Compare commits

...
20 Commits
Author SHA1 Message Date
Gani Georgiev 8be8f3f3cb updated search provider tests 2022-09-18 08:49:51 +03:00
Gani Georgiev 00fd007d50 raised MaxPerPage limit to 400 2022-09-18 08:41:42 +03:00
Gani Georgiev 96bfc69c8e updated ui/dist 2022-09-18 01:57:18 +03:00
Gani Georgiev e542b0d8c5 include only the words selection keymap for code inputs 2022-09-18 01:55:33 +03:00
Gani Georgiev 9814dda8e4 [#478] load selected relation items before the other options 2022-09-18 01:18:54 +03:00
Gani Georgiev 978fdd3ce7 [#478] preserve multiple selection order 2022-09-18 00:29:32 +03:00
Gani Georgiev 9cf89870e7 [#519] improved query performance for relations lookup 2022-09-17 22:55:56 +03:00
Gani Georgiev b8c54568e3 fixed readme typo 2022-09-16 13:24:02 +03:00
Gani Georgiev 843bbf99cc added note about pull requests 2022-09-16 13:06:28 +03:00
Gani Georgiev daffb0f86e [#488] added X-Accel-Buffering:no sse header 2022-09-16 11:19:31 +03:00
Gani Georgiev 1f5c3328e5 [#470] added --pbPublic flag 2022-09-16 11:18:15 +03:00
Gani Georgiev ed5f3b86f5 [#470] don't rely on the cwd and look for pb_public relative to pb_data 2022-09-15 22:52:24 +03:00
Travis Ray 1ba2d14231 [#446] Fixed spelling error on Realtime API page 2022-09-14 21:31:12 +03:00
Gani Georgiev 6cda610ede updated ui deps and generated ui/dist 2022-09-14 20:53:09 +03:00
Gani Georgiev 2fa5233fa6 [#440] try to use the original image format when creating thumbs 2022-09-14 17:12:47 +03:00
Gani Georgiev 030dfc2690 updated ui/dist 2022-09-10 22:54:26 +03:00
Gani Georgiev 8c11e2ef01 [#409] added pocketbase.NewWithConfig factory 2022-09-10 22:53:17 +03:00
Gani Georgiev 4b64e0910b removed commented pb.Bootstrap() code 2022-09-09 14:54:19 +03:00
Gani Georgiev 4a6bc453de updated ui deps and skip creating pb_data on --version or --help execution 2022-09-09 13:58:29 +03:00
Gani Georgiev 96d09a30c4 [#405] updated Google OAuth2 userinfo response data 2022-09-09 09:12:34 +03:00
37 changed files with 667 additions and 546 deletions

No files matched your search

+4
View File
@@ -121,7 +121,11 @@ PocketBase is free and open source project licensed under the [MIT License](LICE
You could help continuing its development by:
- [Contribute to the source code](CONTRIBUTING.md)
> **NB! PR for new features will not be merged until we manage to complete the users refactoring in [#376](https://github.com/pocketbase/pocketbase/issues/376)!**
- [Suggest new features and report issues](https://github.com/pocketbase/pocketbase/issues)
- [Donate a small amount](https://pocketbase.io/support-us)
> Please note that PocketBase was initially created to serve as a new backend for my other open source project - [Presentator](https://presentator.io) (see [#183](https://github.com/presentator/presentator/issues/183)),
+3
View File
@@ -48,6 +48,9 @@ func (api *realtimeApi) connect(c echo.Context) error {
c.Response().Header().Set("Content-Type", "text/event-stream; charset=UTF-8")
c.Response().Header().Set("Cache-Control", "no-store")
c.Response().Header().Set("Connection", "keep-alive")
// https://github.com/pocketbase/pocketbase/discussions/480#discussioncomment-3657640
// https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_buffering
c.Response().Header().Set("X-Accel-Buffering", "no")
event := &core.RealtimeConnectEvent{
HttpContext: c,
+23 -3
View File
@@ -2,20 +2,40 @@ package main
import (
"log"
"os"
"path/filepath"
"strings"
"github.com/labstack/echo/v5"
"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/apis"
"github.com/pocketbase/pocketbase/core"
)
func defaultPublicDir() string {
if strings.HasPrefix(os.Args[0], os.TempDir()) {
// most likely ran with go run
return "./pb_public"
}
return filepath.Join(os.Args[0], "../pb_public")
}
func main() {
app := pocketbase.New()
var publicDirFlag string
// add "--publicDir" option flag
app.RootCmd.PersistentFlags().StringVar(
&publicDirFlag,
"publicDir",
defaultPublicDir(),
"the directory to serve static files",
)
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
// serves static files from the provided public dir (if exists)
subFs := echo.MustSubFS(e.Router.Filesystem, "pb_public")
e.Router.GET("/*", apis.StaticDirectoryHandler(subFs, false))
e.Router.GET("/*", apis.StaticDirectoryHandler(os.DirFS(publicDirFlag), false))
return nil
})
+3
View File
@@ -0,0 +1,3 @@
{
"lockfileVersion": 1
}
+76 -71
View File
@@ -26,50 +26,60 @@ type appWrapper struct {
// PocketBase defines a PocketBase app launcher.
//
// It implements [core.App] via embedding and all of interface methods
// It implements [core.App] via embedding and all of the app interface methods
// could be accessed directly through the instance (eg. PocketBase.DataDir()).
type PocketBase struct {
*appWrapper
// RootCmd is the main cli command
debugFlag bool
dataDirFlag string
encryptionEnvFlag string
hideStartBanner bool
// RootCmd is the main console command
RootCmd *cobra.Command
// console flags
debugFlag bool
dataDirFlag string
encryptionEnv string
// console flag fallback values
defaultDebug bool
defaultDataDir string
defaultEncryptionEnv string
// serve start banner
showStartBanner bool
}
// New creates a new PocketBase instance.
// Config is the PocketBase initialization config struct.
type Config struct {
// optional default values for the console flags
DefaultDebug bool
DefaultDataDir string // if not set, it will fallback to "./pb_data"
DefaultEncryptionEnv string
// hide the default console server info on app startup
HideStartBanner bool
}
// New creates a new PocketBase instance with the default configuration.
// Use [NewWithConfig()] if you want to provide a custom configuration.
//
// Note that the application will not be initialized/bootstrapped yet,
// aka. DB connections, migrations, app settings, etc. will not be accessible.
// Everything will be initialized when Start() is executed.
// If you want to initialize the application before calling Start(),
// then you'll have to manually call Bootstrap().
// Everything will be initialized when [Start()] is executed.
// If you want to initialize the application before calling [Start()],
// then you'll have to manually call [Bootstrap()].
func New() *PocketBase {
// try to find the base executable directory and how it was run
var withGoRun bool
var baseDir string
if strings.HasPrefix(os.Args[0], os.TempDir()) {
// probably ran with go run...
withGoRun = true
baseDir, _ = os.Getwd()
} else {
// probably ran with go build...
withGoRun = false
baseDir = filepath.Dir(os.Args[0])
}
_, isUsingGoRun := inspectRuntime()
defaultDir := filepath.Join(baseDir, "pb_data")
return NewWithConfig(Config{
DefaultDebug: isUsingGoRun,
})
}
// NewWithConfig creates a new PocketBase instance with the provided config.
//
// Note that the application will not be initialized/bootstrapped yet,
// aka. DB connections, migrations, app settings, etc. will not be accessible.
// Everything will be initialized when [Start()] is executed.
// If you want to initialize the application before calling [Start()],
// then you'll have to manually call [Bootstrap()].
func NewWithConfig(config Config) *PocketBase {
// initialize a default data directory based on the executable baseDir
if config.DefaultDataDir == "" {
baseDir, _ := inspectRuntime()
config.DefaultDataDir = filepath.Join(baseDir, "pb_data")
}
pb := &PocketBase{
RootCmd: &cobra.Command{
@@ -84,46 +94,31 @@ func New() *PocketBase {
DisableDefaultCmd: true,
},
},
defaultDebug: withGoRun,
defaultDataDir: defaultDir,
defaultEncryptionEnv: "",
showStartBanner: true,
debugFlag: config.DefaultDebug,
dataDirFlag: config.DefaultDataDir,
encryptionEnvFlag: config.DefaultEncryptionEnv,
hideStartBanner: config.HideStartBanner,
}
// parse base flags
// (errors are ignored, since the full flags parsing happens on Execute())
pb.eagerParseFlags()
pb.eagerParseFlags(config)
// initialize the app instance
pb.appWrapper = &appWrapper{core.NewBaseApp(
pb.dataDirFlag,
pb.encryptionEnv,
pb.encryptionEnvFlag,
pb.debugFlag,
)}
return pb
}
// hide the default help command (allow only `--help` flag)
pb.RootCmd.SetHelpCommand(&cobra.Command{Hidden: true})
// DefaultDebug sets the default --debug flag value.
func (pb *PocketBase) DefaultDebug(val bool) *PocketBase {
pb.defaultDebug = val
return pb
}
// hook the bootstrap process
pb.RootCmd.PersistentPreRunE = func(cmd *cobra.Command, args []string) error {
return pb.Bootstrap()
}
// DefaultDataDir sets the default --dir flag value.
func (pb *PocketBase) DefaultDataDir(val string) *PocketBase {
pb.defaultDataDir = val
return pb
}
// DefaultEncryptionEnv sets the default --encryptionEnv flag value.
func (pb *PocketBase) DefaultEncryptionEnv(val string) *PocketBase {
pb.defaultEncryptionEnv = val
return pb
}
// ShowStartBanner shows/hides the web server start banner.
func (pb *PocketBase) ShowStartBanner(val bool) *PocketBase {
pb.showStartBanner = val
return pb
}
@@ -131,7 +126,7 @@ func (pb *PocketBase) ShowStartBanner(val bool) *PocketBase {
// commands (serve, migrate, version) and executes pb.RootCmd.
func (pb *PocketBase) Start() error {
// register system commands
pb.RootCmd.AddCommand(cmd.NewServeCommand(pb, pb.showStartBanner))
pb.RootCmd.AddCommand(cmd.NewServeCommand(pb, !pb.hideStartBanner))
pb.RootCmd.AddCommand(cmd.NewMigrateCommand(pb))
return pb.Execute()
@@ -143,10 +138,6 @@ func (pb *PocketBase) Start() error {
// This method differs from pb.Start() by not registering the default
// system commands!
func (pb *PocketBase) Execute() error {
if err := pb.Bootstrap(); err != nil {
return err
}
var wg sync.WaitGroup
wg.Add(1)
@@ -180,27 +171,41 @@ func (pb *PocketBase) onTerminate() error {
// eagerParseFlags parses the global app flags before calling pb.RootCmd.Execute().
// so we can have all PocketBase flags ready for use on initialization.
func (pb *PocketBase) eagerParseFlags() error {
func (pb *PocketBase) eagerParseFlags(config Config) error {
pb.RootCmd.PersistentFlags().StringVar(
&pb.dataDirFlag,
"dir",
pb.defaultDataDir,
config.DefaultDataDir,
"the PocketBase data directory",
)
pb.RootCmd.PersistentFlags().StringVar(
&pb.encryptionEnv,
&pb.encryptionEnvFlag,
"encryptionEnv",
pb.defaultEncryptionEnv,
"the env variable whose value of 32 chars will be used \nas encryption key for the app settings (default none)",
config.DefaultEncryptionEnv,
"the env variable whose value of 32 characters will be used \nas encryption key for the app settings (default none)",
)
pb.RootCmd.PersistentFlags().BoolVar(
&pb.debugFlag,
"debug",
pb.defaultDebug,
config.DefaultDebug,
"enable debug mode, aka. showing more detailed logs",
)
return pb.RootCmd.ParseFlags(os.Args[1:])
}
// tries to find the base executable directory and how it was run
func inspectRuntime() (baseDir string, withGoRun bool) {
if strings.HasPrefix(os.Args[0], os.TempDir()) {
// probably ran with go run
withGoRun = true
baseDir, _ = os.Getwd()
} else {
// probably ran with go build
withGoRun = false
baseDir = filepath.Dir(os.Args[0])
}
return
}
+82 -36
View File
@@ -6,14 +6,19 @@ import (
)
func TestNew(t *testing.T) {
testDir := "./pb_test_data_dir"
defer os.RemoveAll(testDir)
// copy os.Args
originalArgs := []string{}
copy(originalArgs, os.Args)
defer func() {
// restore os.Args
copy(os.Args, originalArgs)
}()
// reset os.Args
// change os.Args
os.Args = os.Args[0:1]
os.Args = append(
os.Args,
"--dir="+testDir,
"--dir=test_dir",
"--encryptionEnv=test_encryption_env",
"--debug=true",
)
@@ -32,8 +37,8 @@ func TestNew(t *testing.T) {
t.Fatal("Expected appWrapper to be initialized, got nil")
}
if app.DataDir() != testDir {
t.Fatalf("Expected app.DataDir() %q, got %q", testDir, app.DataDir())
if app.DataDir() != "test_dir" {
t.Fatalf("Expected app.DataDir() %q, got %q", "test_dir", app.DataDir())
}
if app.EncryptionEnv() != "test_encryption_env" {
@@ -45,52 +50,93 @@ func TestNew(t *testing.T) {
}
}
func TestDefaultDebug(t *testing.T) {
app := New()
func TestNewWithConfig(t *testing.T) {
app := NewWithConfig(Config{
DefaultDebug: true,
DefaultDataDir: "test_dir",
DefaultEncryptionEnv: "test_encryption_env",
HideStartBanner: true,
})
app.DefaultDebug(true)
if app.defaultDebug != true {
t.Fatalf("Expected defaultDebug %v, got %v", true, app.defaultDebug)
if app == nil {
t.Fatal("Expected initialized PocketBase instance, got nil")
}
app.DefaultDebug(false)
if app.defaultDebug != false {
t.Fatalf("Expected defaultDebug %v, got %v", false, app.defaultDebug)
if app.RootCmd == nil {
t.Fatal("Expected RootCmd to be initialized, got nil")
}
if app.appWrapper == nil {
t.Fatal("Expected appWrapper to be initialized, got nil")
}
if app.hideStartBanner != true {
t.Fatal("Expected app.hideStartBanner to be true, got false")
}
if app.DataDir() != "test_dir" {
t.Fatalf("Expected app.DataDir() %q, got %q", "test_dir", app.DataDir())
}
if app.EncryptionEnv() != "test_encryption_env" {
t.Fatalf("Expected app.DataDir() %q, got %q", "test_encryption_env", app.EncryptionEnv())
}
if app.IsDebug() != true {
t.Fatal("Expected app.IsDebug() true, got false")
}
}
func TestDefaultDataDir(t *testing.T) {
app := New()
func TestNewWithConfigAndFlags(t *testing.T) {
// copy os.Args
originalArgs := []string{}
copy(originalArgs, os.Args)
defer func() {
// restore os.Args
copy(os.Args, originalArgs)
}()
expected := "test_default"
// change os.Args
os.Args = os.Args[0:1]
os.Args = append(
os.Args,
"--dir=test_dir_flag",
"--encryptionEnv=test_encryption_env_flag",
"--debug=false",
)
app.DefaultDataDir(expected)
if app.defaultDataDir != expected {
t.Fatalf("Expected defaultDataDir %v, got %v", expected, app.defaultDataDir)
app := NewWithConfig(Config{
DefaultDebug: true,
DefaultDataDir: "test_dir",
DefaultEncryptionEnv: "test_encryption_env",
HideStartBanner: true,
})
if app == nil {
t.Fatal("Expected initialized PocketBase instance, got nil")
}
}
func TestDefaultEncryptionEnv(t *testing.T) {
app := New()
if app.RootCmd == nil {
t.Fatal("Expected RootCmd to be initialized, got nil")
}
expected := "test_env"
if app.appWrapper == nil {
t.Fatal("Expected appWrapper to be initialized, got nil")
}
app.DefaultEncryptionEnv(expected)
if app.defaultEncryptionEnv != expected {
t.Fatalf("Expected defaultEncryptionEnv %v, got %v", expected, app.defaultEncryptionEnv)
if app.hideStartBanner != true {
t.Fatal("Expected app.hideStartBanner to be true, got false")
}
}
func TestShowStartBanner(t *testing.T) {
app := New()
if app.DataDir() != "test_dir_flag" {
t.Fatalf("Expected app.DataDir() %q, got %q", "test_dir_flag", app.DataDir())
}
app.ShowStartBanner(true)
if app.showStartBanner != true {
t.Fatalf("Expected showStartBanner %v, got %v", true, app.showStartBanner)
if app.EncryptionEnv() != "test_encryption_env_flag" {
t.Fatalf("Expected app.DataDir() %q, got %q", "test_encryption_env_flag", app.EncryptionEnv())
}
app.ShowStartBanner(false)
if app.showStartBanner != false {
t.Fatalf("Expected showStartBanner %v, got %v", false, app.showStartBanner)
if app.IsDebug() != false {
t.Fatal("Expected app.IsDebug() false, got true")
}
}
+34 -27
View File
@@ -96,7 +96,7 @@ func (r *RecordFieldResolver) Resolve(fieldName string) (resultName string, plac
props := strings.Split(fieldName, ".")
currentCollectionName := r.baseCollection.Name
currentTableAlias := currentCollectionName
currentTableAlias := inflector.Columnify(currentCollectionName)
// check for @collection field (aka. non-relational join)
// must be in the format "@collection.COLLECTION_NAME.FIELD[.FIELD2....]"
@@ -106,14 +106,14 @@ func (r *RecordFieldResolver) Resolve(fieldName string) (resultName string, plac
}
currentCollectionName = props[1]
currentTableAlias = "__collection_" + currentCollectionName
currentTableAlias = inflector.Columnify("__collection_" + currentCollectionName)
collection, err := r.loadCollection(currentCollectionName)
if err != nil {
return "", nil, fmt.Errorf("Failed to load collection %q from field path %q.", currentCollectionName, fieldName)
}
r.addJoin(collection.Name, currentTableAlias, nil)
r.addJoin(inflector.Columnify(collection.Name), currentTableAlias, nil)
props = props[2:] // leave only the collection fields
} else if props[0] == "@request" {
@@ -129,7 +129,7 @@ func (r *RecordFieldResolver) Resolve(fieldName string) (resultName string, plac
// resolve the profile collection fields
currentCollectionName = models.ProfileCollectionName
currentTableAlias = "__user_" + currentCollectionName
currentTableAlias = inflector.Columnify("__user_" + currentCollectionName)
collection, err := r.loadCollection(currentCollectionName)
if err != nil {
@@ -146,12 +146,16 @@ func (r *RecordFieldResolver) Resolve(fieldName string) (resultName string, plac
}
// join the profile collection
r.addJoin(collection.Name, currentTableAlias, dbx.NewExp(fmt.Sprintf(
// aka. profiles.id = profileId
"[[%s.id]] = %s",
inflector.Columnify(currentTableAlias),
profileIdPlaceholder,
), profileIdPlaceholderParam))
r.addJoin(
inflector.Columnify(collection.Name),
currentTableAlias,
dbx.NewExp(fmt.Sprintf(
// aka. profiles.id = profileId
"[[%s.id]] = %s",
currentTableAlias,
profileIdPlaceholder,
), profileIdPlaceholderParam),
)
props = props[3:] // leave only the profile fields
}
@@ -168,7 +172,7 @@ func (r *RecordFieldResolver) Resolve(fieldName string) (resultName string, plac
// base model prop (always available but not part of the collection schema)
if list.ExistInSlice(prop, baseModelFields) {
return fmt.Sprintf("[[%s.%s]]", inflector.Columnify(currentTableAlias), inflector.Columnify(prop)), nil, nil
return fmt.Sprintf("[[%s.%s]]", currentTableAlias, inflector.Columnify(prop)), nil, nil
}
field := collection.Schema.GetFieldByName(prop)
@@ -178,7 +182,7 @@ func (r *RecordFieldResolver) Resolve(fieldName string) (resultName string, plac
// last prop
if i == totalProps-1 {
return fmt.Sprintf("[[%s.%s]]", inflector.Columnify(currentTableAlias), inflector.Columnify(prop)), nil, nil
return fmt.Sprintf("[[%s.%s]]", currentTableAlias, inflector.Columnify(prop)), nil, nil
}
// check if it is a relation field
@@ -198,20 +202,27 @@ func (r *RecordFieldResolver) Resolve(fieldName string) (resultName string, plac
if relErr != nil {
return "", nil, fmt.Errorf("Failed to find field %q collection.", prop)
}
cleanFieldName := inflector.Columnify(field.Name)
newCollectionName := relCollection.Name
newTableAlias := currentTableAlias + "_" + field.Name
newTableAlias := currentTableAlias + "_" + cleanFieldName
jeTable := currentTableAlias + "_" + cleanFieldName + "_je"
jePair := currentTableAlias + "." + cleanFieldName
r.addJoin(
newCollectionName,
fmt.Sprintf(
// note: the case is used to normalize value access for single and multiple relations.
`json_each(CASE WHEN json_valid([[%s]]) THEN [[%s]] ELSE json_array([[%s]]) END)`,
jePair, jePair, jePair,
),
jeTable,
nil,
)
r.addJoin(
inflector.Columnify(newCollectionName),
newTableAlias,
dbx.NewExp(fmt.Sprintf(
// 'LIKE' expr is used to handle the case when the reference field supports multiple values (aka. is json array)
"[[%s.%s]] LIKE ('%%' || [[%s.%s]] || '%%')",
inflector.Columnify(currentTableAlias),
inflector.Columnify(field.Name),
inflector.Columnify(newTableAlias),
inflector.Columnify("id"),
)),
dbx.NewExp(fmt.Sprintf("[[%s.id]] = [[%s.value]]", newTableAlias, jeTable)),
)
currentCollectionName = newCollectionName
@@ -296,11 +307,7 @@ func (r *RecordFieldResolver) loadCollection(collectionNameOrId string) (*models
}
func (r *RecordFieldResolver) addJoin(tableName string, tableAlias string, on dbx.Expression) {
tableExpr := fmt.Sprintf(
"%s %s",
inflector.Columnify(tableName),
inflector.Columnify(tableAlias),
)
tableExpr := fmt.Sprintf("%s %s", tableName, tableAlias)
join := join{
id: tableAlias,
+10 -10
View File
@@ -52,32 +52,32 @@ func TestRecordFieldResolverUpdateQuery(t *testing.T) {
{
"single rel",
[]string{"onerel.title"},
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo4` `demo4_onerel` ON [[demo4.onerel]] LIKE ('%' || [[demo4_onerel.id]] || '%')",
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.onerel]]) THEN [[demo4.onerel]] ELSE json_array([[demo4.onerel]]) END) `demo4_onerel_je` LEFT JOIN `demo4` `demo4_onerel` ON [[demo4_onerel.id]] = [[demo4_onerel_je.value]]",
},
{
"non-relation field + single rel",
[]string{"title", "onerel.title"},
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo4` `demo4_onerel` ON [[demo4.onerel]] LIKE ('%' || [[demo4_onerel.id]] || '%')",
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.onerel]]) THEN [[demo4.onerel]] ELSE json_array([[demo4.onerel]]) END) `demo4_onerel_je` LEFT JOIN `demo4` `demo4_onerel` ON [[demo4_onerel.id]] = [[demo4_onerel_je.value]]",
},
{
"nested incomplete rels",
[]string{"manyrels.onerel"},
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo4` `demo4_manyrels` ON [[demo4.manyrels]] LIKE ('%' || [[demo4_manyrels.id]] || '%')",
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.manyrels]]) THEN [[demo4.manyrels]] ELSE json_array([[demo4.manyrels]]) END) `demo4_manyrels_je` LEFT JOIN `demo4` `demo4_manyrels` ON [[demo4_manyrels.id]] = [[demo4_manyrels_je.value]]",
},
{
"nested complete rels",
[]string{"manyrels.onerel.title"},
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo4` `demo4_manyrels` ON [[demo4.manyrels]] LIKE ('%' || [[demo4_manyrels.id]] || '%') LEFT JOIN `demo4` `demo4_manyrels_onerel` ON [[demo4_manyrels.onerel]] LIKE ('%' || [[demo4_manyrels_onerel.id]] || '%')",
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.manyrels]]) THEN [[demo4.manyrels]] ELSE json_array([[demo4.manyrels]]) END) `demo4_manyrels_je` LEFT JOIN `demo4` `demo4_manyrels` ON [[demo4_manyrels.id]] = [[demo4_manyrels_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_manyrels.onerel]]) THEN [[demo4_manyrels.onerel]] ELSE json_array([[demo4_manyrels.onerel]]) END) `demo4_manyrels_onerel_je` LEFT JOIN `demo4` `demo4_manyrels_onerel` ON [[demo4_manyrels_onerel.id]] = [[demo4_manyrels_onerel_je.value]]",
},
{
"repeated nested rels",
[]string{"manyrels.onerel.manyrels.onerel.title"},
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo4` `demo4_manyrels` ON [[demo4.manyrels]] LIKE ('%' || [[demo4_manyrels.id]] || '%') LEFT JOIN `demo4` `demo4_manyrels_onerel` ON [[demo4_manyrels.onerel]] LIKE ('%' || [[demo4_manyrels_onerel.id]] || '%') LEFT JOIN `demo4` `demo4_manyrels_onerel_manyrels` ON [[demo4_manyrels_onerel.manyrels]] LIKE ('%' || [[demo4_manyrels_onerel_manyrels.id]] || '%') LEFT JOIN `demo4` `demo4_manyrels_onerel_manyrels_onerel` ON [[demo4_manyrels_onerel_manyrels.onerel]] LIKE ('%' || [[demo4_manyrels_onerel_manyrels_onerel.id]] || '%')",
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.manyrels]]) THEN [[demo4.manyrels]] ELSE json_array([[demo4.manyrels]]) END) `demo4_manyrels_je` LEFT JOIN `demo4` `demo4_manyrels` ON [[demo4_manyrels.id]] = [[demo4_manyrels_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_manyrels.onerel]]) THEN [[demo4_manyrels.onerel]] ELSE json_array([[demo4_manyrels.onerel]]) END) `demo4_manyrels_onerel_je` LEFT JOIN `demo4` `demo4_manyrels_onerel` ON [[demo4_manyrels_onerel.id]] = [[demo4_manyrels_onerel_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_manyrels_onerel.manyrels]]) THEN [[demo4_manyrels_onerel.manyrels]] ELSE json_array([[demo4_manyrels_onerel.manyrels]]) END) `demo4_manyrels_onerel_manyrels_je` LEFT JOIN `demo4` `demo4_manyrels_onerel_manyrels` ON [[demo4_manyrels_onerel_manyrels.id]] = [[demo4_manyrels_onerel_manyrels_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_manyrels_onerel_manyrels.onerel]]) THEN [[demo4_manyrels_onerel_manyrels.onerel]] ELSE json_array([[demo4_manyrels_onerel_manyrels.onerel]]) END) `demo4_manyrels_onerel_manyrels_onerel_je` LEFT JOIN `demo4` `demo4_manyrels_onerel_manyrels_onerel` ON [[demo4_manyrels_onerel_manyrels_onerel.id]] = [[demo4_manyrels_onerel_manyrels_onerel_je.value]]",
},
{
"multiple rels",
[]string{"manyrels.title", "onerel.onefile"},
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo4` `demo4_manyrels` ON [[demo4.manyrels]] LIKE ('%' || [[demo4_manyrels.id]] || '%') LEFT JOIN `demo4` `demo4_onerel` ON [[demo4.onerel]] LIKE ('%' || [[demo4_onerel.id]] || '%')",
"SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.manyrels]]) THEN [[demo4.manyrels]] ELSE json_array([[demo4.manyrels]]) END) `demo4_manyrels_je` LEFT JOIN `demo4` `demo4_manyrels` ON [[demo4_manyrels.id]] = [[demo4_manyrels_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4.onerel]]) THEN [[demo4.onerel]] ELSE json_array([[demo4.onerel]]) END) `demo4_onerel_je` LEFT JOIN `demo4` `demo4_onerel` ON [[demo4_onerel.id]] = [[demo4_onerel_je.value]]",
},
{
"@collection join",
@@ -95,12 +95,12 @@ func TestRecordFieldResolverUpdateQuery(t *testing.T) {
"^" +
regexp.QuoteMeta("SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `profiles` `__user_profiles` ON [[__user_profiles.id]] =") +
" {:.*} " +
regexp.QuoteMeta("LEFT JOIN `profiles` `__user_profiles_rel` ON [[__user_profiles.rel]] LIKE ('%' || [[__user_profiles_rel.id]] || '%')") +
regexp.QuoteMeta("LEFT JOIN json_each(CASE WHEN json_valid([[__user_profiles.rel]]) THEN [[__user_profiles.rel]] ELSE json_array([[__user_profiles.rel]]) END) `__user_profiles_rel_je` LEFT JOIN `profiles` `__user_profiles_rel` ON [[__user_profiles_rel.id]] = [[__user_profiles_rel_je.value]]") +
"$",
},
}
for i, s := range scenarios {
for _, s := range scenarios {
query := app.Dao().RecordQuery(collection)
r := resolvers.NewRecordFieldResolver(app.Dao(), collection, requestData)
@@ -109,14 +109,14 @@ func TestRecordFieldResolverUpdateQuery(t *testing.T) {
}
if err := r.UpdateQuery(query); err != nil {
t.Errorf("(%d) UpdateQuery failed with error %v", i, err)
t.Errorf("(%s) UpdateQuery failed with error %v", s.name, err)
continue
}
rawQuery := query.Build().SQL()
if !list.ExistInSliceWithRegex(rawQuery, []string{s.expectQuery}) {
t.Errorf("(%d) Expected query\n %v \ngot:\n %v", i, s.expectQuery, rawQuery)
t.Errorf("(%s) Expected query\n %v \ngot:\n %v", s.name, s.expectQuery, rawQuery)
}
}
}
+7 -8
View File
@@ -29,12 +29,11 @@ func NewGoogleProvider() *Google {
// FetchAuthUser returns an AuthUser instance based the Google's user api.
func (p *Google) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) {
// https://cloud.google.com/identity-platform/docs/reference/rest/v1/UserInfo
rawData := struct {
LocalId string `json:"localId"`
DisplayName string `json:"displayName"`
Email string `json:"email"`
PhotoUrl string `json:"photoUrl"`
Id string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Picture string `json:"picture"`
}{}
if err := p.FetchRawUserData(token, &rawData); err != nil {
@@ -42,10 +41,10 @@ func (p *Google) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) {
}
user := &AuthUser{
Id: rawData.LocalId,
Name: rawData.DisplayName,
Id: rawData.Id,
Name: rawData.Name,
Email: rawData.Email,
AvatarUrl: rawData.PhotoUrl,
AvatarUrl: rawData.Picture,
}
return user, nil
+8 -1
View File
@@ -305,8 +305,15 @@ func (s *System) CreateThumb(originalKey string, thumbKey, thumbSize string) err
return writerErr
}
// try to detect the thumb format based on the original file name
// (fallbacks to png on error)
format, err := imaging.FormatFromFilename(thumbKey)
if err != nil {
format = imaging.PNG
}
// thumb encode (aka. upload)
if err := imaging.Encode(w, thumbImg, imaging.PNG); err != nil {
if err := imaging.Encode(w, thumbImg, format); err != nil {
w.Close()
return err
}
+1 -1
View File
@@ -13,7 +13,7 @@ import (
const DefaultPerPage int = 30
// MaxPerPage specifies the maximum allowed search result items returned in a single page.
const MaxPerPage int = 200
const MaxPerPage int = 400
// url search query params
const (
+3 -3
View File
@@ -289,7 +289,7 @@ func TestProviderExecNonEmptyQuery(t *testing.T) {
`{"page":1,"perPage":` + fmt.Sprint(MaxPerPage) + `,"totalItems":1,"totalPages":1,"items":[{"test1":2,"test2":"test2.2","test3":""}]}`,
[]string{
"SELECT COUNT(*) FROM `test` WHERE ((NOT (`test1` IS NULL)) AND (COALESCE(test2, '') != COALESCE(null, ''))) AND (test1 >= 2) ORDER BY `test1` ASC, `test2` DESC",
"SELECT * FROM `test` WHERE ((NOT (`test1` IS NULL)) AND (COALESCE(test2, '') != COALESCE(null, ''))) AND (test1 >= 2) ORDER BY `test1` ASC, `test2` DESC LIMIT 200",
"SELECT * FROM `test` WHERE ((NOT (`test1` IS NULL)) AND (COALESCE(test2, '') != COALESCE(null, ''))) AND (test1 >= 2) ORDER BY `test1` ASC, `test2` DESC LIMIT 400",
},
},
// valid sort and filter fields (zero results)
@@ -437,9 +437,9 @@ func TestProviderParseAndExec(t *testing.T) {
},
// valid query params
{
"page=3&perPage=555&filter=test1>1&sort=-test2,test3",
"page=3&perPage=9999&filter=test1>1&sort=-test2,test3",
false,
`{"page":1,"perPage":200,"totalItems":1,"totalPages":1,"items":[{"test1":2,"test2":"test2.2","test3":""}]}`,
`{"page":1,"perPage":400,"totalItems":1,"totalPages":1,"items":[{"test1":2,"test2":"test2.2","test3":""}]}`,
},
}
+1 -1
View File
@@ -4,4 +4,4 @@ PB_PROFILE_COLLECTION = "profiles"
PB_INSTALLER_PARAM = "installer"
PB_RULES_SYNTAX_DOCS = "https://pocketbase.io/docs/manage-collections#rules-filters-syntax"
PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases"
PB_VERSION = "v0.7.0"
PB_VERSION = "v0.7.4"
@@ -1,13 +1,13 @@
import{S as me,i as Te,s as Se,e as be,f as Pe,N as SO,g as Re,y as bO,o as xe,J as ke,L as Xe,M as ye}from"./index.bdac21fd.js";import{P as Ze,N as We,u as je,D as we,v as oO,T as C,I as KO,w as lO,x as o,y as _e,L as QO,z as cO,A as U,B as uO,F as HO,G as dO,H as v,J as ve,K as qe,E as X,M as _,O as ze,Q as Ge,R as m,U as Ce,a as W,h as Ue,b as Ye,c as Ve,d as Ee,e as Ie,s as Ae,f as Ne,g as De,i as Le,r as Fe,j as Je,k as Me,l as Be,m as Ke,n as He,o as Ot,p as et,q as tt,t as PO,C as q}from"./index.c4d07677.js";class I{constructor(O,e,a,i,r,s,n,Q,u,d=0,l){this.p=O,this.stack=e,this.state=a,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=Q,this.curContext=u,this.lookAhead=d,this.parent=l}toString(){return`[${this.stack.filter((O,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,e,a=0){let i=O.parser.context;return new I(O,[],e,a,a,0,[],0,i?new RO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let e=O>>19,a=O&65535,{parser:i}=this.p,r=i.dynamicPrecedence(a);if(r&&(this.score+=r),e==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),a<i.minRepeatTerm&&this.storeNode(a,this.reducePos,this.reducePos,4,!0),this.reduceContext(a,this.reducePos);return}let s=this.stack.length-(e-1)*3-(O&262144?6:0),n=this.stack[s-2],Q=this.stack[s-1],u=this.bufferBase+this.buffer.length-Q;if(a<i.minRepeatTerm||O&131072){let d=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(a,n,d,u+4,!0)}if(O&262144)this.state=this.stack[s];else{let d=this.stack[s-3];this.state=i.getGoto(d,a,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,e,a,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,n=this.buffer.length;if(n==0&&s.parent&&(n=s.bufferBase-s.parent.bufferBase,s=s.parent),n>0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(e==a)return;if(s.buffer[n-2]>=e){s.buffer[n-2]=a;return}}}if(!r||this.pos==a)this.buffer.push(O,e,a,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>a;)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,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=e,this.buffer[s+2]=a,this.buffer[s+3]=i}}shift(O,e,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if((O&262144)==0){let r=O,{parser:s}=this.p;(a>this.pos||e<=s.maxNode)&&(this.pos=a,s.stateFlag(r,1)||(this.reducePos=a)),this.pushState(r,i),this.shiftContext(e,i),e<=s.maxNode&&this.buffer.push(e,i,a,4)}else this.pos=a,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,a,4)}apply(O,e,a){O&65536?this.reduce(O):this.shift(O,e,a)}useNode(O,e){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(e,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,e=O.buffer.length;for(;e>0&&O.buffer[e-2]>O.reducePos;)e-=4;let a=O.buffer.slice(e),i=O.bufferBase+e;for(;O&&i==O.bufferBase;)O=O.parent;return new I(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,e){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,e,4),this.storeNode(0,this.pos,e,a?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(O){for(let e=new at(this);;){let a=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,O);if((a&65536)==0)return!0;if(a==0)return!1;e.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;r<e.length;r+=2)(s=e[r+1])!=this.state&&this.p.parser.hasAction(s,O)&&i.push(e[r],s);if(this.stack.length<120)for(let r=0;i.length<4<<1&&r<e.length;r+=2){let s=e[r+1];i.some((n,Q)=>Q&1&&n==s)||i.push(e[r],s)}e=i}let a=[];for(let i=0;i<e.length&&a.length<4;i+=2){let r=e[i+1];if(r==this.state)continue;let s=this.split();s.pushState(r,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(e[i],this.pos),s.score-=200,a.push(s)}return a}forceReduce(){let O=this.p.parser.stateSlot(this.state,5);if((O&65536)==0)return!1;let{parser:e}=this.p;if(!e.validAction(this.state,O)){let a=O>>19,i=O&65535,r=this.stack.length-a*3;if(r<0||e.getGoto(this.stack[r],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{paLine truncated
import{S as me,i as Te,s as Se,e as be,f as Pe,N as SO,g as Re,y as bO,o as xe,J as ke,L as Xe,M as ye}from"./index.bbd53e70.js";import{P as Ze,N as We,u as je,D as we,v as oO,T as C,I as KO,w as lO,x as o,y as _e,L as QO,z as cO,A as U,B as uO,F as HO,G as dO,H as v,J as ve,K as qe,E as X,M as _,O as ze,Q as Ge,R as T,U as Ce,a as W,h as Ue,b as Ye,c as Ve,d as Ee,e as Ie,s as Ae,f as Ne,g as De,i as Le,r as Fe,j as Je,k as Me,l as Be,m as Ke,n as He,o as Ot,p as et,q as tt,t as PO,C as q}from"./index.2148ad18.js";class I{constructor(O,e,a,i,r,s,n,Q,u,d=0,l){this.p=O,this.stack=e,this.state=a,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=Q,this.curContext=u,this.lookAhead=d,this.parent=l}toString(){return`[${this.stack.filter((O,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,e,a=0){let i=O.parser.context;return new I(O,[],e,a,a,0,[],0,i?new RO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let e=O>>19,a=O&65535,{parser:i}=this.p,r=i.dynamicPrecedence(a);if(r&&(this.score+=r),e==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),a<i.minRepeatTerm&&this.storeNode(a,this.reducePos,this.reducePos,4,!0),this.reduceContext(a,this.reducePos);return}let s=this.stack.length-(e-1)*3-(O&262144?6:0),n=this.stack[s-2],Q=this.stack[s-1],u=this.bufferBase+this.buffer.length-Q;if(a<i.minRepeatTerm||O&131072){let d=i.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(a,n,d,u+4,!0)}if(O&262144)this.state=this.stack[s];else{let d=this.stack[s-3];this.state=i.getGoto(d,a,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,e,a,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,n=this.buffer.length;if(n==0&&s.parent&&(n=s.bufferBase-s.parent.bufferBase,s=s.parent),n>0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(e==a)return;if(s.buffer[n-2]>=e){s.buffer[n-2]=a;return}}}if(!r||this.pos==a)this.buffer.push(O,e,a,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>a;)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,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=e,this.buffer[s+2]=a,this.buffer[s+3]=i}}shift(O,e,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if((O&262144)==0){let r=O,{parser:s}=this.p;(a>this.pos||e<=s.maxNode)&&(this.pos=a,s.stateFlag(r,1)||(this.reducePos=a)),this.pushState(r,i),this.shiftContext(e,i),e<=s.maxNode&&this.buffer.push(e,i,a,4)}else this.pos=a,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,a,4)}apply(O,e,a){O&65536?this.reduce(O):this.shift(O,e,a)}useNode(O,e){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(e,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,e=O.buffer.length;for(;e>0&&O.buffer[e-2]>O.reducePos;)e-=4;let a=O.buffer.slice(e),i=O.bufferBase+e;for(;O&&i==O.bufferBase;)O=O.parent;return new I(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,e){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,e,4),this.storeNode(0,this.pos,e,a?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(O){for(let e=new at(this);;){let a=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,O);if((a&65536)==0)return!0;if(a==0)return!1;e.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;r<e.length;r+=2)(s=e[r+1])!=this.state&&this.p.parser.hasAction(s,O)&&i.push(e[r],s);if(this.stack.length<120)for(let r=0;i.length<4<<1&&r<e.length;r+=2){let s=e[r+1];i.some((n,Q)=>Q&1&&n==s)||i.push(e[r],s)}e=i}let a=[];for(let i=0;i<e.length&&a.length<4;i+=2){let r=e[i+1];if(r==this.state)continue;let s=this.split();s.pushState(r,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(e[i],this.pos),s.score-=200,a.push(s)}return a}forceReduce(){let O=this.p.parser.stateSlot(this.state,5);if((O&65536)==0)return!1;let{parser:e}=this.p;if(!e.validAction(this.state,O)){let a=O>>19,i=O&65535,r=this.stack.length-a*3;if(r<0||e.getGoto(this.stack[r],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{paLine truncated
\${}
} catch (\${error}) {
\${}
}`,{label:"try",detail:"/ catch block",type:"keyword"}),m("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),m(`if (\${}) {
}`,{label:"try",detail:"/ catch block",type:"keyword"}),T("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),T(`if (\${}) {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),m(`class \${name} {
}`,{label:"if",detail:"/ else block",type:"keyword"}),T(`class \${name} {
constructor(\${params}) {
\${}
}
}`,{label:"class",detail:"definition",type:"keyword"}),m('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),m('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],LO=new Ce,ue=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function j(t){return(O,e)=>{let a=O.node.getChild("VariableDefinition");return a&&e(a,t),!0}}const Va=["FunctionDeclaration"],Ea={FunctionDeclaration:j("function"),ClassDeclaration:j("class"),ClassExpression:()=>!0,EnumDeclaration:j("constant"),TypeAliasDeclaration:j("type"),NamespaceDeclaration:j("namespace"),VariableDefinition(t,O){t.matchContext(Va)||O(t,"variable")},TypeDefinition(t,O){O(t,"type")},__proto__:null};function de(t,O){let e=LO.get(O);if(e)return e;let a=[],i=!0;function r(s,n){let Q=t.sliceString(s.from,s.to);a.push({label:Q,type:n})}return O.cursor(KO.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let n=Ea[s.name];if(n&&n(s,r)||ue.has(s.name))return!1}else if(s.to-s.from>8192){for(let n of de(t,s.node))a.push(n);return!1}}),LO.set(O,a),a}const FO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,$e=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function Ia(t){let O=v(t.state).resolveInner(t.pos,-1);if($e.indexOf(O.name)>-1)return null;let e=O.to-O.from<20&&FO.test(t.state.sliceDoc(O.from,O.to));if(!e&&!t.explicit)return null;let a=[];for(let i=O;i;i=i.parent)ue.has(i.name)&&(a=a.concat(de(t.state.doc,i)));return{options:a,from:e?O.from:t.pos,validFor:FO}}const k=QO.define({parser:Ua.configure({props:[cO.add({IfStatement:U({except:/^\s*({|else\b)/}),TryStatement:U({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ze,SwitchBody:t=>{let O=t.textAfter,e=/^\s*\}/.test(O),a=/^\s*(case|default)\b/.test(O);return t.baseIndent+(e?0:a?1:2)*t.unit},Block:Ge({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":U({except:/^{/}),JSXElement(t){let O=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(O?0:t.unit)},JSXEscape(t){let O=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(O?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),uO.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":HO,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Aa=k.configure({dialect:"ts"}),Na=k.configure({dialect:"jsx"}),Da=k.configure({dialect:"jsx ts"}),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(t=>({label:t,type:"keyword"}));function he(t={}){let O=t.jsx?t.typescript?Da:Na:t.typescript?Aa:k;return new dO(O,[k.data.of({autocomplete:ve($e,qe(Ya.concat(La)))}),k.data.of({autocomplete:Ia}),t.jsx?Ja:[]])}function JO(t,O,e=t.length){if(!O)return"";let a=O.getChild("JSXIdentifier");return a?t.sliceString(a.from,Math.min(a.to,e)):""}const Fa=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Ja=X.inputHandler.of((t,O,e,a)=>{if((Fa?t.composing:t.compositionStarted)||t.state.readOnly||O!=e||a!=">"&&a!="/"||!k.isActiveAt(t.state,O,-1))return!1;let{state:i}=t,r=i.changeByRange(s=>{var n,Q,u;let{head:d}=s,l=v(i).resolveInner(d,-1),$;if(l.name=="JSXStartTag"&&(l=l.parent),a==">"&&l.name=="JSXFragmentTag")return{range:_.cursor(d+1),changes:{from:d,insert:"><>"}};if(a==">"&&l.name=="JSXIdentifier"){if(((Q=(n=l.parent)===null||n===void 0?void 0:n.lastChild)===null||Q===void 0?void 0:Q.name)!="JSXEndTag"&&($=JO(i.doc,l.parent,d)))return{range:_.cursor(d+1),changes:{from:d,insert:`></${$}>`}}}else if(a=="/"&&l.name=="JSXFragmentTag"){let h=l.parent,p=h==null?void 0:h.parent;if(h.from==d-1&&((u=p.lastChild)===null||u===void 0?void 0:u.name)!="JSXEndTag"&&($=JO(i.doc,p==null?void 0:p.firstChild,d))){let b=`/${$}>`;return{range:_.cursor(d+b.length),changes:{from:d,insert:b}}}}return{range:s}});return r.changes.empty?!1:(t.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)}),w=["_blank","_self","_top","_parent"],tO=["ascii","utf-8","utf-16","latin1","latin1"],aO=["get","post","put","delete"],iO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],g=["true","false"],c={},Ma={a:{attrs:{href:null,ping:null,type:null,media:null,target:w,hreflang:null}},abbr:c,acronym:c,address:c,applet:c,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:c,aside:c,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["n Line truncated
}`,{label:"class",detail:"definition",type:"keyword"}),T('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),T('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],LO=new Ce,ue=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function j(t){return(O,e)=>{let a=O.node.getChild("VariableDefinition");return a&&e(a,t),!0}}const Va=["FunctionDeclaration"],Ea={FunctionDeclaration:j("function"),ClassDeclaration:j("class"),ClassExpression:()=>!0,EnumDeclaration:j("constant"),TypeAliasDeclaration:j("type"),NamespaceDeclaration:j("namespace"),VariableDefinition(t,O){t.matchContext(Va)||O(t,"variable")},TypeDefinition(t,O){O(t,"type")},__proto__:null};function de(t,O){let e=LO.get(O);if(e)return e;let a=[],i=!0;function r(s,n){let Q=t.sliceString(s.from,s.to);a.push({label:Q,type:n})}return O.cursor(KO.IncludeAnonymous).iterate(s=>{if(i)i=!1;else if(s.name){let n=Ea[s.name];if(n&&n(s,r)||ue.has(s.name))return!1}else if(s.to-s.from>8192){for(let n of de(t,s.node))a.push(n);return!1}}),LO.set(O,a),a}const FO=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,$e=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function Ia(t){let O=v(t.state).resolveInner(t.pos,-1);if($e.indexOf(O.name)>-1)return null;let e=O.to-O.from<20&&FO.test(t.state.sliceDoc(O.from,O.to));if(!e&&!t.explicit)return null;let a=[];for(let i=O;i;i=i.parent)ue.has(i.name)&&(a=a.concat(de(t.state.doc,i)));return{options:a,from:e?O.from:t.pos,validFor:FO}}const k=QO.define({parser:Ua.configure({props:[cO.add({IfStatement:U({except:/^\s*({|else\b)/}),TryStatement:U({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ze,SwitchBody:t=>{let O=t.textAfter,e=/^\s*\}/.test(O),a=/^\s*(case|default)\b/.test(O);return t.baseIndent+(e?0:a?1:2)*t.unit},Block:Ge({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":U({except:/^{/}),JSXElement(t){let O=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(O?0:t.unit)},JSXEscape(t){let O=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(O?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),uO.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression":HO,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Aa=k.configure({dialect:"ts"}),Na=k.configure({dialect:"jsx"}),Da=k.configure({dialect:"jsx ts"}),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(t=>({label:t,type:"keyword"}));function he(t={}){let O=t.jsx?t.typescript?Da:Na:t.typescript?Aa:k;return new dO(O,[k.data.of({autocomplete:ve($e,qe(Ya.concat(La)))}),k.data.of({autocomplete:Ia}),t.jsx?Ja:[]])}function JO(t,O,e=t.length){if(!O)return"";let a=O.getChild("JSXIdentifier");return a?t.sliceString(a.from,Math.min(a.to,e)):""}const Fa=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Ja=X.inputHandler.of((t,O,e,a)=>{if((Fa?t.composing:t.compositionStarted)||t.state.readOnly||O!=e||a!=">"&&a!="/"||!k.isActiveAt(t.state,O,-1))return!1;let{state:i}=t,r=i.changeByRange(s=>{var n,Q,u;let{head:d}=s,l=v(i).resolveInner(d,-1),$;if(l.name=="JSXStartTag"&&(l=l.parent),a==">"&&l.name=="JSXFragmentTag")return{range:_.cursor(d+1),changes:{from:d,insert:"><>"}};if(a==">"&&l.name=="JSXIdentifier"){if(((Q=(n=l.parent)===null||n===void 0?void 0:n.lastChild)===null||Q===void 0?void 0:Q.name)!="JSXEndTag"&&($=JO(i.doc,l.parent,d)))return{range:_.cursor(d+1),changes:{from:d,insert:`></${$}>`}}}else if(a=="/"&&l.name=="JSXFragmentTag"){let h=l.parent,p=h==null?void 0:h.parent;if(h.from==d-1&&((u=p.lastChild)===null||u===void 0?void 0:u.name)!="JSXEndTag"&&($=JO(i.doc,p==null?void 0:p.firstChild,d))){let P=`/${$}>`;return{range:_.cursor(d+P.length),changes:{from:d,insert:P}}}}return{range:s}});return r.changes.empty?!1:(t.dispatch(r,{userEvent:"input.type",scrollIntoView:!0}),!0)}),w=["_blank","_self","_top","_parent"],tO=["ascii","utf-8","utf-16","latin1","latin1"],aO=["get","post","put","delete"],iO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],g=["true","false"],c={},Ma={a:{attrs:{href:null,ping:null,type:null,media:null,target:w,hreflang:null}},abbr:c,acronym:c,address:c,applet:c,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:c,aside:c,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["n Line truncated
-1
View File
@@ -1 +0,0 @@
import{S as z,i as Q,s as X,e as Y,f as Z,g as j,y as _,o as $,H as ee,I as te,J as ne,K as ie,L as oe,C as L,M as re}from"./index.bdac21fd.js";import{C as E,E as w,a as S,h as se,b as le,c as ae,d as ce,e as ue,s as fe,f as de,g as ge,i as he,r as pe,j as ye,k as me,l as be,m as ke,n as xe,o as we,p as Se,q as Ce,t as P,S as qe}from"./index.c4d07677.js";function Ke(t){G(t,"start");var i={},e=t.languageData||{},d=!1;for(var g in t)if(g!=e&&t.hasOwnProperty(g))for(var p=i[g]=[],r=t[g],o=0;o<r.length;o++){var l=r[o];p.push(new Ie(l,t)),(l.indent||l.dedent)&&(d=!0)}return{startState:function(){return{state:"start",pending:null,indent:d?[]:null}},copyState:function(u){var y={state:u.state,pending:u.pending,indent:u.indent&&u.indent.slice(0)};return u.stack&&(y.stack=u.stack.slice(0)),y},token:ve(i),indent:Re(i,e),languageData:e}}function G(t,i){if(!t.hasOwnProperty(i))throw new Error("Undefined state "+i+" in simple mode")}function Le(t,i){if(!t)return/(?:)/;var e="";return t instanceof RegExp?(t.ignoreCase&&(e="i"),t=t.source):t=String(t),new RegExp((i===!1?"":"^")+"(?:"+t+")",e)}function Ee(t){if(!t)return null;if(t.apply)return t;if(typeof t=="string")return t.replace(/\./g," ");for(var i=[],e=0;e<t.length;e++)i.push(t[e]&&t[e].replace(/\./g," "));return i}function Ie(t,i){(t.next||t.push)&&G(i,t.next||t.push),this.regex=Le(t.regex),this.token=Ee(t.token),this.data=t}function ve(t){return function(i,e){if(e.pending){var d=e.pending.shift();return e.pending.length==0&&(e.pending=null),i.pos+=d.text.length,d.token}for(var g=t[e.state],p=0;p<g.length;p++){var r=g[p],o=(!r.data.sol||i.sol())&&i.match(r.regex);if(o){r.data.next?e.state=r.data.next:r.data.push?((e.stack||(e.stack=[])).push(e.state),e.state=r.data.push):r.data.pop&&e.stack&&e.stack.length&&(e.state=e.stack.pop()),r.data.indent&&e.indent.push(i.indentation()+i.indentUnit),r.data.dedent&&e.indent.pop();var l=r.token;if(l&&l.apply&&(l=l(o)),o.length>2&&r.token&&typeof r.token!="string"){e.pending=[];for(var u=2;u<o.length;u++)o[u]&&e.pending.push({text:o[u],token:r.token[u-1]});return i.backUp(o[0].length-(o[1]?o[1].length:0)),l[0]}else return l&&l.join?l[0]:l}}return i.next(),null}}function Re(t,i){return function(e,d){if(e.indent==null||i.dontIndentStates&&i.doneIndentState.indexOf(e.state)>-1)return null;var g=e.indent.length-1,p=t[e.state];e:for(;;){for(var r=0;r<p.length;r++){var o=p[r];if(o.data.dedent&&o.data.dedentIfLineStart!==!1){var l=o.regex.exec(d);if(l&&l[0]){g--,(o.next||o.push)&&(p=t[o.next||o.push]),d=d.slice(l[0].length);continue e}}}break}return g<0?0:e.indent[g]}}function _e(t){let i;return{c(){i=Y("div"),Z(i,"class","code-editor")},m(e,d){j(e,i,d),t[13](i)},p:_,i:_,o:_,d(e){e&&$(i),t[13](null)}}}function Ae(t,i,e){let d,g;ee(t,te,n=>e(12,g=n));const p=ne();let{id:r=""}=i,{value:o=""}=i,{disabled:l=!1}=i,{placeholder:u=""}=i,{baseCollection:y=new ie}=i,{singleLine:C=!1}=i,{extraAutocompleteKeys:I=[]}=i,{disableRequestKeys:k=!1}=i,{disableIndirectCollectionsKeys:q=!1}=i,f,b,A=new E,F=new E,M=new E,O=new E;function v(){f==null||f.focus()}function J(n){let s=n.slice();return L.pushOrReplaceByKey(s,y,"id"),s}function B(){b==null||b.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function W(){if(!r)return;const n=document.querySelectorAll('[for="'+r+'"]');for(let s of n)s.removeEventListener("click",v)}function D(){if(!r)return;W();const n=document.querySelectorAll('[for="'+r+'"]');for(let s of n)s.addEventListener("click",v)}function R(n,s="",a=0){let m=d.find(c=>c.name==n||c.id==n);if(!m||a>=4)return[];let h=[s+"id",s+"created",s+"updated"];for(const c of m.schema){const x=s+c.name;if(c.type==="relation"&&c.options.collectionId){const K=R(c.options.collectionId,x+".",a+1);K.length?h=h.concat(K):h.push(x)}else h.push(x)}return h}function H(n=!0,s=!0){let a=[].concat(I);const m=R(y.name);for(const h of m)a.push(h);if(n&&(a.push("@request.method"),a.push("@request.query."),a.push("@request.data."),a.push("@request.user.id"),a.push("@request.user.email"),a.push("@request.user.verified"),a.push("@request.user.created"),a.push("@request.user.updated")),n||s)for(const h of d){let c="";if(h.name==="profiles"){if(!n)continue;c="@request.user.profile."}else{if(!s)continue;c="@collection."+h.name+"."}const x=R(h.name,c);for(const K of x)a.push(K)}return a.sort(function(h,c){return c.length-h.length}),a}function N(n){let s=n.matchBefore(/[\@\w\.]*/);if(s.from==s.to&&!n.explicit)return null;let a=[{label:"false"},{label:"true"},{label:"@now"}];q||a.push({label:"@collection.*",apply:"@collection."});const m=["@request.user.profile.id","@request.user.profile.userId","@request.user.profile.created","@request.user.profile.updated"],h=H(!k,!k&&s.text.startsWith("@c"));for(const c of h)m.includes(c)||a.push({label:c.endsWith(".")?c+"*":c,apply:c});return{from:s.from,options:a}}function T(){const n=[{regex:L.escapeRegExp("@now"),token:"keyword"}],s=H(!k,!q);for(const a of s){let m;a.endsWith(".")?m=L.escapeRegExp(a)+"\\w+[\\w.]*":Line truncated
+1
View File
@@ -0,0 +1 @@
import{S as z,i as Q,s as X,e as Y,f as Z,g as j,y as _,o as $,H as ee,I as te,J as ne,K as ie,L as oe,C as L,M as re}from"./index.bbd53e70.js";import{C as E,E as w,a as S,h as se,b as le,c as ae,d as ce,e as ue,s as fe,f as de,g as ge,i as he,r as pe,j as ye,k as me,l as be,m as ke,n as xe,o as we,p as Se,q as Ce,t as P,S as qe}from"./index.2148ad18.js";function Ke(t){G(t,"start");var i={},e=t.languageData||{},d=!1;for(var g in t)if(g!=e&&t.hasOwnProperty(g))for(var p=i[g]=[],s=t[g],o=0;o<s.length;o++){var l=s[o];p.push(new Ie(l,t)),(l.indent||l.dedent)&&(d=!0)}return{startState:function(){return{state:"start",pending:null,indent:d?[]:null}},copyState:function(u){var y={state:u.state,pending:u.pending,indent:u.indent&&u.indent.slice(0)};return u.stack&&(y.stack=u.stack.slice(0)),y},token:ve(i),indent:Re(i,e),languageData:e}}function G(t,i){if(!t.hasOwnProperty(i))throw new Error("Undefined state "+i+" in simple mode")}function Le(t,i){if(!t)return/(?:)/;var e="";return t instanceof RegExp?(t.ignoreCase&&(e="i"),t=t.source):t=String(t),new RegExp((i===!1?"":"^")+"(?:"+t+")",e)}function Ee(t){if(!t)return null;if(t.apply)return t;if(typeof t=="string")return t.replace(/\./g," ");for(var i=[],e=0;e<t.length;e++)i.push(t[e]&&t[e].replace(/\./g," "));return i}function Ie(t,i){(t.next||t.push)&&G(i,t.next||t.push),this.regex=Le(t.regex),this.token=Ee(t.token),this.data=t}function ve(t){return function(i,e){if(e.pending){var d=e.pending.shift();return e.pending.length==0&&(e.pending=null),i.pos+=d.text.length,d.token}for(var g=t[e.state],p=0;p<g.length;p++){var s=g[p],o=(!s.data.sol||i.sol())&&i.match(s.regex);if(o){s.data.next?e.state=s.data.next:s.data.push?((e.stack||(e.stack=[])).push(e.state),e.state=s.data.push):s.data.pop&&e.stack&&e.stack.length&&(e.state=e.stack.pop()),s.data.indent&&e.indent.push(i.indentation()+i.indentUnit),s.data.dedent&&e.indent.pop();var l=s.token;if(l&&l.apply&&(l=l(o)),o.length>2&&s.token&&typeof s.token!="string"){e.pending=[];for(var u=2;u<o.length;u++)o[u]&&e.pending.push({text:o[u],token:s.token[u-1]});return i.backUp(o[0].length-(o[1]?o[1].length:0)),l[0]}else return l&&l.join?l[0]:l}}return i.next(),null}}function Re(t,i){return function(e,d){if(e.indent==null||i.dontIndentStates&&i.doneIndentState.indexOf(e.state)>-1)return null;var g=e.indent.length-1,p=t[e.state];e:for(;;){for(var s=0;s<p.length;s++){var o=p[s];if(o.data.dedent&&o.data.dedentIfLineStart!==!1){var l=o.regex.exec(d);if(l&&l[0]){g--,(o.next||o.push)&&(p=t[o.next||o.push]),d=d.slice(l[0].length);continue e}}}break}return g<0?0:e.indent[g]}}function _e(t){let i;return{c(){i=Y("div"),Z(i,"class","code-editor")},m(e,d){j(e,i,d),t[13](i)},p:_,i:_,o:_,d(e){e&&$(i),t[13](null)}}}function Ae(t,i,e){let d,g;ee(t,te,n=>e(12,g=n));const p=ne();let{id:s=""}=i,{value:o=""}=i,{disabled:l=!1}=i,{placeholder:u=""}=i,{baseCollection:y=new ie}=i,{singleLine:C=!1}=i,{extraAutocompleteKeys:I=[]}=i,{disableRequestKeys:k=!1}=i,{disableIndirectCollectionsKeys:q=!1}=i,f,b,A=new E,M=new E,F=new E,O=new E;function v(){f==null||f.focus()}function J(n){let r=n.slice();return L.pushOrReplaceByKey(r,y,"id"),r}function B(){b==null||b.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function W(){if(!s)return;const n=document.querySelectorAll('[for="'+s+'"]');for(let r of n)r.removeEventListener("click",v)}function D(){if(!s)return;W();const n=document.querySelectorAll('[for="'+s+'"]');for(let r of n)r.addEventListener("click",v)}function R(n,r="",a=0){let m=d.find(c=>c.name==n||c.id==n);if(!m||a>=4)return[];let h=[r+"id",r+"created",r+"updated"];for(const c of m.schema){const x=r+c.name;if(c.type==="relation"&&c.options.collectionId){const K=R(c.options.collectionId,x+".",a+1);K.length?h=h.concat(K):h.push(x)}else h.push(x)}return h}function H(n=!0,r=!0){let a=[].concat(I);const m=R(y.name);for(const h of m)a.push(h);if(n&&(a.push("@request.method"),a.push("@request.query."),a.push("@request.data."),a.push("@request.user.id"),a.push("@request.user.email"),a.push("@request.user.verified"),a.push("@request.user.created"),a.push("@request.user.updated")),n||r)for(const h of d){let c="";if(h.name==="profiles"){if(!n)continue;c="@request.user.profile."}else{if(!r)continue;c="@collection."+h.name+"."}const x=R(h.name,c);for(const K of x)a.push(K)}return a.sort(function(h,c){return c.length-h.length}),a}function N(n){let r=n.matchBefore(/[\@\w\.]*/);if(r.from==r.to&&!n.explicit)return null;let a=[{label:"false"},{label:"true"},{label:"@now"}];q||a.push({label:"@collection.*",apply:"@collection."});const m=["@request.user.profile.id","@request.user.profile.userId","@request.user.profile.created","@request.user.profile.updated"],h=H(!k,!k&&r.text.startsWith("@c"));for(const c of h)m.includes(c)||a.push({label:c.endsWith(".")?c+"*":c,apply:c});return{from:r.from,options:a}}function T(){const n=[{regex:L.escapeRegExp("@now"),token:"keyword"}],r=H(!k,!q);for(const a of r){let m;a.endsWith(".")?m=L.escapeRegExp(a)+"\\w+[\\w.]*":Line truncated
@@ -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 k,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.bdac21fd.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=k(),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=k(),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,C,v,P,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=k(),A(r.$$.fragment),p=k(),A(d.$$.fragment),n=k(),i=c("button"),g=c("span"),g.textContent="Set new password",R=k(),C=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(C,"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,C,$),_(C,v),P=!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),(!P||$&4)&&(i.disabled=a[2]),$&4&&L(i,"btn-loading",a[2])},i(a){P||(H(r.$$.fragment,a),H(d.$$.fragment,a),P=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),P=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(C),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};
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.bbd53e70.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};
@@ -1,2 +0,0 @@
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.bdac21fd.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=`<h4 class="m-b-xs">Forgotten admin password</h4>
<p>Enter the email associated with your account and we\u2019ll send you a recovery link:</p>`,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]),$&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='<i class="ri-checkbox-circle-line"></i>',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};
@@ -0,0 +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.bbd53e70.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=`<h4 class="m-b-xs">Forgotten admin password</h4>
<p>Enter the email associated with your account and we\u2019ll send you a recovery link:</p>`,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='<i class="ri-checkbox-circle-line"></i>',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};
@@ -1,4 +1,4 @@
import{S as G,i as J,s as M,F as N,c as T,m as L,t as v,a as y,d as z,C as R,E as U,g as _,k as W,n as Y,o as b,G as j,p as A,q as B,e as m,w as C,b as h,f as d,r as F,h as k,u as q,v as D,y as E,x as I,z as H}from"./index.bdac21fd.js";function K(r){let e,t,s,l,n,o,c,a,i,u,g,$,p=r[3]&&S(r);return o=new B({props:{class:"form-field required",name:"password",$$slots:{default:[Q,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),s=m("h5"),l=C(`Type your password to confirm changing your email address
`),p&&p.c(),n=h(),T(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],F(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,s),k(s,l),p&&p.m(s,null),k(e,n),L(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=q(e,"submit",D(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=S(f),p.c(),p.m(s,null)):p&&(p.d(1),p=null);const P={};w&769&&(P.$$scope={dirty:w,ctx:f}),o.$set(P),(!u||w&2)&&(a.disabled=f[1]),w&2&&F(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(),z(o),g=!1,$()}}}function O(r){let e,t,s,l,n;return{c(){e=m("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
import{S as G,i as J,s as M,F as N,c as T,m as L,t as v,a as y,d as z,C as R,E as U,g as _,k as W,n as Y,o as b,G as j,p as A,q as B,e as m,w as C,b as h,f as d,r as F,h as k,u as q,v as D,y as E,x as I,z as H}from"./index.bbd53e70.js";function K(r){let e,t,s,l,n,o,c,a,i,u,g,$,p=r[3]&&S(r);return o=new B({props:{class:"form-field required",name:"password",$$slots:{default:[Q,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),s=m("h5"),l=C(`Type your password to confirm changing your email address
`),p&&p.c(),n=h(),T(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],F(a,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,s),k(s,l),p&&p.m(s,null),k(e,n),L(o,e,null),k(e,c),k(e,a),k(a,i),u=!0,g||($=q(e,"submit",D(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=S(f),p.c(),p.m(s,null)):p&&(p.d(1),p=null);const P={};w&769&&(P.$$scope={dirty:w,ctx:f}),o.$set(P),(!u||w&2)&&(a.disabled=f[1]),(!u||w&2)&&F(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(),z(o),g=!1,$()}}}function O(r){let e,t,s,l,n;return{c(){e=m("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
<div class="content txt-bold"><p>Successfully changed the user email address.</p>
<p>You can now sign in with your new email address.</p></div>`,t=h(),s=m("button"),s.textContent="Close",d(e,"class","alert alert-success"),d(s,"type","button"),d(s,"class","btn btn-secondary btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,s,c),l||(n=q(s,"click",r[6]),l=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(s),l=!1,n()}}}function S(r){let e,t,s;return{c(){e=C("to "),t=m("strong"),s=C(r[3]),d(t,"class","txt-nowrap")},m(l,n){_(l,e,n),_(l,t,n),k(t,s)},p(l,n){n&8&&I(s,l[3])},d(l){l&&b(e),l&&b(t)}}}function Q(r){let e,t,s,l,n,o,c,a;return{c(){e=m("label"),t=C("Password"),l=h(),n=m("input"),d(e,"for",s=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,l,u),_(i,n,u),H(n,r[0]),n.focus(),c||(a=q(n,"input",r[7]),c=!0)},p(i,u){u&256&&s!==(s=i[8])&&d(e,"for",s),u&256&&o!==(o=i[8])&&d(n,"id",o),u&1&&n.value!==i[0]&&H(n,i[0])},d(i){i&&b(e),i&&b(l),i&&b(n),c=!1,a()}}}function V(r){let e,t,s,l;const n=[O,K],o=[];function c(a,i){return a[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),s=U()},m(a,i){o[e].m(a,i),_(a,s,i),l=!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(s.parentNode,s))},i(a){l||(v(t),l=!0)},o(a){y(t),l=!1},d(a){o[e].d(a),a&&b(s)}}}function X(r){let e,t;return e=new N({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:r}}}),{c(){T(e.$$.fragment)},m(s,l){L(e,s,l),t=!0},p(s,[l]){const n={};l&527&&(n.$$scope={dirty:l,ctx:s}),e.$set(n)},i(s){t||(v(e.$$.fragment,s),t=!0)},o(s){y(e.$$.fragment,s),t=!1},d(s){z(e,s)}}}function Z(r,e,t){let s,{params:l}=e,n="",o=!1,c=!1;async function a(){if(o)return;t(1,o=!0);const g=new j("../");try{await g.users.confirmEmailChange(l==null?void 0:l.token,n),t(2,c=!0)}catch($){A.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,l=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,s=R.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[n,o,c,s,a,l,i,u]}class ee extends G{constructor(e){super(),J(this,e,Z,X,M,{params:5})}}export{ee as default};
@@ -1,4 +1,4 @@
import{S as M,i as U,s as W,F as Y,c as H,m as N,t as P,a as q,d as L,C as j,E as A,g as _,k as B,n as D,o as m,G as I,p as K,q as E,e as b,w as y,b as C,f as c,r as G,h as w,u as S,v as O,y as F,x as Q,z as R}from"./index.bdac21fd.js";function V(i){let e,l,s,n,t,o,p,u,r,a,v,g,k,h,d=i[4]&&J(i);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),u=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=y(`Reset your user password
`),d&&d.c(),t=C(),H(o.$$.fragment),p=C(),H(u.$$.fragment),r=C(),a=b("button"),v=b("span"),v.textContent="Set new password",c(l,"class","content txt-center m-b-base"),c(v,"class","txt"),c(a,"type","submit"),c(a,"class","btn btn-lg btn-block"),a.disabled=i[2],G(a,"btn-loading",i[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,p),N(u,e,null),w(e,r),w(e,a),w(a,v),g=!0,k||(h=S(e,"submit",O(i[5])),k=!0)},p(f,$){f[4]?d?d.p(f,$):(d=J(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const T={};$&3073&&(T.$$scope={dirty:$,ctx:f}),o.$set(T);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),u.$set(z),(!g||$&4)&&(a.disabled=f[2]),$&4&&G(a,"btn-loading",f[2])},i(f){g||(P(o.$$.fragment,f),P(u.$$.fragment,f),g=!0)},o(f){q(o.$$.fragment,f),q(u.$$.fragment,f),g=!1},d(f){f&&m(e),d&&d.d(),L(o),L(u),k=!1,h()}}}function X(i){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
import{S as M,i as U,s as W,F as Y,c as H,m as N,t as P,a as q,d as L,C as j,E as A,g as _,k as B,n as D,o as m,G as I,p as K,q as E,e as b,w as y,b as C,f as c,r as G,h as w,u as S,v as O,y as F,x as Q,z as R}from"./index.bbd53e70.js";function V(i){let e,l,s,n,t,o,p,u,r,a,v,k,g,h,d=i[4]&&J(i);return o=new E({props:{class:"form-field required",name:"password",$$slots:{default:[Z,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),u=new E({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:i}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=y(`Reset your user password
`),d&&d.c(),t=C(),H(o.$$.fragment),p=C(),H(u.$$.fragment),r=C(),a=b("button"),v=b("span"),v.textContent="Set new password",c(l,"class","content txt-center m-b-base"),c(v,"class","txt"),c(a,"type","submit"),c(a,"class","btn btn-lg btn-block"),a.disabled=i[2],G(a,"btn-loading",i[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,p),N(u,e,null),w(e,r),w(e,a),w(a,v),k=!0,g||(h=S(e,"submit",O(i[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=J(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const T={};$&3073&&(T.$$scope={dirty:$,ctx:f}),o.$set(T);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),u.$set(z),(!k||$&4)&&(a.disabled=f[2]),(!k||$&4)&&G(a,"btn-loading",f[2])},i(f){k||(P(o.$$.fragment,f),P(u.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(u.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),L(o),L(u),g=!1,h()}}}function X(i){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
<div class="content txt-bold"><p>Successfully changed the user password.</p>
<p>You can now sign in with your new password.</p></div>`,l=C(),s=b("button"),s.textContent="Close",c(e,"class","alert alert-success"),c(s,"type","button"),c(s,"class","btn btn-secondary btn-block")},m(o,p){_(o,e,p),_(o,l,p),_(o,s,p),n||(t=S(s,"click",i[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function J(i){let e,l,s;return{c(){e=y("for "),l=b("strong"),s=y(i[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&Q(s,n[4])},d(n){n&&m(e),n&&m(l)}}}function Z(i){let e,l,s,n,t,o,p,u;return{c(){e=b("label"),l=y("New password"),n=C(),t=b("input"),c(e,"for",s=i[10]),c(t,"type","password"),c(t,"id",o=i[10]),t.required=!0,t.autofocus=!0},m(r,a){_(r,e,a),w(e,l),_(r,n,a),_(r,t,a),R(t,i[0]),t.focus(),p||(u=S(t,"input",i[8]),p=!0)},p(r,a){a&1024&&s!==(s=r[10])&&c(e,"for",s),a&1024&&o!==(o=r[10])&&c(t,"id",o),a&1&&t.value!==r[0]&&R(t,r[0])},d(r){r&&m(e),r&&m(n),r&&m(t),p=!1,u()}}}function x(i){let e,l,s,n,t,o,p,u;return{c(){e=b("label"),l=y("New password confirm"),n=C(),t=b("input"),c(e,"for",s=i[10]),c(t,"type","password"),c(t,"id",o=i[10]),t.required=!0},m(r,a){_(r,e,a),w(e,l),_(r,n,a),_(r,t,a),R(t,i[1]),p||(u=S(t,"input",i[9]),p=!0)},p(r,a){a&1024&&s!==(s=r[10])&&c(e,"for",s),a&1024&&o!==(o=r[10])&&c(t,"id",o),a&2&&t.value!==r[1]&&R(t,r[1])},d(r){r&&m(e),r&&m(n),r&&m(t),p=!1,u()}}}function ee(i){let e,l,s,n;const t=[X,V],o=[];function p(u,r){return u[3]?0:1}return e=p(i),l=o[e]=t[e](i),{c(){l.c(),s=A()},m(u,r){o[e].m(u,r),_(u,s,r),n=!0},p(u,r){let a=e;e=p(u),e===a?o[e].p(u,r):(B(),q(o[a],1,1,()=>{o[a]=null}),D(),l=o[e],l?l.p(u,r):(l=o[e]=t[e](u),l.c()),P(l,1),l.m(s.parentNode,s))},i(u){n||(P(l),n=!0)},o(u){q(l),n=!1},d(u){o[e].d(u),u&&m(s)}}}function te(i){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[ee]},$$scope:{ctx:i}}}),{c(){H(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||(P(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){L(e,s)}}}function se(i,e,l){let s,{params:n}=e,t="",o="",p=!1,u=!1;async function r(){if(p)return;l(2,p=!0);const k=new I("../");try{await k.users.confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,u=!0)}catch(h){K.errorResponseHandler(h)}l(2,p=!1)}const a=()=>window.close();function v(){t=this.value,l(0,t)}function g(){o=this.value,l(1,o)}return i.$$set=k=>{"params"in k&&l(6,n=k.params)},i.$$.update=()=>{i.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,p,u,s,r,n,a,v,g]}class ne extends M{constructor(e){super(),U(this,e,se,te,W,{params:6})}}export{ne as default};
<p>You can now sign in with your new password.</p></div>`,l=C(),s=b("button"),s.textContent="Close",c(e,"class","alert alert-success"),c(s,"type","button"),c(s,"class","btn btn-secondary btn-block")},m(o,p){_(o,e,p),_(o,l,p),_(o,s,p),n||(t=S(s,"click",i[7]),n=!0)},p:F,i:F,o:F,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function J(i){let e,l,s;return{c(){e=y("for "),l=b("strong"),s=y(i[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&Q(s,n[4])},d(n){n&&m(e),n&&m(l)}}}function Z(i){let e,l,s,n,t,o,p,u;return{c(){e=b("label"),l=y("New password"),n=C(),t=b("input"),c(e,"for",s=i[10]),c(t,"type","password"),c(t,"id",o=i[10]),t.required=!0,t.autofocus=!0},m(r,a){_(r,e,a),w(e,l),_(r,n,a),_(r,t,a),R(t,i[0]),t.focus(),p||(u=S(t,"input",i[8]),p=!0)},p(r,a){a&1024&&s!==(s=r[10])&&c(e,"for",s),a&1024&&o!==(o=r[10])&&c(t,"id",o),a&1&&t.value!==r[0]&&R(t,r[0])},d(r){r&&m(e),r&&m(n),r&&m(t),p=!1,u()}}}function x(i){let e,l,s,n,t,o,p,u;return{c(){e=b("label"),l=y("New password confirm"),n=C(),t=b("input"),c(e,"for",s=i[10]),c(t,"type","password"),c(t,"id",o=i[10]),t.required=!0},m(r,a){_(r,e,a),w(e,l),_(r,n,a),_(r,t,a),R(t,i[1]),p||(u=S(t,"input",i[9]),p=!0)},p(r,a){a&1024&&s!==(s=r[10])&&c(e,"for",s),a&1024&&o!==(o=r[10])&&c(t,"id",o),a&2&&t.value!==r[1]&&R(t,r[1])},d(r){r&&m(e),r&&m(n),r&&m(t),p=!1,u()}}}function ee(i){let e,l,s,n;const t=[X,V],o=[];function p(u,r){return u[3]?0:1}return e=p(i),l=o[e]=t[e](i),{c(){l.c(),s=A()},m(u,r){o[e].m(u,r),_(u,s,r),n=!0},p(u,r){let a=e;e=p(u),e===a?o[e].p(u,r):(B(),q(o[a],1,1,()=>{o[a]=null}),D(),l=o[e],l?l.p(u,r):(l=o[e]=t[e](u),l.c()),P(l,1),l.m(s.parentNode,s))},i(u){n||(P(l),n=!0)},o(u){q(l),n=!1},d(u){o[e].d(u),u&&m(s)}}}function te(i){let e,l;return e=new Y({props:{nobranding:!0,$$slots:{default:[ee]},$$scope:{ctx:i}}}),{c(){H(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||(P(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){L(e,s)}}}function se(i,e,l){let s,{params:n}=e,t="",o="",p=!1,u=!1;async function r(){if(p)return;l(2,p=!0);const g=new I("../");try{await g.users.confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,u=!0)}catch(h){K.errorResponseHandler(h)}l(2,p=!1)}const a=()=>window.close();function v(){t=this.value,l(0,t)}function k(){o=this.value,l(1,o)}return i.$$set=g=>{"params"in g&&l(6,n=g.params)},i.$$.update=()=>{i.$$.dirty&64&&l(4,s=j.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,p,u,s,r,n,a,v,k]}class ne extends M{constructor(e){super(),U(this,e,se,te,W,{params:6})}}export{ne as default};
@@ -1,3 +1,3 @@
import{S as k,i as v,s as y,F as w,c as x,m as C,t as g,a as $,d as L,G as H,E as M,g as r,o as a,e as u,b as m,f,u as _,y as p}from"./index.bdac21fd.js";function P(c){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div>
import{S as k,i as v,s as y,F as w,c as x,m as C,t as g,a as $,d as L,G as H,E as M,g as r,o as a,e as u,b as m,f,u as _,y as p}from"./index.bbd53e70.js";function P(c){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-error-warning-line"></i></div>
<div class="content txt-bold"><p>Invalid or expired verification token.</p></div>`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(l,o){r(l,t,o),r(l,s,o),r(l,e,o),n||(i=_(e,"click",c[4]),n=!0)},p,d(l){l&&a(t),l&&a(s),l&&a(e),n=!1,i()}}}function S(c){let t,s,e,n,i;return{c(){t=u("div"),t.innerHTML=`<div class="icon"><i class="ri-checkbox-circle-line"></i></div>
<div class="content txt-bold"><p>Successfully verified email address.</p></div>`,s=m(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(l,o){r(l,t,o),r(l,s,o),r(l,e,o),n||(i=_(e,"click",c[3]),n=!0)},p,d(l){l&&a(t),l&&a(s),l&&a(e),n=!1,i()}}}function T(c){let t;return{c(){t=u("div"),t.innerHTML='<div class="loader loader-lg"><em>Please wait...</em></div>',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function F(c){let t;function s(i,l){return i[1]?T:i[0]?S:P}let e=s(c),n=e(c);return{c(){n.c(),t=M()},m(i,l){n.m(i,l),r(i,t,l)},p(i,l){e===(e=s(i))&&n?n.p(i,l):(n.d(1),n=e(i),n&&(n.c(),n.m(t.parentNode,t)))},d(i){n.d(i),i&&a(t)}}}function V(c){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[F]},$$scope:{ctx:c}}}),{c(){x(t.$$.fragment)},m(e,n){C(t,e,n),s=!0},p(e,[n]){const i={};n&67&&(i.$$scope={dirty:n,ctx:e}),t.$set(i)},i(e){s||(g(t.$$.fragment,e),s=!0)},o(e){$(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function q(c,t,s){let{params:e}=t,n=!1,i=!1;l();async function l(){s(1,i=!0);const d=new H("../");try{await d.users.confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,i=!1)}const o=()=>window.close(),b=()=>window.close();return c.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,i,e,o,b]}class I extends k{constructor(t){super(),v(this,t,q,V,y,{params:2})}}export{I as default};
@@ -1 +1 @@
@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: #adb3b8;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #ebeff2;--baseAlt2Color: #dee3e8;--baseAlt3Color: #a9b4bc;--baseAlt4Color: #7c868d;--infoColor: #3da9fc;--infoAltColor: #d8eefe;--successColor: #2cb67d;--successAltColor: #d6f5e8;--dangerColor: #ef4565;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffe7d6;--overlayColor: rgba(65, 82, 105, .25);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .05);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 24px;--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:befLine truncated
@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: #adb3b8;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #ebeff2;--baseAlt2Color: #dee3e8;--baseAlt3Color: #a9b4bc;--baseAlt4Color: #7c868d;--infoColor: #3da9fc;--infoAltColor: #d8eefe;--successColor: #2cb67d;--successAltColor: #d6f5e8;--dangerColor: #ef4565;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffe7d6;--overlayColor: rgba(65, 82, 105, .25);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .05);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 24px;--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:befLine truncated
+12
View File
@@ -0,0 +1,12 @@
class N{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),ze.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),ze.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 ti(this),r=new ti(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 ti(this,e)}iterRange(e,t=this.length){return new Yo(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 _o(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]?N.empty:e.length<=32?new J(e):ze.from(J.split(e,[]))}}class J extends N{constructor(e,t=Pa(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 La(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new J(yr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Fi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new J(l,o.length+r.length));else{let h=l.length>>1;i.push(new J(l.slice(0,h)),new J(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof J))return super.replace(e,t,i);let s=Fi(this.text,Fi(i.text,yr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new J(s,r):ze.from(J.split(s,[]),r)}sliceString(e,t=this.length,i=`
`){let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],h=r+l.length;r>e&&o&&(s+=i),e<h&&t>r&&(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 J(i,s)),i=[],s=-1);return s>-1&&t.push(new J(i,s)),t}}class ze extends N{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<this.children.length;r++){let l=this.children[r],h=o+l.length;if(e<=h&&t>=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<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines<a>>5-1&&h.lines>a>>5+1){let c=this.children.slice();return c[s]=h,new ze(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;r<this.children.length&&o<=t;r++){let l=this.children[r],h=o+l.length;o>e&&r&&(s+=i),e<h&&t>o&&(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 ze))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 J(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 ze)for(let g of d.children)f(g);else d.lines>o&&(h>o||!h)?(u(),l.push(d)):d instanceof J&&h&&(p=c[c.length-1])instanceof J&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new J(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]:ze.from(c,a)),a=-1,h=c.length=0)}for(let d of e)f(d);return u(),l.length==1?l[0]:new ze(l,t)}}N.empty=new J([""],0);function Pa(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Fi(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],h=s+l.length;h>=t&&(h>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=h+1}return e}function yr(n,e,t){return Fi(n,[""],e,t)}class ti{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof J?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 J?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 J){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 J?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 Yo{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new ti(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 _o{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"&&(N.prototype[Symbol.iterator]=function(){return this.iter()},ti.prototype[Symbol.iterator]=Yo.prototype[Symbol.iterator]=_o.prototype[Symbol.iterator]=function(){return this});class La{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 Bt="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;n<Bt.length;n++)Bt[n]+=Bt[n-1];function Ra(n){for(let e=1;e<Bt.length;e+=2)if(Bt[e]>n)return Bt[e-1]<=n;return!1}function br(n){return n>=127462&&n<=127487}const wr=8205;function fe(n,e,t=!0,i=!0){return(t?Qo:Ea)(n,e,i)}function Qo(n,e,t){if(e==n.length)return e;e&&Zo(n.charCodeAt(e))&&el(n.charCodeAt(e-1))&&e--;let i=ie(n,e);for(e+=ve(i);e<n.length;){let s=ie(n,e);if(i==wr||s==wr||t&&Ra(s))e+=ve(s),i=s;else if(br(s)){let r=0,o=e-2;for(;o>=0&&br(ie(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Ea(n,e,t){for(;e>0;){let i=Qo(n,e-2,t);if(i<e)return i;e--}return 0}function Zo(n){return n>=56320&&n<57344}function el(n){return n>=55296&&n<56320}function ie(n,e){let t=n.charCodeAt(e);if(!el(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Zo(i)?(t-55296<<10)+(i-56320)+65536:t}function Ws(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ve(n){return n<65536?1:2}const Yn=/\r\n?|\n/;var le=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(le||(le={}));class Ke{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){_n(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s Line truncated
`}get readOnly(){return this.facet(cl)}phrase(e,...t){for(let i of this.facet(I.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(sl))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return Ka(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=fe(t,o,!1);if(r(t.slice(h,o))!=j.Word)break;o=h}for(;l<s;){let h=fe(t,l);if(r(t.slice(l,h))!=j.Word)break;l=h}return o==l?null:m.range(o+i,l+i)}}I.allowMultipleSelections=rl;I.tabSize=D.define({combine:n=>n.length?n[0]:4});I.lineSeparator=ol;I.readOnly=cl;I.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])}});I.languageData=sl;I.changeFilter=ll;I.transactionFilter=hl;I.transactionExtender=al;gn.reconfigure=R.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 yt{eq(e){return this==e}range(e,t=e){return li.create(e,t,this)}}yt.prototype.startSide=yt.prototype.endSide=0;yt.prototype.point=!1;yt.prototype.mapMode=le.TrackDel;class li{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new li(e,t,i)}}function ns(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class qs{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);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let i=[],s=[],r=[],o=-1,l=-1;for(let h=0;h<this.value.length;h++){let a=this.value[h],c=this.from[h]+e,f=this.to[h]+e,u,d;if(c==f){let p=t.mapPos(c,a.startSide,a.mapMode);if(p==null||(u=d=p,a.startSide!=a.endSide&&(d=t.mapPos(c,a.endSide),d<u)))continue}else if(u=t.mapPos(c,a.startSide),d=t.mapPos(f,a.endSide),u>d||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 qs(s,r,i,l):null,pos:o}}}class ${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 $(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(ns)),this.isEmpty)return t.length?$.of(t):this;let l=new dl(this,null,-1).goto(0),h=0,a=[],c=new bt;for(;l.value||h<t.length;)if(h<t.length&&(l.from-t[h].from||l.startSide-t[h].value.startSide)>=0){let f=t[h++];c.addInner(f.from,f.to,f.value)||a.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(h==t.length||this.chunkEnd(l.chunkIndex)<t[h].from)&&(!o||s>this.chunkEnd(l.chunkIndex)||r<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||s>l.to||r<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||a.push(li.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!a.length?$.empty:this.nextLayer.update({add:a,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],h=this.chunk[o],a=e.touchesRange(l,l+h.length);if(a===!1)s=Math.max(s,h.maxPoint),t.push(h),i.push(e.mapPos(l));else if(a===!0){let{mapped:c,pos:f}=h.map(l,e);c&&(s=Math.max(s,c.maxPoint),t.push(c),i.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new $(i,t,r||$.empty,s)}between(e,t,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=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 hi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return hi.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=Sr(o,l,i),a=new Ut(o,h,r),c=new Ut(l,h Line truncated
`)}static newName(){let e=Mr[Ar]||1;return Mr[Ar]=e+1,os+e.toString(36)}static mount(e,t){(e[ls]||new Ga(e)).mount(Array.isArray(t)?t:[t])}}let Ci=null;class Ga{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Ci)return e.adoptedStyleSheets=[Ci.sheet].concat(e.adoptedStyleSheets),e[ls]=Ci;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),Ci=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[ls]=this}mount(e){let t=this.sheet,i=0,s=0;for(let r=0;r<e.length;r++){let o=e[r],l=this.modules.indexOf(o);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),t)for(let h=0;h<o.rules.length;h++)t.insertRule(o.rules[h],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=o.rules.length,s++}}if(!t){let r="";for(let o=0;o<this.modules.length;o++)r+=this.modules[o].getRules()+`
`;this.styleTag.textContent=r}}}var lt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ai={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Dr=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent);typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent);var Ja=typeof navigator<"u"&&/Mac/.test(navigator.platform),Xa=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ya=Ja||Dr&&+Dr[1]<57;for(var ne=0;ne<10;ne++)lt[48+ne]=lt[96+ne]=String(ne);for(var ne=1;ne<=24;ne++)lt[ne+111]="F"+ne;for(var ne=65;ne<=90;ne++)lt[ne]=String.fromCharCode(ne+32),ai[ne]=String.fromCharCode(ne);for(var Pn in lt)ai.hasOwnProperty(Pn)||(ai[Pn]=lt[Pn]);function _a(n){var e=Ya&&(n.ctrlKey||n.altKey||n.metaKey)||Xa&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?ai: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 Ui(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Et(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Qa(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Hi(n,e){if(!e.anchorNode)return!1;try{return Et(n,e.anchorNode)}catch{return!1}}function ci(n){return n.nodeType==3?It(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Gi(n,e,t,i){return t?Or(n,e,t,i,-1)||Or(n,e,t,i,1):!1}function Ji(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Or(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:fi(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=Ji(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?fi(n):0}else return!1}}function fi(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}const pl={left:0,right:0,top:0,bottom:0};function mn(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function Za(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function ec(n,e,t,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView;for(let c=n;c;)if(c.nodeType==1){let f,u=c==h.body;if(u)f=Za(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=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.top<f.top?(p=-(f.top-e.top+o),t>0&&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-p<f.top&&(p=-(f.top+p-e.top+o)));else{let g=e.bottom-e.top,y=f.bottom-f.top;p=(s=="center"&&g<=y?e.top+g/2-y/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-y+o)-f.top}if(i=="nearest"?e.left<f.left?(d=-(f.left-e.left+r),t>0&&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.left<f.left+d&&(d=-(f.left+d-e.left+r))):d=(i=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:i=="start"==l?e.left-r:e.right-(f.right-f.left)+r)-f.left,d||p)if(u)a.scrollBy(d,p);else{if(p){let g=c.scrollTop;c.scrollTop+=p,p=c.scrollTop-g}if(d){let g=c.scrollLeft;c.scrollLeft+=d,d=c.scrollLeft-g}e={left:e.left-d,top:e.top-p,right:e.right-d,bottom:e.bottom-p}}if(u)break;c=c.assignedSlot||c.parentNode,i=s="nearest"}else if(c.nodeType==11)c=c.host;else break}class tc{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 gl(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;t<e.length;){let i=e[t++],s=e[t++],r=e[t++];i.scrollTop!=s&&(i.scrollTop=s),i.scrollLeft!=r&&(i.scrollLeft=r)}}}let Tr;function It(n,e,t=e){leLine truncated
`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),a=m.cursor(t?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function Oc(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==j.Space&&(s=o),s==o}}function Tc(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return m.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!=null?i:n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=jl(n,{x:f,y:p},!1,r);if(p<h.top||p>h.bottom||(r<0?g<s:g>s))return m.cursor(g,e.assoc,void 0,o)}}function In(n,e,t){let i=n.state.facet(Nl).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.from<l&&(t=e.head>t.from?m.cursor(o,1):m.cursor(l,-1),s=!0)});if(!s)return t}}class Bc{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;for(let t in Z){let i=Z[t];e.contentDOM.addEventListener(t,s=>{!Kr(e,s)||this.ignoreDuringComposition(s)||t=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(t,e,s)?s.preventDefault():i(e,s))},xs[t]),this.registeredEvents.push(t)}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=>{!Kr(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){Ee(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){Ee(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(A.android&&A.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let i;return A.ios&&!t.synthetic&&!t.altKey&&!t.metaKey&&((i=Kl.find(s=>s.keyCode==t.keyCode))&&!t.ctrlKey||Pc.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,ni(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 Kl=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Pc="dthko",Ul=[16,17,18,20,91,92,224,225];class Lc{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.lastEvent=t;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(I.allowMultipleSelections)&&Rc(e,t),this.dragMove=Ec(e,t),this.dragging=Ic(e,t)&&Us(t)==1?null:!1,this.dragging===!1&&(t.preventDefault(),this.select(t))}move(e){if(e.buttons==0)return this.destroy();this.dragging===!1&&this.select(this.lastEvent=e)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.pr Line truncated
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,As),Af={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 Fn=null;function Mf(){var n;if(Fn==null&&typeof document<"u"&&document.body){let e=document.body.style;Fn=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Fn||!1}const qi=D.define({combine(n){let e=Ct(n,{render:null,specialChars:Cf,addSpecialChars:null});return(e.replaceTabs=!Mf())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,As)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,As)),e}});function hg(n={}){return[qi.of(n),Df()]}let uo=null;function Df(){return uo||(uo=de.fromClass(class{constructor(n){this.view=n,this.decorations=T.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(qi)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new vf({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ie(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 Pf((l-h%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=T.replace({widget:new Bf(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(qi);n.startState.facet(qi)!=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 Of="\u2022";function Tf(n){return n>=32?Of:n==10?"\u2424":String.fromCharCode(9216+n)}class Bf extends at{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Tf(this.code),i=e.state.phrase("Control character")+" "+(Af[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 Pf extends at{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 Lf extends at{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 de.fromClass(class{constructor(e){this.view=e,this.placeholder=T.set([T.widget({widget:new Lf(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?T.none:this.placeholder}},{decorations:e=>e.decorations})}const Ms=2e3;function Rf(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Ms||t.off>Ms||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(m.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=rs(a.text,o,n.tabSize,!0);if(c>-1){let f=rs(a.text,l,n.tabSize);r.push(m.range(a.from+c,a.from+f))}}}return r}function Ef(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function po(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>Ms?-1:s==i.length?Ef(n,e.clientX):yi(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function If(n,e){let t=po(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=po(n,s);if(!l)return i;let h=Rf(n.state,t,l);return h.length?o?m.create(h.concat(i.ranges)):m.create(h):i}}:null}function cg(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?If(t,i):null)}const Wn="-10000px";class Nf{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){let t=e.state.facet(this.facet),i=t.filt Line truncated
`&&(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;t+=this.ranges[++this.rangeIndex].from-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,i,s,r){if(this.ranges.length>1){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 Dh(t,e?e.state.tabSize:4,e?kt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=Bh(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.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=F.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Eu,topID:0,maxBufferLength:2048,reused:this.chunkReused});e=new F(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new F(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function Bh(n,e,t){e.start=e.pos;for(let i=0;i<10;i++){let s=n(e,t);if(e.pos>e.start)return s}throw new Error("Stream parser failed to advance stream.")}const tr=Object.create(null),pi=[pe.none],Eu=new Xs(pi),To=[],Ph=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"]])Ph[n]=Rh(tr,e);class Lh{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),Ph)}resolve(e){return e?this.table[e]||(this.table[e]=Rh(this.extra,e)):0}}const Iu=new Lh(tr);function Kn(n,e){To.indexOf(n)>-1||(To.push(n),console.warn(e))}function Rh(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):Kn(r,`Modifier ${r} used at start of tag`):t?Kn(r,`Tag ${r} used as modifier`):t=o:Kn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=pe.define({id:pi.length,name:i,props:[ou({[i]:t})]});return pi.push(s),s.id}function Nu(n){let e=pe.define({id:pi.length,name:"Document",props:[Ft.add(()=>n)]});return pi.push(e),e}const Vu=n=>{let e=nr(n.state);return e.line?Fu(n):e.block?Hu(n):!1};function ir(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 Fu=ir($u,0),Wu=ir(Eh,0),Hu=ir((n,e)=>Eh(n,e,qu(e)),0);function nr(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Xt=50;function zu(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Xt,i),o=n.sliceDoc(s,s+Xt),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*Xt?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Xt),f=n.sliceDoc(s-Xt,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 qu(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 Eh(n,e,t=e.selection.ranges){let i=t.map(r=>nr(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>zu(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;o<s.length;o++)if(l=s[o]){let h=i[o],{open:a,close:c}=l;r.push({from:a.pos-h.open.length,to:a.pos+a.margin},{from:c.pos-c.margin,to:c.pos+h.close.length})}return{changes:r}}return null}function $u(n,e,t=e.selection.ranges){let i=[],s=-1;for(let{from:r,to:o}of t){let l=i.length,h=1e9;for(let a=r;a<=o;){let c=e.doc.lineAt(a);if(c.from>s&&(r==o||o>c.from)){s=c.from;let f=nr(e,a).line;if(!f)continue;let u=/^\s*/.exec(c.text)[0].length,d=u==c Line truncated
`:i=="r"?"\r":i=="t"?" ":"\\"),this.wholeWord=!!e.wholeWord}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 op(this):new sp(this)}getCursor(e,t=0,i){let s=e.doc?e:I.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Tt(this,s,t,i):Ot(this,s,t,i)}}class ya{constructor(e){this.spec=e}}function Ot(n,e,t,i){return new qt(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?np(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function np(n,e){return(t,i,s,r)=>((r>t||r+s.length<i)&&(r=Math.max(0,t-2),s=n.sliceString(r,Math.min(n.length,i+2))),e(an(s,t-r))!=j.Word||e(hn(s,i-r))!=j.Word||e(hn(s,t-r))!=j.Word&&e(an(s,i-r))!=j.Word)}class sp extends ya{constructor(e){super(e)}nextMatch(e,t,i){let s=Ot(this.spec,e,i,e.doc.length).nextOverlapping();return s.done&&(s=Ot(this.spec,e,0,t).nextOverlapping()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Ot(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.replace}matchAll(e,t){let i=Ot(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(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 da(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?rp(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function hn(n,e){return n.slice(fe(n,e,!1),e)}function an(n,e){return n.slice(e,fe(n,e))}function rp(n){return(e,t,i)=>!i[0].length||n(an(i.input,i.index))!=j.Word||n(hn(i.input,i.index+i[0].length))!=j.Word||n(hn(i.input,i.index))!=j.Word&&n(an(i.input,i.index+i[0].length))!=j.Word}class op extends ya{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.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i<e.match.length?e.match[i]:t)}matchAll(e,t){let i=Tt(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(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-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const gi=R.define(),lr=R.define(),st=me.define({create(n){return new Jn(Vs(n).create(),null)},update(n,e){for(let t of e.effects)t.is(gi)?n=new Jn(t.value.create(),n.panel):t.is(lr)&&(n=new Jn(n.query,t.value?hr:null));return n},provide:n=>Zi.from(n,e=>e.panel)});class Jn{constructor(e,t){this.query=e,this.panel=t}}const lp=T.mark({class:"cm-searchMatch"}),hp=T.mark({class:"cm-searchMatch cm-searchMatch-selected"}),ap=de.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 bt;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:h}=r[s];for(;s<o-1&&h>r[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?hp:lp)})}return i.finish()}},{decorations:n=>n.decorations});function wi(n){return e=>{let t=e.state.field(st,!1);return t&&t.query.spec.valid?n(e,t):ba(e)}}const cn=wi((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:ar(n,i),userEvent:"select.search"}),!0):!1}),fn=wi((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:ar(n,s),userEvent:"select.search"}),!0):!1}),cp=wi((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:m.create(t.map(i=>m.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),fp=({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 qt(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(m.range(l.value.from,l.value.to))}return e(n.update({selection:m.create(r,o),userEvent:"select Line truncated
@@ -1,16 +1,16 @@
(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 se(){}const $l=n=>n;function ut(n,e){for(const t in e)n[t]=e[t];return n}function Rm(n){return n()}function iu(){return Object.create(null)}function Je(n){n.forEach(Rm)}function Nn(n){return typeof n=="function"}function De(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let jl;function ti(n,e){return jl||(jl=document.createElement("a")),jl.href=e,n===jl.href}function hb(n){return Object.keys(n).length===0}function Hm(n,...e){if(n==null)return se;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function at(n,e,t){n.$$.on_destroy.push(Hm(e,t))}function $n(n,e,t,i){if(n){const s=jm(n,e,t,i);return n[0](s)}}function jm(n,e,t,i){return n[1]&&i?ut(t.ctx.slice(),n[1](i(e))):t.ctx}function Sn(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;r<o;r+=1)l[r]=e.dirty[r]|s[r];return l}return e.dirty|s}return e.dirty}function Cn(n,e,t,i,s,l){if(s){const o=jm(e,t,i,l);n.p(o,s)}}function Mn(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function li(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function Bt(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function su(n){return n==null?"":n}function nn(n,e,t){return n.set(t),e}function Ye(n){return n&&Nn(n.destroy)?n.destroy:se}const qm=typeof window<"u";let Ro=qm?()=>window.performance.now():()=>Date.now(),ma=qm?n=>requestAnimationFrame(n):se;const ks=new Set;function Vm(n){ks.forEach(e=>{e.c(n)||(ks.delete(e),e.f())}),ks.size!==0&&ma(Vm)}function Ho(n){let e;return ks.size===0&&ma(Vm),{promise:new Promise(t=>{ks.add(e={c:n,f:t})}),abort(){ks.delete(e)}}}function m(n,e){n.appendChild(e)}function zm(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function mb(n){const e=_("style");return gb(zm(n),e),e.sheet}function gb(n,e){m(n.head||n,e)}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode.removeChild(n)}function Yt(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function _(n){return document.createElement(n)}function N(n){return document.createTextNode(n)}function D(){return N(" ")}function We(){return N("")}function J(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Wt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function ni(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Bm(n){return function(e){e.target===this&&n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function mi(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 Pt(n){return n===""?null:+n}function _b(n){return Array.from(n.childNodes)}function ue(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function Se(n,e){n.value=e==null?"":e}function lu(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function te(n,e,t){n.classList[t?"add":"remove"](e)}function Um(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}const mo=new Map;let go=0;function bb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function vb(n,e){const t={stylesheet:mb(e),rules:{}};return mo.set(n,t),t}function cl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{
(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 se(){}const $l=n=>n;function ut(n,e){for(const t in e)n[t]=e[t];return n}function Rm(n){return n()}function iu(){return Object.create(null)}function Je(n){n.forEach(Rm)}function Nn(n){return typeof n=="function"}function De(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let jl;function ti(n,e){return jl||(jl=document.createElement("a")),jl.href=e,n===jl.href}function hb(n){return Object.keys(n).length===0}function Hm(n,...e){if(n==null)return se;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function at(n,e,t){n.$$.on_destroy.push(Hm(e,t))}function $n(n,e,t,i){if(n){const s=jm(n,e,t,i);return n[0](s)}}function jm(n,e,t,i){return n[1]&&i?ut(t.ctx.slice(),n[1](i(e))):t.ctx}function Sn(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;r<o;r+=1)l[r]=e.dirty[r]|s[r];return l}return e.dirty|s}return e.dirty}function Cn(n,e,t,i,s,l){if(s){const o=jm(e,t,i,l);n.p(o,s)}}function Mn(n){if(n.ctx.length>32){const e=[],t=n.ctx.length/32;for(let i=0;i<t;i++)e[i]=-1;return e}return-1}function li(n){const e={};for(const t in n)t[0]!=="$"&&(e[t]=n[t]);return e}function Bt(n,e){const t={};e=new Set(e);for(const i in n)!e.has(i)&&i[0]!=="$"&&(t[i]=n[i]);return t}function su(n){return n==null?"":n}function nn(n,e,t){return n.set(t),e}function Ye(n){return n&&Nn(n.destroy)?n.destroy:se}const qm=typeof window<"u";let Ro=qm?()=>window.performance.now():()=>Date.now(),ma=qm?n=>requestAnimationFrame(n):se;const ks=new Set;function Vm(n){ks.forEach(e=>{e.c(n)||(ks.delete(e),e.f())}),ks.size!==0&&ma(Vm)}function Ho(n){let e;return ks.size===0&&ma(Vm),{promise:new Promise(t=>{ks.add(e={c:n,f:t})}),abort(){ks.delete(e)}}}function m(n,e){n.appendChild(e)}function zm(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function mb(n){const e=_("style");return gb(zm(n),e),e.sheet}function gb(n,e){return m(n.head||n,e),e.sheet}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode.removeChild(n)}function Yt(n,e){for(let t=0;t<n.length;t+=1)n[t]&&n[t].d(e)}function _(n){return document.createElement(n)}function N(n){return document.createTextNode(n)}function D(){return N(" ")}function We(){return N("")}function J(n,e,t,i){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}function Wt(n){return function(e){return e.preventDefault(),n.call(this,e)}}function ni(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function Bm(n){return function(e){e.target===this&&n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function mi(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 Pt(n){return n===""?null:+n}function _b(n){return Array.from(n.childNodes)}function ue(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function Se(n,e){n.value=e==null?"":e}function lu(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ne(n,e,t){n.classList[t?"add":"remove"](e)}function Um(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}const mo=new Map;let go=0;function bb(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function vb(n,e){const t={stylesheet:mb(e),rules:{}};return mo.set(n,t),t}function cl(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_${bb(f)}_${r}`,d=zm(n),{stylesheet:h,rules:g}=mo.get(d)||vb(d,n);g[c]||(g[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const v=n.style.animation||"";return n.style.animation=`${v?`${v}, `:""}${c} ${i}ms linear ${s}ms 1 both`,go+=1,c}function dl(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(", "),go-=s,go||yb())}function yb(){ma(()=>{go||(mo.forEach(n=>{const{stylesheet:e}=n;let t=e.cssRules.length;for(;t--;)e.deleteRule(t);n.rules={}}),mo.clear())})}function kb(n,e,t,i){if(!e)return se;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return se;const{delay:l=0,duration:o=300,easing:r=$l,start:a=Ro()+l,end:u=a+o,tick:f=se,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,g;function v(){c&&(g=cl(n,0,1,o,l,r,c)),l||(h=!0)}function b(){c&&dl(n,g),d=!1}return Ho(y=>{if(!h&&y>=a&&(h=!0),h&&y>=u&&(f(1,0),b()),!d)return!1;if(h){const $=y-a,C=0+1*r($/o);f(C,1-C)}return!0}),v(),f(0,1),b}function wb(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,Wm(n,s)}}function Wm(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 pl;function nl(n){pl=n}function jo(){if(!pl)throw new Error("Function called outside component initialization");return pl}function Fn(n){jo().$$.on_mount.push(n)}function $b(n){jo().$$.after_update.push(n)}function Sb(n){jo().$$.on_destroy.push(n)}function xt(){const n=jo();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Um(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function tt(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Xs=[],me=[],ao=[],Rr=[],Ym=Promise.resolve();let Hr=!1;function Km(){Hr||(Hr=!0,Ym.then(Jm))}function Zn(){return Km(),Ym}function Tt(n){ao.push(n)}function je(n){Rr.push(n)}const lr=new Set;let ql=0;function Jm(){const n=pl;do{for(;ql<Xs.length;){const e=Xs[ql];ql++,nl(e),Cb(e.$$)}for(nl(null),Xs.length=0,ql=0;me.length;)me.pop()();for(let e=0;e<ao.length;e+=1){const t=ao[e];lr.has(t)||(lr.add(t),t())}ao.length=0}while(Xs.length);for(;Rr.length;)Rr.pop()();Hr=!1,lr.clear(),nl(n)}function Cb(n){if(n.fragment!==null){n.update(),Je(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Tt)}}let js;function ga(){return js||(js=Promise.resolve(),js.then(()=>{js=null})),js}function ns(n,e,t){n.dispatchEvent(Um(`${e?"intro":"outro"}${t}`))}const uo=new Set;let ci;function Ae(){ci={r:0,c:[],p:ci}}function Pe(){ci.r||Je(ci.c),ci=ci.p}function A(n,e){n&&n.i&&(uo.delete(n),n.i(e))}function L(n,e,t,i){if(n&&n.o){if(uo.has(n))return;uo.add(n),ci.c.push(()=>{uo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const _a={duration:0};function Zm(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&dl(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=$l,tick:g=se,css:v}=i||_a;v&&(l=cl(n,0,1,d,c,h,v,r++)),g(0,1);const b=Ro()+c,y=b+d;o&&o.abort(),s=!0,Tt(()=>ns(n,!0,"start")),o=Ho($=>{if(s){if($>=y)return g(1,0),ns(n,!0,"end"),a(),s=!1;if($>=b){const C=h(($-b)/d);g(C,1-C)}}return s})}let f=!1;return{start(){f||(f=!0,dl(n),Nn(i)?(i=i(),ga().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Gm(n,e,t){let i=e(n,t),s=!0,l;const o=ci;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=$l,tick:c=se,css:d}=i||_a;d&&(l=cl(n,1,0,u,a,f,d));const h=Ro()+a,g=h+u;Tt(()=>ns(n,!1,"start")),Ho(v=>{if(s){if(v>=g)return c(0,1),ns(n,!1,"end"),--o.r||Je(o.c),!1;if(v>=h){const b=f((v-h)/u);c(1-b,b)}}return s})}return Nn(i)?ga().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&dl(n,l),s=!1)}}}function st(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&dl(n,a)}function f(d,h){const g=d.b-l;return h*=Math.abs(g),{a:l,b:d.b,d:g,duration:h,start:d.start,end:d.start+h,group:d.group}}function c(d){const{delay:h=0,duration:g=300,easing:v=$l,tick:b=se,css:y}=s||_a,$={start:Ro()+h,b:d};d||($.group=ci,ci.r+=1),o||r?r=$:(y&&(u(),a=cl(n,l,d,g,h,v,y)),d&&b(0,1),o=f($,g),Tt(()=>ns(n,d,"start")),Ho(C=>{if(r&&C>r.start&&(o=f(r,g),r=null,ns(n,o.b,"start"),y&&(u(),a=cl(n,l,o.b,o.duration,0,v,s.css))),o){if(C>=o.end)b(l=o.b,1-l),ns(n,o.b,"end"),r||(o.b?u():--o.group.r||Je(o.group.c)),o=null;else if(C>=o.start){const S=C-o.start;l=o.a+o.d*v(S/o.duration),b(l,1-l)}}return!!(o||r)}))}return{run(d){Nn(s)?ga().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function bn(n,e){n.d(1),e.delete(n.key)}function Gt(n,e){L(n,1,1,()=>{e.delete(n.key)})}function Mb(n,e){n.f(),Gt(n,e)}function _t(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,h= Line truncated
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=D(),i=_("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function Q0(n){let e,t,i,s=!n[0]&&ju();const l=n[1].default,o=$n(l,n,n[2],null);return{c(){e=_("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){w(r,e,a),s&&s.m(e,null),m(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)&&Cn(o,l,r,r[2],i?Sn(l,r[2],a,null):Mn(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){L(o,r),i=!1},d(r){r&&k(e),s&&s.d(),o&&o.d(r)}}}function x0(n){let e,t;return e=new On({props:{class:"full-page",center:!0,$$slots:{default:[Q0]},$$scope:{ctx:n}}}),{c(){q(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){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function ev(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 l_ extends Ee{constructor(e){super(),Oe(this,e,ev,x0,De,{nobranding:0})}}function qu(n,e,t){const i=n.slice();return i[11]=e[t],i}const tv=n=>({}),Vu=n=>({uniqueId:n[3]});function nv(n){let e=(n[11]||ko)+"",t;return{c(){t=N(e)},m(i,s){w(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||ko)+"")&&ue(t,e)},d(i){i&&k(t)}}}function iv(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||ko)+"",i;return{c(){e=_("pre"),i=N(t)},m(o,r){w(o,e,r),m(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)||ko)+"")&&ue(i,t)},d(o){o&&k(e)}}}function zu(n){let e,t;function i(o,r){return typeof o[11]=="object"?iv:nv}let s=i(n),l=s(n);return{c(){e=_("div"),l.c(),t=D(),p(e,"class","help-block help-block-error")},m(o,r){w(o,e,r),l.m(e,null),m(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&&k(e),l.d()}}}function sv(n){let e,t,i,s,l;const o=n[7].default,r=$n(o,n,n[6],Vu);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=zu(qu(n,a,f));return{c(){e=_("div"),r&&r.c(),t=D();for(let f=0;f<u.length;f+=1)u[f].c();p(e,"class",n[0]),te(e,"error",n[2].length)},m(f,c){w(f,e,c),r&&r.m(e,null),m(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=J(e,"click",n[8]),s=!0)},p(f,[c]){if(r&&r.p&&(!i||c&64)&&Cn(r,o,f,f[6],i?Sn(o,f[6],c,tv):Mn(f[6]),Vu),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const h=qu(f,a,d);u[d]?u[d].p(h,c):(u[d]=zu(h),u[d].c(),u[d].m(e,null))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}(!i||c&1)&&p(e,"class",f[0]),c&5&&te(e,"error",f[2].length)},i(f){i||(A(r,f),i=!0)},o(f){L(r,f),i=!1},d(f){f&&k(e),r&&r.d(f),Yt(u,f),n[9](null),s=!1,l()}}}const ko="Invalid value";function lv(n,e,t){let i;at(n,Vi,g=>t(5,i=g));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(){Oa(r)}Fn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(g){tt.call(this,n,g)}function h(g){me[g?"unshift":"push"](()=>{u=g,t(1,u)})}return n.$$set=g=>{"name"in g&&t(4,r=g.name),"class"in g&&t(0,a=g.class),"$$scope"in g&&t(6,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=B.toArray(B.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,h]}class Ne extends Ee{constructor(e){super(),Oe(this,e,lv,sv,De,{name:4,class:0})}}function ov(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Email"),s=D(),l=_("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){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0]),l.focus(),r||(a=J(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]&&Se(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function rv(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("Password"),s=D(),l=_("input"),r=D(),a=_("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){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),Se(l,n[1]),w(c,r,d),w(c,a,d),u||(f=J(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]&&Se(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function av(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Password confirm"),s=D(),l=_("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){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[2]),r||(a=J(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]&&Se(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function uv(n){Line truncated
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),te(f,"btn-disabled",n[3]),te(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(g,v){w(g,e,v),m(e,t),m(e,i),H(s,e,null),m(e,l),H(o,e,null),m(e,r),H(a,e,null),m(e,u),m(e,f),c=!0,d||(h=J(e,"submit",Wt(n[4])),d=!0)},p(g,[v]){const b={};v&1537&&(b.$$scope={dirty:v,ctx:g}),s.$set(b);const y={};v&1538&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const $={};v&1540&&($.$$scope={dirty:v,ctx:g}),a.$set($),v&8&&te(f,"btn-disabled",g[3]),v&8&&te(f,"btn-loading",g[3])},i(g){c||(A(s.$$.fragment,g),A(o.$$.fragment,g),A(a.$$.fragment,g),c=!0)},o(g){L(s.$$.fragment,g),L(o.$$.fragment,g),L(a.$$.fragment,g),c=!1},d(g){g&&k(e),j(s),j(o),j(a),d=!1,h()}}}function fv(n,e,t){const i=xt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await ye.admins.create({email:s,password:l,passwordConfirm:o}),await ye.admins.authViaEmail(s,l),i("submit")}catch(d){ye.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 cv extends Ee{constructor(e){super(),Oe(this,e,fv,uv,De,{})}}function Bu(n){let e,t;return e=new l_({props:{$$slots:{default:[dv]},$$scope:{ctx:n}}}),{c(){q(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){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function dv(n){let e,t;return e=new cv({}),e.$on("submit",n[1]),{c(){q(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p:se,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function pv(n){let e,t,i=n[0]&&Bu(n);return{c(){i&&i.c(),e=We()},m(s,l){i&&i.m(s,l),w(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(),L(i,1,1,()=>{i=null}),Pe())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function hv(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ye.logout(!1),t(0,i=!0);return}ye.authStore.isValid?Ci("/collections"):ye.logout()}return[i,async()=>{t(0,i=!1),await Zn(),window.location.search=""}]}class mv extends Ee{constructor(e){super(),Oe(this,e,hv,pv,De,{})}}const Nt=Gn(""),wo=Gn(""),us=Gn(!1);function Jo(n){const e=n-1;return e*e*e+1}function $o(n,{delay:e=0,duration:t=400,easing:i=$l}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function Yn(n,{delay:e=0,duration:t=400,easing:i=Jo,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)=>`
}`,c=`__svelte_${bb(f)}_${r}`,d=zm(n),{stylesheet:h,rules:g}=mo.get(d)||vb(d,n);g[c]||(g[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const v=n.style.animation||"";return n.style.animation=`${v?`${v}, `:""}${c} ${i}ms linear ${s}ms 1 both`,go+=1,c}function dl(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(", "),go-=s,go||yb())}function yb(){ma(()=>{go||(mo.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&k(e)}),mo.clear())})}function kb(n,e,t,i){if(!e)return se;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return se;const{delay:l=0,duration:o=300,easing:r=$l,start:a=Ro()+l,end:u=a+o,tick:f=se,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,g;function v(){c&&(g=cl(n,0,1,o,l,r,c)),l||(h=!0)}function b(){c&&dl(n,g),d=!1}return Ho(y=>{if(!h&&y>=a&&(h=!0),h&&y>=u&&(f(1,0),b()),!d)return!1;if(h){const $=y-a,C=0+1*r($/o);f(C,1-C)}return!0}),v(),f(0,1),b}function wb(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,Wm(n,s)}}function Wm(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 pl;function nl(n){pl=n}function jo(){if(!pl)throw new Error("Function called outside component initialization");return pl}function Fn(n){jo().$$.on_mount.push(n)}function $b(n){jo().$$.after_update.push(n)}function Sb(n){jo().$$.on_destroy.push(n)}function xt(){const n=jo();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=Um(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function tt(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Xs=[],me=[],ao=[],Rr=[],Ym=Promise.resolve();let Hr=!1;function Km(){Hr||(Hr=!0,Ym.then(Jm))}function Zn(){return Km(),Ym}function Tt(n){ao.push(n)}function je(n){Rr.push(n)}const lr=new Set;let ql=0;function Jm(){const n=pl;do{for(;ql<Xs.length;){const e=Xs[ql];ql++,nl(e),Cb(e.$$)}for(nl(null),Xs.length=0,ql=0;me.length;)me.pop()();for(let e=0;e<ao.length;e+=1){const t=ao[e];lr.has(t)||(lr.add(t),t())}ao.length=0}while(Xs.length);for(;Rr.length;)Rr.pop()();Hr=!1,lr.clear(),nl(n)}function Cb(n){if(n.fragment!==null){n.update(),Je(n.before_update);const e=n.dirty;n.dirty=[-1],n.fragment&&n.fragment.p(n.ctx,e),n.after_update.forEach(Tt)}}let js;function ga(){return js||(js=Promise.resolve(),js.then(()=>{js=null})),js}function ns(n,e,t){n.dispatchEvent(Um(`${e?"intro":"outro"}${t}`))}const uo=new Set;let ci;function Ae(){ci={r:0,c:[],p:ci}}function Pe(){ci.r||Je(ci.c),ci=ci.p}function A(n,e){n&&n.i&&(uo.delete(n),n.i(e))}function L(n,e,t,i){if(n&&n.o){if(uo.has(n))return;uo.add(n),ci.c.push(()=>{uo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const _a={duration:0};function Zm(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&dl(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=$l,tick:g=se,css:v}=i||_a;v&&(l=cl(n,0,1,d,c,h,v,r++)),g(0,1);const b=Ro()+c,y=b+d;o&&o.abort(),s=!0,Tt(()=>ns(n,!0,"start")),o=Ho($=>{if(s){if($>=y)return g(1,0),ns(n,!0,"end"),a(),s=!1;if($>=b){const C=h(($-b)/d);g(C,1-C)}}return s})}let f=!1;return{start(){f||(f=!0,dl(n),Nn(i)?(i=i(),ga().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Gm(n,e,t){let i=e(n,t),s=!0,l;const o=ci;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=$l,tick:c=se,css:d}=i||_a;d&&(l=cl(n,1,0,u,a,f,d));const h=Ro()+a,g=h+u;Tt(()=>ns(n,!1,"start")),Ho(v=>{if(s){if(v>=g)return c(0,1),ns(n,!1,"end"),--o.r||Je(o.c),!1;if(v>=h){const b=f((v-h)/u);c(1-b,b)}}return s})}return Nn(i)?ga().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&dl(n,l),s=!1)}}}function st(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&dl(n,a)}function f(d,h){const g=d.b-l;return h*=Math.abs(g),{a:l,b:d.b,d:g,duration:h,start:d.start,end:d.start+h,group:d.group}}function c(d){const{delay:h=0,duration:g=300,easing:v=$l,tick:b=se,css:y}=s||_a,$={start:Ro()+h,b:d};d||($.group=ci,ci.r+=1),o||r?r=$:(y&&(u(),a=cl(n,l,d,g,h,v,y)),d&&b(0,1),o=f($,g),Tt(()=>ns(n,d,"start")),Ho(C=>{if(r&&C>r.start&&(o=f(r,g),r=null,ns(n,o.b,"start"),y&&(u(),a=cl(n,l,o.b,o.duration,0,v,s.css))),o){if(C>=o.end)b(l=o.b,1-l),ns(n,o.b,"end"),r||(o.b?u():--o.group.r||Je(o.group.c)),o=null;else if(C>=o.start){const S=C-o.start;l=o.a+o.d*v(S/o.duration),b(l,1-l)}}return!!(o||r)}))}return{run(d){Nn(s)?ga().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function bn(n,e){n.d(1),e.delete(n.key)}function Gt(n,e){L(n,1,1,()=>{e.delete(n.key)})}function Mb(n,e){n.f(),Gt(n,e)}function _t(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,h=l.length,g=d;const v={};for(;g--;)v[n[g].ke Line truncated
<span class="txt">Pocket<strong>Base</strong></span></figure>`,t=D(),i=_("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function Q0(n){let e,t,i,s=!n[0]&&ju();const l=n[1].default,o=$n(l,n,n[2],null);return{c(){e=_("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){w(r,e,a),s&&s.m(e,null),m(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)&&Cn(o,l,r,r[2],i?Sn(l,r[2],a,null):Mn(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){L(o,r),i=!1},d(r){r&&k(e),s&&s.d(),o&&o.d(r)}}}function x0(n){let e,t;return e=new On({props:{class:"full-page",center:!0,$$slots:{default:[Q0]},$$scope:{ctx:n}}}),{c(){q(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){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function ev(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 l_ extends Ee{constructor(e){super(),Oe(this,e,ev,x0,De,{nobranding:0})}}function qu(n,e,t){const i=n.slice();return i[11]=e[t],i}const tv=n=>({}),Vu=n=>({uniqueId:n[3]});function nv(n){let e=(n[11]||ko)+"",t;return{c(){t=N(e)},m(i,s){w(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||ko)+"")&&ue(t,e)},d(i){i&&k(t)}}}function iv(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||ko)+"",i;return{c(){e=_("pre"),i=N(t)},m(o,r){w(o,e,r),m(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)||ko)+"")&&ue(i,t)},d(o){o&&k(e)}}}function zu(n){let e,t;function i(o,r){return typeof o[11]=="object"?iv:nv}let s=i(n),l=s(n);return{c(){e=_("div"),l.c(),t=D(),p(e,"class","help-block help-block-error")},m(o,r){w(o,e,r),l.m(e,null),m(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&&k(e),l.d()}}}function sv(n){let e,t,i,s,l;const o=n[7].default,r=$n(o,n,n[6],Vu);let a=n[2],u=[];for(let f=0;f<a.length;f+=1)u[f]=zu(qu(n,a,f));return{c(){e=_("div"),r&&r.c(),t=D();for(let f=0;f<u.length;f+=1)u[f].c();p(e,"class",n[0]),ne(e,"error",n[2].length)},m(f,c){w(f,e,c),r&&r.m(e,null),m(e,t);for(let d=0;d<u.length;d+=1)u[d].m(e,null);n[9](e),i=!0,s||(l=J(e,"click",n[8]),s=!0)},p(f,[c]){if(r&&r.p&&(!i||c&64)&&Cn(r,o,f,f[6],i?Sn(o,f[6],c,tv):Mn(f[6]),Vu),c&4){a=f[2];let d;for(d=0;d<a.length;d+=1){const h=qu(f,a,d);u[d]?u[d].p(h,c):(u[d]=zu(h),u[d].c(),u[d].m(e,null))}for(;d<u.length;d+=1)u[d].d(1);u.length=a.length}(!i||c&1)&&p(e,"class",f[0]),(!i||c&5)&&ne(e,"error",f[2].length)},i(f){i||(A(r,f),i=!0)},o(f){L(r,f),i=!1},d(f){f&&k(e),r&&r.d(f),Yt(u,f),n[9](null),s=!1,l()}}}const ko="Invalid value";function lv(n,e,t){let i;at(n,Vi,g=>t(5,i=g));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(){Oa(r)}Fn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(g){tt.call(this,n,g)}function h(g){me[g?"unshift":"push"](()=>{u=g,t(1,u)})}return n.$$set=g=>{"name"in g&&t(4,r=g.name),"class"in g&&t(0,a=g.class),"$$scope"in g&&t(6,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=B.toArray(B.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,h]}class Ne extends Ee{constructor(e){super(),Oe(this,e,lv,sv,De,{name:4,class:0})}}function ov(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Email"),s=D(),l=_("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){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0]),l.focus(),r||(a=J(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]&&Se(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function rv(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=N("Password"),s=D(),l=_("input"),r=D(),a=_("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){w(c,e,d),m(e,t),w(c,s,d),w(c,l,d),Se(l,n[1]),w(c,r,d),w(c,a,d),u||(f=J(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]&&Se(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function av(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Password confirm"),s=D(),l=_("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){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[2]),r||(a=J(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]&&Se(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function Line truncated
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),ne(f,"btn-disabled",n[3]),ne(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(g,v){w(g,e,v),m(e,t),m(e,i),H(s,e,null),m(e,l),H(o,e,null),m(e,r),H(a,e,null),m(e,u),m(e,f),c=!0,d||(h=J(e,"submit",Wt(n[4])),d=!0)},p(g,[v]){const b={};v&1537&&(b.$$scope={dirty:v,ctx:g}),s.$set(b);const y={};v&1538&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const $={};v&1540&&($.$$scope={dirty:v,ctx:g}),a.$set($),(!c||v&8)&&ne(f,"btn-disabled",g[3]),(!c||v&8)&&ne(f,"btn-loading",g[3])},i(g){c||(A(s.$$.fragment,g),A(o.$$.fragment,g),A(a.$$.fragment,g),c=!0)},o(g){L(s.$$.fragment,g),L(o.$$.fragment,g),L(a.$$.fragment,g),c=!1},d(g){g&&k(e),j(s),j(o),j(a),d=!1,h()}}}function fv(n,e,t){const i=xt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await ye.admins.create({email:s,password:l,passwordConfirm:o}),await ye.admins.authViaEmail(s,l),i("submit")}catch(d){ye.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 cv extends Ee{constructor(e){super(),Oe(this,e,fv,uv,De,{})}}function Bu(n){let e,t;return e=new l_({props:{$$slots:{default:[dv]},$$scope:{ctx:n}}}),{c(){q(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){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function dv(n){let e,t;return e=new cv({}),e.$on("submit",n[1]),{c(){q(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p:se,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function pv(n){let e,t,i=n[0]&&Bu(n);return{c(){i&&i.c(),e=We()},m(s,l){i&&i.m(s,l),w(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(),L(i,1,1,()=>{i=null}),Pe())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function hv(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ye.logout(!1),t(0,i=!0);return}ye.authStore.isValid?Ci("/collections"):ye.logout()}return[i,async()=>{t(0,i=!1),await Zn(),window.location.search=""}]}class mv extends Ee{constructor(e){super(),Oe(this,e,hv,pv,De,{})}}const Nt=Gn(""),wo=Gn(""),us=Gn(!1);function Jo(n){const e=n-1;return e*e*e+1}function $o(n,{delay:e=0,duration:t=400,easing:i=$l}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function Yn(n,{delay:e=0,duration:t=400,easing:i=Jo,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 on(n,{delay:e=0,duration:t=400,easing:i=Jo}={}){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:h=>`overflow: hidden;opacity: ${Math.min(h*20,1)*l};height: ${h*o}px;padding-top: ${h*r}px;padding-bottom: ${h*a}px;margin-top: ${h*u}px;margin-bottom: ${h*f}px;border-top-width: ${h*c}px;border-bottom-width: ${h*d}px;`}}function Tn(n,{delay:e=0,duration:t=400,easing:i=Jo,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 gv(n){let e,t,i,s;return{c(){e=_("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){w(l,e,o),n[13](e),Se(e,n[7]),i||(s=J(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]&&Se(e,l[7])},i:se,o:se,d(l){l&&k(e),n[13](null),i=!1,s()}}}function _v(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=new o(r(n)),me.push(()=>Re(e,"value",l)),e.$on("submit",n[10])),{c(){e&&q(e.$$.fragment),i=We()},m(a,u){e&&H(e,a,u),w(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],je(()=>t=!1)),o!==(o=a[4])){if(e){Ae();const c=e;L(c.$$.fragment,1,0,()=>{j(c,1)}),Pe()}o?(e=new o(r(a)),me.push(()=>Re(e,"value",l)),e.$on("submit",a[10]),q(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&&L(e.$$.fragment,a),s=!1},d(a){a&&k(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=D(),t=_("button"),t.innerHTML='<span class="txt">Clear</span>',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(o=J(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(),L(r,1,1,()=>{r=null}),Pe())},i(a){s||(A(r),a&&Tt(()=>{i||(i=st(t,Yn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){L(r),a&&(i||(i=st(t,Yn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,o()}}}function Wu(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Search</span>',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Tt(()=>{t||(t=st(e,Yn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=st(e,Yn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function bv(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[_v,gv],h=[];function g(b,y){return b[4]&&!b[5]?0:1}o=g(n),r=h[o]=d[o](n);let v=(n[0].length||n[7].length)&&Uu(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=D(),r.c(),a=D(),v&&v.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(b,y){w(b,e,y),m(e,t),m(t,i),m(i,s),m(t,l),h[o].m(t,null),m(t,a),v&&v.m(t,null),u=!0,f||(c=[J(t,"submit",Wt(n[10])),J(e,"click",ni(n[11]))],f=!0)},p(b,[y]){let $=o;o=g(b),o===$?h[o].p(b,y):(Ae(),L(h[$],1,1,()=>{h[$]=null}),Pe(),r=h[o],r?r.p(b,y):(r=h[o]=d[o](b),r.c()),A(r,1),r.m(t,a)),b[0].length||b[7].length?v?(v.p(b,y),y&129&&A(v,1)):(v=Uu(b),v.c(),A(v,1),v.m(t,null)):v&&(Ae(),L(v,1,1,()=>{v=null}),Pe())},i(b){u||(A(r),A(v),u=!0)},o(b){L(r),L(v),u=!1},d(b){b&&k(e),h[o].d(),v&&v.d(),f=!1,Je(c)}}}function vv(n,e,t){const i=xt(),s="search_"+B.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new dn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(T=!0){t(7,d=""),T&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function v(){u||f||(t(5,f=!0),t(4,u=(await Pi(()=>import("./FilterAutocompleteInput.586413d1.js"),["FilterAutocompleteInput.586413d1.js","index.c4d07677.js"],import.meta.url)).default),t(5,f=!1))}Fn(()=>{v()});function b(T){tt.call(this,n,T)}function y(T){d=T,t(7,d),t(0,l)}function $(T){me[T?"unshift":"push"](()=>{c=T,t(6,c)})}function C(){d=this.value,t(7,d),t(0,l)}const S=()=>{h(!1),g()};return n.$$set=T=>{"value"in T&&t(0,l=T.value),"placeholder"in T&&t(1,o=T.placeholder),"autocompleteCollection"in T&&t(2,r=T.autocompleteCollection),"extraAutocompleteKeys"in T&&t(3,a=T.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,g,b,y,$,C,S]}class Zo extends Ee{constructor(e){super(),Oe(this,e,vv,bv,De,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Gr,Ki;const Xr="app-tooltip";function Yu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ri(){return Ki=Ki||document.querySelector("."+Xr),Ki||(Ki=document.createElement("div"),Ki.classList.add(Xr),document.body.appendChild(Ki)),Ki}function o_(n,e){let t=Ri();if(!t.classList.contains("active")||!(e!=null&&e.text)){Qr();return}t.textContent=e.text,t.className=Xr+" 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 Line truncated
`}}function gv(n){let e,t,i,s;return{c(){e=_("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){w(l,e,o),n[13](e),Se(e,n[7]),i||(s=J(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]&&Se(e,l[7])},i:se,o:se,d(l){l&&k(e),n[13](null),i=!1,s()}}}function _v(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=new o(r(n)),me.push(()=>Re(e,"value",l)),e.$on("submit",n[10])),{c(){e&&q(e.$$.fragment),i=We()},m(a,u){e&&H(e,a,u),w(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],je(()=>t=!1)),o!==(o=a[4])){if(e){Ae();const c=e;L(c.$$.fragment,1,0,()=>{j(c,1)}),Pe()}o?(e=new o(r(a)),me.push(()=>Re(e,"value",l)),e.$on("submit",a[10]),q(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&&L(e.$$.fragment,a),s=!1},d(a){a&&k(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=D(),t=_("button"),t.innerHTML='<span class="txt">Clear</span>',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),w(a,e,u),w(a,t,u),s=!0,l||(o=J(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(),L(r,1,1,()=>{r=null}),Pe())},i(a){s||(A(r),a&&Tt(()=>{i||(i=st(t,Yn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){L(r),a&&(i||(i=st(t,Yn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&k(e),a&&k(t),a&&i&&i.end(),l=!1,o()}}}function Wu(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Search</span>',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Tt(()=>{t||(t=st(e,Yn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=st(e,Yn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function bv(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[_v,gv],h=[];function g(b,y){return b[4]&&!b[5]?0:1}o=g(n),r=h[o]=d[o](n);let v=(n[0].length||n[7].length)&&Uu(n);return{c(){e=_("div"),t=_("form"),i=_("label"),s=_("i"),l=D(),r.c(),a=D(),v&&v.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(b,y){w(b,e,y),m(e,t),m(t,i),m(i,s),m(t,l),h[o].m(t,null),m(t,a),v&&v.m(t,null),u=!0,f||(c=[J(t,"submit",Wt(n[10])),J(e,"click",ni(n[11]))],f=!0)},p(b,[y]){let $=o;o=g(b),o===$?h[o].p(b,y):(Ae(),L(h[$],1,1,()=>{h[$]=null}),Pe(),r=h[o],r?r.p(b,y):(r=h[o]=d[o](b),r.c()),A(r,1),r.m(t,a)),b[0].length||b[7].length?v?(v.p(b,y),y&129&&A(v,1)):(v=Uu(b),v.c(),A(v,1),v.m(t,null)):v&&(Ae(),L(v,1,1,()=>{v=null}),Pe())},i(b){u||(A(r),A(v),u=!0)},o(b){L(r),L(v),u=!1},d(b){b&&k(e),h[o].d(),v&&v.d(),f=!1,Je(c)}}}function vv(n,e,t){const i=xt(),s="search_"+B.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new dn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(T=!0){t(7,d=""),T&&(c==null||c.focus()),i("clear")}function g(){t(0,l=d),i("submit",l)}async function v(){u||f||(t(5,f=!0),t(4,u=(await Pi(()=>import("./FilterAutocompleteInput.83995c20.js"),["FilterAutocompleteInput.83995c20.js","index.2148ad18.js"],import.meta.url)).default),t(5,f=!1))}Fn(()=>{v()});function b(T){tt.call(this,n,T)}function y(T){d=T,t(7,d),t(0,l)}function $(T){me[T?"unshift":"push"](()=>{c=T,t(6,c)})}function C(){d=this.value,t(7,d),t(0,l)}const S=()=>{h(!1),g()};return n.$$set=T=>{"value"in T&&t(0,l=T.value),"placeholder"in T&&t(1,o=T.placeholder),"autocompleteCollection"in T&&t(2,r=T.autocompleteCollection),"extraAutocompleteKeys"in T&&t(3,a=T.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,g,b,y,$,C,S]}class Zo extends Ee{constructor(e){super(),Oe(this,e,vv,bv,De,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Gr,Ki;const Xr="app-tooltip";function Yu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ri(){return Ki=Ki||document.querySelector("."+Xr),Ki||(Ki=document.createElement("div"),Ki.classList.add(Xr),document.body.appendChild(Ki)),Ki}function o_(n,e){let t=Ri();if(!t.classList.contains("active")||!(e!=null&&e.text)){Qr();return}t.textContent=e.text,t.className=Xr+" 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 Line truncated
<span class="txt">method</span>`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Ev(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="url",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function Av(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="referer",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function Pv(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="status",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function Lv(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function Ju(n){let e;function t(l,o){return l[6]?Nv:Iv}let i=t(n),s=i(n);return{c(){s.c(),e=We()},m(l,o){s.m(l,o),w(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&&k(e)}}}function Iv(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Zu(n);return{c(){e=_("tr"),t=_("td"),i=_("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){w(a,e,u),m(e,t),m(t,i),m(t,s),o&&o.m(t,null),m(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&&k(e),o&&o.d()}}}function Nv(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
`},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Zu(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function Gu(n){let e;return{c(){e=_("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Xu(n,e){var oe,Ce,Te;let t,i,s,l=((oe=e[21].method)==null?void 0:oe.toUpperCase())+"",o,r,a,u,f,c=e[21].url+"",d,h,g,v,b,y,$=(e[21].referer||"N/A")+"",C,S,T,M,O,E=e[21].status+"",P,I,F,z,Q,ne,G,ee,U,Y,Z=(((Ce=e[21].meta)==null?void 0:Ce.errorMessage)||((Te=e[21].meta)==null?void 0:Te.errorData))&&Gu();z=new Si({props:{date:e[21].created}});function de(){return e[16](e[21])}function x(...K){return e[17](e[21],...K)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("span"),o=N(l),a=D(),u=_("td"),f=_("span"),d=N(c),g=D(),Z&&Z.c(),v=D(),b=_("td"),y=_("span"),C=N($),T=D(),M=_("td"),O=_("span"),P=N(E),I=D(),F=_("td"),q(z.$$.fragment),Q=D(),ne=_("td"),ne.innerHTML='<i class="ri-arrow-right-line"></i>',G=D(),p(s,"class",r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[21].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",S=e[21].referer),te(y,"txt-hint",!e[21].referer),p(b,"class","col-type-text col-field-referer"),p(O,"class","label"),te(O,"label-danger",e[21].status>=400),p(M,"class","col-type-number col-field-status"),p(F,"class","col-type-date col-field-created"),p(ne,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(K,we){w(K,t,we),m(t,i),m(i,s),m(s,o),m(t,a),m(t,u),m(u,f),m(f,d),m(u,g),Z&&Z.m(u,null),m(t,v),m(t,b),m(b,y),m(y,C),m(t,T),m(t,M),m(M,O),m(O,P),m(t,I),m(t,F),H(z,F,null),m(t,Q),m(t,ne),m(t,G),ee=!0,U||(Y=[J(t,"click",de),J(t,"keydown",x)],U=!0)},p(K,we){var W,_e,He;e=K,(!ee||we&8)&&l!==(l=((W=e[21].method)==null?void 0:W.toUpperCase())+"")&&ue(o,l),(!ee||we&8&&r!==(r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&p(s,"class",r),(!ee||we&8)&&c!==(c=e[21].url+"")&&ue(d,c),(!ee||we&8&&h!==(h=e[21].url))&&p(f,"title",h),((_e=e[21].meta)==null?void 0:_e.errorMessage)||((He=e[21].meta)==null?void 0:He.errorData)?Z||(Z=Gu(),Z.c(),Z.m(u,null)):Z&&(Z.d(1),Z=null),(!ee||we&8)&&$!==($=(e[21].referer||"N/A")+"")&&ue(C,$),(!ee||we&8&&S!==(S=e[21].referer))&&p(y,"title",S),we&8&&te(y,"txt-hint",!e[21].referer),(!ee||we&8)&&E!==(E=e[21].status+"")&&ue(P,E),we&8&&te(O,"label-danger",e[21].status>=400);const ae={};we&8&&(ae.date=e[21].created),z.$set(ae)},i(K){ee||(A(z.$$.fragment,K),ee=!0)},o(K){L(z.$$.fragment,K),ee=!1},d(K){K&&k(t),Z&&Z.d(),j(z),U=!1,Je(Y)}}}function Qu(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a&8&&i!==(i=r[3].length+"")&&ue(s,i),a&16&&ue(o,r[4])},d(r){r&&k(e)}}}function xu(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),te(t,"btn-loading",n[6]),te(t,"btn-disabled",n[6]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=J(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&ue(o,l),c&64&&te(t,"btn-loading",f[6]),c&64&&te(t,"btn-disabled",f[6])},d(f){f&&k(e),a=!1,u()}}}function Fv(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O=[],E=new Map,P,I,F,z;function Q(W){n[11](W)}let ne={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[Ov]},$$scope:{ctx:n}};n[1]!==void 0&&(ne.sort=n[1]),l=new an({props:ne}),me.push(()=>Re(l,"sort",Q));function G(W){n[12](W)}let ee={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[Ev]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),a=new an({props:ee}),me.push(()=>Re(a,"sort",G));function U(W){n[13](W)}let Y={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[Av]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),c=new an({props:Y}),me.push(()=>Re(c,"sort",U));function Z(W){n[14](W)}let de={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Pv]},$$scope:{ctx:n}};n[1]!==void 0&&(de.sort=n[1]),g=new an({props:de}),me.push(()=>Re(g,"sort",Z));function x(W){n[15](W)}let oe={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[Lv]},$$scope:{ctx:n}};n[1]!==void 0&&(oe.sort=n[1]),y=new an({props:oe}),me.push(()=>Re(y,"sort",x));let Ce=n[3];const Te=W=>W[21].id;for(let W=0;W<Ce.length;W+=1){let _e=Ku(n,Ce,W),He=Te(_e);E.set(He,O[W]=Xu(He,_e))}let K=null;Ce.length||(K=Ju(n) Line truncated
`},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Zu(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function Gu(n){let e;return{c(){e=_("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Xu(n,e){var oe,Ce,Te;let t,i,s,l=((oe=e[21].method)==null?void 0:oe.toUpperCase())+"",o,r,a,u,f,c=e[21].url+"",d,h,g,v,b,y,$=(e[21].referer||"N/A")+"",C,S,T,M,O,E=e[21].status+"",P,I,F,V,Z,te,X,ee,U,Y,G=(((Ce=e[21].meta)==null?void 0:Ce.errorMessage)||((Te=e[21].meta)==null?void 0:Te.errorData))&&Gu();V=new Si({props:{date:e[21].created}});function de(){return e[16](e[21])}function x(...K){return e[17](e[21],...K)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("span"),o=N(l),a=D(),u=_("td"),f=_("span"),d=N(c),g=D(),G&&G.c(),v=D(),b=_("td"),y=_("span"),C=N($),T=D(),M=_("td"),O=_("span"),P=N(E),I=D(),F=_("td"),q(V.$$.fragment),Z=D(),te=_("td"),te.innerHTML='<i class="ri-arrow-right-line"></i>',X=D(),p(s,"class",r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[21].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",S=e[21].referer),ne(y,"txt-hint",!e[21].referer),p(b,"class","col-type-text col-field-referer"),p(O,"class","label"),ne(O,"label-danger",e[21].status>=400),p(M,"class","col-type-number col-field-status"),p(F,"class","col-type-date col-field-created"),p(te,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(K,ke){w(K,t,ke),m(t,i),m(i,s),m(s,o),m(t,a),m(t,u),m(u,f),m(f,d),m(u,g),G&&G.m(u,null),m(t,v),m(t,b),m(b,y),m(y,C),m(t,T),m(t,M),m(M,O),m(O,P),m(t,I),m(t,F),H(V,F,null),m(t,Z),m(t,te),m(t,X),ee=!0,U||(Y=[J(t,"click",de),J(t,"keydown",x)],U=!0)},p(K,ke){var W,_e,He;e=K,(!ee||ke&8)&&l!==(l=((W=e[21].method)==null?void 0:W.toUpperCase())+"")&&ue(o,l),(!ee||ke&8&&r!==(r="label txt-uppercase "+e[9][e[21].method.toLowerCase()]))&&p(s,"class",r),(!ee||ke&8)&&c!==(c=e[21].url+"")&&ue(d,c),(!ee||ke&8&&h!==(h=e[21].url))&&p(f,"title",h),((_e=e[21].meta)==null?void 0:_e.errorMessage)||((He=e[21].meta)==null?void 0:He.errorData)?G||(G=Gu(),G.c(),G.m(u,null)):G&&(G.d(1),G=null),(!ee||ke&8)&&$!==($=(e[21].referer||"N/A")+"")&&ue(C,$),(!ee||ke&8&&S!==(S=e[21].referer))&&p(y,"title",S),(!ee||ke&8)&&ne(y,"txt-hint",!e[21].referer),(!ee||ke&8)&&E!==(E=e[21].status+"")&&ue(P,E),(!ee||ke&8)&&ne(O,"label-danger",e[21].status>=400);const ae={};ke&8&&(ae.date=e[21].created),V.$set(ae)},i(K){ee||(A(V.$$.fragment,K),ee=!0)},o(K){L(V.$$.fragment,K),ee=!1},d(K){K&&k(t),G&&G.d(),j(V),U=!1,Je(Y)}}}function Qu(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a&8&&i!==(i=r[3].length+"")&&ue(s,i),a&16&&ue(o,r[4])},d(r){r&&k(e)}}}function xu(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ne(t,"btn-loading",n[6]),ne(t,"btn-disabled",n[6]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=J(t,"click",n[19]),a=!0)},p(f,c){c&24&&l!==(l=f[4]-f[3].length+"")&&ue(o,l),c&64&&ne(t,"btn-loading",f[6]),c&64&&ne(t,"btn-disabled",f[6])},d(f){f&&k(e),a=!1,u()}}}function Fv(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O=[],E=new Map,P,I,F,V;function Z(W){n[11](W)}let te={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[Ov]},$$scope:{ctx:n}};n[1]!==void 0&&(te.sort=n[1]),l=new an({props:te}),me.push(()=>Re(l,"sort",Z));function X(W){n[12](W)}let ee={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[Ev]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),a=new an({props:ee}),me.push(()=>Re(a,"sort",X));function U(W){n[13](W)}let Y={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[Av]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),c=new an({props:Y}),me.push(()=>Re(c,"sort",U));function G(W){n[14](W)}let de={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Pv]},$$scope:{ctx:n}};n[1]!==void 0&&(de.sort=n[1]),g=new an({props:de}),me.push(()=>Re(g,"sort",G));function x(W){n[15](W)}let oe={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[Lv]},$$scope:{ctx:n}};n[1]!==void 0&&(oe.sort=n[1]),y=new an({props:oe}),me.push(()=>Re(y,"sort",x));let Ce=n[3];const Te=W=>W[21].id;for(let W=0;W<Ce.length;W+=1){let _e=Ku(n,Ce,W),He=Te(_e);E.set(He,O[W]=Xu(He,_e))}let K=null;Ce.le Line truncated
* Chart.js v3.9.1
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
@@ -25,31 +25,31 @@
* https://www.chartjs.org
* (c) 2022 Chart.js Contributors
* Released under the MIT License
*/class yk{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],o=t.duration;l.forEach(r=>r({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=p_.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 bi=new yk;const Sf="transparent",kk={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=hf(n||Sf),s=i.valid&&hf(e||Sf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class wk{constructor(e,t,i,s){const l=t[i];s=Xl([e.to,s,l,e.from]);const o=Xl([e.from,l,s]);this._active=!0,this._fn=e.fn||kk[e.type||typeof o],this._easing=rl[e.easing]||rl.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=Xl([e.to,t,s,e.from]),this._from=Xl([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||t<i),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=o&&a>1?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;s<i.length;s++)i[s][t]()}}const $k=["x","y","borderWidth","radius","tension"],Sk=["color","borderColor","backgroundColor"];kt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const Ck=Object.keys(kt.animation);kt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});kt.set("animations",{colors:{type:"color",properties:Sk},numbers:{type:"number",properties:$k}});kt.describe("animations",{_fallback:"animation"});kt.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 L_{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!ht(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!ht(s))return;const l={};for(const o of Ck)l[o]=s[o];(It(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=Tk(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&Mk(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 wk(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 bi.add(this._chart,i),!0}}function Mk(n,e){const t=[]Line truncated
*/class yk{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,t,i,s){const l=t.listeners[s],o=t.duration;l.forEach(r=>r({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=p_.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 bi=new yk;const Sf="transparent",kk={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=hf(n||Sf),s=i.valid&&hf(e||Sf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class wk{constructor(e,t,i,s){const l=t[i];s=Xl([e.to,s,l,e.from]);const o=Xl([e.from,l,s]);this._active=!0,this._fn=e.fn||kk[e.type||typeof o],this._easing=rl[e.easing]||rl.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=Xl([e.to,t,s,e.from]),this._from=Xl([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||t<i),!this._active){this._target[s]=r,this._notify(!0);return}if(t<0){this._target[s]=l;return}a=t/i%2,a=o&&a>1?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;s<i.length;s++)i[s][t]()}}const $k=["x","y","borderWidth","radius","tension"],Sk=["color","borderColor","backgroundColor"];kt.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const Ck=Object.keys(kt.animation);kt.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:n=>n!=="onProgress"&&n!=="onComplete"&&n!=="fn"});kt.set("animations",{colors:{type:"color",properties:Sk},numbers:{type:"number",properties:$k}});kt.describe("animations",{_fallback:"animation"});kt.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 L_{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!ht(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!ht(s))return;const l={};for(const o of Ck)l[o]=s[o];(It(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=Tk(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&Mk(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 wk(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 bi.add(this._chart,i),!0}}function Mk(n,e){const t=[]Line truncated
`)>-1?n.split(`
`):n}function Vw(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=Ln(e.bodyFont),u=Ln(e.titleFont),f=Ln(e.footerFont),c=l.length,d=s.length,h=i.length,g=Jn(e.padding);let v=g.height,b=0,y=i.reduce((S,T)=>S+T.before.length+T.lines.length+T.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(v+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const S=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;v+=h*S+(y-h)*a.lineHeight+(y-1)*e.bodySpacing}d&&(v+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let $=0;const C=function(S){b=Math.max(b,t.measureText(S).width+$)};return t.save(),t.font=u.string,Et(n.title,C),t.font=a.string,Et(n.beforeBody.concat(n.afterBody),C),$=e.displayColors?o+2+e.boxPadding:0,Et(i,S=>{Et(S.before,C),Et(S.lines,C),Et(S.after,C)}),$=0,t.font=f.string,Et(n.footer,C),t.restore(),b+=g.width,{width:b,height:v}}function zw(n,e){const{y:t,height:i}=e;return t<i/2?"top":t>n.height-i/2?"bottom":"center"}function Bw(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 Uw(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"),Bw(u,n,e,t)&&(u="center"),u}function nc(n,e,t){const i=t.yAlign||e.yAlign||zw(n,t);return{xAlign:t.xAlign||e.xAlign||Uw(n,e,t,i),yAlign:i}}function Ww(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function Yw(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:h}=$s(o);let g=Ww(e,r);const v=Yw(e,a,u);return a==="center"?r==="left"?g+=u:r==="right"&&(g-=u):r==="left"?g-=Math.max(f,d)+s:r==="right"&&(g+=Math.max(c,h)+s),{x:cn(g,0,i.width-e.width),y:cn(v,0,i.height-e.height)}}function so(n,e,t){const i=Jn(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 fi([],vi(n))}function Kw(n,e,t){return zi(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 ua extends Mi{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 L_(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=Kw(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=fi(r,vi(s)),r=fi(r,vi(l)),r=fi(r,vi(o)),r}getBeforeBody(e,t){return sc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return Et(e,l=>{const o={before:[],lines:[],after:[]},r=lc(i,l);fi(o.before,vi(r.beforeLabel.call(this,l))),fi(o.lines,r.label.call(this,l)),fi(o.after,vi(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=fi(r,vi(s)),r=fi(r,vi(l)),r=fi(r,vi(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;a<u;++a)r.push(Vw(this.chart,t[a]));return e.filter&&(r=r.filter((f,c,d)=>e.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),Et(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;l Line truncated
* chartjs-adapter-luxon v1.2.0
* https://www.chartjs.org
* (c) 2022 chartjs-adapter-luxon Contributors
* Released under the MIT license
*/const h$={datetime:Qe.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Qe.TIME_WITH_SECONDS,minute:Qe.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};H_._date.override({_id:"luxon",_create:function(n){return Qe.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return h$},parse:function(n,e){const t=this.options,i=typeof n;return n===null||i==="undefined"?null:(i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Qe.fromFormat(n,e,t):n=Qe.fromISO(n,t):n instanceof Date?n=Qe.fromJSDate(n,t):i==="object"&&!(n instanceof Qe)&&(n=Qe.fromObject(n,t)),n.isValid?n.valueOf():null)},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e):t.toLocaleString(e)},add:function(n,e,t){const i={};return i[t]=e,this._create(n).plus(i).valueOf()},diff:function(n,e,t){return this._create(n).diff(this._create(e)).as(t).valueOf()},startOf:function(n,e,t){if(e==="isoWeek"){t=Math.trunc(Math.min(Math.max(0,t),6));const i=this._create(n);return i.minus({days:(i.weekday-t+7)%7}).startOf("day").valueOf()}return e?this._create(n).startOf(e).valueOf():n},endOf:function(n,e){return this._create(n).endOf(e).valueOf()}});function pc(n){let e,t,i;return{c(){e=_("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Tt(()=>{t||(t=st(e,Tn,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=st(e,Tn,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function m$(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=N(n[1]),t=D(),s=N(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&ue(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&ue(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function g$(n){let e;return{c(){e=N("Loading...")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function _$(n){let e,t,i,s,l,o=n[2]&&pc();function r(f,c){return f[2]?g$:m$}let a=r(n),u=a(n);return{c(){e=_("div"),o&&o.c(),t=D(),i=_("canvas"),s=D(),l=_("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),lu(i,"height","250px"),lu(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),te(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){w(f,e,c),o&&o.m(e,null),m(e,t),m(e,i),n[8](i),w(f,s,c),w(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&&(Ae(),L(o,1,1,()=>{o=null}),Pe()),c&4&&te(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){L(o)},d(f){f&&k(e),o&&o.d(),n[8](null),f&&k(s),f&&k(l),u.d()}}}function b$(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),ye.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let g of h)r.push({x:B.getDateTime(g.date).toLocal().toJSDate(),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(c(),console.warn(h),ye.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Fn(()=>(Io.register(Bi,er,Qo,Qa,Pl,qw,Jw),t(6,o=new Io(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:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(h){me[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.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 v$ extends Ee{constructor(e){super(),Oe(this,e,b$,_$,De,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var hc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},sb={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
*/const h$={datetime:Qe.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Qe.TIME_WITH_SECONDS,minute:Qe.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};H_._date.override({_id:"luxon",_create:function(n){return Qe.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return h$},parse:function(n,e){const t=this.options,i=typeof n;return n===null||i==="undefined"?null:(i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Qe.fromFormat(n,e,t):n=Qe.fromISO(n,t):n instanceof Date?n=Qe.fromJSDate(n,t):i==="object"&&!(n instanceof Qe)&&(n=Qe.fromObject(n,t)),n.isValid?n.valueOf():null)},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e):t.toLocaleString(e)},add:function(n,e,t){const i={};return i[t]=e,this._create(n).plus(i).valueOf()},diff:function(n,e,t){return this._create(n).diff(this._create(e)).as(t).valueOf()},startOf:function(n,e,t){if(e==="isoWeek"){t=Math.trunc(Math.min(Math.max(0,t),6));const i=this._create(n);return i.minus({days:(i.weekday-t+7)%7}).startOf("day").valueOf()}return e?this._create(n).startOf(e).valueOf():n},endOf:function(n,e){return this._create(n).endOf(e).valueOf()}});function pc(n){let e,t,i;return{c(){e=_("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Tt(()=>{t||(t=st(e,Tn,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=st(e,Tn,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function m$(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=N(n[1]),t=D(),s=N(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&ue(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&ue(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function g$(n){let e;return{c(){e=N("Loading...")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function _$(n){let e,t,i,s,l,o=n[2]&&pc();function r(f,c){return f[2]?g$:m$}let a=r(n),u=a(n);return{c(){e=_("div"),o&&o.c(),t=D(),i=_("canvas"),s=D(),l=_("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),lu(i,"height","250px"),lu(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),ne(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){w(f,e,c),o&&o.m(e,null),m(e,t),m(e,i),n[8](i),w(f,s,c),w(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&&(Ae(),L(o,1,1,()=>{o=null}),Pe()),c&4&&ne(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){L(o)},d(f){f&&k(e),o&&o.d(),n[8](null),f&&k(s),f&&k(l),u.d()}}}function b$(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),ye.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let g of h)r.push({x:B.getDateTime(g.date).toLocal().toJSDate(),y:g.total}),t(1,a+=g.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(c(),console.warn(h),ye.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Fn(()=>(Io.register(Bi,er,Qo,Qa,Pl,qw,Jw),t(6,o=new Io(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:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(h){me[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.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 v$ extends Ee{constructor(e){super(),Oe(this,e,b$,_$,De,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var hc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},sb={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @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 $(C){return C instanceof a?new a(C.type,$(C.content),C.alias):Array.isArray(C)?C.map($):C.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function($){return Object.prototype.toString.call($).slice(8,-1)},objId:function($){return $.__id||Object.defineProperty($,"__id",{value:++l}),$.__id},clone:function $(C,S){S=S||{};var T,M;switch(r.util.type(C)){case"Object":if(M=r.util.objId(C),S[M])return S[M];T={},S[M]=T;for(var O in C)C.hasOwnProperty(O)&&(T[O]=$(C[O],S));return T;case"Array":return M=r.util.objId(C),S[M]?S[M]:(T=[],S[M]=T,C.forEach(function(E,P){T[P]=$(E,S)}),T);default:return C}},getLanguage:function($){for(;$;){var C=s.exec($.className);if(C)return C[1].toLowerCase();$=$.parentElement}return"none"},setLanguage:function($,C){$.className=$.className.replace(RegExp(s,"gi"),""),$.classList.add("language-"+C)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(T){var $=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(T.stack)||[])[1];if($){var C=document.getElementsByTagName("script");for(var S in C)if(C[S].src==$)return C[S]}return null}},isActive:function($,C,S){for(var T="no-"+C;$;){var M=$.classList;if(M.contains(C))return!0;if(M.contains(T))return!1;$=$.parentElement}return!!S}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function($,C){var S=r.util.clone(r.languages[$]);for(var T in C)S[T]=C[T];return S},insertBefore:function($,C,S,T){T=T||r.languages;var M=T[$],O={};for(var E in M)if(M.hasOwnProperty(E)){if(E==C)for(var P in S)S.hasOwnProperty(P)&&(O[P]=S[P]);S.hasOwnProperty(E)||(O[E]=M[E])}var I=T[$];return T[$]=O,r.languages.DFS(r.languages,function(F,z){z===I&&F!=$&&(this[F]=O)}),O},DFS:function $(C,S,T,M){M=M||{};var O=r.util.objId;for(var E in C)if(C.hasOwnProperty(E)){S.call(C,E,C[E],T||E);var P=C[E],I=r.util.type(P);I==="Object"&&!M[O(P)]?(M[O(P)]=!0,$(P,S,null,M)):I==="Array"&&!M[O(P)]&&(M[O(P)]=!0,$(P,S,E,M))}}},plugins:{},highlightAll:function($,C){r.highlightAllUnder(document,$,C)},highlightAllUnder:function($,C,S){var T={callback:S,container:$,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",T),T.elements=Array.prototype.slice.apply(T.container.querySelectorAll(T.selector)),r.hooks.run("before-all-elements-highlight",T);for(var M=0,O;O=T.elements[M++];)r.highlightElement(O,C===!0,T.callback)},highlightElement:function($,C,S){var T=r.util.getLanguage($),M=r.languages[T];r.util.setLanguage($,T);var O=$.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,T);var E=$.textContent,P={element:$,language:T,grammar:M,code:E};function I(z){P.highlightedCode=z,r.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,r.hooks.run("after-highlight",P),r.hooks.run("complete",P),S&&S.call(P.element)}if(r.hooks.run("before-sanity-check",P),O=P.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!P.code){r.hooks.run("complete",P),S&&S.call(P.element);return}if(r.hooks.run("before-highlight",P),!P.grammar){I(r.util.encode(P.code));return}if(C&&i.Worker){var F=new Worker(r.filename);F.onmessage=function(z){I(z.data)},F.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else I(r.highlight(P.code,P.grammar,P.language))},highlight:function($,C,S){var T={code:$,grammar:C,language:S};if(r.hooks.run("before-tokenize",T),!T.grammar)throw new Error('The language "'+T.language+'" has no grammar.');return T.tokens=r.tokenize(T.code,T.grammar),r.hooks.run("after-tokenize",T),a.stringify(r.util.encode(T.tokens),T.language)},tokenize:function($,C){var S=C.rest;if(S){for(var T in S)C[T]=S[T];delete C.rest}var M=new c;return d(M,M.head,$),f($,M,C,M.head,0),g(M)},hooks:{all:{},add:function($,C){var S=r.hooks.all;S[$]=S[$]||[],S[$].push(C)},run:function($,C){var S=r.hooks.all[$];if(!(!S||!S.length))for(var T=0,M;M=S[T++];)M(C)}},Token:a};i.Prism=r;function a($,C,S,T){this.type=$,this.content=C,this.alias=S,this.length=(T||"").length|0}a.stringify=function $(C,S){if(typeof C=="string")return C;if(Array.isArray(C)){var T="";return C.forEach(function(I){T+=$(I,S)}),T}var M={type:C.type,content:$(C.content,S),tag:"span",classes:["token",C.type],attributes:{},language:S},O=C.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(M.classes,O):M.classes.push(O)),r.hooks.run("wrap",M);var E="";for(var P in M.attributes)E+=" "+P+'="'+(M.attributes[P]||"").replace(/"/g,"&quot;")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+E+">"+M.content+"</"+M.tag+">"};function u($,C,S,T){$.lastIndex=C;var M=$.exec(S);if(M&&T&&M[1]){var O=M[1].length;M.index+=O,M[0]=M[0].slice(O)}return M}funLine truncated
*/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 $(C){return C instanceof a?new a(C.type,$(C.content),C.alias):Array.isArray(C)?C.map($):C.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function($){return Object.prototype.toString.call($).slice(8,-1)},objId:function($){return $.__id||Object.defineProperty($,"__id",{value:++l}),$.__id},clone:function $(C,S){S=S||{};var T,M;switch(r.util.type(C)){case"Object":if(M=r.util.objId(C),S[M])return S[M];T={},S[M]=T;for(var O in C)C.hasOwnProperty(O)&&(T[O]=$(C[O],S));return T;case"Array":return M=r.util.objId(C),S[M]?S[M]:(T=[],S[M]=T,C.forEach(function(E,P){T[P]=$(E,S)}),T);default:return C}},getLanguage:function($){for(;$;){var C=s.exec($.className);if(C)return C[1].toLowerCase();$=$.parentElement}return"none"},setLanguage:function($,C){$.className=$.className.replace(RegExp(s,"gi"),""),$.classList.add("language-"+C)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(T){var $=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(T.stack)||[])[1];if($){var C=document.getElementsByTagName("script");for(var S in C)if(C[S].src==$)return C[S]}return null}},isActive:function($,C,S){for(var T="no-"+C;$;){var M=$.classList;if(M.contains(C))return!0;if(M.contains(T))return!1;$=$.parentElement}return!!S}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function($,C){var S=r.util.clone(r.languages[$]);for(var T in C)S[T]=C[T];return S},insertBefore:function($,C,S,T){T=T||r.languages;var M=T[$],O={};for(var E in M)if(M.hasOwnProperty(E)){if(E==C)for(var P in S)S.hasOwnProperty(P)&&(O[P]=S[P]);S.hasOwnProperty(E)||(O[E]=M[E])}var I=T[$];return T[$]=O,r.languages.DFS(r.languages,function(F,V){V===I&&F!=$&&(this[F]=O)}),O},DFS:function $(C,S,T,M){M=M||{};var O=r.util.objId;for(var E in C)if(C.hasOwnProperty(E)){S.call(C,E,C[E],T||E);var P=C[E],I=r.util.type(P);I==="Object"&&!M[O(P)]?(M[O(P)]=!0,$(P,S,null,M)):I==="Array"&&!M[O(P)]&&(M[O(P)]=!0,$(P,S,E,M))}}},plugins:{},highlightAll:function($,C){r.highlightAllUnder(document,$,C)},highlightAllUnder:function($,C,S){var T={callback:S,container:$,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",T),T.elements=Array.prototype.slice.apply(T.container.querySelectorAll(T.selector)),r.hooks.run("before-all-elements-highlight",T);for(var M=0,O;O=T.elements[M++];)r.highlightElement(O,C===!0,T.callback)},highlightElement:function($,C,S){var T=r.util.getLanguage($),M=r.languages[T];r.util.setLanguage($,T);var O=$.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,T);var E=$.textContent,P={element:$,language:T,grammar:M,code:E};function I(V){P.highlightedCode=V,r.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,r.hooks.run("after-highlight",P),r.hooks.run("complete",P),S&&S.call(P.element)}if(r.hooks.run("before-sanity-check",P),O=P.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!P.code){r.hooks.run("complete",P),S&&S.call(P.element);return}if(r.hooks.run("before-highlight",P),!P.grammar){I(r.util.encode(P.code));return}if(C&&i.Worker){var F=new Worker(r.filename);F.onmessage=function(V){I(V.data)},F.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else I(r.highlight(P.code,P.grammar,P.language))},highlight:function($,C,S){var T={code:$,grammar:C,language:S};if(r.hooks.run("before-tokenize",T),!T.grammar)throw new Error('The language "'+T.language+'" has no grammar.');return T.tokens=r.tokenize(T.code,T.grammar),r.hooks.run("after-tokenize",T),a.stringify(r.util.encode(T.tokens),T.language)},tokenize:function($,C){var S=C.rest;if(S){for(var T in S)C[T]=S[T];delete C.rest}var M=new c;return d(M,M.head,$),f($,M,C,M.head,0),g(M)},hooks:{all:{},add:function($,C){var S=r.hooks.all;S[$]=S[$]||[],S[$].push(C)},run:function($,C){var S=r.hooks.all[$];if(!(!S||!S.length))for(var T=0,M;M=S[T++];)M(C)}},Token:a};i.Prism=r;function a($,C,S,T){this.type=$,this.content=C,this.alias=S,this.length=(T||"").length|0}a.stringify=function $(C,S){if(typeof C=="string")return C;if(Array.isArray(C)){var T="";return C.forEach(function(I){T+=$(I,S)}),T}var M={type:C.type,content:$(C.content,S),tag:"span",classes:["token",C.type],attributes:{},language:S},O=C.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(M.classes,O):M.classes.push(O)),r.hooks.run("wrap",M);var E="";for(var P in M.attributes)E+=" "+P+'="'+(M.attributes[P]||"").replace(/"/g,"&quot;")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+E+">"+M.content+"</"+M.tag+">"};function u($,C,S,T){$.lastIndex=C;var M=$.exec(S);if(M&&T&&M[1]){var O=M[1].length;M.index+=O,M[0]=M[0].slice(O)}return M}funLine truncated
`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(P+1))}y.textContent=M,t.highlightElement(y)},function(M){b.setAttribute(r,f),y.textContent=M})}}),t.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(c),$=0,C;C=y[$++];)t.highlightElement(C)}};var g=!1;t.fileHighlight=function(){g||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),g=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(sb);const Gs=sb.exports;var y$={exports:{}};(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;a<o.length;++a)o.charCodeAt(a)==" ".charCodeAt(0)&&(r+=3);return o.length+r}var l={"remove-trailing":"boolean","remove-indent":"boolean","left-trim":"boolean","right-trim":"boolean","break-lines":"number",indent:"number","remove-initial-line-feed":"boolean","tabs-to-spaces":"number","spaces-to-tabs":"number"};t.prototype={setDefaults:function(o){this.defaults=e(this.defaults,o)},normalize:function(o,r){r=e(this.defaults,r);for(var a in r){var u=i(a);a!=="normalize"&&u!=="setDefaults"&&r[a]&&this[u]&&(o=this[u].call(this,o,r[a]))}return o},leftTrim:function(o){return o.replace(/^\s+/,"")},rightTrim:function(o){return o.replace(/\s+$/,"")},tabsToSpaces:function(o,r){return r=r|0||4,o.replace(/\t/g,new Array(++r).join(" "))},spacesToTabs:function(o,r){return r=r|0||4,o.replace(RegExp(" {"+r+"}","g")," ")},removeTrailing:function(o){return o.replace(/\s*?$/gm,"")},removeInitialLineFeed:function(o){return o.replace(/^(?:\r?\n|\r)/,"")},removeIndent:function(o){var r=o.match(/^[^\S\n\r]*(?=\S)/gm);return!r||!r[0].length||(r.sort(function(a,u){return a.length-u.length}),!r[0].length)?o:o.replace(RegExp("^"+r[0],"gm"),"")},indent:function(o,r){return o.replace(/^[^\S\n\r]*(?=\S)/gm,new Array(++r).join(" ")+"$&")},breakLines:function(o,r){r=r===!0?80:r|0||80;for(var a=o.split(`
`),u=0;u<a.length;++u)if(!(s(a[u])<=r)){for(var f=a[u].split(/(\s+)/g),c=0,d=0;d<f.length;++d){var h=s(f[d]);c+=h,c>r&&(f[d]=`
`+f[d],c=h)}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,h="",g="",v=!1,b=0;b<d.length;++b){var y=d[b];y==o.element?v=!0:y.nodeName==="#text"&&(v?g+=y.nodeValue:h+=y.nodeValue,a.removeChild(y),--b)}if(!o.element.children.length||!Prism.plugins.KeepMarkup)o.code=h+o.code+g,o.code=r.normalize(o.code,o.settings);else{var $=h+o.element.innerHTML+g;o.element.innerHTML=r.normalize($,o.settings),o.code=o.element.textContent}}}})})()})(y$);(function(n){var e=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};n.languages.dart=n.languages.extend("clike",{"class-name":[i,{pattern:RegExp(t+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:i.inside}],keyword:e,operator:/\bis!|\b(?:as|is)\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 k$(n){let e,t,i;return{c(){e=_("div"),t=_("code"),p(t,"class","svelte-1ua9m3i"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-1ua9m3i")},m(s,l){w(s,e,l),m(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-1ua9m3i")&&p(e,"class",i)},i:se,o:se,d(s){s&&k(e)}}}function w$(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=Gs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Gs.highlight(a,Gs.languages[l]||Gs.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 Gs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class _n extends Ee{constructor(e){super(),Oe(this,e,w$,k$,De,{class:0,content:2,language:3})}}const $$=n=>({}),mc=n=>({}),S$=n=>({}),gc=n=>({});function _c(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C=n[4]&&!n[2]&&bc(n);const S=n[18].header,T=$n(S,n,n[17],gc);let M=n[4]&&n[2]&&vc(n);const O=n[18].default,E=$n(O,n,n[17],null),P=n[18].footer,I=$n(P,n,n[17],mc);return{c(){e=_("div"),t=_("div"),s=D(),l=_("div"),o=_("div"),C&&C.c(),r=D(),T&&T.c(),a=D(),M&&M.c(),u=D(),f=_("div"),E&&E.c(),c=D(),d=_("div"),I&&I.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",h="overlay-panel "+n[1]+" "+n[8]),te(l,"popup",n[2]),p(e,"class","overlay-panel-container"),te(e,"padded",n[2]),te(e,"active",n[0])},m(F,z){w(F,e,z),m(e,t),m(e,s),m(e,l),m(l,o),C&&C.m(o,null),m(o,r),T&&T.m(o,null),m(o,a),M&&M.m(o,null),m(l,u),m(l,f),E&&E.m(f,null),n[20](f),m(l,c),m(l,d),I&&I.m(d,null),b=!0,y||($=[J(t,"click",Wt(n[19])),J(f,"scroll",n[21])],y=!0)},p(F,z){n=F,n[4]&&!n[2]?C?C.p(n,z):(C=bc(n),C.c(),C.m(o,r)):C&&(C.d(1),C=null),T&&T.p&&(!b||z&131072)&&Cn(T,S,n,n[17],b?Sn(S,n[17],z,S$):Mn(n[17]),gc),n[4]&&n[2]?M?M.p(n,z):(M=vc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),E&&E.p&&(!b||z&131072)&&Cn(E,O,n,n[17],b?Sn(O,n[17],z,null):Mn(n[17]),null),I&&I.p&&(!b||z&131072)&&Cn(I,P,n,n[17],b?Sn(P,n[17],z,$$) Line truncated
`)}},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,h="",g="",v=!1,b=0;b<d.length;++b){var y=d[b];y==o.element?v=!0:y.nodeName==="#text"&&(v?g+=y.nodeValue:h+=y.nodeValue,a.removeChild(y),--b)}if(!o.element.children.length||!Prism.plugins.KeepMarkup)o.code=h+o.code+g,o.code=r.normalize(o.code,o.settings);else{var $=h+o.element.innerHTML+g;o.element.innerHTML=r.normalize($,o.settings),o.code=o.element.textContent}}}})})()})(y$);(function(n){var e=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,i={pattern:RegExp(t+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};n.languages.dart=n.languages.extend("clike",{"class-name":[i,{pattern:RegExp(t+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:i.inside}],keyword:e,operator:/\bis!|\b(?:as|is)\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 k$(n){let e,t,i;return{c(){e=_("div"),t=_("code"),p(t,"class","svelte-1ua9m3i"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-1ua9m3i")},m(s,l){w(s,e,l),m(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-1ua9m3i")&&p(e,"class",i)},i:se,o:se,d(s){s&&k(e)}}}function w$(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=Gs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Gs.highlight(a,Gs.languages[l]||Gs.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 Gs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class _n extends Ee{constructor(e){super(),Oe(this,e,w$,k$,De,{class:0,content:2,language:3})}}const $$=n=>({}),mc=n=>({}),S$=n=>({}),gc=n=>({});function _c(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C=n[4]&&!n[2]&&bc(n);const S=n[18].header,T=$n(S,n,n[17],gc);let M=n[4]&&n[2]&&vc(n);const O=n[18].default,E=$n(O,n,n[17],null),P=n[18].footer,I=$n(P,n,n[17],mc);return{c(){e=_("div"),t=_("div"),s=D(),l=_("div"),o=_("div"),C&&C.c(),r=D(),T&&T.c(),a=D(),M&&M.c(),u=D(),f=_("div"),E&&E.c(),c=D(),d=_("div"),I&&I.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",h="overlay-panel "+n[1]+" "+n[8]),ne(l,"popup",n[2]),p(e,"class","overlay-panel-container"),ne(e,"padded",n[2]),ne(e,"active",n[0])},m(F,V){w(F,e,V),m(e,t),m(e,s),m(e,l),m(l,o),C&&C.m(o,null),m(o,r),T&&T.m(o,null),m(o,a),M&&M.m(o,null),m(l,u),m(l,f),E&&E.m(f,null),n[20](f),m(l,c),m(l,d),I&&I.m(d,null),b=!0,y||($=[J(t,"click",Wt(n[19])),J(f,"scroll",n[21])],y=!0)},p(F,V){n=F,n[4]&&!n[2]?C?C.p(n,V):(C=bc(n),C.c(),C.m(o,r)):C&&(C.d(1),C=null),T&&T.p&&(!b||V&131072)&&Cn(T,S,n,n[17],b?Sn(S,n[17],V,S$):Mn(n[17]),gc),n[4]&&n[2]?M?M.p(n,V):(M=vc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),E&&E.p&&(!b||V&131072)&&Cn(E,O,n,n[17],b?Sn(O,n[17],V,null):Mn(n[17]),null),I&&I.p&&(!b||V&131072)&&Cn(I,P,n,n[17],b?Sn(P,n[17],V,$$) Line truncated
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 $={};y&16&&($.id=b[4]),y&1&&($.disabled=!B.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,$.value=b[0].exceptDomains,je(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){L(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),j(r,b),b&&k(u),b&&k(f),d=!1,h()}}}function AS(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(b){n[3](b)}let v={id:n[4]+".options.onlyDomains",disabled:!B.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new hs({props:v}),me.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=D(),s=_("i"),o=D(),q(r.$$.fragment),u=D(),f=_("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){w(b,e,y),m(e,t),m(e,i),m(e,s),w(b,o,y),H(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(h=Ye(gt.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 $={};y&16&&($.id=b[4]+".options.onlyDomains"),y&1&&($.disabled=!B.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,$.value=b[0].onlyDomains,je(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){L(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),j(r,b),b&&k(u),b&&k(f),d=!1,h()}}}function PS(n){let e,t,i,s,l,o,r;return i=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[ES,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[AS,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),H(i,t,null),m(e,s),m(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){L(i.$$.fragment,a),L(o.$$.fragment,a),r=!1},d(a){a&&k(e),j(i),j(o)}}}function LS(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 ab extends Ee{constructor(e){super(),Oe(this,e,LS,PS,De,{key:1,options:0})}}function IS(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 ab({props:r}),me.push(()=>Re(e,"key",l)),me.push(()=>Re(e,"options",o)),{c(){q(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],je(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],je(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){L(e.$$.fragment,a),s=!1},d(a){j(e,a)}}}function NS(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 FS extends Ee{constructor(e){super(),Oe(this,e,NS,IS,De,{key:0,options:1})}}var Dr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ss={_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:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},yl={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 togg Line truncated
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 $={};y&16&&($.id=b[4]+".options.onlyDomains"),y&1&&($.disabled=!B.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,$.value=b[0].onlyDomains,je(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){L(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),j(r,b),b&&k(u),b&&k(f),d=!1,h()}}}function PS(n){let e,t,i,s,l,o,r;return i=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[ES,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[AS,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){w(a,e,u),m(e,t),H(i,t,null),m(e,s),m(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){L(i.$$.fragment,a),L(o.$$.fragment,a),r=!1},d(a){a&&k(e),j(i),j(o)}}}function LS(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 ab extends Ee{constructor(e){super(),Oe(this,e,LS,PS,De,{key:1,options:0})}}function IS(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 ab({props:r}),me.push(()=>Re(e,"key",l)),me.push(()=>Re(e,"options",o)),{c(){q(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],je(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],je(()=>i=!1)),e.$set(f)},i(a){s||(A(e.$$.fragment,a),s=!0)},o(a){L(e.$$.fragment,a),s=!1},d(a){j(e,a)}}}function NS(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 FS extends Ee{constructor(e){super(),Oe(this,e,NS,IS,De,{key:0,options:1})}}var Dr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ss={_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:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},yl={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 togg Line truncated
<span class='flatpickr-weekday'>
`+V.join("</span><span class='flatpickr-weekday'>")+`
`+z.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function de(){t.calendarContainer.classList.add("hasWeeks");var R=St("div","flatpickr-weekwrapper");R.appendChild(St("span","flatpickr-weekday",t.l10n.weekAbbreviation));var V=St("div","flatpickr-weeks");return R.appendChild(V),{weekWrapper:R,weekNumbers:V}}function x(R,V){V===void 0&&(V=!0);var ie=V?R:R-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ze("onYearChange"),Q()),z(),Ze("onMonthChange"),rt())}function oe(R,V){if(R===void 0&&(R=!0),V===void 0&&(V=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,V===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=Pr(t.config),re=ie.hours,Le=ie.minutes,le=ie.seconds;h(re,Le,le)}t.redraw(),R&&Ze("onChange")}function Ce(){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 Te(){t.config!==void 0&&Ze("onDestroy");for(var R=t._handlers.length;R--;)t._handlers[R].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 V=t.calendarContainer.parentNode;if(V.lastChild&&V.removeChild(V.lastChild),V.parentNode){for(;V.firstChild;)V.parentNode.insertBefore(V.firstChild,V);V.parentNode.removeChild(V)}}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(ie){try{delete t[ie]}catch{}})}function K(R){return t.calendarContainer.contains(R)}function we(R){if(t.isOpen&&!t.config.inline){var V=En(R),ie=K(V),re=V===t.input||V===t.altInput||t.element.contains(V)||R.path&&R.path.indexOf&&(~R.path.indexOf(t.input)||~R.path.indexOf(t.altInput)),Le=!re&&!ie&&!K(R.relatedTarget),le=!t.config.ignoredFocusElements.some(function(pe){return pe.contains(V)});Le&&le&&(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 ae(R){if(!(!R||t.config.minDate&&R<t.config.minDate.getFullYear()||t.config.maxDate&&R>t.config.maxDate.getFullYear())){var V=R,ie=t.currentYear!==V;t.currentYear=V||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)),ie&&(t.redraw(),Ze("onYearChange"),Q())}}function W(R,V){var ie;V===void 0&&(V=!0);var re=t.parseDate(R,void 0,V);if(t.config.minDate&&re&&An(re,t.config.minDate,V!==void 0?V:!t.minDateHasTime)<0||t.config.maxDate&&re&&An(re,t.config.maxDate,V!==void 0?V:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(re===void 0)return!1;for(var Le=!!t.config.enable,le=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,pe=0,ve=void 0;pe<le.length;pe++){if(ve=le[pe],typeof ve=="function"&&ve(re))return Le;if(ve instanceof Date&&re!==void 0&&ve.getTime()===re.getTime())return Le;if(typeof ve=="string"){var fe=t.parseDate(ve,void 0,!0);return fe&&fe.getTime()===re.getTime()?Le:!Le}else if(typeof ve=="object"&&re!==void 0&&ve.from&&ve.to&&re.getTime()>=ve.from.getTime()&&re.getTime()<=ve.to.getTime())return Le}return!Le}function _e(R){return t.daysContainer!==void 0?R.className.indexOf("hidden")===-1&&R.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(R):!1}function He(R){var V=R.target===t._input,ie=t._input.value.trimEnd()!==Ht();V&&ie&&!(R.relatedTarget&&K(R.relatedTarget))&&t.setDate(t._input.value,!0,R.target===t.altInput?t.config.altFormat:t.config.dateFormat)}functi Line truncated
`}}function de(){t.calendarContainer.classList.add("hasWeeks");var R=St("div","flatpickr-weekwrapper");R.appendChild(St("span","flatpickr-weekday",t.l10n.weekAbbreviation));var z=St("div","flatpickr-weeks");return R.appendChild(z),{weekWrapper:R,weekNumbers:z}}function x(R,z){z===void 0&&(z=!0);var ie=z?R:R-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ze("onYearChange"),Z()),V(),Ze("onMonthChange"),rt())}function oe(R,z){if(R===void 0&&(R=!0),z===void 0&&(z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=Pr(t.config),re=ie.hours,Le=ie.minutes,le=ie.seconds;h(re,Le,le)}t.redraw(),R&&Ze("onChange")}function Ce(){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 Te(){t.config!==void 0&&Ze("onDestroy");for(var R=t._handlers.length;R--;)t._handlers[R].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 z=t.calendarContainer.parentNode;if(z.lastChild&&z.removeChild(z.lastChild),z.parentNode){for(;z.firstChild;)z.parentNode.insertBefore(z.firstChild,z);z.parentNode.removeChild(z)}}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(ie){try{delete t[ie]}catch{}})}function K(R){return t.calendarContainer.contains(R)}function ke(R){if(t.isOpen&&!t.config.inline){var z=En(R),ie=K(z),re=z===t.input||z===t.altInput||t.element.contains(z)||R.path&&R.path.indexOf&&(~R.path.indexOf(t.input)||~R.path.indexOf(t.altInput)),Le=!re&&!ie&&!K(R.relatedTarget),le=!t.config.ignoredFocusElements.some(function(pe){return pe.contains(z)});Le&&le&&(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 ae(R){if(!(!R||t.config.minDate&&R<t.config.minDate.getFullYear()||t.config.maxDate&&R>t.config.maxDate.getFullYear())){var z=R,ie=t.currentYear!==z;t.currentYear=z||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)),ie&&(t.redraw(),Ze("onYearChange"),Z())}}function W(R,z){var ie;z===void 0&&(z=!0);var re=t.parseDate(R,void 0,z);if(t.config.minDate&&re&&An(re,t.config.minDate,z!==void 0?z:!t.minDateHasTime)<0||t.config.maxDate&&re&&An(re,t.config.maxDate,z!==void 0?z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(re===void 0)return!1;for(var Le=!!t.config.enable,le=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,pe=0,ve=void 0;pe<le.length;pe++){if(ve=le[pe],typeof ve=="function"&&ve(re))return Le;if(ve instanceof Date&&re!==void 0&&ve.getTime()===re.getTime())return Le;if(typeof ve=="string"){var fe=t.parseDate(ve,void 0,!0);return fe&&fe.getTime()===re.getTime()?Le:!Le}else if(typeof ve=="object"&&re!==void 0&&ve.from&&ve.to&&re.getTime()>=ve.from.getTime()&&re.getTime()<=ve.to.getTime())return Le}return!Le}function _e(R){return t.daysContainer!==void 0?R.className.indexOf("hidden")===-1&&R.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(R):!1}function He(R){var z=R.target===t._input,ie=t._input.value.trimEnd()!==Ht();z&&ie&&!(R.relatedTarget&&K(R.relatedTarget))&&t.setDate(t._input.value,!0,R.target===t.altInput?t.config.altFormat:t.config.dateFormat)}functi Line truncated
Leave empty for no restriction.`,position:"top"})),S=!0)},p(E,P){(!C||P&1024&&l!==(l=E[10]))&&p(e,"for",l);const I={};P&1024&&(I.id=E[10]),!a&&P&1&&(a=!0,I.value=E[0].mimeTypes,je(()=>a=!1)),r.$set(I);const F={};P&2049&&(F.$$scope={dirty:P,ctx:E}),$.$set(F)},i(E){C||(A(r.$$.fragment,E),A($.$$.fragment,E),C=!0)},o(E){L(r.$$.fragment,E),L($.$$.fragment,E),C=!1},d(E){E&&k(e),E&&k(o),j(r,E),E&&k(u),E&&k(f),j($),S=!1,T()}}}function u3(n){let e;return{c(){e=_("ul"),e.innerHTML=`<li><strong>WxH</strong>
(eg. 100x50) - crop to WxH viewbox (from center)</li>
<li><strong>WxHt</strong>
@@ -61,37 +61,37 @@
<li><strong>0xH</strong>
(eg. 0x50) - resize to H height preserving the aspect ratio</li>
<li><strong>Wx0</strong>
(eg. 100x0) - resize to W width preserving the aspect ratio</li>`,p(e,"class","m-0")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function f3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T;function M(E){n[9](E)}let O={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(O.value=n[0].thumbs),r=new hs({props:O}),me.push(()=>Re(r,"value",M)),$=new Ti({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[u3]},$$scope:{ctx:n}}}),{c(){e=_("label"),t=_("span"),t.textContent="Thumb sizes",i=D(),s=_("i"),o=D(),q(r.$$.fragment),u=D(),f=_("div"),c=_("span"),c.textContent="Use comma as separator.",d=D(),h=_("button"),g=_("span"),g.textContent="Supported formats",v=D(),b=_("i"),y=D(),q($.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(g,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(E,P){w(E,e,P),m(e,t),m(e,i),m(e,s),w(E,o,P),H(r,E,P),w(E,u,P),w(E,f,P),m(f,c),m(f,d),m(f,h),m(h,g),m(h,v),m(h,b),m(h,y),H($,h,null),C=!0,S||(T=Ye(gt.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"})),S=!0)},p(E,P){(!C||P&1024&&l!==(l=E[10]))&&p(e,"for",l);const I={};P&1024&&(I.id=E[10]),!a&&P&1&&(a=!0,I.value=E[0].thumbs,je(()=>a=!1)),r.$set(I);const F={};P&2048&&(F.$$scope={dirty:P,ctx:E}),$.$set(F)},i(E){C||(A(r.$$.fragment,E),A($.$$.fragment,E),C=!0)},o(E){L(r.$$.fragment,E),L($.$$.fragment,E),C=!1},d(E){E&&k(e),E&&k(o),j(r,E),E&&k(u),E&&k(f),j($),S=!1,T()}}}function c3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[l3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[o3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[a3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[f3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),r=D(),a=_("div"),q(u.$$.fragment),f=D(),c=_("div"),q(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(g,v){w(g,e,v),m(e,t),H(i,t,null),m(e,s),m(e,l),H(o,l,null),m(e,r),m(e,a),H(u,a,null),m(e,f),m(e,c),H(d,c,null),h=!0},p(g,[v]){const b={};v&2&&(b.name="schema."+g[1]+".options.maxSize"),v&3073&&(b.$$scope={dirty:v,ctx:g}),i.$set(b);const y={};v&2&&(y.name="schema."+g[1]+".options.maxSelect"),v&3073&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const $={};v&2&&($.name="schema."+g[1]+".options.mimeTypes"),v&3073&&($.$$scope={dirty:v,ctx:g}),u.$set($);const C={};v&2&&(C.name="schema."+g[1]+".options.thumbs"),v&3073&&(C.$$scope={dirty:v,ctx:g}),d.$set(C)},i(g){h||(A(i.$$.fragment,g),A(o.$$.fragment,g),A(u.$$.fragment,g),A(d.$$.fragment,g),h=!0)},o(g){L(i.$$.fragment,g),L(o.$$.fragment,g),L(u.$$.fragment,g),L(d.$$.fragment,g),h=!1},d(g){g&&k(e),j(i),j(o),j(u),j(d)}}}function d3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=Pt(this.value),t(0,s)}function o(){s.maxSelect=Pt(this.value),t(0,s)}function r(h){n.$$.not_equal(s.mimeTypes,h)&&(s.mimeTypes=h,t(0,s))}const a=()=>{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)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(h){n.$$.not_equal(s.thumbs,h)&&(s.thumbs=h,t(0,s))}return n.$$set=h=>{"key"in h&&t(1,i=h.key),"options"in h&&t(0,s=h.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class p3 extends Ee{constructor(e){super(),Oe(this,e,d3,c3,De,{key:1,options:0})}}function h3(n){let e,t,i,s,l,o,r;function a(f){n[5](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3]};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new ps({props:u}),me.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=N("Collection"),s=D(),q(l.$$.fraLine truncated
(eg. 100x0) - resize to W width preserving the aspect ratio</li>`,p(e,"class","m-0")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function f3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T;function M(E){n[9](E)}let O={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(O.value=n[0].thumbs),r=new hs({props:O}),me.push(()=>Re(r,"value",M)),$=new Ti({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[u3]},$$scope:{ctx:n}}}),{c(){e=_("label"),t=_("span"),t.textContent="Thumb sizes",i=D(),s=_("i"),o=D(),q(r.$$.fragment),u=D(),f=_("div"),c=_("span"),c.textContent="Use comma as separator.",d=D(),h=_("button"),g=_("span"),g.textContent="Supported formats",v=D(),b=_("i"),y=D(),q($.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(g,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(E,P){w(E,e,P),m(e,t),m(e,i),m(e,s),w(E,o,P),H(r,E,P),w(E,u,P),w(E,f,P),m(f,c),m(f,d),m(f,h),m(h,g),m(h,v),m(h,b),m(h,y),H($,h,null),C=!0,S||(T=Ye(gt.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"})),S=!0)},p(E,P){(!C||P&1024&&l!==(l=E[10]))&&p(e,"for",l);const I={};P&1024&&(I.id=E[10]),!a&&P&1&&(a=!0,I.value=E[0].thumbs,je(()=>a=!1)),r.$set(I);const F={};P&2048&&(F.$$scope={dirty:P,ctx:E}),$.$set(F)},i(E){C||(A(r.$$.fragment,E),A($.$$.fragment,E),C=!0)},o(E){L(r.$$.fragment,E),L($.$$.fragment,E),C=!1},d(E){E&&k(e),E&&k(o),j(r,E),E&&k(u),E&&k(f),j($),S=!1,T()}}}function c3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[l3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[o3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[a3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[f3,({uniqueId:g})=>({10:g}),({uniqueId:g})=>g?1024:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),r=D(),a=_("div"),q(u.$$.fragment),f=D(),c=_("div"),q(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(g,v){w(g,e,v),m(e,t),H(i,t,null),m(e,s),m(e,l),H(o,l,null),m(e,r),m(e,a),H(u,a,null),m(e,f),m(e,c),H(d,c,null),h=!0},p(g,[v]){const b={};v&2&&(b.name="schema."+g[1]+".options.maxSize"),v&3073&&(b.$$scope={dirty:v,ctx:g}),i.$set(b);const y={};v&2&&(y.name="schema."+g[1]+".options.maxSelect"),v&3073&&(y.$$scope={dirty:v,ctx:g}),o.$set(y);const $={};v&2&&($.name="schema."+g[1]+".options.mimeTypes"),v&3073&&($.$$scope={dirty:v,ctx:g}),u.$set($);const C={};v&2&&(C.name="schema."+g[1]+".options.thumbs"),v&3073&&(C.$$scope={dirty:v,ctx:g}),d.$set(C)},i(g){h||(A(i.$$.fragment,g),A(o.$$.fragment,g),A(u.$$.fragment,g),A(d.$$.fragment,g),h=!0)},o(g){L(i.$$.fragment,g),L(o.$$.fragment,g),L(u.$$.fragment,g),L(d.$$.fragment,g),h=!1},d(g){g&&k(e),j(i),j(o),j(u),j(d)}}}function d3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=Pt(this.value),t(0,s)}function o(){s.maxSelect=Pt(this.value),t(0,s)}function r(h){n.$$.not_equal(s.mimeTypes,h)&&(s.mimeTypes=h,t(0,s))}const a=()=>{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)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(h){n.$$.not_equal(s.thumbs,h)&&(s.thumbs=h,t(0,s))}return n.$$set=h=>{"key"in h&&t(1,i=h.key),"options"in h&&t(0,s=h.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class p3 extends Ee{constructor(e){super(),Oe(this,e,d3,c3,De,{key:1,options:0})}}function h3(n){let e,t,i,s,l,o,r;function a(f){n[5](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3]};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new ps({props:u}),me.push(()=>Re(l,"keyOfSelected",a)),{c(){e=_("label"),t=N("Collection"),s=D(),q(l.$$.fraLine truncated
form-field
required
`+(n[5]?"":"invalid")+`
`+(n[0].id&&n[0].system?"disabled":"")+`
`,name:"schema."+n[1]+".name",$$slots:{default:[M3,({uniqueId:z})=>({38:z}),({uniqueId:z})=>[0,z?128:0]]},$$scope:{ctx:n}}});const O=[R3,F3,N3,I3,L3,P3,A3,E3,O3,D3,T3],E=[];function P(z,Q){return z[0].type==="text"?0:z[0].type==="number"?1:z[0].type==="bool"?2:z[0].type==="email"?3:z[0].type==="url"?4:z[0].type==="date"?5:z[0].type==="select"?6:z[0].type==="json"?7:z[0].type==="file"?8:z[0].type==="relation"?9:z[0].type==="user"?10:-1}~(f=P(n))&&(c=E[f]=O[f](n)),g=new Ne({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[H3,({uniqueId:z})=>({38:z}),({uniqueId:z})=>[0,z?128:0]]},$$scope:{ctx:n}}});let I=n[0].type!=="file"&&Yc(n),F=!n[0].toDelete&&Kc(n);return{c(){e=_("form"),t=_("div"),i=_("div"),q(s.$$.fragment),l=D(),o=_("div"),q(r.$$.fragment),a=D(),u=_("div"),c&&c.c(),d=D(),h=_("div"),q(g.$$.fragment),v=D(),b=_("div"),I&&I.c(),y=D(),F&&F.c(),$=D(),C=_("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(h,"class","col-sm-4 flex"),p(b,"class","col-sm-4 flex"),p(t,"class","grid"),p(C,"type","submit"),p(C,"class","hidden"),p(C,"tabindex","-1"),p(e,"class","field-form")},m(z,Q){w(z,e,Q),m(e,t),m(t,i),H(s,i,null),m(t,l),m(t,o),H(r,o,null),m(t,a),m(t,u),~f&&E[f].m(u,null),m(t,d),m(t,h),H(g,h,null),m(t,v),m(t,b),I&&I.m(b,null),m(t,y),F&&F.m(t,null),m(e,$),m(e,C),S=!0,T||(M=J(e,"submit",Wt(n[31])),T=!0)},p(z,Q){const ne={};Q[0]&1&&(ne.class="form-field required "+(z[0].id?"disabled":"")),Q[0]&2&&(ne.name="schema."+z[1]+".type"),Q[0]&1|Q[1]&384&&(ne.$$scope={dirty:Q,ctx:z}),s.$set(ne);const G={};Q[0]&33&&(G.class=`
`,name:"schema."+n[1]+".name",$$slots:{default:[M3,({uniqueId:V})=>({38:V}),({uniqueId:V})=>[0,V?128:0]]},$$scope:{ctx:n}}});const O=[R3,F3,N3,I3,L3,P3,A3,E3,O3,D3,T3],E=[];function P(V,Z){return V[0].type==="text"?0:V[0].type==="number"?1:V[0].type==="bool"?2:V[0].type==="email"?3:V[0].type==="url"?4:V[0].type==="date"?5:V[0].type==="select"?6:V[0].type==="json"?7:V[0].type==="file"?8:V[0].type==="relation"?9:V[0].type==="user"?10:-1}~(f=P(n))&&(c=E[f]=O[f](n)),g=new Ne({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[H3,({uniqueId:V})=>({38:V}),({uniqueId:V})=>[0,V?128:0]]},$$scope:{ctx:n}}});let I=n[0].type!=="file"&&Yc(n),F=!n[0].toDelete&&Kc(n);return{c(){e=_("form"),t=_("div"),i=_("div"),q(s.$$.fragment),l=D(),o=_("div"),q(r.$$.fragment),a=D(),u=_("div"),c&&c.c(),d=D(),h=_("div"),q(g.$$.fragment),v=D(),b=_("div"),I&&I.c(),y=D(),F&&F.c(),$=D(),C=_("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(h,"class","col-sm-4 flex"),p(b,"class","col-sm-4 flex"),p(t,"class","grid"),p(C,"type","submit"),p(C,"class","hidden"),p(C,"tabindex","-1"),p(e,"class","field-form")},m(V,Z){w(V,e,Z),m(e,t),m(t,i),H(s,i,null),m(t,l),m(t,o),H(r,o,null),m(t,a),m(t,u),~f&&E[f].m(u,null),m(t,d),m(t,h),H(g,h,null),m(t,v),m(t,b),I&&I.m(b,null),m(t,y),F&&F.m(t,null),m(e,$),m(e,C),S=!0,T||(M=J(e,"submit",Wt(n[31])),T=!0)},p(V,Z){const te={};Z[0]&1&&(te.class="form-field required "+(V[0].id?"disabled":"")),Z[0]&2&&(te.name="schema."+V[1]+".type"),Z[0]&1|Z[1]&384&&(te.$$scope={dirty:Z,ctx:V}),s.$set(te);const X={};Z[0]&33&&(X.class=`
form-field
required
`+(z[5]?"":"invalid")+`
`+(z[0].id&&z[0].system?"disabled":"")+`
`),Q[0]&2&&(G.name="schema."+z[1]+".name"),Q[0]&33|Q[1]&384&&(G.$$scope={dirty:Q,ctx:z}),r.$set(G);let ee=f;f=P(z),f===ee?~f&&E[f].p(z,Q):(c&&(Ae(),L(E[ee],1,1,()=>{E[ee]=null}),Pe()),~f?(c=E[f],c?c.p(z,Q):(c=E[f]=O[f](z),c.c()),A(c,1),c.m(u,null)):c=null);const U={};Q[0]&1|Q[1]&384&&(U.$$scope={dirty:Q,ctx:z}),g.$set(U),z[0].type!=="file"?I?(I.p(z,Q),Q[0]&1&&A(I,1)):(I=Yc(z),I.c(),A(I,1),I.m(b,null)):I&&(Ae(),L(I,1,1,()=>{I=null}),Pe()),z[0].toDelete?F&&(Ae(),L(F,1,1,()=>{F=null}),Pe()):F?(F.p(z,Q),Q[0]&1&&A(F,1)):(F=Kc(z),F.c(),A(F,1),F.m(t,null))},i(z){S||(A(s.$$.fragment,z),A(r.$$.fragment,z),A(c),A(g.$$.fragment,z),A(I),A(F),S=!0)},o(z){L(s.$$.fragment,z),L(r.$$.fragment,z),L(c),L(g.$$.fragment,z),L(I),L(F),S=!1},d(z){z&&k(e),j(s),j(r),~f&&E[f].d(),j(g),I&&I.d(),F&&F.d(),T=!1,M()}}}function Zc(n){let e,t,i,s,l=n[0].system&&Gc(),o=!n[0].id&&Xc(n),r=n[0].required&&Qc(),a=n[0].unique&&xc();return{c(){e=_("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){w(u,e,f),l&&l.m(e,null),m(e,t),o&&o.m(e,null),m(e,i),r&&r.m(e,null),m(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Gc(),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=Xc(u),o.c(),o.m(e,i)),u[0].required?r||(r=Qc(),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=xc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Gc(n){let e;return{c(){e=_("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Xc(n){let e;return{c(){e=_("span"),e.textContent="New",p(e,"class","label"),te(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){w(t,e,i)},p(t,i){i[0]&257&&te(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&k(e)}}}function Qc(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xc(n){let e;return{c(){e=_("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ed(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ye(gt.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Tt(()=>{t||(t=st(e,Tn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=st(e,Tn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function td(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){w(s,e,l),t||(i=J(e,"click",ni(n[15])),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function z3(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,h,g,v,b,y=!n[0].toDelete&&Zc(n),$=n[7]&&!n[0].system&&ed(),C=n[0].toDelete&&td(n);return{c(){e=_("div"),t=_("span"),i=_("i"),l=D(),o=_("strong"),a=N(r),f=D(),y&&y.c(),c=D(),d=_("div"),h=D(),$&&$.c(),g=D(),C&&C.c(),v=We(),p(i,"class",s=su(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),te(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(S,T){w(S,e,T),m(e,t),m(t,i),m(e,l),m(e,o),m(o,a),w(S,f,T),y&&y.m(S,T),w(S,c,T),w(S,d,T),w(S,h,T),$&&$.m(S,T),w(S,g,T),C&&C.m(S,T),w(S,v,T),b=!0},p(S,T){(!b||T[0]&1&&s!==(s=su(B.getFieldTypeIcon(S[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!b||T[0]&1)&&r!==(r=(S[0].name||"-")+"")&&ue(a,r),(!b||T[0]&1&&u!==(u=S[0].name))&&p(o,"title",u),T[0]&1&&te(o,"txt-strikethrough",S[0].toDelete),S[0].toDelete?y&&(y.d(1),y=null):y?y.p(S,T):(y=Zc(S),y.c(),y.m(c.parentNode,c)),S[7]&&!S[0].system?$?T[0]&129&&A($,1):($=ed(),$.c(),A($,1),$.m(g.parentNode,g)):$&&(Ae(),L($,1,1,()=>{$=null}),Pe()),S[0].toDelete?C?C.p(S,T):(C=td(S),C.c(),C.m(v.parentNode,v)):C&&(C.d(1),C=null)},i(S){b||(A($),b=!0)},o(S){L($),b=!1},d(S){S&&k(e),S&&k(f),y&&y.d(S),S&&k(c),S&&k(d),S&&k(h),$&&$.d(S),S&&k(g),C&&C.d(S),S&&k(v)}}}function B3(n){let e,t,i={single:!0,interactive:n[8],class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion",$$slots:{header:[z3],default:[V3]},$$scope:{ctx:n}};return e=new ir({props:i}),n[32](e),e.$on("expand",n[33]),e.$on("collapse",n[34]),e.$on("toggle",n[35]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&256&&(o.interactive=s[8]),l[0]&5&&(o.class=s[2]||s[0].toDelete||s[0].system?"field-accordion disabled":"field-accordion"),l[0]&483|l[1]&256&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[32](null),j(e,s)}}}function U3(n,e,t){let i,s,l,o,r;at(n,Vi,K=>t(14,r=K));const a=xt();let{key:u="0"}=e,{field:f=new Dn}=e,{disabled:c=!1}=e,{excludeNames:d=[]}=e,h,g=f.type;function v(){h==null||h.expand()}function b(){h==null||h.collapse()}function y(){f.id?t(0,f.toDelete=!0,f):(b(),a("remove"))}function $(K){if(K=(""+K).toLowerCase(),!K)return!1;for(const we of Line truncated
`+(V[5]?"":"invalid")+`
`+(V[0].id&&V[0].system?"disabled":"")+`
`),Z[0]&2&&(X.name="schema."+V[1]+".name"),Z[0]&33|Z[1]&384&&(X.$$scope={dirty:Z,ctx:V}),r.$set(X);let ee=f;f=P(V),f===ee?~f&&E[f].p(V,Z):(c&&(Ae(),L(E[ee],1,1,()=>{E[ee]=null}),Pe()),~f?(c=E[f],c?c.p(V,Z):(c=E[f]=O[f](V),c.c()),A(c,1),c.m(u,null)):c=null);const U={};Z[0]&1|Z[1]&384&&(U.$$scope={dirty:Z,ctx:V}),g.$set(U),V[0].type!=="file"?I?(I.p(V,Z),Z[0]&1&&A(I,1)):(I=Yc(V),I.c(),A(I,1),I.m(b,null)):I&&(Ae(),L(I,1,1,()=>{I=null}),Pe()),V[0].toDelete?F&&(Ae(),L(F,1,1,()=>{F=null}),Pe()):F?(F.p(V,Z),Z[0]&1&&A(F,1)):(F=Kc(V),F.c(),A(F,1),F.m(t,null))},i(V){S||(A(s.$$.fragment,V),A(r.$$.fragment,V),A(c),A(g.$$.fragment,V),A(I),A(F),S=!0)},o(V){L(s.$$.fragment,V),L(r.$$.fragment,V),L(c),L(g.$$.fragment,V),L(I),L(F),S=!1},d(V){V&&k(e),j(s),j(r),~f&&E[f].d(),j(g),I&&I.d(),F&&F.d(),T=!1,M()}}}function Zc(n){let e,t,i,s,l=n[0].system&&Gc(),o=!n[0].id&&Xc(n),r=n[0].required&&Qc(),a=n[0].unique&&xc();return{c(){e=_("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){w(u,e,f),l&&l.m(e,null),m(e,t),o&&o.m(e,null),m(e,i),r&&r.m(e,null),m(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Gc(),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=Xc(u),o.c(),o.m(e,i)),u[0].required?r||(r=Qc(),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=xc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Gc(n){let e;return{c(){e=_("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Xc(n){let e;return{c(){e=_("span"),e.textContent="New",p(e,"class","label"),ne(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){w(t,e,i)},p(t,i){i[0]&257&&ne(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&k(e)}}}function Qc(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xc(n){let e;return{c(){e=_("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ed(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ye(gt.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Tt(()=>{t||(t=st(e,Tn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=st(e,Tn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function td(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Restore</span>',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){w(s,e,l),t||(i=J(e,"click",ni(n[15])),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function z3(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,h,g,v,b,y=!n[0].toDelete&&Zc(n),$=n[7]&&!n[0].system&&ed(),C=n[0].toDelete&&td(n);return{c(){e=_("div"),t=_("span"),i=_("i"),l=D(),o=_("strong"),a=N(r),f=D(),y&&y.c(),c=D(),d=_("div"),h=D(),$&&$.c(),g=D(),C&&C.c(),v=We(),p(i,"class",s=su(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),ne(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(S,T){w(S,e,T),m(e,t),m(t,i),m(e,l),m(e,o),m(o,a),w(S,f,T),y&&y.m(S,T),w(S,c,T),w(S,d,T),w(S,h,T),$&&$.m(S,T),w(S,g,T),C&&C.m(S,T),w(S,v,T),b=!0},p(S,T){(!b||T[0]&1&&s!==(s=su(B.getFieldTypeIcon(S[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!b||T[0]&1)&&r!==(r=(S[0].name||"-")+"")&&ue(a,r),(!b||T[0]&1&&u!==(u=S[0].name))&&p(o,"title",u),(!b||T[0]&1)&&ne(o,"txt-strikethrough",S[0].toDelete),S[0].toDelete?y&&(y.d(1),y=null):y?y.p(S,T):(y=Zc(S),y.c(),y.m(c.parentNode,c)),S[7]&&!S[0].system?$?T[0]&129&&A($,1):($=ed(),$.c(),A($,1),$.m(g.parentNode,g)):$&&(Ae(),L($,1,1,()=>{$=null}),Pe()),S[0].toDelete?C?C.p(S,T):(C=td(S),C.c(),C.m(v.parentNode,v)):C&&(C.d(1),C=null)},i(S){b||(A($),b=!0)},o(S){L($),b=!1},d(S){S&&k(e),S&&k(f),y&&y.d(S),S&&k(c),S&&k(d),S&&k(h),$&&$.d(S),S&&k(g),C&&C.d(S),S&&k(v)}}}function B3(n){let e,t,i={single:!0,interactive:n[8],class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion",$$slots:{header:[z3],default:[V3]},$$scope:{ctx:n}};return e=new ir({props:i}),n[32](e),e.$on("expand",n[33]),e.$on("collapse",n[34]),e.$on("toggle",n[35]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&256&&(o.interactive=s[8]),l[0]&5&&(o.class=s[2]||s[0].toDelete||s[0].system?"field-accordion disabled":"field-accordion"),l[0]&483|l[1]&256&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[32](null),j(e,s)}}}function U3(n,e,t){let i,s,l,o,r;at(n,Vi,K=>t(14,r=K));const a=xt();let{key:u="0"}=e,{field:f=new Dn}=e,{disabled:c=!1}=e,{excludeNames:d=[]}=e,h,g=f.type;function v(){h==null||h.expand()}function b(){h==null||h.collapse()}function y(){f.id?t(0,f.toDelete=!0,f):(b(),a("remove"))}function $(K){if(K=(""+K).toLowerCase(),!K)return!1;for(const Line truncated
<code>@request.query.*</code>
<code>@request.data.*</code>
<code>@request.user.*</code>`,C=D(),S=_("hr"),T=D(),M=_("p"),M.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",O=D(),E=_("div"),E.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",P=D(),I=_("hr"),F=D(),z=_("p"),z.innerHTML=`Example rule:
<code>@request.user.*</code>`,C=D(),S=_("hr"),T=D(),M=_("p"),M.innerHTML="You could also add constraints and query other collections using the <em>@collection</em> filter:",O=D(),E=_("div"),E.innerHTML="<code>@collection.ANY_COLLECTION_NAME.*</code>",P=D(),I=_("hr"),F=D(),V=_("p"),V.innerHTML=`Example rule:
<br/>
<code>@request.user.id!=&quot;&quot; &amp;&amp; created&gt;&quot;2022-01-01 00:00:00&quot;</code>`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p($,"class","inline-flex flex-gap-5"),p(S,"class","m-t-10 m-b-5"),p(M,"class","m-b-0"),p(E,"class","inline-flex flex-gap-5"),p(I,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(U,Y){w(U,e,Y),m(e,t),m(t,i),m(i,s),m(i,l),m(i,o),m(o,r),m(o,a),m(o,u),m(o,f),m(o,c),m(o,d);for(let Z=0;Z<ee.length;Z+=1)ee[Z].m(o,null);m(i,h),m(i,g),m(i,v),m(i,b),m(i,y),m(i,$),m(i,C),m(i,S),m(i,T),m(i,M),m(i,O),m(i,E),m(i,P),m(i,I),m(i,F),m(i,z),ne=!0},p(U,Y){if(Y&1){G=U[0].schema;let Z;for(Z=0;Z<G.length;Z+=1){const de=ld(U,G,Z);ee[Z]?ee[Z].p(de,Y):(ee[Z]=rd(de),ee[Z].c(),ee[Z].m(o,null))}for(;Z<ee.length;Z+=1)ee[Z].d(1);ee.length=G.length}},i(U){ne||(U&&Tt(()=>{Q||(Q=st(e,on,{duration:150},!0)),Q.run(1)}),ne=!0)},o(U){U&&(Q||(Q=st(e,on,{duration:150},!1)),Q.run(0)),ne=!1},d(U){U&&k(e),Yt(ee,U),U&&Q&&Q.end()}}}function Z3(n){let e,t=n[18].name+"",i;return{c(){e=_("code"),i=N(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&1&&t!==(t=s[18].name+"")&&ue(i,t)},d(s){s&&k(e)}}}function G3(n){let e,t=n[18].name+"",i,s;return{c(){e=_("code"),i=N(t),s=N(".*")},m(l,o){w(l,e,o),m(e,i),m(e,s)},p(l,o){o&1&&t!==(t=l[18].name+"")&&ue(i,t)},d(l){l&&k(e)}}}function rd(n){let e;function t(l,o){return l[18].type==="relation"||l[18].type==="user"?G3:Z3}let i=t(n),s=i(n);return{c(){s.c(),e=We()},m(l,o){s.m(l,o),w(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&&k(e)}}}function X3(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const o=r=>r[13];for(let r=0;r<l.length;r+=1){let a=sd(n,l,r),u=o(a);t.set(u,e[r]=ad(u,a))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();i=We()},m(r,a){for(let u=0;u<e.length;u+=1)e[u].m(r,a);w(r,i,a),s=!0},p(r,a){a&131163&&(l=Object.entries(r[6]),Ae(),e=_t(e,a,o,1,r,l,t,i.parentNode,Gt,ad,i,sd),Pe())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(e[a]);s=!0}},o(r){for(let a=0;a<e.length;a+=1)L(e[a]);s=!1},d(r){for(let a=0;a<e.length;a+=1)e[a].d(r);r&&k(i)}}}function Q3(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:se,i:se,o:se,d(t){t&&k(e)}}}function x3(n){let e,t,i;function s(){return n[9](n[13])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[Ye(gt.call(null,e,"Lock and set to Admins only")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Je(i)}}}function eC(n){let e,t,i;function s(){return n[8](n[13])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-unlock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[Ye(gt.call(null,e,"Unlock and set custom rule")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Je(i)}}}function tC(n){let e;return{c(){e=N("Leave empty to grant everyone access")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function nC(n){let e;return{c(){e=N("Only admins will be able to access (unlock to change)")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function iC(n){let e,t=n[14]+"",i,s,l=Ii(n[0][n[13]])?"Admins only":"Custom rule",o,r,a,u,f=n[13],c,d,h,g,v;const b=()=>n[10](u,f),y=()=>n[10](null,f);function $(E){n[11](E,n[13])}var C=n[4];function S(E){let P={id:E[17],baseCollection:E[0],disabled:Ii(E[0][E[13]])};return E[0][E[13]]!==void 0&&(P.value=E[0][E[13]]),{props:P}}C&&(u=new C(S(n)),b(),me.push(()=>Re(u,"value",$)));function T(E,P){return P&1&&(g=null),g==null&&(g=!!Ii(E[0][E[13]])),g?nC:tC}let M=T(n,-1),O=M(n);return{c(){e=_("label"),i=N(t),s=N(" - "),o=N(l),a=D(),u&&q(u.$$.fragment),d=D(),h=_("div"),O.c(),p(e,"for",r=n[17]),p(h,"class","help-block")},m(E,P){w(E,e,P),m(e,i),m(e,s),m(e,o),w(E,a,P),u&&H(u,E,P),w(E,d,P),w(E,h,P),O.m(h,null),v=!0},p(E,P){n=E,(!v||P&1)&&l!==(l=Ii(n[0][n[13]])?"Admins only":"Custom rule")&&ue(o,l),(!v||P&131072&&r!==(r=n[17]))&&p(e,"for",r),f!==n[13]&&(y(),f=n[13],b());const I={};if(P&131072&&(I.id=n[17]),P&1&&(I.baseCollection=n[0]),P&1&&(I.disabled=Ii(n[0][n[13]])),!c&&P&65&&(c=!0,I.value=n[0][n[13]],je(()=>c=!1)),C!==(C=n[4])){if(u){Ae();const F=u;L(F.$$.fragment,1,0,()=>{j(F,1)}),Pe()}C?(u=new C(S(n)),b(),me.push(()=>Re(u,"value",$)),q(u.$$.fragment),A(u.$$.fragment,1),H(u,d.parentNode,d)):u=null}else C&&u.$set(I);M!==(M=T(n,P))&&(O.d(1),O=M(n),O&&(O.c(),O.m(h,null)))},i(E){v||(u&&A(u.$$.fragment,E),v=!0)},o(E){u&&L(u.$$.fragment,E),v=!1},d(E){E&&k(e),E&&k(a),y(),u&&j(u,E),E&&k(d),E&&k(h),O.d()}}}function ad(n,e){let t,i,s,l,o,r,a,u;function f(h,g){return g&1&&(l=null),l==null&&(l=!!Ii(h[0][h[13]])),l?eC:x3}let c=f(e,-1),d=c(e);return r=new Ne({props:{class:"form-field rule-field m-0 "+(Ii(e[0][e[13]])?"disabled":""),name:e[13],$$slots:{default:[iC,({uniqueId:h})=>({17:h}),({Line truncated
<code>@request.user.id!=&quot;&quot; &amp;&amp; created&gt;&quot;2022-01-01 00:00:00&quot;</code>`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(g,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p($,"class","inline-flex flex-gap-5"),p(S,"class","m-t-10 m-b-5"),p(M,"class","m-b-0"),p(E,"class","inline-flex flex-gap-5"),p(I,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(U,Y){w(U,e,Y),m(e,t),m(t,i),m(i,s),m(i,l),m(i,o),m(o,r),m(o,a),m(o,u),m(o,f),m(o,c),m(o,d);for(let G=0;G<ee.length;G+=1)ee[G].m(o,null);m(i,h),m(i,g),m(i,v),m(i,b),m(i,y),m(i,$),m(i,C),m(i,S),m(i,T),m(i,M),m(i,O),m(i,E),m(i,P),m(i,I),m(i,F),m(i,V),te=!0},p(U,Y){if(Y&1){X=U[0].schema;let G;for(G=0;G<X.length;G+=1){const de=ld(U,X,G);ee[G]?ee[G].p(de,Y):(ee[G]=rd(de),ee[G].c(),ee[G].m(o,null))}for(;G<ee.length;G+=1)ee[G].d(1);ee.length=X.length}},i(U){te||(U&&Tt(()=>{Z||(Z=st(e,on,{duration:150},!0)),Z.run(1)}),te=!0)},o(U){U&&(Z||(Z=st(e,on,{duration:150},!1)),Z.run(0)),te=!1},d(U){U&&k(e),Yt(ee,U),U&&Z&&Z.end()}}}function Z3(n){let e,t=n[18].name+"",i;return{c(){e=_("code"),i=N(t)},m(s,l){w(s,e,l),m(e,i)},p(s,l){l&1&&t!==(t=s[18].name+"")&&ue(i,t)},d(s){s&&k(e)}}}function G3(n){let e,t=n[18].name+"",i,s;return{c(){e=_("code"),i=N(t),s=N(".*")},m(l,o){w(l,e,o),m(e,i),m(e,s)},p(l,o){o&1&&t!==(t=l[18].name+"")&&ue(i,t)},d(l){l&&k(e)}}}function rd(n){let e;function t(l,o){return l[18].type==="relation"||l[18].type==="user"?G3:Z3}let i=t(n),s=i(n);return{c(){s.c(),e=We()},m(l,o){s.m(l,o),w(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&&k(e)}}}function X3(n){let e=[],t=new Map,i,s,l=Object.entries(n[6]);const o=r=>r[13];for(let r=0;r<l.length;r+=1){let a=sd(n,l,r),u=o(a);t.set(u,e[r]=ad(u,a))}return{c(){for(let r=0;r<e.length;r+=1)e[r].c();i=We()},m(r,a){for(let u=0;u<e.length;u+=1)e[u].m(r,a);w(r,i,a),s=!0},p(r,a){a&131163&&(l=Object.entries(r[6]),Ae(),e=_t(e,a,o,1,r,l,t,i.parentNode,Gt,ad,i,sd),Pe())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(e[a]);s=!0}},o(r){for(let a=0;a<e.length;a+=1)L(e[a]);s=!1},d(r){for(let a=0;a<e.length;a+=1)e[a].d(r);r&&k(i)}}}function Q3(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:se,i:se,o:se,d(t){t&&k(e)}}}function x3(n){let e,t,i;function s(){return n[9](n[13])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[Ye(gt.call(null,e,"Lock and set to Admins only")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Je(i)}}}function eC(n){let e,t,i;function s(){return n[8](n[13])}return{c(){e=_("button"),e.innerHTML='<i class="ri-lock-unlock-line"></i>',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(l,o){w(l,e,o),t||(i=[Ye(gt.call(null,e,"Unlock and set custom rule")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Je(i)}}}function tC(n){let e;return{c(){e=N("Leave empty to grant everyone access")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function nC(n){let e;return{c(){e=N("Only admins will be able to access (unlock to change)")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function iC(n){let e,t=n[14]+"",i,s,l=Ii(n[0][n[13]])?"Admins only":"Custom rule",o,r,a,u,f=n[13],c,d,h,g,v;const b=()=>n[10](u,f),y=()=>n[10](null,f);function $(E){n[11](E,n[13])}var C=n[4];function S(E){let P={id:E[17],baseCollection:E[0],disabled:Ii(E[0][E[13]])};return E[0][E[13]]!==void 0&&(P.value=E[0][E[13]]),{props:P}}C&&(u=new C(S(n)),b(),me.push(()=>Re(u,"value",$)));function T(E,P){return P&1&&(g=null),g==null&&(g=!!Ii(E[0][E[13]])),g?nC:tC}let M=T(n,-1),O=M(n);return{c(){e=_("label"),i=N(t),s=N(" - "),o=N(l),a=D(),u&&q(u.$$.fragment),d=D(),h=_("div"),O.c(),p(e,"for",r=n[17]),p(h,"class","help-block")},m(E,P){w(E,e,P),m(e,i),m(e,s),m(e,o),w(E,a,P),u&&H(u,E,P),w(E,d,P),w(E,h,P),O.m(h,null),v=!0},p(E,P){n=E,(!v||P&1)&&l!==(l=Ii(n[0][n[13]])?"Admins only":"Custom rule")&&ue(o,l),(!v||P&131072&&r!==(r=n[17]))&&p(e,"for",r),f!==n[13]&&(y(),f=n[13],b());const I={};if(P&131072&&(I.id=n[17]),P&1&&(I.baseCollection=n[0]),P&1&&(I.disabled=Ii(n[0][n[13]])),!c&&P&65&&(c=!0,I.value=n[0][n[13]],je(()=>c=!1)),C!==(C=n[4])){if(u){Ae();const F=u;L(F.$$.fragment,1,0,()=>{j(F,1)}),Pe()}C?(u=new C(S(n)),b(),me.push(()=>Re(u,"value",$)),q(u.$$.fragment),A(u.$$.fragment,1),H(u,d.parentNode,d)):u=null}else C&&u.$set(I);M!==(M=T(n,P))&&(O.d(1),O=M(n),O&&(O.c(),O.m(h,null)))},i(E){v||(u&&A(u.$$.fragment,E),v=!0)},o(E){u&&L(u.$$.fragment,E),v=!1},d(E){E&&k(e),E&&k(a),y(),u&&j(u,E),E&&k(d),E&&k(h),O.d()}}}function ad(n,e){let t,i,s,l,o,r,a,u;function f(h,g){return g&1&&(l=null),l==null&&(l=!!Ii(h[0][h[13]])),l?eC:x3}let c=f(e,-1),d=c(e);return r=new Ne({props:{class:"form-field rule-field m-0 "+(Ii(e[0][e[13]])?"disabled":""),name:e[13],$$slots:{default:[iC,({uniqueId:h})=>({17:h}),({Line truncated
<a href="https://pocketbase.io/docs/manage-collections#rules-filters-syntax" target="_blank" rel="noopener">PocketBase filter syntax and operators
</a>.`,s=D(),l=_("span"),r=N(o),a=D(),b&&b.c(),u=D(),c.c(),d=We(),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex"),p(e,"class","block m-b-base")},m(S,T){w(S,e,T),m(e,t),m(t,i),m(t,s),m(t,l),m(l,r),m(e,a),b&&b.m(e,null),w(S,u,T),$[f].m(S,T),w(S,d,T),h=!0,g||(v=J(l,"click",n[7]),g=!0)},p(S,[T]){(!h||T&4)&&o!==(o=S[2]?"Hide available fields":"Show available fields")&&ue(r,o),S[2]?b?(b.p(S,T),T&4&&A(b,1)):(b=od(S),b.c(),A(b,1),b.m(e,null)):b&&(Ae(),L(b,1,1,()=>{b=null}),Pe());let M=f;f=C(S),f===M?$[f].p(S,T):(Ae(),L($[M],1,1,()=>{$[M]=null}),Pe(),c=$[f],c?c.p(S,T):(c=$[f]=y[f](S),c.c()),A(c,1),c.m(d.parentNode,d))},i(S){h||(A(b),A(c),h=!0)},o(S){L(b),L(c),h=!1},d(S){S&&k(e),b&&b.d(),S&&k(u),$[f].d(S),S&&k(d),g=!1,v()}}}function Ii(n){return n===null}function lC(n,e,t){let{collection:i=new dn}=e,s={},l=!1,o={},r,a=!1;const u={listRule:"List Action",viewRule:"View Action",createRule:"Create Action",updateRule:"Update Action",deleteRule:"Delete Action"};async function f(){t(5,a=!0);try{t(4,r=(await Pi(()=>import("./FilterAutocompleteInput.586413d1.js"),["FilterAutocompleteInput.586413d1.js","index.c4d07677.js"],import.meta.url)).default)}catch(b){console.warn(b),t(4,r=null)}t(5,a=!1)}Fn(()=>{f()});const c=()=>t(2,l=!l),d=async b=>{var y;t(0,i[b]=s[b]||"",i),await Zn(),(y=o[b])==null||y.focus()},h=b=>{t(1,s[b]=i[b],s),t(0,i[b]=null,i)};function g(b,y){me[b?"unshift":"push"](()=>{o[y]=b,t(3,o)})}function v(b,y){n.$$.not_equal(i[y],b)&&(i[y]=b,t(0,i))}return n.$$set=b=>{"collection"in b&&t(0,i=b.collection)},[i,s,l,o,r,a,u,c,d,h,g,v]}class oC extends Ee{constructor(e){super(),Oe(this,e,lC,sC,De,{collection:0})}}function ud(n,e,t){const i=n.slice();return i[14]=e[t],i}function fd(n,e,t){const i=n.slice();return i[14]=e[t],i}function cd(n){let e;return{c(){e=_("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dd(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=N(`Renamed collection
</a>.`,s=D(),l=_("span"),r=N(o),a=D(),b&&b.c(),u=D(),c.c(),d=We(),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex"),p(e,"class","block m-b-base")},m(S,T){w(S,e,T),m(e,t),m(t,i),m(t,s),m(t,l),m(l,r),m(e,a),b&&b.m(e,null),w(S,u,T),$[f].m(S,T),w(S,d,T),h=!0,g||(v=J(l,"click",n[7]),g=!0)},p(S,[T]){(!h||T&4)&&o!==(o=S[2]?"Hide available fields":"Show available fields")&&ue(r,o),S[2]?b?(b.p(S,T),T&4&&A(b,1)):(b=od(S),b.c(),A(b,1),b.m(e,null)):b&&(Ae(),L(b,1,1,()=>{b=null}),Pe());let M=f;f=C(S),f===M?$[f].p(S,T):(Ae(),L($[M],1,1,()=>{$[M]=null}),Pe(),c=$[f],c?c.p(S,T):(c=$[f]=y[f](S),c.c()),A(c,1),c.m(d.parentNode,d))},i(S){h||(A(b),A(c),h=!0)},o(S){L(b),L(c),h=!1},d(S){S&&k(e),b&&b.d(),S&&k(u),$[f].d(S),S&&k(d),g=!1,v()}}}function Ii(n){return n===null}function lC(n,e,t){let{collection:i=new dn}=e,s={},l=!1,o={},r,a=!1;const u={listRule:"List Action",viewRule:"View Action",createRule:"Create Action",updateRule:"Update Action",deleteRule:"Delete Action"};async function f(){t(5,a=!0);try{t(4,r=(await Pi(()=>import("./FilterAutocompleteInput.83995c20.js"),["FilterAutocompleteInput.83995c20.js","index.2148ad18.js"],import.meta.url)).default)}catch(b){console.warn(b),t(4,r=null)}t(5,a=!1)}Fn(()=>{f()});const c=()=>t(2,l=!l),d=async b=>{var y;t(0,i[b]=s[b]||"",i),await Zn(),(y=o[b])==null||y.focus()},h=b=>{t(1,s[b]=i[b],s),t(0,i[b]=null,i)};function g(b,y){me[b?"unshift":"push"](()=>{o[y]=b,t(3,o)})}function v(b,y){n.$$.not_equal(i[y],b)&&(i[y]=b,t(0,i))}return n.$$set=b=>{"collection"in b&&t(0,i=b.collection)},[i,s,l,o,r,a,u,c,d,h,g,v]}class oC extends Ee{constructor(e){super(),Oe(this,e,lC,sC,De,{collection:0})}}function ud(n,e,t){const i=n.slice();return i[14]=e[t],i}function fd(n,e,t){const i=n.slice();return i[14]=e[t],i}function cd(n){let e;return{c(){e=_("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dd(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=_("li"),t=_("div"),i=N(`Renamed collection
`),s=_("strong"),o=N(l),r=D(),a=_("i"),u=D(),f=_("strong"),d=N(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(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,o),m(t,r),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&2&&l!==(l=h[1].originalName+"")&&ue(o,l),g&2&&c!==(c=h[1].name+"")&&ue(d,c)},d(h){h&&k(e)}}}function pd(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=_("li"),t=_("div"),i=N(`Renamed field
`),s=_("strong"),o=N(l),r=D(),a=_("i"),u=D(),f=_("strong"),d=N(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(h,g){w(h,e,g),m(e,t),m(t,i),m(t,s),m(s,o),m(t,r),m(t,a),m(t,u),m(t,f),m(f,d)},p(h,g){g&16&&l!==(l=h[14].originalName+"")&&ue(o,l),g&16&&c!==(c=h[14].name+"")&&ue(d,c)},d(h){h&&k(e)}}}function hd(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=_("li"),t=N("Removed field "),i=_("span"),l=N(s),o=D(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){w(r,e,a),m(e,t),m(e,i),m(i,l),m(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&ue(l,s)},d(r){r&&k(e)}}}function rC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[3].length&&cd(),g=n[5]&&dd(n),v=n[4],b=[];for(let C=0;C<v.length;C+=1)b[C]=pd(fd(n,v,C));let y=n[3],$=[];for(let C=0;C<y.length;C+=1)$[C]=hd(ud(n,y,C));return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=D(),s=_("div"),l=_("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(),h&&h.c(),r=D(),a=_("h6"),a.textContent="Changes:",u=D(),f=_("ul"),g&&g.c(),c=D();for(let C=0;C<b.length;C+=1)b[C].c();d=D();for(let C=0;C<$.length;C+=1)$[C].c();p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning"),p(f,"class","changes-list svelte-1ghly2p")},m(C,S){w(C,e,S),m(e,t),m(e,i),m(e,s),m(s,l),m(s,o),h&&h.m(s,null),w(C,r,S),w(C,a,S),w(C,u,S),w(C,f,S),g&&g.m(f,null),m(f,c);for(let T=0;T<b.length;T+=1)b[T].m(f,null);m(f,d);for(let T=0;T<$.length;T+=1)$[T].m(f,null)},p(C,S){if(C[3].length?h||(h=cd(),h.c(),h.m(s,null)):h&&(h.d(1),h=null),C[5]?g?g.p(C,S):(g=dd(C),g.c(),g.m(f,c)):g&&(g.d(1),g=null),S&16){v=C[4];let T;for(T=0;T<v.length;T+=1){const M=fd(C,v,T);b[T]?b[T].p(M,S):(b[T]=pd(M),b[T].c(),b[T].m(f,d))}for(;T<b.length;T+=1)b[T].d(1);b.length=v.length}if(S&8){y=C[3];let T;for(T=0;T<y.length;T+=1){const M=ud(C,y,T);$[T]?$[T].p(M,S):($[T]=hd(M),$[T].c(),$[T].m(f,null))}for(;T<$.length;T+=1)$[T].d(1);$.length=y.length}},d(C){C&&k(e),h&&h.d(),C&&k(r),C&&k(a),C&&k(u),C&&k(f),g&&g.d(),Yt(b,C),Yt($,C)}}}function aC(n){let e;return{c(){e=_("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function uC(n){let e,t,i,s,l;return{c(){e=_("button"),e.innerHTML='<span class="txt">Cancel</span>',t=D(),i=_("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[J(e,"click",n[8]),J(i,"click",n[9])],s=!0)},p:se,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Je(l)}}}function fC(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[uC],header:[aC],default:[rC]},$$scope:{ctx:n}};return e=new ui({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){q(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){L(e.$$.fragment,s),t=!1},d(s){n[10](null),j(e,s)}}}function cC(n,e,t){let i,s,l;const o=xt();let r,a;async function u(y){t(1,a=y),await Zn(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),h=()=>c();function g(y){me[y?"unshift":"push"](()=>{r=y,t(2,r)})}function v(y){tt.call(this,n,y)}function b(y){tt.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,h,g,v,b]}class dC extends Ee{constructor(e){super(),Oe(this,e,cC,fC,De,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function md(n){let e,t,i,s;function l(r){n[26](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new oC({props:o}),me.push(()=>Re(t,"collection",l)),{c(){e=_("div"),q(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){w(r,e,a),H(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],je(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){L(t.$$.fragment,r),s=!1},d(r){r&&k(e),j(t)}}}function pC(n){let e,t,i,s,l,o;function r(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new J3({props:a}),me.push(()=>Re(i,"collection",r));let u=n[9]===kl&&md(n);return{c(){e=_("div"),t=_("div"),q(i.$$.fragment),l=D(),u&&u.c(),p(t,"class","tab-item"),te(t,"active",n[9]===rs),p(e,"class","tabs-content svelte-b10vi")},m(f,c){w(f,e,c),m(e,t),H(i,t,null),m(e,l),u&&u.m(e,null),o=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],je(()=>s=!1)),i.$set(d),c[0]&512&&te(t,"active",f[9]===rs),f[9]===kl?u?(u.p(f,c),c[0]&512&&A(u,1)):(u=md(f),u.c(),A(u,1),u.m(e,null)):u&&(Ae(),L(u,1,1,()=>{u=null}),Pe())},i(f){o||(A(i.$$.fragment,f),A(u),o=!0)},o(f){L(i.$$.fragment,f),L(u),o=!1},d(f){f&&k(e),j(i),u&&u.d()}}}function gd(n){let e,t,i,s,l,o,r;return o=new Ti({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[hC]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=D(),i=_("button"),s=_("i"),l=D(),q(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),m(i,s),m(i,l),H(o,i,null),r=!0},p(a,u){const f={};u[1]&256&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){L(o.$$.fragment,a),r=!1},d(a){a&&k(e),a&&k(t),a&&k(i),j(o)}}}function hC(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i>
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[20]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function _d(n){let e;return{c(){e=_("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function mC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[2].system&&_d();return{c(){e=_("label"),t=N("Name"),s=D(),l=_("input"),u=D(),h&&h.c(),f=We(),p(e,"for",i=n[38]),p(l,"type","text"),p(l,"id",o=n[38]),l.required=!0,l.disabled=n[11],p(l,"spellcheck","false"),l.autofocus=r=n[2].isNew,p(l,"placeholder",'eg. "posts"'),l.value=a=n[2].name},m(g,v){w(g,e,v),m(e,t),w(g,s,v),w(g,l,v),w(g,u,v),h&&h.m(g,v),w(g,f,v),n[2].isNew&&l.focus(),c||(d=J(l,"input",n[21]),c=!0)},p(g,v){v[1]&128&&i!==(i=g[38])&&p(e,"for",i),v[1]&128&&o!==(o=g[38])&&p(l,"id",o),v[0]&2048&&(l.disabled=g[11]),v[0]&4&&r!==(r=g[2].isNew)&&(l.autofocus=r),v[0]&4&&a!==(a=g[2].name)&&l.value!==a&&(l.value=a),g[2].system?h||(h=_d(),h.c(),h.m(f.parentNode,f)):h&&(h.d(1),h=null)},d(g){g&&k(e),g&&k(s),g&&k(l),g&&k(u),h&&h.d(g),g&&k(f),c=!1,d()}}}function bd(n){let e,t,i,s,l,o;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){w(r,e,a),s=!0,l||(o=Ye(t=gt.call(null,e,n[12])),l=!0)},p(r,a){t&&Nn(t.update)&&a[0]&4096&&t.update.call(null,r[12])},i(r){s||(r&&Tt(()=>{i||(i=st(e,Tn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=st(e,Tn,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function vd(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ye(gt.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Tt(()=>{t||(t=st(e,Tn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=st(e,Tn,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function gC(n){var F,z,Q,ne,G,ee;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,h,g,v=!B.isEmpty((F=n[4])==null?void 0:F.schema),b,y,$,C,S=!B.isEmpty((z=n[4])==null?void 0:z.listRule)||!B.isEmpty((Q=n[4])==null?void 0:Q.viewRule)||!B.isEmpty((ne=n[4])==null?void 0:ne.createRule)||!B.isEmpty((G=n[4])==null?void 0:G.updateRule)||!B.isEmpty((ee=n[4])==null?void 0:ee.deleteRule),T,M,O,E=!n[2].isNew&&!n[2].system&&gd(n);r=new Ne({props:{class:"form-field required m-b-0 "+(n[11]?"disabled":""),name:"name",$$slots:{default:[mC,({uniqueId:U})=>({38:U}),({uniqueId:U})=>[0,U?128:0]]},$$scope:{ctx:n}}});let P=v&&bd(n),I=S&&vd();return{c(){e=_("h4"),i=N(t),s=D(),E&&E.c(),l=D(),o=_("form"),q(r.$$.fragment),a=D(),u=_("input"),f=D(),c=_("div"),d=_("button"),h=_("span"),h.textContent="Fields",g=D(),P&&P.c(),b=D(),y=_("button"),$=_("span"),$.textContent="API Rules",C=D(),I&&I.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),te(d,"active",n[9]===rs),p($,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),te(y,"active",n[9]===kl),p(c,"class","tabs-header stretched")},m(U,Y){w(U,e,Y),m(e,i),w(U,s,Y),E&&E.m(U,Y),w(U,l,Y),w(U,o,Y),H(r,o,null),m(o,a),m(o,u),w(U,f,Y),w(U,c,Y),m(c,d),m(d,h),m(d,g),P&&P.m(d,null),m(c,b),m(c,y),m(y,$),m(y,C),I&&I.m(y,null),T=!0,M||(O=[J(o,"submit",Wt(n[22])),J(d,"click",n[23]),J(y,"click",n[24])],M=!0)},p(U,Y){var de,x,oe,Ce,Te,K;(!T||Y[0]&4)&&t!==(t=U[2].isNew?"New collection":"Edit collection")&&ue(i,t),!U[2].isNew&&!U[2].system?E?(E.p(U,Y),Y[0]&4&&A(E,1)):(E=gd(U),E.c(),A(E,1),E.m(l.parentNode,l)):E&&(Ae(),L(E,1,1,()=>{E=null}),Pe());const Z={};Y[0]&2048&&(Z.class="form-field required m-b-0 "+(U[11]?"disabled":"")),Y[0]&2052|Y[1]&384&&(Z.$$scope={dirty:Y,ctx:U}),r.$set(Z),Y[0]&16&&(v=!B.isEmpty((de=U[4])==null?void 0:de.schema)),v?P?(P.p(U,Y),Y[0]&16&&A(P,1)):(P=bd(U),P.c(),A(P,1),P.m(d,null)):P&&(Ae(),L(P,1,1,()=>{P=null}),Pe()),Y[0]&512&&te(d,"active",U[9]===rs),Y[0]&16&&(S=!B.isEmpty((x=U[4])==null?void 0:x.listRule)||!B.isEmpty((oe=U[4])==null?void 0:oe.viewRule)||!B.isEmpty((Ce=U[4])==null?void 0:Ce.createRule)||!B.isEmpty((Te=U[4])==null?void 0:Te.updateRule)||!B.isEmpty((K=U[4])==null?void 0:K.deleteRule)),S?I?Y[0]&16&&A(I,1):(I=vd(),I.c(),A(I,1),I.m(y,null)):I&&(Ae(),L(I,1,1,()=>{I=null}),Pe()),Y[0]&512&&te(y,"active",U[9]===kl)},i(U){T||(A(E),A(r.$$.fragment,U),A(P),A(I),T=!0)},o(U){L(E),L(r.$$.fragment,U),L(P),L(I),T=!1},d(U){U&&k(e),U&&k(s),E&&E.d(U),U&&k(l),U&&k(o),j(r),U&&k(f),U&&k(c),P&&P.d(),I&&I.d(),M=!1,Je(O)}}}function _C(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=D(),s=_("button"),l=_("span"),r=N(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],te(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,r),u||(f=[J(e,"click",n[18]),J(s,"click",n[19]Line truncated
<span class="txt">New collection</span>`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){w(l,e,o),m(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:se,d(l){l&&k(e),i=!1,s()}}}function wC(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],h=new Map,g,v,b,y,$,C,S=n[3];const T=P=>P[14].id;for(let P=0;P<S.length;P+=1){let I=yd(n,S,P),F=T(I);h.set(F,d[P]=$d(F,I))}let M=null;S.length||(M=kd(n));let O=!n[6]&&Sd(n),E={};return b=new tu({props:E}),n[13](b),{c(){e=_("aside"),t=_("header"),i=_("div"),s=_("div"),l=_("button"),l.innerHTML='<i class="ri-close-line"></i>',o=D(),r=_("input"),a=D(),u=_("hr"),f=D(),c=_("div");for(let P=0;P<d.length;P+=1)d[P].c();M&&M.c(),g=D(),O&&O.c(),v=D(),q(b.$$.fragment),p(l,"type","button"),p(l,"class","btn btn-xs btn-secondary btn-circle btn-clear"),te(l,"hidden",!n[4]),p(s,"class","form-field-addon"),p(r,"type","text"),p(r,"placeholder","Search collections..."),p(i,"class","form-field search"),te(i,"active",n[4]),p(t,"class","sidebar-header"),p(u,"class","m-t-5 m-b-xs"),p(c,"class","sidebar-content"),p(e,"class","page-sidebar collection-sidebar")},m(P,I){w(P,e,I),m(e,t),m(t,i),m(i,s),m(s,l),m(i,o),m(i,r),Se(r,n[0]),m(e,a),m(e,u),m(e,f),m(e,c);for(let F=0;F<d.length;F+=1)d[F].m(c,null);M&&M.m(c,null),m(e,g),O&&O.m(e,null),w(P,v,I),H(b,P,I),y=!0,$||(C=[J(l,"click",n[9]),J(r,"input",n[10])],$=!0)},p(P,[I]){I&16&&te(l,"hidden",!P[4]),I&1&&r.value!==P[0]&&Se(r,P[0]),I&16&&te(i,"active",P[4]),I&170&&(S=P[3],d=_t(d,I,T,1,P,S,h,c,bn,$d,null,yd),!S.length&&M?M.p(P,I):S.length?M&&(M.d(1),M=null):(M=kd(P),M.c(),M.m(c,null))),P[6]?O&&(O.d(1),O=null):O?O.p(P,I):(O=Sd(P),O.c(),O.m(e,null));const F={};b.$set(F)},i(P){y||(A(b.$$.fragment,P),y=!0)},o(P){L(b.$$.fragment,P),y=!1},d(P){P&&k(e);for(let I=0;I<d.length;I+=1)d[I].d();M&&M.d(),O&&O.d(),P&&k(v),n[13](null),j(b,P),$=!1,Je(C)}}}function $C(n,e,t){let i,s,l,o,r,a;at(n,hi,y=>t(5,o=y)),at(n,As,y=>t(8,r=y)),at(n,us,y=>t(6,a=y));let u,f="";function c(y){nn(hi,o=y,o)}const d=()=>t(0,f="");function h(){f=this.value,t(0,f)}const g=y=>c(y),v=()=>u==null?void 0:u.show();function b(y){me[y?"unshift":"push"](()=>{u=y,t(2,u)})}return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=f.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=f!==""),n.$$.dirty&259&&t(3,l=r.filter(y=>y.name!="profiles"&&(y.id==f||y.name.replace(/\s+/g,"").toLowerCase().includes(i))))},[f,i,u,l,s,o,a,c,r,d,h,g,v,b]}class SC extends Ee{constructor(e){super(),Oe(this,e,$C,wC,De,{})}}function CC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O,E,P,I,F,z,Q,ne,G,ee,U,Y,Z,de,x,oe,Ce,Te,K,we,ae,W,_e,He,Ue,X,ge,ce,ke,Ge;return{c(){e=_("p"),e.innerHTML=`The syntax basically follows the format
update it manually!`,o=D(),h&&h.c(),r=D(),a=_("h6"),a.textContent="Changes:",u=D(),f=_("ul"),g&&g.c(),c=D();for(let C=0;C<b.length;C+=1)b[C].c();d=D();for(let C=0;C<$.length;C+=1)$[C].c();p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning"),p(f,"class","changes-list svelte-1ghly2p")},m(C,S){w(C,e,S),m(e,t),m(e,i),m(e,s),m(s,l),m(s,o),h&&h.m(s,null),w(C,r,S),w(C,a,S),w(C,u,S),w(C,f,S),g&&g.m(f,null),m(f,c);for(let T=0;T<b.length;T+=1)b[T].m(f,null);m(f,d);for(let T=0;T<$.length;T+=1)$[T].m(f,null)},p(C,S){if(C[3].length?h||(h=cd(),h.c(),h.m(s,null)):h&&(h.d(1),h=null),C[5]?g?g.p(C,S):(g=dd(C),g.c(),g.m(f,c)):g&&(g.d(1),g=null),S&16){v=C[4];let T;for(T=0;T<v.length;T+=1){const M=fd(C,v,T);b[T]?b[T].p(M,S):(b[T]=pd(M),b[T].c(),b[T].m(f,d))}for(;T<b.length;T+=1)b[T].d(1);b.length=v.length}if(S&8){y=C[3];let T;for(T=0;T<y.length;T+=1){const M=ud(C,y,T);$[T]?$[T].p(M,S):($[T]=hd(M),$[T].c(),$[T].m(f,null))}for(;T<$.length;T+=1)$[T].d(1);$.length=y.length}},d(C){C&&k(e),h&&h.d(),C&&k(r),C&&k(a),C&&k(u),C&&k(f),g&&g.d(),Yt(b,C),Yt($,C)}}}function aC(n){let e;return{c(){e=_("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function uC(n){let e,t,i,s,l;return{c(){e=_("button"),e.innerHTML='<span class="txt">Cancel</span>',t=D(),i=_("button"),i.innerHTML='<span class="txt">Confirm</span>',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[J(e,"click",n[8]),J(i,"click",n[9])],s=!0)},p:se,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Je(l)}}}function fC(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[uC],header:[aC],default:[rC]},$$scope:{ctx:n}};return e=new ui({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){q(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){L(e.$$.fragment,s),t=!1},d(s){n[10](null),j(e,s)}}}function cC(n,e,t){let i,s,l;const o=xt();let r,a;async function u(y){t(1,a=y),await Zn(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),h=()=>c();function g(y){me[y?"unshift":"push"](()=>{r=y,t(2,r)})}function v(y){tt.call(this,n,y)}function b(y){tt.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,h,g,v,b]}class dC extends Ee{constructor(e){super(),Oe(this,e,cC,fC,De,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function md(n){let e,t,i,s;function l(r){n[26](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new oC({props:o}),me.push(()=>Re(t,"collection",l)),{c(){e=_("div"),q(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){w(r,e,a),H(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],je(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){L(t.$$.fragment,r),s=!1},d(r){r&&k(e),j(t)}}}function pC(n){let e,t,i,s,l,o;function r(f){n[25](f)}let a={};n[2]!==void 0&&(a.collection=n[2]),i=new J3({props:a}),me.push(()=>Re(i,"collection",r));let u=n[9]===kl&&md(n);return{c(){e=_("div"),t=_("div"),q(i.$$.fragment),l=D(),u&&u.c(),p(t,"class","tab-item"),ne(t,"active",n[9]===rs),p(e,"class","tabs-content svelte-b10vi")},m(f,c){w(f,e,c),m(e,t),H(i,t,null),m(e,l),u&&u.m(e,null),o=!0},p(f,c){const d={};!s&&c[0]&4&&(s=!0,d.collection=f[2],je(()=>s=!1)),i.$set(d),(!o||c[0]&512)&&ne(t,"active",f[9]===rs),f[9]===kl?u?(u.p(f,c),c[0]&512&&A(u,1)):(u=md(f),u.c(),A(u,1),u.m(e,null)):u&&(Ae(),L(u,1,1,()=>{u=null}),Pe())},i(f){o||(A(i.$$.fragment,f),A(u),o=!0)},o(f){L(i.$$.fragment,f),L(u),o=!1},d(f){f&&k(e),j(i),u&&u.d()}}}function gd(n){let e,t,i,s,l,o,r;return o=new Ti({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[hC]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=D(),i=_("button"),s=_("i"),l=D(),q(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),m(i,s),m(i,l),H(o,i,null),r=!0},p(a,u){const f={};u[1]&256&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){L(o.$$.fragment,a),r=!1},d(a){a&&k(e),a&&k(t),a&&k(i),j(o)}}}function hC(n){let e,t,i;return{c(){e=_("button"),e.innerHTML=`<i class="ri-delete-bin-7-line"></i>
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[20]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function _d(n){let e;return{c(){e=_("div"),e.textContent="System collection",p(e,"class","help-block")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function mC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[2].system&&_d();return{c(){e=_("label"),t=N("Name"),s=D(),l=_("input"),u=D(),h&&h.c(),f=We(),p(e,"for",i=n[38]),p(l,"type","text"),p(l,"id",o=n[38]),l.required=!0,l.disabled=n[11],p(l,"spellcheck","false"),l.autofocus=r=n[2].isNew,p(l,"placeholder",'eg. "posts"'),l.value=a=n[2].name},m(g,v){w(g,e,v),m(e,t),w(g,s,v),w(g,l,v),w(g,u,v),h&&h.m(g,v),w(g,f,v),n[2].isNew&&l.focus(),c||(d=J(l,"input",n[21]),c=!0)},p(g,v){v[1]&128&&i!==(i=g[38])&&p(e,"for",i),v[1]&128&&o!==(o=g[38])&&p(l,"id",o),v[0]&2048&&(l.disabled=g[11]),v[0]&4&&r!==(r=g[2].isNew)&&(l.autofocus=r),v[0]&4&&a!==(a=g[2].name)&&l.value!==a&&(l.value=a),g[2].system?h||(h=_d(),h.c(),h.m(f.parentNode,f)):h&&(h.d(1),h=null)},d(g){g&&k(e),g&&k(s),g&&k(l),g&&k(u),h&&h.d(g),g&&k(f),c=!1,d()}}}function bd(n){let e,t,i,s,l,o;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){w(r,e,a),s=!0,l||(o=Ye(t=gt.call(null,e,n[12])),l=!0)},p(r,a){t&&Nn(t.update)&&a[0]&4096&&t.update.call(null,r[12])},i(r){s||(r&&Tt(()=>{i||(i=st(e,Tn,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=st(e,Tn,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function vd(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ye(gt.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Tt(()=>{t||(t=st(e,Tn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=st(e,Tn,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function gC(n){var F,V,Z,te,X,ee;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,h,g,v=!B.isEmpty((F=n[4])==null?void 0:F.schema),b,y,$,C,S=!B.isEmpty((V=n[4])==null?void 0:V.listRule)||!B.isEmpty((Z=n[4])==null?void 0:Z.viewRule)||!B.isEmpty((te=n[4])==null?void 0:te.createRule)||!B.isEmpty((X=n[4])==null?void 0:X.updateRule)||!B.isEmpty((ee=n[4])==null?void 0:ee.deleteRule),T,M,O,E=!n[2].isNew&&!n[2].system&&gd(n);r=new Ne({props:{class:"form-field required m-b-0 "+(n[11]?"disabled":""),name:"name",$$slots:{default:[mC,({uniqueId:U})=>({38:U}),({uniqueId:U})=>[0,U?128:0]]},$$scope:{ctx:n}}});let P=v&&bd(n),I=S&&vd();return{c(){e=_("h4"),i=N(t),s=D(),E&&E.c(),l=D(),o=_("form"),q(r.$$.fragment),a=D(),u=_("input"),f=D(),c=_("div"),d=_("button"),h=_("span"),h.textContent="Fields",g=D(),P&&P.c(),b=D(),y=_("button"),$=_("span"),$.textContent="API Rules",C=D(),I&&I.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ne(d,"active",n[9]===rs),p($,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),ne(y,"active",n[9]===kl),p(c,"class","tabs-header stretched")},m(U,Y){w(U,e,Y),m(e,i),w(U,s,Y),E&&E.m(U,Y),w(U,l,Y),w(U,o,Y),H(r,o,null),m(o,a),m(o,u),w(U,f,Y),w(U,c,Y),m(c,d),m(d,h),m(d,g),P&&P.m(d,null),m(c,b),m(c,y),m(y,$),m(y,C),I&&I.m(y,null),T=!0,M||(O=[J(o,"submit",Wt(n[22])),J(d,"click",n[23]),J(y,"click",n[24])],M=!0)},p(U,Y){var de,x,oe,Ce,Te,K;(!T||Y[0]&4)&&t!==(t=U[2].isNew?"New collection":"Edit collection")&&ue(i,t),!U[2].isNew&&!U[2].system?E?(E.p(U,Y),Y[0]&4&&A(E,1)):(E=gd(U),E.c(),A(E,1),E.m(l.parentNode,l)):E&&(Ae(),L(E,1,1,()=>{E=null}),Pe());const G={};Y[0]&2048&&(G.class="form-field required m-b-0 "+(U[11]?"disabled":"")),Y[0]&2052|Y[1]&384&&(G.$$scope={dirty:Y,ctx:U}),r.$set(G),Y[0]&16&&(v=!B.isEmpty((de=U[4])==null?void 0:de.schema)),v?P?(P.p(U,Y),Y[0]&16&&A(P,1)):(P=bd(U),P.c(),A(P,1),P.m(d,null)):P&&(Ae(),L(P,1,1,()=>{P=null}),Pe()),(!T||Y[0]&512)&&ne(d,"active",U[9]===rs),Y[0]&16&&(S=!B.isEmpty((x=U[4])==null?void 0:x.listRule)||!B.isEmpty((oe=U[4])==null?void 0:oe.viewRule)||!B.isEmpty((Ce=U[4])==null?void 0:Ce.createRule)||!B.isEmpty((Te=U[4])==null?void 0:Te.updateRule)||!B.isEmpty((K=U[4])==null?void 0:K.deleteRule)),S?I?Y[0]&16&&A(I,1):(I=vd(),I.c(),A(I,1),I.m(y,null)):I&&(Ae(),L(I,1,1,()=>{I=null}),Pe()),(!T||Y[0]&512)&&ne(y,"active",U[9]===kl)},i(U){T||(A(E),A(r.$$.fragment,U),A(P),A(I),T=!0)},o(U){L(E),L(r.$$.fragment,U),L(P),L(I),T=!1},d(U){U&&k(e),U&&k(s),E&&E.d(U),U&&k(l),U&&k(o),j(r),U&&k(f),U&&k(c),P&&P.d(),I&&I.d(),M=!1,Je(O)}}}function _C(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=D(),s=_("button"),l=_("span"),r=N(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[10]||n[7],ne(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,r),u||(f=[J(e,"click",n[18]),J(s,"Line truncated
<span class="txt">New collection</span>`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){w(l,e,o),m(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:se,d(l){l&&k(e),i=!1,s()}}}function wC(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],h=new Map,g,v,b,y,$,C,S=n[3];const T=P=>P[14].id;for(let P=0;P<S.length;P+=1){let I=yd(n,S,P),F=T(I);h.set(F,d[P]=$d(F,I))}let M=null;S.length||(M=kd(n));let O=!n[6]&&Sd(n),E={};return b=new tu({props:E}),n[13](b),{c(){e=_("aside"),t=_("header"),i=_("div"),s=_("div"),l=_("button"),l.innerHTML='<i class="ri-close-line"></i>',o=D(),r=_("input"),a=D(),u=_("hr"),f=D(),c=_("div");for(let P=0;P<d.length;P+=1)d[P].c();M&&M.c(),g=D(),O&&O.c(),v=D(),q(b.$$.fragment),p(l,"type","button"),p(l,"class","btn btn-xs btn-secondary btn-circle btn-clear"),ne(l,"hidden",!n[4]),p(s,"class","form-field-addon"),p(r,"type","text"),p(r,"placeholder","Search collections..."),p(i,"class","form-field search"),ne(i,"active",n[4]),p(t,"class","sidebar-header"),p(u,"class","m-t-5 m-b-xs"),p(c,"class","sidebar-content"),p(e,"class","page-sidebar collection-sidebar")},m(P,I){w(P,e,I),m(e,t),m(t,i),m(i,s),m(s,l),m(i,o),m(i,r),Se(r,n[0]),m(e,a),m(e,u),m(e,f),m(e,c);for(let F=0;F<d.length;F+=1)d[F].m(c,null);M&&M.m(c,null),m(e,g),O&&O.m(e,null),w(P,v,I),H(b,P,I),y=!0,$||(C=[J(l,"click",n[9]),J(r,"input",n[10])],$=!0)},p(P,[I]){(!y||I&16)&&ne(l,"hidden",!P[4]),I&1&&r.value!==P[0]&&Se(r,P[0]),(!y||I&16)&&ne(i,"active",P[4]),I&170&&(S=P[3],d=_t(d,I,T,1,P,S,h,c,bn,$d,null,yd),!S.length&&M?M.p(P,I):S.length?M&&(M.d(1),M=null):(M=kd(P),M.c(),M.m(c,null))),P[6]?O&&(O.d(1),O=null):O?O.p(P,I):(O=Sd(P),O.c(),O.m(e,null));const F={};b.$set(F)},i(P){y||(A(b.$$.fragment,P),y=!0)},o(P){L(b.$$.fragment,P),y=!1},d(P){P&&k(e);for(let I=0;I<d.length;I+=1)d[I].d();M&&M.d(),O&&O.d(),P&&k(v),n[13](null),j(b,P),$=!1,Je(C)}}}function $C(n,e,t){let i,s,l,o,r,a;at(n,hi,y=>t(5,o=y)),at(n,As,y=>t(8,r=y)),at(n,us,y=>t(6,a=y));let u,f="";function c(y){nn(hi,o=y,o)}const d=()=>t(0,f="");function h(){f=this.value,t(0,f)}const g=y=>c(y),v=()=>u==null?void 0:u.show();function b(y){me[y?"unshift":"push"](()=>{u=y,t(2,u)})}return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=f.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=f!==""),n.$$.dirty&259&&t(3,l=r.filter(y=>y.name!="profiles"&&(y.id==f||y.name.replace(/\s+/g,"").toLowerCase().includes(i))))},[f,i,u,l,s,o,a,c,r,d,h,g,v,b]}class SC extends Ee{constructor(e){super(),Oe(this,e,$C,wC,De,{})}}function CC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O,E,P,I,F,V,Z,te,X,ee,U,Y,G,de,x,oe,Ce,Te,K,ke,ae,W,_e,He,Ue,Q,ge,ce,we,Ge;return{c(){e=_("p"),e.innerHTML=`The syntax basically follows the format
<code><span class="txt-success">OPERAND</span>
<span class="txt-danger">OPERATOR</span>
<span class="txt-success">OPERAND</span></code>, where:`,t=D(),i=_("ul"),s=_("li"),s.innerHTML=`<code class="txt-success">OPERAND</code> - could be any of the above field literal, string (single or double
quoted), number, null, true, false`,l=D(),o=_("li"),r=_("code"),r.textContent="OPERATOR",a=N(` - is one of:
`),u=_("br"),f=D(),c=_("ul"),d=_("li"),h=_("code"),h.textContent="=",g=D(),v=_("span"),v.textContent="Equal",b=D(),y=_("li"),$=_("code"),$.textContent="!=",C=D(),S=_("span"),S.textContent="NOT equal",T=D(),M=_("li"),O=_("code"),O.textContent=">",E=D(),P=_("span"),P.textContent="Greater than",I=D(),F=_("li"),z=_("code"),z.textContent=">=",Q=D(),ne=_("span"),ne.textContent="Greater than or equal",G=D(),ee=_("li"),U=_("code"),U.textContent="<",Y=D(),Z=_("span"),Z.textContent="Less than or equal",de=D(),x=_("li"),oe=_("code"),oe.textContent="<=",Ce=D(),Te=_("span"),Te.textContent="Less than or equal",K=D(),we=_("li"),ae=_("code"),ae.textContent="~",W=D(),_e=_("span"),_e.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard
match)`,He=D(),Ue=_("li"),X=_("code"),X.textContent="!~",ge=D(),ce=_("span"),ce.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,ke=D(),Ge=_("p"),Ge.innerHTML=`To group and combine several expressions you could use brackets
<code>(...)</code>, <code>&amp;&amp;</code> (AND) and <code>||</code> (OR) tokens.`,p(r,"class","txt-danger"),p(h,"class","filter-op svelte-1w7s5nw"),p(v,"class","txt-hint"),p($,"class","filter-op svelte-1w7s5nw"),p(S,"class","txt-hint"),p(O,"class","filter-op svelte-1w7s5nw"),p(P,"class","txt-hint"),p(z,"class","filter-op svelte-1w7s5nw"),p(ne,"class","txt-hint"),p(U,"class","filter-op svelte-1w7s5nw"),p(Z,"class","txt-hint"),p(oe,"class","filter-op svelte-1w7s5nw"),p(Te,"class","txt-hint"),p(ae,"class","filter-op svelte-1w7s5nw"),p(_e,"class","txt-hint"),p(X,"class","filter-op svelte-1w7s5nw"),p(ce,"class","txt-hint")},m(et,Ke){w(et,e,Ke),w(et,t,Ke),w(et,i,Ke),m(i,s),m(i,l),m(i,o),m(o,r),m(o,a),m(o,u),m(o,f),m(o,c),m(c,d),m(d,h),m(d,g),m(d,v),m(c,b),m(c,y),m(y,$),m(y,C),m(y,S),m(c,T),m(c,M),m(M,O),m(M,E),m(M,P),m(c,I),m(c,F),m(F,z),m(F,Q),m(F,ne),m(c,G),m(c,ee),m(ee,U),m(ee,Y),m(ee,Z),m(c,de),m(c,x),m(x,oe),m(x,Ce),m(x,Te),m(c,K),m(c,we),m(we,ae),m(we,W),m(we,_e),m(c,He),m(c,Ue),m(Ue,X),m(Ue,ge),m(Ue,ce),w(et,ke,Ke),w(et,Ge,Ke)},p:se,i:se,o:se,d(et){et&&k(e),et&&k(t),et&&k(i),et&&k(ke),et&&k(Ge)}}}class MC extends Ee{constructor(e){super(),Oe(this,e,null,CC,De,{})}}function Cd(n,e,t){const i=n.slice();return i[5]=e[t],i}function Md(n,e,t){const i=n.slice();return i[5]=e[t],i}function Td(n,e){let t,i,s=e[5].title+"",l,o,r,a;function u(){return e[4](e[5])}return{key:n,first:null,c(){t=_("button"),i=_("div"),l=N(s),o=D(),p(i,"class","txt"),p(t,"class","tab-item svelte-1maocj6"),te(t,"active",e[0]===e[5].language),this.first=t},m(f,c){w(f,t,c),m(t,i),m(i,l),m(t,o),r||(a=J(t,"click",u),r=!0)},p(f,c){e=f,c&2&&s!==(s=e[5].title+"")&&ue(l,s),c&3&&te(t,"active",e[0]===e[5].language)},d(f){f&&k(t),r=!1,a()}}}function Dd(n,e){let t,i,s,l;return i=new _n({props:{language:e[5].language,content:e[5].content}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item svelte-1maocj6"),te(t,"active",e[0]===e[5].language),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&2&&(a.language=e[5].language),r&2&&(a.content=e[5].content),i.$set(a),r&3&&te(t,"active",e[0]===e[5].language)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function TC(n){let e,t,i=[],s=new Map,l,o,r=[],a=new Map,u,f=n[1];const c=g=>g[5].language;for(let g=0;g<f.length;g+=1){let v=Md(n,f,g),b=c(v);s.set(b,i[g]=Td(b,v))}let d=n[1];const h=g=>g[5].language;for(let g=0;g<d.length;g+=1){let v=Cd(n,d,g),b=h(v);a.set(b,r[g]=Dd(b,v))}return{c(){e=_("div"),t=_("div");for(let g=0;g<i.length;g+=1)i[g].c();l=D(),o=_("div");for(let g=0;g<r.length;g+=1)r[g].c();p(t,"class","tabs-header compact left"),p(o,"class","tabs-content"),p(e,"class","tabs sdk-tabs m-b-lg svelte-1maocj6")},m(g,v){w(g,e,v),m(e,t);for(let b=0;b<i.length;b+=1)i[b].m(t,null);m(e,l),m(e,o);for(let b=0;b<r.length;b+=1)r[b].m(o,null);u=!0},p(g,[v]){v&3&&(f=g[1],i=_t(i,v,c,1,g,f,s,t,bn,Td,null,Md)),v&3&&(d=g[1],Ae(),r=_t(r,v,h,1,g,d,a,o,Gt,Dd,null,Cd),Pe())},i(g){if(!u){for(let v=0;v<d.length;v+=1)A(r[v]);u=!0}},o(g){for(let v=0;v<r.length;v+=1)L(r[v]);u=!1},d(g){g&&k(e);for(let v=0;v<i.length;v+=1)i[v].d();for(let v=0;v<r.length;v+=1)r[v].d()}}}const Od="pb_sdk_preference";function DC(n,e,t){let i,{js:s=""}=e,{dart:l=""}=e,o=localStorage.getItem(Od)||"javascript";const r=a=>t(0,o=a.language);return n.$$set=a=>{"js"in a&&t(2,s=a.js),"dart"in a&&t(3,l=a.dart)},n.$$.update=()=>{n.$$.dirty&1&&o&&localStorage.setItem(Od,o),n.$$.dirty&12&&t(1,i=[{title:"JavaScript",language:"javascript",content:s},{title:"Dart",language:"dart",content:l}])},[o,i,s,l,r]}class Hs extends Ee{constructor(e){super(),Oe(this,e,DC,TC,De,{js:2,dart:3})}}function Ed(n,e,t){const i=n.slice();return i[6]=e[t],i}function Ad(n,e,t){const i=n.slice();return i[6]=e[t],i}function Pd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ld(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("div"),s=N(i),l=D(),p(t,"class","tab-item"),te(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&20&&te(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Id(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),te(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o,r&20&&te(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function OC(n){var gi,Ll,ms,Il;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y=n[0].name+"",$,C,S,T,M,O,E,P,I,F,z,Q,ne,G,ee,U,Y,Z,de,x,oe,Ce,Te,K,we,ae,W,_e,He,Ue,X,ge,ce,ke,Ge,et,Ke,nt,Me,ze,Xe,it,ft,be,Fe,dt,Dt,pt,lt,Lt,bt,Ft,Ot,Ze,$e,Be,ot,rt,Ht,Ct,ct,en,R,V,ie,re=[],Le=new Map,le,pe,ve=[],fe=new MapLine truncated
`),u=_("br"),f=D(),c=_("ul"),d=_("li"),h=_("code"),h.textContent="=",g=D(),v=_("span"),v.textContent="Equal",b=D(),y=_("li"),$=_("code"),$.textContent="!=",C=D(),S=_("span"),S.textContent="NOT equal",T=D(),M=_("li"),O=_("code"),O.textContent=">",E=D(),P=_("span"),P.textContent="Greater than",I=D(),F=_("li"),V=_("code"),V.textContent=">=",Z=D(),te=_("span"),te.textContent="Greater than or equal",X=D(),ee=_("li"),U=_("code"),U.textContent="<",Y=D(),G=_("span"),G.textContent="Less than or equal",de=D(),x=_("li"),oe=_("code"),oe.textContent="<=",Ce=D(),Te=_("span"),Te.textContent="Less than or equal",K=D(),ke=_("li"),ae=_("code"),ae.textContent="~",W=D(),_e=_("span"),_e.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for wildcard
match)`,He=D(),Ue=_("li"),Q=_("code"),Q.textContent="!~",ge=D(),ce=_("span"),ce.textContent=`NOT Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for
wildcard match)`,we=D(),Ge=_("p"),Ge.innerHTML=`To group and combine several expressions you could use brackets
<code>(...)</code>, <code>&amp;&amp;</code> (AND) and <code>||</code> (OR) tokens.`,p(r,"class","txt-danger"),p(h,"class","filter-op svelte-1w7s5nw"),p(v,"class","txt-hint"),p($,"class","filter-op svelte-1w7s5nw"),p(S,"class","txt-hint"),p(O,"class","filter-op svelte-1w7s5nw"),p(P,"class","txt-hint"),p(V,"class","filter-op svelte-1w7s5nw"),p(te,"class","txt-hint"),p(U,"class","filter-op svelte-1w7s5nw"),p(G,"class","txt-hint"),p(oe,"class","filter-op svelte-1w7s5nw"),p(Te,"class","txt-hint"),p(ae,"class","filter-op svelte-1w7s5nw"),p(_e,"class","txt-hint"),p(Q,"class","filter-op svelte-1w7s5nw"),p(ce,"class","txt-hint")},m(et,Ke){w(et,e,Ke),w(et,t,Ke),w(et,i,Ke),m(i,s),m(i,l),m(i,o),m(o,r),m(o,a),m(o,u),m(o,f),m(o,c),m(c,d),m(d,h),m(d,g),m(d,v),m(c,b),m(c,y),m(y,$),m(y,C),m(y,S),m(c,T),m(c,M),m(M,O),m(M,E),m(M,P),m(c,I),m(c,F),m(F,V),m(F,Z),m(F,te),m(c,X),m(c,ee),m(ee,U),m(ee,Y),m(ee,G),m(c,de),m(c,x),m(x,oe),m(x,Ce),m(x,Te),m(c,K),m(c,ke),m(ke,ae),m(ke,W),m(ke,_e),m(c,He),m(c,Ue),m(Ue,Q),m(Ue,ge),m(Ue,ce),w(et,we,Ke),w(et,Ge,Ke)},p:se,i:se,o:se,d(et){et&&k(e),et&&k(t),et&&k(i),et&&k(we),et&&k(Ge)}}}class MC extends Ee{constructor(e){super(),Oe(this,e,null,CC,De,{})}}function Cd(n,e,t){const i=n.slice();return i[5]=e[t],i}function Md(n,e,t){const i=n.slice();return i[5]=e[t],i}function Td(n,e){let t,i,s=e[5].title+"",l,o,r,a;function u(){return e[4](e[5])}return{key:n,first:null,c(){t=_("button"),i=_("div"),l=N(s),o=D(),p(i,"class","txt"),p(t,"class","tab-item svelte-1maocj6"),ne(t,"active",e[0]===e[5].language),this.first=t},m(f,c){w(f,t,c),m(t,i),m(i,l),m(t,o),r||(a=J(t,"click",u),r=!0)},p(f,c){e=f,c&2&&s!==(s=e[5].title+"")&&ue(l,s),c&3&&ne(t,"active",e[0]===e[5].language)},d(f){f&&k(t),r=!1,a()}}}function Dd(n,e){let t,i,s,l;return i=new _n({props:{language:e[5].language,content:e[5].content}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item svelte-1maocj6"),ne(t,"active",e[0]===e[5].language),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&2&&(a.language=e[5].language),r&2&&(a.content=e[5].content),i.$set(a),(!l||r&3)&&ne(t,"active",e[0]===e[5].language)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function TC(n){let e,t,i=[],s=new Map,l,o,r=[],a=new Map,u,f=n[1];const c=g=>g[5].language;for(let g=0;g<f.length;g+=1){let v=Md(n,f,g),b=c(v);s.set(b,i[g]=Td(b,v))}let d=n[1];const h=g=>g[5].language;for(let g=0;g<d.length;g+=1){let v=Cd(n,d,g),b=h(v);a.set(b,r[g]=Dd(b,v))}return{c(){e=_("div"),t=_("div");for(let g=0;g<i.length;g+=1)i[g].c();l=D(),o=_("div");for(let g=0;g<r.length;g+=1)r[g].c();p(t,"class","tabs-header compact left"),p(o,"class","tabs-content"),p(e,"class","tabs sdk-tabs m-b-lg svelte-1maocj6")},m(g,v){w(g,e,v),m(e,t);for(let b=0;b<i.length;b+=1)i[b].m(t,null);m(e,l),m(e,o);for(let b=0;b<r.length;b+=1)r[b].m(o,null);u=!0},p(g,[v]){v&3&&(f=g[1],i=_t(i,v,c,1,g,f,s,t,bn,Td,null,Md)),v&3&&(d=g[1],Ae(),r=_t(r,v,h,1,g,d,a,o,Gt,Dd,null,Cd),Pe())},i(g){if(!u){for(let v=0;v<d.length;v+=1)A(r[v]);u=!0}},o(g){for(let v=0;v<r.length;v+=1)L(r[v]);u=!1},d(g){g&&k(e);for(let v=0;v<i.length;v+=1)i[v].d();for(let v=0;v<r.length;v+=1)r[v].d()}}}const Od="pb_sdk_preference";function DC(n,e,t){let i,{js:s=""}=e,{dart:l=""}=e,o=localStorage.getItem(Od)||"javascript";const r=a=>t(0,o=a.language);return n.$$set=a=>{"js"in a&&t(2,s=a.js),"dart"in a&&t(3,l=a.dart)},n.$$.update=()=>{n.$$.dirty&1&&o&&localStorage.setItem(Od,o),n.$$.dirty&12&&t(1,i=[{title:"JavaScript",language:"javascript",content:s},{title:"Dart",language:"dart",content:l}])},[o,i,s,l,r]}class Hs extends Ee{constructor(e){super(),Oe(this,e,DC,TC,De,{js:2,dart:3})}}function Ed(n,e,t){const i=n.slice();return i[6]=e[t],i}function Ad(n,e,t){const i=n.slice();return i[6]=e[t],i}function Pd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ld(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("div"),s=N(i),l=D(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&20&&ne(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Id(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o,(!l||r&20)&&ne(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function OC(n){var gi,Ll,ms,Il;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y=n[0].name+"",$,C,S,T,M,O,E,P,I,F,V,Z,te,X,ee,U,Y,G,de,x,oe,Ce,Te,K,ke,ae,W,_e,He,Ue,Q,ge,ce,we,Ge,et,Ke,nt,Me,ze,Xe,it,ct,be,Fe,dt,Dt,pt,lt,Lt,bt,Ft,Ot,Ze,$e,Be,ot,rt,Ht,Ct,ft,en,R,z,ie,re=[],Le=new Map,le,pe,ve=[Line truncated
import PocketBase from 'pocketbase';
const client = new PocketBase('${n[3]}');
@@ -124,29 +124,29 @@
// alternatively you can also fetch all records at once via getFullList:
final records = await client.records.getFullList('${(Il=n[0])==null?void 0:Il.name}', batch: 200, sort: '-created');
`}}),X=new _n({props:{content:`
`}}),Q=new _n({props:{content:`
// DESC by created and ASC by id
?sort=-created,id
`}}),ze=new _n({props:{content:`
?filter=(id='abc' && created>'2022-01-01')
`}}),it=new MC({}),bt=new _n({props:{content:`
?expand=rel1,rel2.subrel21.subrel22
`}});let mt=n[4];const un=qe=>qe[6].code;for(let qe=0;qe<mt.length;qe+=1){let xe=Ad(n,mt,qe),Xt=un(xe);Le.set(Xt,re[qe]=Ld(Xt,xe))}let jt=n[4];const Di=qe=>qe[6].code;for(let qe=0;qe<jt.length;qe+=1){let xe=Ed(n,jt,qe),Xt=Di(xe);fe.set(Xt,ve[qe]=Id(Xt,xe))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records"),c=D(),Ie&&Ie.c(),d=D(),h=_("div"),g=_("p"),v=N("Fetch a paginated "),b=_("strong"),$=N(y),C=N(" records list."),S=D(),T=_("div"),T.textContent="Client SDKs example",M=D(),q(O.$$.fragment),E=D(),P=_("div"),P.textContent="Query parameters",I=D(),F=_("table"),z=_("thead"),z.innerHTML=`<tr><th>Param</th>
`}});let mt=n[4];const un=qe=>qe[6].code;for(let qe=0;qe<mt.length;qe+=1){let xe=Ad(n,mt,qe),Xt=un(xe);Le.set(Xt,re[qe]=Ld(Xt,xe))}let jt=n[4];const Di=qe=>qe[6].code;for(let qe=0;qe<jt.length;qe+=1){let xe=Ed(n,jt,qe),Xt=Di(xe);fe.set(Xt,ve[qe]=Id(Xt,xe))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records"),c=D(),Ie&&Ie.c(),d=D(),h=_("div"),g=_("p"),v=N("Fetch a paginated "),b=_("strong"),$=N(y),C=N(" records list."),S=D(),T=_("div"),T.textContent="Client SDKs example",M=D(),q(O.$$.fragment),E=D(),P=_("div"),P.textContent="Query parameters",I=D(),F=_("table"),V=_("thead"),V.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,Q=D(),ne=_("tbody"),G=_("tr"),G.innerHTML=`<td>page</td>
<th width="60%">Description</th></tr>`,Z=D(),te=_("tbody"),X=_("tr"),X.innerHTML=`<td>page</td>
<td><span class="label">Number</span></td>
<td>The page (aka. offset) of the paginated list (default to 1).</td>`,ee=D(),U=_("tr"),U.innerHTML=`<td>perPage</td>
<td><span class="label">Number</span></td>
<td>Specify the max returned records per page (default to 30).</td>`,Y=D(),Z=_("tr"),de=_("td"),de.textContent="sort",x=D(),oe=_("td"),oe.innerHTML='<span class="label">String</span>',Ce=D(),Te=_("td"),K=N("Specify the records order attribute(s). "),we=_("br"),ae=N(`
<td>Specify the max returned records per page (default to 30).</td>`,Y=D(),G=_("tr"),de=_("td"),de.textContent="sort",x=D(),oe=_("td"),oe.innerHTML='<span class="label">String</span>',Ce=D(),Te=_("td"),K=N("Specify the records order attribute(s). "),ke=_("br"),ae=N(`
Add `),W=_("code"),W.textContent="-",_e=N(" / "),He=_("code"),He.textContent="+",Ue=N(` (default) in front of the attribute for DESC / ASC order.
Ex.:
`),q(X.$$.fragment),ge=D(),ce=_("tr"),ke=_("td"),ke.textContent="filter",Ge=D(),et=_("td"),et.innerHTML='<span class="label">String</span>',Ke=D(),nt=_("td"),Me=N(`Filter the returned records. Ex.:
`),q(ze.$$.fragment),Xe=D(),q(it.$$.fragment),ft=D(),be=_("tr"),Fe=_("td"),Fe.textContent="expand",dt=D(),Dt=_("td"),Dt.innerHTML='<span class="label">String</span>',pt=D(),lt=_("td"),Lt=N(`Auto expand record relations. Ex.:
`),q(Q.$$.fragment),ge=D(),ce=_("tr"),we=_("td"),we.textContent="filter",Ge=D(),et=_("td"),et.innerHTML='<span class="label">String</span>',Ke=D(),nt=_("td"),Me=N(`Filter the returned records. Ex.:
`),q(ze.$$.fragment),Xe=D(),q(it.$$.fragment),ct=D(),be=_("tr"),Fe=_("td"),Fe.textContent="expand",dt=D(),Dt=_("td"),Dt.innerHTML='<span class="label">String</span>',pt=D(),lt=_("td"),Lt=N(`Auto expand record relations. Ex.:
`),q(bt.$$.fragment),Ft=N(`
Supports up to 6-levels depth nested relations expansion. `),Ot=_("br"),Ze=N(`
The expanded relations will be appended to each individual record under the
`),$e=_("code"),$e.textContent="@expand",Be=N(" property (eg. "),ot=_("code"),ot.textContent='"@expand": {"rel1": {...}, ...}',rt=N(`). Only the
relations that the user has permissions to `),Ht=_("strong"),Ht.textContent="view",Ct=N(" will be expanded."),ct=D(),en=_("div"),en.textContent="Responses",R=D(),V=_("div"),ie=_("div");for(let qe=0;qe<re.length;qe+=1)re[qe].c();le=D(),pe=_("div");for(let qe=0;qe<ve.length;qe+=1)ve[qe].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(h,"class","content m-b-base"),p(T,"class","section-title"),p(P,"class","section-title"),p(F,"class","table-compact table-border m-b-lg"),p(en,"class","section-title"),p(ie,"class","tabs-header compact left"),p(pe,"class","tabs-content"),p(V,"class","tabs")},m(qe,xe){w(qe,e,xe),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(e,c),Ie&&Ie.m(e,null),w(qe,d,xe),w(qe,h,xe),m(h,g),m(g,v),m(g,b),m(b,$),m(g,C),w(qe,S,xe),w(qe,T,xe),w(qe,M,xe),H(O,qe,xe),w(qe,E,xe),w(qe,P,xe),w(qe,I,xe),w(qe,F,xe),m(F,z),m(F,Q),m(F,ne),m(ne,G),m(ne,ee),m(ne,U),m(ne,Y),m(ne,Z),m(Z,de),m(Z,x),m(Z,oe),m(Z,Ce),m(Z,Te),m(Te,K),m(Te,we),m(Te,ae),m(Te,W),m(Te,_e),m(Te,He),m(Te,Ue),H(X,Te,null),m(ne,ge),m(ne,ce),m(ce,ke),m(ce,Ge),m(ce,et),m(ce,Ke),m(ce,nt),m(nt,Me),H(ze,nt,null),m(nt,Xe),H(it,nt,null),m(ne,ft),m(ne,be),m(be,Fe),m(be,dt),m(be,Dt),m(be,pt),m(be,lt),m(lt,Lt),H(bt,lt,null),m(lt,Ft),m(lt,Ot),m(lt,Ze),m(lt,$e),m(lt,Be),m(lt,ot),m(lt,rt),m(lt,Ht),m(lt,Ct),w(qe,ct,xe),w(qe,en,xe),w(qe,R,xe),w(qe,V,xe),m(V,ie);for(let Xt=0;Xt<re.length;Xt+=1)re[Xt].m(ie,null);m(V,le),m(V,pe);for(let Xt=0;Xt<ve.length;Xt+=1)ve[Xt].m(pe,null);he=!0},p(qe,[xe]){var Nl,Fl,Rl,Hl;(!he||xe&1)&&a!==(a=qe[0].name+"")&&ue(u,a),qe[1]?Ie||(Ie=Pd(),Ie.c(),Ie.m(e,null)):Ie&&(Ie.d(1),Ie=null),(!he||xe&1)&&y!==(y=qe[0].name+"")&&ue($,y);const Xt={};xe&9&&(Xt.js=`
relations that the user has permissions to `),Ht=_("strong"),Ht.textContent="view",Ct=N(" will be expanded."),ft=D(),en=_("div"),en.textContent="Responses",R=D(),z=_("div"),ie=_("div");for(let qe=0;qe<re.length;qe+=1)re[qe].c();le=D(),pe=_("div");for(let qe=0;qe<ve.length;qe+=1)ve[qe].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(h,"class","content m-b-base"),p(T,"class","section-title"),p(P,"class","section-title"),p(F,"class","table-compact table-border m-b-lg"),p(en,"class","section-title"),p(ie,"class","tabs-header compact left"),p(pe,"class","tabs-content"),p(z,"class","tabs")},m(qe,xe){w(qe,e,xe),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(e,c),Ie&&Ie.m(e,null),w(qe,d,xe),w(qe,h,xe),m(h,g),m(g,v),m(g,b),m(b,$),m(g,C),w(qe,S,xe),w(qe,T,xe),w(qe,M,xe),H(O,qe,xe),w(qe,E,xe),w(qe,P,xe),w(qe,I,xe),w(qe,F,xe),m(F,V),m(F,Z),m(F,te),m(te,X),m(te,ee),m(te,U),m(te,Y),m(te,G),m(G,de),m(G,x),m(G,oe),m(G,Ce),m(G,Te),m(Te,K),m(Te,ke),m(Te,ae),m(Te,W),m(Te,_e),m(Te,He),m(Te,Ue),H(Q,Te,null),m(te,ge),m(te,ce),m(ce,we),m(ce,Ge),m(ce,et),m(ce,Ke),m(ce,nt),m(nt,Me),H(ze,nt,null),m(nt,Xe),H(it,nt,null),m(te,ct),m(te,be),m(be,Fe),m(be,dt),m(be,Dt),m(be,pt),m(be,lt),m(lt,Lt),H(bt,lt,null),m(lt,Ft),m(lt,Ot),m(lt,Ze),m(lt,$e),m(lt,Be),m(lt,ot),m(lt,rt),m(lt,Ht),m(lt,Ct),w(qe,ft,xe),w(qe,en,xe),w(qe,R,xe),w(qe,z,xe),m(z,ie);for(let Xt=0;Xt<re.length;Xt+=1)re[Xt].m(ie,null);m(z,le),m(z,pe);for(let Xt=0;Xt<ve.length;Xt+=1)ve[Xt].m(pe,null);he=!0},p(qe,[xe]){var Nl,Fl,Rl,Hl;(!he||xe&1)&&a!==(a=qe[0].name+"")&&ue(u,a),qe[1]?Ie||(Ie=Pd(),Ie.c(),Ie.m(e,null)):Ie&&(Ie.d(1),Ie=null),(!he||xe&1)&&y!==(y=qe[0].name+"")&&ue($,y);const Xt={};xe&9&&(Xt.js=`
import PocketBase from 'pocketbase';
const client = new PocketBase('${qe[3]}');
@@ -179,7 +179,7 @@
// alternatively you can also fetch all records at once via getFullList:
final records = await client.records.getFullList('${(Hl=qe[0])==null?void 0:Hl.name}', batch: 200, sort: '-created');
`),O.$set(Xt),xe&20&&(mt=qe[4],re=_t(re,xe,un,1,qe,mt,Le,ie,bn,Ld,null,Ad)),xe&20&&(jt=qe[4],Ae(),ve=_t(ve,xe,Di,1,qe,jt,fe,pe,Gt,Id,null,Ed),Pe())},i(qe){if(!he){A(O.$$.fragment,qe),A(X.$$.fragment,qe),A(ze.$$.fragment,qe),A(it.$$.fragment,qe),A(bt.$$.fragment,qe);for(let xe=0;xe<jt.length;xe+=1)A(ve[xe]);he=!0}},o(qe){L(O.$$.fragment,qe),L(X.$$.fragment,qe),L(ze.$$.fragment,qe),L(it.$$.fragment,qe),L(bt.$$.fragment,qe);for(let xe=0;xe<ve.length;xe+=1)L(ve[xe]);he=!1},d(qe){qe&&k(e),Ie&&Ie.d(),qe&&k(d),qe&&k(h),qe&&k(S),qe&&k(T),qe&&k(M),j(O,qe),qe&&k(E),qe&&k(P),qe&&k(I),qe&&k(F),j(X),j(ze),j(it),j(bt),qe&&k(ct),qe&&k(en),qe&&k(R),qe&&k(V);for(let xe=0;xe<re.length;xe+=1)re[xe].d();for(let xe=0;xe<ve.length;xe+=1)ve[xe].d()}}}function EC(n,e,t){let i,s,{collection:l=new dn}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.listRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify({page:1,perPage:30,totalItems:2,items:[B.dummyCollectionRecord(l),B.dummyCollectionRecord(l)]},null,2)}),r.push({code:400,body:`
`),O.$set(Xt),xe&20&&(mt=qe[4],re=_t(re,xe,un,1,qe,mt,Le,ie,bn,Ld,null,Ad)),xe&20&&(jt=qe[4],Ae(),ve=_t(ve,xe,Di,1,qe,jt,fe,pe,Gt,Id,null,Ed),Pe())},i(qe){if(!he){A(O.$$.fragment,qe),A(Q.$$.fragment,qe),A(ze.$$.fragment,qe),A(it.$$.fragment,qe),A(bt.$$.fragment,qe);for(let xe=0;xe<jt.length;xe+=1)A(ve[xe]);he=!0}},o(qe){L(O.$$.fragment,qe),L(Q.$$.fragment,qe),L(ze.$$.fragment,qe),L(it.$$.fragment,qe),L(bt.$$.fragment,qe);for(let xe=0;xe<ve.length;xe+=1)L(ve[xe]);he=!1},d(qe){qe&&k(e),Ie&&Ie.d(),qe&&k(d),qe&&k(h),qe&&k(S),qe&&k(T),qe&&k(M),j(O,qe),qe&&k(E),qe&&k(P),qe&&k(I),qe&&k(F),j(Q),j(ze),j(it),j(bt),qe&&k(ft),qe&&k(en),qe&&k(R),qe&&k(z);for(let xe=0;xe<re.length;xe+=1)re[xe].d();for(let xe=0;xe<ve.length;xe+=1)ve[xe].d()}}}function EC(n,e,t){let i,s,{collection:l=new dn}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.listRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify({page:1,perPage:30,totalItems:2,items:[B.dummyCollectionRecord(l),B.dummyCollectionRecord(l)]},null,2)}),r.push({code:400,body:`
{
"code": 400,
"message": "Something went wrong while processing your request. Invalid filter.",
@@ -197,7 +197,7 @@
"message": "The requested resource wasn't found.",
"data": {}
}
`}))},t(3,s=B.getApiExampleUrl(ye.baseUrl)),[l,i,o,s,r,a]}class AC extends Ee{constructor(e){super(),Oe(this,e,EC,OC,De,{collection:0})}}function Nd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Fd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Rd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Hd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=D(),p(t,"class","tab-item"),te(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&20&&te(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function jd(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),te(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o,r&20&&te(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function PC(n){var Ot,Ze;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y,$=n[0].name+"",C,S,T,M,O,E,P,I,F,z,Q,ne,G,ee,U,Y,Z,de,x,oe,Ce,Te,K,we,ae,W,_e,He,Ue,X,ge,ce,ke,Ge,et,Ke,nt,Me,ze,Xe=[],it=new Map,ft,be,Fe=[],dt=new Map,Dt,pt=n[1]&&Rd();E=new Hs({props:{js:`
`}))},t(3,s=B.getApiExampleUrl(ye.baseUrl)),[l,i,o,s,r,a]}class AC extends Ee{constructor(e){super(),Oe(this,e,EC,OC,De,{collection:0})}}function Nd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Fd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Rd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Hd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=D(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&20&&ne(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function jd(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o,(!l||r&20)&&ne(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function PC(n){var Ot,Ze;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y,$=n[0].name+"",C,S,T,M,O,E,P,I,F,V,Z,te,X,ee,U,Y,G,de,x,oe,Ce,Te,K,ke,ae,W,_e,He,Ue,Q,ge,ce,we,Ge,et,Ke,nt,Me,ze,Xe=[],it=new Map,ct,be,Fe=[],dt=new Map,Dt,pt=n[1]&&Rd();E=new Hs({props:{js:`
import PocketBase from 'pocketbase';
const client = new PocketBase('${n[3]}');
@@ -219,19 +219,19 @@
});
`}}),ae=new _n({props:{content:`
?expand=rel1,rel2.subrel21.subrel22
`}});let lt=n[4];const Lt=$e=>$e[6].code;for(let $e=0;$e<lt.length;$e+=1){let Be=Fd(n,lt,$e),ot=Lt(Be);it.set(ot,Xe[$e]=Hd(ot,Be))}let bt=n[4];const Ft=$e=>$e[6].code;for(let $e=0;$e<bt.length;$e+=1){let Be=Nd(n,bt,$e),ot=Ft(Be);dt.set(ot,Fe[$e]=jd(ot,Be))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=D(),pt&&pt.c(),h=D(),g=_("div"),v=_("p"),b=N("Fetch a single "),y=_("strong"),C=N($),S=N(" record."),T=D(),M=_("div"),M.textContent="Client SDKs example",O=D(),q(E.$$.fragment),P=D(),I=_("div"),I.textContent="Path Parameters",F=D(),z=_("table"),z.innerHTML=`<thead><tr><th>Param</th>
`}});let lt=n[4];const Lt=$e=>$e[6].code;for(let $e=0;$e<lt.length;$e+=1){let Be=Fd(n,lt,$e),ot=Lt(Be);it.set(ot,Xe[$e]=Hd(ot,Be))}let bt=n[4];const Ft=$e=>$e[6].code;for(let $e=0;$e<bt.length;$e+=1){let Be=Nd(n,bt,$e),ot=Ft(Be);dt.set(ot,Fe[$e]=jd(ot,Be))}return{c(){e=_("div"),t=_("strong"),t.textContent="GET",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=D(),pt&&pt.c(),h=D(),g=_("div"),v=_("p"),b=N("Fetch a single "),y=_("strong"),C=N($),S=N(" record."),T=D(),M=_("div"),M.textContent="Client SDKs example",O=D(),q(E.$$.fragment),P=D(),I=_("div"),I.textContent="Path Parameters",F=D(),V=_("table"),V.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
<td>ID of the record to view.</td></tr></tbody>`,Q=D(),ne=_("div"),ne.textContent="Query parameters",G=D(),ee=_("table"),U=_("thead"),U.innerHTML=`<tr><th>Param</th>
<td>ID of the record to view.</td></tr></tbody>`,Z=D(),te=_("div"),te.textContent="Query parameters",X=D(),ee=_("table"),U=_("thead"),U.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,Y=D(),Z=_("tbody"),de=_("tr"),x=_("td"),x.textContent="expand",oe=D(),Ce=_("td"),Ce.innerHTML='<span class="label">String</span>',Te=D(),K=_("td"),we=N(`Auto expand record relations. Ex.:
<th width="60%">Description</th></tr>`,Y=D(),G=_("tbody"),de=_("tr"),x=_("td"),x.textContent="expand",oe=D(),Ce=_("td"),Ce.innerHTML='<span class="label">String</span>',Te=D(),K=_("td"),ke=N(`Auto expand record relations. Ex.:
`),q(ae.$$.fragment),W=N(`
Supports up to 6-levels depth nested relations expansion. `),_e=_("br"),He=N(`
The expanded relations will be appended to the record under the
`),Ue=_("code"),Ue.textContent="@expand",X=N(" property (eg. "),ge=_("code"),ge.textContent='"@expand": {"rel1": {...}, ...}',ce=N(`). Only the
relations that the user has permissions to `),ke=_("strong"),ke.textContent="view",Ge=N(" will be expanded."),et=D(),Ke=_("div"),Ke.textContent="Responses",nt=D(),Me=_("div"),ze=_("div");for(let $e=0;$e<Xe.length;$e+=1)Xe[$e].c();ft=D(),be=_("div");for(let $e=0;$e<Fe.length;$e+=1)Fe[$e].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(g,"class","content m-b-base"),p(M,"class","section-title"),p(I,"class","section-title"),p(z,"class","table-compact table-border m-b-lg"),p(ne,"class","section-title"),p(ee,"class","table-compact table-border m-b-lg"),p(Ke,"class","section-title"),p(ze,"class","tabs-header compact left"),p(be,"class","tabs-content"),p(Me,"class","tabs")},m($e,Be){w($e,e,Be),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),pt&&pt.m(e,null),w($e,h,Be),w($e,g,Be),m(g,v),m(v,b),m(v,y),m(y,C),m(v,S),w($e,T,Be),w($e,M,Be),w($e,O,Be),H(E,$e,Be),w($e,P,Be),w($e,I,Be),w($e,F,Be),w($e,z,Be),w($e,Q,Be),w($e,ne,Be),w($e,G,Be),w($e,ee,Be),m(ee,U),m(ee,Y),m(ee,Z),m(Z,de),m(de,x),m(de,oe),m(de,Ce),m(de,Te),m(de,K),m(K,we),H(ae,K,null),m(K,W),m(K,_e),m(K,He),m(K,Ue),m(K,X),m(K,ge),m(K,ce),m(K,ke),m(K,Ge),w($e,et,Be),w($e,Ke,Be),w($e,nt,Be),w($e,Me,Be),m(Me,ze);for(let ot=0;ot<Xe.length;ot+=1)Xe[ot].m(ze,null);m(Me,ft),m(Me,be);for(let ot=0;ot<Fe.length;ot+=1)Fe[ot].m(be,null);Dt=!0},p($e,[Be]){var rt,Ht;(!Dt||Be&1)&&a!==(a=$e[0].name+"")&&ue(u,a),$e[1]?pt||(pt=Rd(),pt.c(),pt.m(e,null)):pt&&(pt.d(1),pt=null),(!Dt||Be&1)&&$!==($=$e[0].name+"")&&ue(C,$);const ot={};Be&9&&(ot.js=`
`),Ue=_("code"),Ue.textContent="@expand",Q=N(" property (eg. "),ge=_("code"),ge.textContent='"@expand": {"rel1": {...}, ...}',ce=N(`). Only the
relations that the user has permissions to `),we=_("strong"),we.textContent="view",Ge=N(" will be expanded."),et=D(),Ke=_("div"),Ke.textContent="Responses",nt=D(),Me=_("div"),ze=_("div");for(let $e=0;$e<Xe.length;$e+=1)Xe[$e].c();ct=D(),be=_("div");for(let $e=0;$e<Fe.length;$e+=1)Fe[$e].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-info"),p(g,"class","content m-b-base"),p(M,"class","section-title"),p(I,"class","section-title"),p(V,"class","table-compact table-border m-b-lg"),p(te,"class","section-title"),p(ee,"class","table-compact table-border m-b-lg"),p(Ke,"class","section-title"),p(ze,"class","tabs-header compact left"),p(be,"class","tabs-content"),p(Me,"class","tabs")},m($e,Be){w($e,e,Be),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),pt&&pt.m(e,null),w($e,h,Be),w($e,g,Be),m(g,v),m(v,b),m(v,y),m(y,C),m(v,S),w($e,T,Be),w($e,M,Be),w($e,O,Be),H(E,$e,Be),w($e,P,Be),w($e,I,Be),w($e,F,Be),w($e,V,Be),w($e,Z,Be),w($e,te,Be),w($e,X,Be),w($e,ee,Be),m(ee,U),m(ee,Y),m(ee,G),m(G,de),m(de,x),m(de,oe),m(de,Ce),m(de,Te),m(de,K),m(K,ke),H(ae,K,null),m(K,W),m(K,_e),m(K,He),m(K,Ue),m(K,Q),m(K,ge),m(K,ce),m(K,we),m(K,Ge),w($e,et,Be),w($e,Ke,Be),w($e,nt,Be),w($e,Me,Be),m(Me,ze);for(let ot=0;ot<Xe.length;ot+=1)Xe[ot].m(ze,null);m(Me,ct),m(Me,be);for(let ot=0;ot<Fe.length;ot+=1)Fe[ot].m(be,null);Dt=!0},p($e,[Be]){var rt,Ht;(!Dt||Be&1)&&a!==(a=$e[0].name+"")&&ue(u,a),$e[1]?pt||(pt=Rd(),pt.c(),pt.m(e,null)):pt&&(pt.d(1),pt=null),(!Dt||Be&1)&&$!==($=$e[0].name+"")&&ue(C,$);const ot={};Be&9&&(ot.js=`
import PocketBase from 'pocketbase';
const client = new PocketBase('${$e[3]}');
@@ -251,7 +251,7 @@
final record = await client.records.getOne('${(Ht=$e[0])==null?void 0:Ht.name}', 'RECORD_ID', query: {
'expand': 'some_relation',
});
`),E.$set(ot),Be&20&&(lt=$e[4],Xe=_t(Xe,Be,Lt,1,$e,lt,it,ze,bn,Hd,null,Fd)),Be&20&&(bt=$e[4],Ae(),Fe=_t(Fe,Be,Ft,1,$e,bt,dt,be,Gt,jd,null,Nd),Pe())},i($e){if(!Dt){A(E.$$.fragment,$e),A(ae.$$.fragment,$e);for(let Be=0;Be<bt.length;Be+=1)A(Fe[Be]);Dt=!0}},o($e){L(E.$$.fragment,$e),L(ae.$$.fragment,$e);for(let Be=0;Be<Fe.length;Be+=1)L(Fe[Be]);Dt=!1},d($e){$e&&k(e),pt&&pt.d(),$e&&k(h),$e&&k(g),$e&&k(T),$e&&k(M),$e&&k(O),j(E,$e),$e&&k(P),$e&&k(I),$e&&k(F),$e&&k(z),$e&&k(Q),$e&&k(ne),$e&&k(G),$e&&k(ee),j(ae),$e&&k(et),$e&&k(Ke),$e&&k(nt),$e&&k(Me);for(let Be=0;Be<Xe.length;Be+=1)Xe[Be].d();for(let Be=0;Be<Fe.length;Be+=1)Fe[Be].d()}}}function LC(n,e,t){let i,s,{collection:l=new dn}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.viewRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify(B.dummyCollectionRecord(l),null,2)}),i&&r.push({code:403,body:`
`),E.$set(ot),Be&20&&(lt=$e[4],Xe=_t(Xe,Be,Lt,1,$e,lt,it,ze,bn,Hd,null,Fd)),Be&20&&(bt=$e[4],Ae(),Fe=_t(Fe,Be,Ft,1,$e,bt,dt,be,Gt,jd,null,Nd),Pe())},i($e){if(!Dt){A(E.$$.fragment,$e),A(ae.$$.fragment,$e);for(let Be=0;Be<bt.length;Be+=1)A(Fe[Be]);Dt=!0}},o($e){L(E.$$.fragment,$e),L(ae.$$.fragment,$e);for(let Be=0;Be<Fe.length;Be+=1)L(Fe[Be]);Dt=!1},d($e){$e&&k(e),pt&&pt.d(),$e&&k(h),$e&&k(g),$e&&k(T),$e&&k(M),$e&&k(O),j(E,$e),$e&&k(P),$e&&k(I),$e&&k(F),$e&&k(V),$e&&k(Z),$e&&k(te),$e&&k(X),$e&&k(ee),j(ae),$e&&k(et),$e&&k(Ke),$e&&k(nt),$e&&k(Me);for(let Be=0;Be<Xe.length;Be+=1)Xe[Be].d();for(let Be=0;Be<Fe.length;Be+=1)Fe[Be].d()}}}function LC(n,e,t){let i,s,{collection:l=new dn}=e,o=200,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.viewRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:200,body:JSON.stringify(B.dummyCollectionRecord(l),null,2)}),i&&r.push({code:403,body:`
{
"code": 403,
"message": "Only admins can access this action.",
@@ -264,7 +264,7 @@
"data": {}
}
`}))},t(3,s=B.getApiExampleUrl(ye.baseUrl)),[l,i,o,s,r,a]}class IC extends Ee{constructor(e){super(),Oe(this,e,LC,PC,De,{collection:0})}}function qd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Vd(n,e,t){const i=n.slice();return i[6]=e[t],i}function zd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Bd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function NC(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function FC(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function RC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("User "),i=N(t),s=N(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ue(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function HC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("Relation record "),i=N(t),s=N(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ue(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function jC(n){let e,t,i,s,l;return{c(){e=N("File object."),t=_("br"),i=N(`
Set to `),s=_("code"),s.textContent="null",l=N(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:se,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function qC(n){let e;return{c(){e=N("URL address.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function VC(n){let e;return{c(){e=N("Email address.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function zC(n){let e;return{c(){e=N("JSON array or object.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function BC(n){let e;return{c(){e=N("Number value.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function UC(n){let e;return{c(){e=N("Plain text value.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Ud(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=B.getFieldValueType(e[11])+"",h,g,v,b;function y(O,E){return O[11].required?FC:NC}let $=y(e),C=$(e);function S(O,E){if(O[11].type==="text")return UC;if(O[11].type==="number")return BC;if(O[11].type==="json")return zC;if(O[11].type==="email")return VC;if(O[11].type==="url")return qC;if(O[11].type==="file")return jC;if(O[11].type==="relation")return HC;if(O[11].type==="user")return RC}let T=S(e),M=T&&T(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),C.c(),l=D(),o=_("span"),a=N(r),u=D(),f=_("td"),c=_("span"),h=N(d),g=D(),v=_("td"),M&&M.c(),b=D(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(O,E){w(O,t,E),m(t,i),m(i,s),C.m(s,null),m(s,l),m(s,o),m(o,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,v),M&&M.m(v,null),m(t,b)},p(O,E){e=O,$!==($=y(e))&&(C.d(1),C=$(e),C&&(C.c(),C.m(s,l))),E&1&&r!==(r=e[11].name+"")&&ue(a,r),E&1&&d!==(d=B.getFieldValueType(e[11])+"")&&ue(h,d),T===(T=S(e))&&M?M.p(e,E):(M&&M.d(1),M=T&&T(e),M&&(M.c(),M.m(v,null)))},d(O){O&&k(t),C.d(),M&&M.d()}}}function Wd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=D(),p(t,"class","tab-item"),te(t,"active",e[1]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&ue(s,i),f&6&&te(t,"active",e[1]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Yd(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),te(t,"active",e[1]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),r&6&&te(t,"active",e[1]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function WC(n){var ie,re,Le;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y=n[0].name+"",$,C,S,T,M,O,E,P,I,F,z,Q,ne,G,ee,U,Y,Z,de,x=[],oe=new Map,Ce,Te,K,we,ae,W,_e,He,Ue,X,ge,ce,ke,Ge,et,Ke,nt,Me,ze,Xe,it,ft,be,Fe,dt,Dt,pt,lt,Lt,bt=[],Ft=new Map,Ot,Ze,$e=[],Be=new Map,ot,rt=n[4]&&Bd();F=new Hs({props:{js:`
Set to `),s=_("code"),s.textContent="null",l=N(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:se,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function qC(n){let e;return{c(){e=N("URL address.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function VC(n){let e;return{c(){e=N("Email address.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function zC(n){let e;return{c(){e=N("JSON array or object.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function BC(n){let e;return{c(){e=N("Number value.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function UC(n){let e;return{c(){e=N("Plain text value.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Ud(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=B.getFieldValueType(e[11])+"",h,g,v,b;function y(O,E){return O[11].required?FC:NC}let $=y(e),C=$(e);function S(O,E){if(O[11].type==="text")return UC;if(O[11].type==="number")return BC;if(O[11].type==="json")return zC;if(O[11].type==="email")return VC;if(O[11].type==="url")return qC;if(O[11].type==="file")return jC;if(O[11].type==="relation")return HC;if(O[11].type==="user")return RC}let T=S(e),M=T&&T(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),C.c(),l=D(),o=_("span"),a=N(r),u=D(),f=_("td"),c=_("span"),h=N(d),g=D(),v=_("td"),M&&M.c(),b=D(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(O,E){w(O,t,E),m(t,i),m(i,s),C.m(s,null),m(s,l),m(s,o),m(o,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,v),M&&M.m(v,null),m(t,b)},p(O,E){e=O,$!==($=y(e))&&(C.d(1),C=$(e),C&&(C.c(),C.m(s,l))),E&1&&r!==(r=e[11].name+"")&&ue(a,r),E&1&&d!==(d=B.getFieldValueType(e[11])+"")&&ue(h,d),T===(T=S(e))&&M?M.p(e,E):(M&&M.d(1),M=T&&T(e),M&&(M.c(),M.m(v,null)))},d(O){O&&k(t),C.d(),M&&M.d()}}}function Wd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=D(),p(t,"class","tab-item"),ne(t,"active",e[1]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&ue(s,i),f&6&&ne(t,"active",e[1]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function Yd(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),ne(t,"active",e[1]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),(!l||r&6)&&ne(t,"active",e[1]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function WC(n){var ie,re,Le;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y=n[0].name+"",$,C,S,T,M,O,E,P,I,F,V,Z,te,X,ee,U,Y,G,de,x=[],oe=new Map,Ce,Te,K,ke,ae,W,_e,He,Ue,Q,ge,ce,we,Ge,et,Ke,nt,Me,ze,Xe,it,ct,be,Fe,dt,Dt,pt,lt,Lt,bt=[],Ft=new Map,Ot,Ze,$e=[],Be=new Map,ot,rt=n[4]&&Bd();F=new Hs({props:{js:`
import PocketBase from 'pocketbase';
const client = new PocketBase('${n[3]}');
@@ -286,22 +286,22 @@
final record = await client.records.create('${(re=n[0])==null?void 0:re.name}', body: body);
`}});let Ht=(Le=n[0])==null?void 0:Le.schema;const Ct=le=>le[11].name;for(let le=0;le<Ht.length;le+=1){let pe=zd(n,Ht,le),ve=Ct(pe);oe.set(ve,x[le]=Ud(ve,pe))}et=new _n({props:{content:`
?expand=rel1,rel2.subrel21.subrel22
`}});let ct=n[2];const en=le=>le[6].code;for(let le=0;le<ct.length;le+=1){let pe=Vd(n,ct,le),ve=en(pe);Ft.set(ve,bt[le]=Wd(ve,pe))}let R=n[2];const V=le=>le[6].code;for(let le=0;le<R.length;le+=1){let pe=qd(n,R,le),ve=V(pe);Be.set(ve,$e[le]=Yd(ve,pe))}return{c(){e=_("div"),t=_("strong"),t.textContent="POST",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records"),c=D(),rt&&rt.c(),d=D(),h=_("div"),g=_("p"),v=N("Create a new "),b=_("strong"),$=N(y),C=N(" record."),S=D(),T=_("p"),T.innerHTML=`Body parameters could be sent as <code>application/json</code> or
<code>multipart/form-data</code>.`,M=D(),O=_("p"),O.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",E=D(),P=_("div"),P.textContent="Client SDKs example",I=D(),q(F.$$.fragment),z=D(),Q=_("div"),Q.textContent="Body Parameters",ne=D(),G=_("table"),ee=_("thead"),ee.innerHTML=`<tr><th>Param</th>
`}});let ft=n[2];const en=le=>le[6].code;for(let le=0;le<ft.length;le+=1){let pe=Vd(n,ft,le),ve=en(pe);Ft.set(ve,bt[le]=Wd(ve,pe))}let R=n[2];const z=le=>le[6].code;for(let le=0;le<R.length;le+=1){let pe=qd(n,R,le),ve=z(pe);Be.set(ve,$e[le]=Yd(ve,pe))}return{c(){e=_("div"),t=_("strong"),t.textContent="POST",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records"),c=D(),rt&&rt.c(),d=D(),h=_("div"),g=_("p"),v=N("Create a new "),b=_("strong"),$=N(y),C=N(" record."),S=D(),T=_("p"),T.innerHTML=`Body parameters could be sent as <code>application/json</code> or
<code>multipart/form-data</code>.`,M=D(),O=_("p"),O.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",E=D(),P=_("div"),P.textContent="Client SDKs example",I=D(),q(F.$$.fragment),V=D(),Z=_("div"),Z.textContent="Body Parameters",te=D(),X=_("table"),ee=_("thead"),ee.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr>`,U=D(),Y=_("tbody"),Z=_("tr"),Z.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<th width="50%">Description</th></tr>`,U=D(),Y=_("tbody"),G=_("tr"),G.innerHTML=`<td><div class="inline-flex"><span class="label label-warning">Optional</span>
<span>id</span></div></td>
<td><span class="label">String</span></td>
<td><strong>15 characters string</strong> to store as record ID.
<br/>
If not set, it will be auto generated.</td>`,de=D();for(let le=0;le<x.length;le+=1)x[le].c();Ce=D(),Te=_("div"),Te.textContent="Query parameters",K=D(),we=_("table"),ae=_("thead"),ae.innerHTML=`<tr><th>Param</th>
If not set, it will be auto generated.</td>`,de=D();for(let le=0;le<x.length;le+=1)x[le].c();Ce=D(),Te=_("div"),Te.textContent="Query parameters",K=D(),ke=_("table"),ae=_("thead"),ae.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,W=D(),_e=_("tbody"),He=_("tr"),Ue=_("td"),Ue.textContent="expand",X=D(),ge=_("td"),ge.innerHTML='<span class="label">String</span>',ce=D(),ke=_("td"),Ge=N(`Auto expand relations when returning the created record. Ex.:
<th width="60%">Description</th></tr>`,W=D(),_e=_("tbody"),He=_("tr"),Ue=_("td"),Ue.textContent="expand",Q=D(),ge=_("td"),ge.innerHTML='<span class="label">String</span>',ce=D(),we=_("td"),Ge=N(`Auto expand relations when returning the created record. Ex.:
`),q(et.$$.fragment),Ke=N(`
Supports up to 6-levels depth nested relations expansion. `),nt=_("br"),Me=N(`
The expanded relations will be appended to the record under the
`),ze=_("code"),ze.textContent="@expand",Xe=N(" property (eg. "),it=_("code"),it.textContent='"@expand": {"rel1": {...}, ...}',ft=N(`). Only the
relations that the user has permissions to `),be=_("strong"),be.textContent="view",Fe=N(" will be expanded."),dt=D(),Dt=_("div"),Dt.textContent="Responses",pt=D(),lt=_("div"),Lt=_("div");for(let le=0;le<bt.length;le+=1)bt[le].c();Ot=D(),Ze=_("div");for(let le=0;le<$e.length;le+=1)$e[le].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-success"),p(h,"class","content m-b-base"),p(P,"class","section-title"),p(Q,"class","section-title"),p(G,"class","table-compact table-border m-b-lg"),p(Te,"class","section-title"),p(we,"class","table-compact table-border m-b-lg"),p(Dt,"class","section-title"),p(Lt,"class","tabs-header compact left"),p(Ze,"class","tabs-content"),p(lt,"class","tabs")},m(le,pe){w(le,e,pe),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(e,c),rt&&rt.m(e,null),w(le,d,pe),w(le,h,pe),m(h,g),m(g,v),m(g,b),m(b,$),m(g,C),m(h,S),m(h,T),m(h,M),m(h,O),w(le,E,pe),w(le,P,pe),w(le,I,pe),H(F,le,pe),w(le,z,pe),w(le,Q,pe),w(le,ne,pe),w(le,G,pe),m(G,ee),m(G,U),m(G,Y),m(Y,Z),m(Y,de);for(let ve=0;ve<x.length;ve+=1)x[ve].m(Y,null);w(le,Ce,pe),w(le,Te,pe),w(le,K,pe),w(le,we,pe),m(we,ae),m(we,W),m(we,_e),m(_e,He),m(He,Ue),m(He,X),m(He,ge),m(He,ce),m(He,ke),m(ke,Ge),H(et,ke,null),m(ke,Ke),m(ke,nt),m(ke,Me),m(ke,ze),m(ke,Xe),m(ke,it),m(ke,ft),m(ke,be),m(ke,Fe),w(le,dt,pe),w(le,Dt,pe),w(le,pt,pe),w(le,lt,pe),m(lt,Lt);for(let ve=0;ve<bt.length;ve+=1)bt[ve].m(Lt,null);m(lt,Ot),m(lt,Ze);for(let ve=0;ve<$e.length;ve+=1)$e[ve].m(Ze,null);ot=!0},p(le,[pe]){var fe,he,Ie;(!ot||pe&1)&&a!==(a=le[0].name+"")&&ue(u,a),le[4]?rt||(rt=Bd(),rt.c(),rt.m(e,null)):rt&&(rt.d(1),rt=null),(!ot||pe&1)&&y!==(y=le[0].name+"")&&ue($,y);const ve={};pe&9&&(ve.js=`
`),ze=_("code"),ze.textContent="@expand",Xe=N(" property (eg. "),it=_("code"),it.textContent='"@expand": {"rel1": {...}, ...}',ct=N(`). Only the
relations that the user has permissions to `),be=_("strong"),be.textContent="view",Fe=N(" will be expanded."),dt=D(),Dt=_("div"),Dt.textContent="Responses",pt=D(),lt=_("div"),Lt=_("div");for(let le=0;le<bt.length;le+=1)bt[le].c();Ot=D(),Ze=_("div");for(let le=0;le<$e.length;le+=1)$e[le].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-success"),p(h,"class","content m-b-base"),p(P,"class","section-title"),p(Z,"class","section-title"),p(X,"class","table-compact table-border m-b-lg"),p(Te,"class","section-title"),p(ke,"class","table-compact table-border m-b-lg"),p(Dt,"class","section-title"),p(Lt,"class","tabs-header compact left"),p(Ze,"class","tabs-content"),p(lt,"class","tabs")},m(le,pe){w(le,e,pe),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(e,c),rt&&rt.m(e,null),w(le,d,pe),w(le,h,pe),m(h,g),m(g,v),m(g,b),m(b,$),m(g,C),m(h,S),m(h,T),m(h,M),m(h,O),w(le,E,pe),w(le,P,pe),w(le,I,pe),H(F,le,pe),w(le,V,pe),w(le,Z,pe),w(le,te,pe),w(le,X,pe),m(X,ee),m(X,U),m(X,Y),m(Y,G),m(Y,de);for(let ve=0;ve<x.length;ve+=1)x[ve].m(Y,null);w(le,Ce,pe),w(le,Te,pe),w(le,K,pe),w(le,ke,pe),m(ke,ae),m(ke,W),m(ke,_e),m(_e,He),m(He,Ue),m(He,Q),m(He,ge),m(He,ce),m(He,we),m(we,Ge),H(et,we,null),m(we,Ke),m(we,nt),m(we,Me),m(we,ze),m(we,Xe),m(we,it),m(we,ct),m(we,be),m(we,Fe),w(le,dt,pe),w(le,Dt,pe),w(le,pt,pe),w(le,lt,pe),m(lt,Lt);for(let ve=0;ve<bt.length;ve+=1)bt[ve].m(Lt,null);m(lt,Ot),m(lt,Ze);for(let ve=0;ve<$e.length;ve+=1)$e[ve].m(Ze,null);ot=!0},p(le,[pe]){var fe,he,Ie;(!ot||pe&1)&&a!==(a=le[0].name+"")&&ue(u,a),le[4]?rt||(rt=Bd(),rt.c(),rt.m(e,null)):rt&&(rt.d(1),rt=null),(!ot||pe&1)&&y!==(y=le[0].name+"")&&ue($,y);const ve={};pe&9&&(ve.js=`
import PocketBase from 'pocketbase';
const client = new PocketBase('${le[3]}');
@@ -321,7 +321,7 @@
final body = <String, dynamic>{ ... };
final record = await client.records.create('${(he=le[0])==null?void 0:he.name}', body: body);
`),F.$set(ve),pe&1&&(Ht=(Ie=le[0])==null?void 0:Ie.schema,x=_t(x,pe,Ct,1,le,Ht,oe,Y,bn,Ud,null,zd)),pe&6&&(ct=le[2],bt=_t(bt,pe,en,1,le,ct,Ft,Lt,bn,Wd,null,Vd)),pe&6&&(R=le[2],Ae(),$e=_t($e,pe,V,1,le,R,Be,Ze,Gt,Yd,null,qd),Pe())},i(le){if(!ot){A(F.$$.fragment,le),A(et.$$.fragment,le);for(let pe=0;pe<R.length;pe+=1)A($e[pe]);ot=!0}},o(le){L(F.$$.fragment,le),L(et.$$.fragment,le);for(let pe=0;pe<$e.length;pe+=1)L($e[pe]);ot=!1},d(le){le&&k(e),rt&&rt.d(),le&&k(d),le&&k(h),le&&k(E),le&&k(P),le&&k(I),j(F,le),le&&k(z),le&&k(Q),le&&k(ne),le&&k(G);for(let pe=0;pe<x.length;pe+=1)x[pe].d();le&&k(Ce),le&&k(Te),le&&k(K),le&&k(we),j(et),le&&k(dt),le&&k(Dt),le&&k(pt),le&&k(lt);for(let pe=0;pe<bt.length;pe+=1)bt[pe].d();for(let pe=0;pe<$e.length;pe+=1)$e[pe].d()}}}function YC(n,e,t){let i,s,{collection:l=new dn}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.createRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(B.dummyCollectionRecord(l),null,2)},{code:400,body:`
`),F.$set(ve),pe&1&&(Ht=(Ie=le[0])==null?void 0:Ie.schema,x=_t(x,pe,Ct,1,le,Ht,oe,Y,bn,Ud,null,zd)),pe&6&&(ft=le[2],bt=_t(bt,pe,en,1,le,ft,Ft,Lt,bn,Wd,null,Vd)),pe&6&&(R=le[2],Ae(),$e=_t($e,pe,z,1,le,R,Be,Ze,Gt,Yd,null,qd),Pe())},i(le){if(!ot){A(F.$$.fragment,le),A(et.$$.fragment,le);for(let pe=0;pe<R.length;pe+=1)A($e[pe]);ot=!0}},o(le){L(F.$$.fragment,le),L(et.$$.fragment,le);for(let pe=0;pe<$e.length;pe+=1)L($e[pe]);ot=!1},d(le){le&&k(e),rt&&rt.d(),le&&k(d),le&&k(h),le&&k(E),le&&k(P),le&&k(I),j(F,le),le&&k(V),le&&k(Z),le&&k(te),le&&k(X);for(let pe=0;pe<x.length;pe+=1)x[pe].d();le&&k(Ce),le&&k(Te),le&&k(K),le&&k(ke),j(et),le&&k(dt),le&&k(Dt),le&&k(pt),le&&k(lt);for(let pe=0;pe<bt.length;pe+=1)bt[pe].d();for(let pe=0;pe<$e.length;pe+=1)$e[pe].d()}}}function YC(n,e,t){let i,s,{collection:l=new dn}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.createRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(B.dummyCollectionRecord(l),null,2)},{code:400,body:`
{
"code": 400,
"message": "Failed to create record.",
@@ -339,7 +339,7 @@
"data": {}
}
`}])},t(3,s=B.getApiExampleUrl(ye.baseUrl)),[l,o,r,s,i,a]}class KC extends Ee{constructor(e){super(),Oe(this,e,YC,WC,De,{collection:0})}}function Kd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Jd(n,e,t){const i=n.slice();return i[6]=e[t],i}function Zd(n,e,t){const i=n.slice();return i[11]=e[t],i}function Gd(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function JC(n){let e;return{c(){e=_("span"),e.textContent="Optional",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ZC(n){let e;return{c(){e=_("span"),e.textContent="Required",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function GC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("User "),i=N(t),s=N(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ue(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function XC(n){var l;let e,t=((l=n[11].options)==null?void 0:l.maxSelect)>1?"ids":"id",i,s;return{c(){e=N("Relation record "),i=N(t),s=N(".")},m(o,r){w(o,e,r),w(o,i,r),w(o,s,r)},p(o,r){var a;r&1&&t!==(t=((a=o[11].options)==null?void 0:a.maxSelect)>1?"ids":"id")&&ue(i,t)},d(o){o&&k(e),o&&k(i),o&&k(s)}}}function QC(n){let e,t,i,s,l;return{c(){e=N("File object."),t=_("br"),i=N(`
Set to `),s=_("code"),s.textContent="null",l=N(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:se,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function xC(n){let e;return{c(){e=N("URL address.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function e4(n){let e;return{c(){e=N("Email address.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function t4(n){let e;return{c(){e=N("JSON array or object.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function n4(n){let e;return{c(){e=N("Number value.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function i4(n){let e;return{c(){e=N("Plain text value.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Xd(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=B.getFieldValueType(e[11])+"",h,g,v,b;function y(O,E){return O[11].required?ZC:JC}let $=y(e),C=$(e);function S(O,E){if(O[11].type==="text")return i4;if(O[11].type==="number")return n4;if(O[11].type==="json")return t4;if(O[11].type==="email")return e4;if(O[11].type==="url")return xC;if(O[11].type==="file")return QC;if(O[11].type==="relation")return XC;if(O[11].type==="user")return GC}let T=S(e),M=T&&T(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),C.c(),l=D(),o=_("span"),a=N(r),u=D(),f=_("td"),c=_("span"),h=N(d),g=D(),v=_("td"),M&&M.c(),b=D(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(O,E){w(O,t,E),m(t,i),m(i,s),C.m(s,null),m(s,l),m(s,o),m(o,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,v),M&&M.m(v,null),m(t,b)},p(O,E){e=O,$!==($=y(e))&&(C.d(1),C=$(e),C&&(C.c(),C.m(s,l))),E&1&&r!==(r=e[11].name+"")&&ue(a,r),E&1&&d!==(d=B.getFieldValueType(e[11])+"")&&ue(h,d),T===(T=S(e))&&M?M.p(e,E):(M&&M.d(1),M=T&&T(e),M&&(M.c(),M.m(v,null)))},d(O){O&&k(t),C.d(),M&&M.d()}}}function Qd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=D(),p(t,"class","tab-item"),te(t,"active",e[1]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&ue(s,i),f&6&&te(t,"active",e[1]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function xd(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),te(t,"active",e[1]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),r&6&&te(t,"active",e[1]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function s4(n){var le,pe,ve;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y,$=n[0].name+"",C,S,T,M,O,E,P,I,F,z,Q,ne,G,ee,U,Y,Z,de,x,oe,Ce,Te=[],K=new Map,we,ae,W,_e,He,Ue,X,ge,ce,ke,Ge,et,Ke,nt,Me,ze,Xe,it,ft,be,Fe,dt,Dt,pt,lt,Lt,bt,Ft,Ot,Ze=[],$e=new Map,Be,ot,rt=[],Ht=new Map,Ct,ct=n[4]&&Gd();z=new Hs({props:{js:`
Set to `),s=_("code"),s.textContent="null",l=N(" to delete already uploaded file(s).")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),w(o,s,r),w(o,l,r)},p:se,d(o){o&&k(e),o&&k(t),o&&k(i),o&&k(s),o&&k(l)}}}function xC(n){let e;return{c(){e=N("URL address.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function e4(n){let e;return{c(){e=N("Email address.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function t4(n){let e;return{c(){e=N("JSON array or object.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function n4(n){let e;return{c(){e=N("Number value.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function i4(n){let e;return{c(){e=N("Plain text value.")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Xd(n,e){let t,i,s,l,o,r=e[11].name+"",a,u,f,c,d=B.getFieldValueType(e[11])+"",h,g,v,b;function y(O,E){return O[11].required?ZC:JC}let $=y(e),C=$(e);function S(O,E){if(O[11].type==="text")return i4;if(O[11].type==="number")return n4;if(O[11].type==="json")return t4;if(O[11].type==="email")return e4;if(O[11].type==="url")return xC;if(O[11].type==="file")return QC;if(O[11].type==="relation")return XC;if(O[11].type==="user")return GC}let T=S(e),M=T&&T(e);return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),C.c(),l=D(),o=_("span"),a=N(r),u=D(),f=_("td"),c=_("span"),h=N(d),g=D(),v=_("td"),M&&M.c(),b=D(),p(s,"class","inline-flex"),p(c,"class","label"),this.first=t},m(O,E){w(O,t,E),m(t,i),m(i,s),C.m(s,null),m(s,l),m(s,o),m(o,a),m(t,u),m(t,f),m(f,c),m(c,h),m(t,g),m(t,v),M&&M.m(v,null),m(t,b)},p(O,E){e=O,$!==($=y(e))&&(C.d(1),C=$(e),C&&(C.c(),C.m(s,l))),E&1&&r!==(r=e[11].name+"")&&ue(a,r),E&1&&d!==(d=B.getFieldValueType(e[11])+"")&&ue(h,d),T===(T=S(e))&&M?M.p(e,E):(M&&M.d(1),M=T&&T(e),M&&(M.c(),M.m(v,null)))},d(O){O&&k(t),C.d(),M&&M.d()}}}function Qd(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=D(),p(t,"class","tab-item"),ne(t,"active",e[1]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&4&&i!==(i=e[6].code+"")&&ue(s,i),f&6&&ne(t,"active",e[1]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function xd(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),ne(t,"active",e[1]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o;const a={};r&4&&(a.content=e[6].body),i.$set(a),(!l||r&6)&&ne(t,"active",e[1]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function s4(n){var le,pe,ve;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y,$=n[0].name+"",C,S,T,M,O,E,P,I,F,V,Z,te,X,ee,U,Y,G,de,x,oe,Ce,Te=[],K=new Map,ke,ae,W,_e,He,Ue,Q,ge,ce,we,Ge,et,Ke,nt,Me,ze,Xe,it,ct,be,Fe,dt,Dt,pt,lt,Lt,bt,Ft,Ot,Ze=[],$e=new Map,Be,ot,rt=[],Ht=new Map,Ct,ft=n[4]&&Gd();V=new Hs({props:{js:`
import PocketBase from 'pocketbase';
const client = new PocketBase('${n[3]}');
@@ -361,22 +361,22 @@
final record = await client.records.update('${(pe=n[0])==null?void 0:pe.name}', 'RECORD_ID', body: body);
`}});let en=(ve=n[0])==null?void 0:ve.schema;const R=fe=>fe[11].name;for(let fe=0;fe<en.length;fe+=1){let he=Zd(n,en,fe),Ie=R(he);K.set(Ie,Te[fe]=Xd(Ie,he))}Me=new _n({props:{content:`
?expand=rel1,rel2.subrel21.subrel22
`}});let V=n[2];const ie=fe=>fe[6].code;for(let fe=0;fe<V.length;fe+=1){let he=Jd(n,V,fe),Ie=ie(he);$e.set(Ie,Ze[fe]=Qd(Ie,he))}let re=n[2];const Le=fe=>fe[6].code;for(let fe=0;fe<re.length;fe+=1){let he=Kd(n,re,fe),Ie=Le(he);Ht.set(Ie,rt[fe]=xd(Ie,he))}return{c(){e=_("div"),t=_("strong"),t.textContent="PATCH",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=D(),ct&&ct.c(),h=D(),g=_("div"),v=_("p"),b=N("Update a single "),y=_("strong"),C=N($),S=N(" record."),T=D(),M=_("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
<code>multipart/form-data</code>.`,O=D(),E=_("p"),E.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",P=D(),I=_("div"),I.textContent="Client SDKs example",F=D(),q(z.$$.fragment),Q=D(),ne=_("div"),ne.textContent="Path parameters",G=D(),ee=_("table"),ee.innerHTML=`<thead><tr><th>Param</th>
`}});let z=n[2];const ie=fe=>fe[6].code;for(let fe=0;fe<z.length;fe+=1){let he=Jd(n,z,fe),Ie=ie(he);$e.set(Ie,Ze[fe]=Qd(Ie,he))}let re=n[2];const Le=fe=>fe[6].code;for(let fe=0;fe<re.length;fe+=1){let he=Kd(n,re,fe),Ie=Le(he);Ht.set(Ie,rt[fe]=xd(Ie,he))}return{c(){e=_("div"),t=_("strong"),t.textContent="PATCH",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=D(),ft&&ft.c(),h=D(),g=_("div"),v=_("p"),b=N("Update a single "),y=_("strong"),C=N($),S=N(" record."),T=D(),M=_("p"),M.innerHTML=`Body parameters could be sent as <code>application/json</code> or
<code>multipart/form-data</code>.`,O=D(),E=_("p"),E.innerHTML="File upload is supported only via <code>multipart/form-data</code>.",P=D(),I=_("div"),I.textContent="Client SDKs example",F=D(),q(V.$$.fragment),Z=D(),te=_("div"),te.textContent="Path parameters",X=D(),ee=_("table"),ee.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
<td>ID of the record to update.</td></tr></tbody>`,U=D(),Y=_("div"),Y.textContent="Body Parameters",Z=D(),de=_("table"),x=_("thead"),x.innerHTML=`<tr><th>Param</th>
<td>ID of the record to update.</td></tr></tbody>`,U=D(),Y=_("div"),Y.textContent="Body Parameters",G=D(),de=_("table"),x=_("thead"),x.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="50%">Description</th></tr>`,oe=D(),Ce=_("tbody");for(let fe=0;fe<Te.length;fe+=1)Te[fe].c();we=D(),ae=_("div"),ae.textContent="Query parameters",W=D(),_e=_("table"),He=_("thead"),He.innerHTML=`<tr><th>Param</th>
<th width="50%">Description</th></tr>`,oe=D(),Ce=_("tbody");for(let fe=0;fe<Te.length;fe+=1)Te[fe].c();ke=D(),ae=_("div"),ae.textContent="Query parameters",W=D(),_e=_("table"),He=_("thead"),He.innerHTML=`<tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr>`,Ue=D(),X=_("tbody"),ge=_("tr"),ce=_("td"),ce.textContent="expand",ke=D(),Ge=_("td"),Ge.innerHTML='<span class="label">String</span>',et=D(),Ke=_("td"),nt=N(`Auto expand relations when returning the updated record. Ex.:
<th width="60%">Description</th></tr>`,Ue=D(),Q=_("tbody"),ge=_("tr"),ce=_("td"),ce.textContent="expand",we=D(),Ge=_("td"),Ge.innerHTML='<span class="label">String</span>',et=D(),Ke=_("td"),nt=N(`Auto expand relations when returning the updated record. Ex.:
`),q(Me.$$.fragment),ze=N(`
Supports up to 6-levels depth nested relations expansion. `),Xe=_("br"),it=N(`
The expanded relations will be appended to the record under the
`),ft=_("code"),ft.textContent="@expand",be=N(" property (eg. "),Fe=_("code"),Fe.textContent='"@expand": {"rel1": {...}, ...}',dt=N(`). Only the
relations that the user has permissions to `),Dt=_("strong"),Dt.textContent="view",pt=N(" will be expanded."),lt=D(),Lt=_("div"),Lt.textContent="Responses",bt=D(),Ft=_("div"),Ot=_("div");for(let fe=0;fe<Ze.length;fe+=1)Ze[fe].c();Be=D(),ot=_("div");for(let fe=0;fe<rt.length;fe+=1)rt[fe].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-warning"),p(g,"class","content m-b-base"),p(I,"class","section-title"),p(ne,"class","section-title"),p(ee,"class","table-compact table-border m-b-lg"),p(Y,"class","section-title"),p(de,"class","table-compact table-border m-b-lg"),p(ae,"class","section-title"),p(_e,"class","table-compact table-border m-b-lg"),p(Lt,"class","section-title"),p(Ot,"class","tabs-header compact left"),p(ot,"class","tabs-content"),p(Ft,"class","tabs")},m(fe,he){w(fe,e,he),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),ct&&ct.m(e,null),w(fe,h,he),w(fe,g,he),m(g,v),m(v,b),m(v,y),m(y,C),m(v,S),m(g,T),m(g,M),m(g,O),m(g,E),w(fe,P,he),w(fe,I,he),w(fe,F,he),H(z,fe,he),w(fe,Q,he),w(fe,ne,he),w(fe,G,he),w(fe,ee,he),w(fe,U,he),w(fe,Y,he),w(fe,Z,he),w(fe,de,he),m(de,x),m(de,oe),m(de,Ce);for(let Ie=0;Ie<Te.length;Ie+=1)Te[Ie].m(Ce,null);w(fe,we,he),w(fe,ae,he),w(fe,W,he),w(fe,_e,he),m(_e,He),m(_e,Ue),m(_e,X),m(X,ge),m(ge,ce),m(ge,ke),m(ge,Ge),m(ge,et),m(ge,Ke),m(Ke,nt),H(Me,Ke,null),m(Ke,ze),m(Ke,Xe),m(Ke,it),m(Ke,ft),m(Ke,be),m(Ke,Fe),m(Ke,dt),m(Ke,Dt),m(Ke,pt),w(fe,lt,he),w(fe,Lt,he),w(fe,bt,he),w(fe,Ft,he),m(Ft,Ot);for(let Ie=0;Ie<Ze.length;Ie+=1)Ze[Ie].m(Ot,null);m(Ft,Be),m(Ft,ot);for(let Ie=0;Ie<rt.length;Ie+=1)rt[Ie].m(ot,null);Ct=!0},p(fe,[he]){var mt,un,jt;(!Ct||he&1)&&a!==(a=fe[0].name+"")&&ue(u,a),fe[4]?ct||(ct=Gd(),ct.c(),ct.m(e,null)):ct&&(ct.d(1),ct=null),(!Ct||he&1)&&$!==($=fe[0].name+"")&&ue(C,$);const Ie={};he&9&&(Ie.js=`
`),ct=_("code"),ct.textContent="@expand",be=N(" property (eg. "),Fe=_("code"),Fe.textContent='"@expand": {"rel1": {...}, ...}',dt=N(`). Only the
relations that the user has permissions to `),Dt=_("strong"),Dt.textContent="view",pt=N(" will be expanded."),lt=D(),Lt=_("div"),Lt.textContent="Responses",bt=D(),Ft=_("div"),Ot=_("div");for(let fe=0;fe<Ze.length;fe+=1)Ze[fe].c();Be=D(),ot=_("div");for(let fe=0;fe<rt.length;fe+=1)rt[fe].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-warning"),p(g,"class","content m-b-base"),p(I,"class","section-title"),p(te,"class","section-title"),p(ee,"class","table-compact table-border m-b-lg"),p(Y,"class","section-title"),p(de,"class","table-compact table-border m-b-lg"),p(ae,"class","section-title"),p(_e,"class","table-compact table-border m-b-lg"),p(Lt,"class","section-title"),p(Ot,"class","tabs-header compact left"),p(ot,"class","tabs-content"),p(Ft,"class","tabs")},m(fe,he){w(fe,e,he),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),ft&&ft.m(e,null),w(fe,h,he),w(fe,g,he),m(g,v),m(v,b),m(v,y),m(y,C),m(v,S),m(g,T),m(g,M),m(g,O),m(g,E),w(fe,P,he),w(fe,I,he),w(fe,F,he),H(V,fe,he),w(fe,Z,he),w(fe,te,he),w(fe,X,he),w(fe,ee,he),w(fe,U,he),w(fe,Y,he),w(fe,G,he),w(fe,de,he),m(de,x),m(de,oe),m(de,Ce);for(let Ie=0;Ie<Te.length;Ie+=1)Te[Ie].m(Ce,null);w(fe,ke,he),w(fe,ae,he),w(fe,W,he),w(fe,_e,he),m(_e,He),m(_e,Ue),m(_e,Q),m(Q,ge),m(ge,ce),m(ge,we),m(ge,Ge),m(ge,et),m(ge,Ke),m(Ke,nt),H(Me,Ke,null),m(Ke,ze),m(Ke,Xe),m(Ke,it),m(Ke,ct),m(Ke,be),m(Ke,Fe),m(Ke,dt),m(Ke,Dt),m(Ke,pt),w(fe,lt,he),w(fe,Lt,he),w(fe,bt,he),w(fe,Ft,he),m(Ft,Ot);for(let Ie=0;Ie<Ze.length;Ie+=1)Ze[Ie].m(Ot,null);m(Ft,Be),m(Ft,ot);for(let Ie=0;Ie<rt.length;Ie+=1)rt[Ie].m(ot,null);Ct=!0},p(fe,[he]){var mt,un,jt;(!Ct||he&1)&&a!==(a=fe[0].name+"")&&ue(u,a),fe[4]?ft||(ft=Gd(),ft.c(),ft.m(e,null)):ft&&(ft.d(1),ft=null),(!Ct||he&1)&&$!==($=fe[0].name+"")&&ue(C,$);const Ie={};he&9&&(Ie.js=`
import PocketBase from 'pocketbase';
const client = new PocketBase('${fe[3]}');
@@ -396,7 +396,7 @@
final body = <String, dynamic>{ ... };
final record = await client.records.update('${(un=fe[0])==null?void 0:un.name}', 'RECORD_ID', body: body);
`),z.$set(Ie),he&1&&(en=(jt=fe[0])==null?void 0:jt.schema,Te=_t(Te,he,R,1,fe,en,K,Ce,bn,Xd,null,Zd)),he&6&&(V=fe[2],Ze=_t(Ze,he,ie,1,fe,V,$e,Ot,bn,Qd,null,Jd)),he&6&&(re=fe[2],Ae(),rt=_t(rt,he,Le,1,fe,re,Ht,ot,Gt,xd,null,Kd),Pe())},i(fe){if(!Ct){A(z.$$.fragment,fe),A(Me.$$.fragment,fe);for(let he=0;he<re.length;he+=1)A(rt[he]);Ct=!0}},o(fe){L(z.$$.fragment,fe),L(Me.$$.fragment,fe);for(let he=0;he<rt.length;he+=1)L(rt[he]);Ct=!1},d(fe){fe&&k(e),ct&&ct.d(),fe&&k(h),fe&&k(g),fe&&k(P),fe&&k(I),fe&&k(F),j(z,fe),fe&&k(Q),fe&&k(ne),fe&&k(G),fe&&k(ee),fe&&k(U),fe&&k(Y),fe&&k(Z),fe&&k(de);for(let he=0;he<Te.length;he+=1)Te[he].d();fe&&k(we),fe&&k(ae),fe&&k(W),fe&&k(_e),j(Me),fe&&k(lt),fe&&k(Lt),fe&&k(bt),fe&&k(Ft);for(let he=0;he<Ze.length;he+=1)Ze[he].d();for(let he=0;he<rt.length;he+=1)rt[he].d()}}}function l4(n,e,t){let i,s,{collection:l=new dn}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.updateRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(B.dummyCollectionRecord(l),null,2)},{code:400,body:`
`),V.$set(Ie),he&1&&(en=(jt=fe[0])==null?void 0:jt.schema,Te=_t(Te,he,R,1,fe,en,K,Ce,bn,Xd,null,Zd)),he&6&&(z=fe[2],Ze=_t(Ze,he,ie,1,fe,z,$e,Ot,bn,Qd,null,Jd)),he&6&&(re=fe[2],Ae(),rt=_t(rt,he,Le,1,fe,re,Ht,ot,Gt,xd,null,Kd),Pe())},i(fe){if(!Ct){A(V.$$.fragment,fe),A(Me.$$.fragment,fe);for(let he=0;he<re.length;he+=1)A(rt[he]);Ct=!0}},o(fe){L(V.$$.fragment,fe),L(Me.$$.fragment,fe);for(let he=0;he<rt.length;he+=1)L(rt[he]);Ct=!1},d(fe){fe&&k(e),ft&&ft.d(),fe&&k(h),fe&&k(g),fe&&k(P),fe&&k(I),fe&&k(F),j(V,fe),fe&&k(Z),fe&&k(te),fe&&k(X),fe&&k(ee),fe&&k(U),fe&&k(Y),fe&&k(G),fe&&k(de);for(let he=0;he<Te.length;he+=1)Te[he].d();fe&&k(ke),fe&&k(ae),fe&&k(W),fe&&k(_e),j(Me),fe&&k(lt),fe&&k(Lt),fe&&k(bt),fe&&k(Ft);for(let he=0;he<Ze.length;he+=1)Ze[he].d();for(let he=0;he<rt.length;he+=1)rt[he].d()}}}function l4(n,e,t){let i,s,{collection:l=new dn}=e,o=200,r=[];const a=u=>t(1,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{var u,f;n.$$.dirty&1&&t(4,i=(l==null?void 0:l.updateRule)===null),n.$$.dirty&1&&t(2,r=[{code:200,body:JSON.stringify(B.dummyCollectionRecord(l),null,2)},{code:400,body:`
{
"code": 400,
"message": "Failed to update record.",
@@ -419,7 +419,7 @@
"message": "The requested resource wasn't found.",
"data": {}
}
`}])},t(3,s=B.getApiExampleUrl(ye.baseUrl)),[l,o,r,s,i,a]}class o4 extends Ee{constructor(e){super(),Oe(this,e,l4,s4,De,{collection:0})}}function ep(n,e,t){const i=n.slice();return i[6]=e[t],i}function tp(n,e,t){const i=n.slice();return i[6]=e[t],i}function np(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ip(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=D(),p(t,"class","tab-item"),te(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&20&&te(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function sp(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),te(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o,r&20&&te(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function r4(n){var He,Ue;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y,$=n[0].name+"",C,S,T,M,O,E,P,I,F,z,Q,ne,G,ee,U,Y=[],Z=new Map,de,x,oe=[],Ce=new Map,Te,K=n[1]&&np();E=new Hs({props:{js:`
`}])},t(3,s=B.getApiExampleUrl(ye.baseUrl)),[l,o,r,s,i,a]}class o4 extends Ee{constructor(e){super(),Oe(this,e,l4,s4,De,{collection:0})}}function ep(n,e,t){const i=n.slice();return i[6]=e[t],i}function tp(n,e,t){const i=n.slice();return i[6]=e[t],i}function np(n){let e;return{c(){e=_("p"),e.innerHTML="Requires <code>Authorization: Admin TOKEN</code> header",p(e,"class","txt-hint txt-sm txt-right")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ip(n,e){let t,i=e[6].code+"",s,l,o,r;function a(){return e[5](e[6])}return{key:n,first:null,c(){t=_("button"),s=N(i),l=D(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(u,f){w(u,t,f),m(t,s),m(t,l),o||(r=J(t,"click",a),o=!0)},p(u,f){e=u,f&20&&ne(t,"active",e[2]===e[6].code)},d(u){u&&k(t),o=!1,r()}}}function sp(n,e){let t,i,s,l;return i=new _n({props:{content:e[6].body}}),{key:n,first:null,c(){t=_("div"),q(i.$$.fragment),s=D(),p(t,"class","tab-item"),ne(t,"active",e[2]===e[6].code),this.first=t},m(o,r){w(o,t,r),H(i,t,null),m(t,s),l=!0},p(o,r){e=o,(!l||r&20)&&ne(t,"active",e[2]===e[6].code)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){L(i.$$.fragment,o),l=!1},d(o){o&&k(t),j(i)}}}function r4(n){var He,Ue;let e,t,i,s,l,o,r,a=n[0].name+"",u,f,c,d,h,g,v,b,y,$=n[0].name+"",C,S,T,M,O,E,P,I,F,V,Z,te,X,ee,U,Y=[],G=new Map,de,x,oe=[],Ce=new Map,Te,K=n[1]&&np();E=new Hs({props:{js:`
import PocketBase from 'pocketbase';
const client = new PocketBase('${n[3]}');
@@ -435,28 +435,28 @@
...
await client.records.delete('${(Ue=n[0])==null?void 0:Ue.name}', 'RECORD_ID');
`}});let we=n[4];const ae=X=>X[6].code;for(let X=0;X<we.length;X+=1){let ge=tp(n,we,X),ce=ae(ge);Z.set(ce,Y[X]=ip(ce,ge))}let W=n[4];const _e=X=>X[6].code;for(let X=0;X<W.length;X+=1){let ge=ep(n,W,X),ce=_e(ge);Ce.set(ce,oe[X]=sp(ce,ge))}return{c(){e=_("div"),t=_("strong"),t.textContent="DELETE",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=D(),K&&K.c(),h=D(),g=_("div"),v=_("p"),b=N("Delete a single "),y=_("strong"),C=N($),S=N(" record."),T=D(),M=_("div"),M.textContent="Client SDKs example",O=D(),q(E.$$.fragment),P=D(),I=_("div"),I.textContent="Path parameters",F=D(),z=_("table"),z.innerHTML=`<thead><tr><th>Param</th>
`}});let ke=n[4];const ae=Q=>Q[6].code;for(let Q=0;Q<ke.length;Q+=1){let ge=tp(n,ke,Q),ce=ae(ge);G.set(ce,Y[Q]=ip(ce,ge))}let W=n[4];const _e=Q=>Q[6].code;for(let Q=0;Q<W.length;Q+=1){let ge=ep(n,W,Q),ce=_e(ge);Ce.set(ce,oe[Q]=sp(ce,ge))}return{c(){e=_("div"),t=_("strong"),t.textContent="DELETE",i=D(),s=_("div"),l=_("p"),o=N("/api/collections/"),r=_("strong"),u=N(a),f=N("/records/"),c=_("strong"),c.textContent=":id",d=D(),K&&K.c(),h=D(),g=_("div"),v=_("p"),b=N("Delete a single "),y=_("strong"),C=N($),S=N(" record."),T=D(),M=_("div"),M.textContent="Client SDKs example",O=D(),q(E.$$.fragment),P=D(),I=_("div"),I.textContent="Path parameters",F=D(),V=_("table"),V.innerHTML=`<thead><tr><th>Param</th>
<th>Type</th>
<th width="60%">Description</th></tr></thead>
<tbody><tr><td>id</td>
<td><span class="label">String</span></td>
<td>ID of the record to delete.</td></tr></tbody>`,Q=D(),ne=_("div"),ne.textContent="Responses",G=D(),ee=_("div"),U=_("div");for(let X=0;X<Y.length;X+=1)Y[X].c();de=D(),x=_("div");for(let X=0;X<oe.length;X+=1)oe[X].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-danger"),p(g,"class","content m-b-base"),p(M,"class","section-title"),p(I,"class","section-title"),p(z,"class","table-compact table-border m-b-lg"),p(ne,"class","section-title"),p(U,"class","tabs-header compact left"),p(x,"class","tabs-content"),p(ee,"class","tabs")},m(X,ge){w(X,e,ge),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),K&&K.m(e,null),w(X,h,ge),w(X,g,ge),m(g,v),m(v,b),m(v,y),m(y,C),m(v,S),w(X,T,ge),w(X,M,ge),w(X,O,ge),H(E,X,ge),w(X,P,ge),w(X,I,ge),w(X,F,ge),w(X,z,ge),w(X,Q,ge),w(X,ne,ge),w(X,G,ge),w(X,ee,ge),m(ee,U);for(let ce=0;ce<Y.length;ce+=1)Y[ce].m(U,null);m(ee,de),m(ee,x);for(let ce=0;ce<oe.length;ce+=1)oe[ce].m(x,null);Te=!0},p(X,[ge]){var ke,Ge;(!Te||ge&1)&&a!==(a=X[0].name+"")&&ue(u,a),X[1]?K||(K=np(),K.c(),K.m(e,null)):K&&(K.d(1),K=null),(!Te||ge&1)&&$!==($=X[0].name+"")&&ue(C,$);const ce={};ge&9&&(ce.js=`
<td>ID of the record to delete.</td></tr></tbody>`,Z=D(),te=_("div"),te.textContent="Responses",X=D(),ee=_("div"),U=_("div");for(let Q=0;Q<Y.length;Q+=1)Y[Q].c();de=D(),x=_("div");for(let Q=0;Q<oe.length;Q+=1)oe[Q].c();p(t,"class","label label-primary"),p(s,"class","content"),p(e,"class","alert alert-danger"),p(g,"class","content m-b-base"),p(M,"class","section-title"),p(I,"class","section-title"),p(V,"class","table-compact table-border m-b-lg"),p(te,"class","section-title"),p(U,"class","tabs-header compact left"),p(x,"class","tabs-content"),p(ee,"class","tabs")},m(Q,ge){w(Q,e,ge),m(e,t),m(e,i),m(e,s),m(s,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(e,d),K&&K.m(e,null),w(Q,h,ge),w(Q,g,ge),m(g,v),m(v,b),m(v,y),m(y,C),m(v,S),w(Q,T,ge),w(Q,M,ge),w(Q,O,ge),H(E,Q,ge),w(Q,P,ge),w(Q,I,ge),w(Q,F,ge),w(Q,V,ge),w(Q,Z,ge),w(Q,te,ge),w(Q,X,ge),w(Q,ee,ge),m(ee,U);for(let ce=0;ce<Y.length;ce+=1)Y[ce].m(U,null);m(ee,de),m(ee,x);for(let ce=0;ce<oe.length;ce+=1)oe[ce].m(x,null);Te=!0},p(Q,[ge]){var we,Ge;(!Te||ge&1)&&a!==(a=Q[0].name+"")&&ue(u,a),Q[1]?K||(K=np(),K.c(),K.m(e,null)):K&&(K.d(1),K=null),(!Te||ge&1)&&$!==($=Q[0].name+"")&&ue(C,$);const ce={};ge&9&&(ce.js=`
import PocketBase from 'pocketbase';
const client = new PocketBase('${X[3]}');
const client = new PocketBase('${Q[3]}');
...
await client.records.delete('${(ke=X[0])==null?void 0:ke.name}', 'RECORD_ID');
await client.records.delete('${(we=Q[0])==null?void 0:we.name}', 'RECORD_ID');
`),ge&9&&(ce.dart=`
import 'package:pocketbase/pocketbase.dart';
final client = PocketBase('${X[3]}');
final client = PocketBase('${Q[3]}');
...
await client.records.delete('${(Ge=X[0])==null?void 0:Ge.name}', 'RECORD_ID');
`),E.$set(ce),ge&20&&(we=X[4],Y=_t(Y,ge,ae,1,X,we,Z,U,bn,ip,null,tp)),ge&20&&(W=X[4],Ae(),oe=_t(oe,ge,_e,1,X,W,Ce,x,Gt,sp,null,ep),Pe())},i(X){if(!Te){A(E.$$.fragment,X);for(let ge=0;ge<W.length;ge+=1)A(oe[ge]);Te=!0}},o(X){L(E.$$.fragment,X);for(let ge=0;ge<oe.length;ge+=1)L(oe[ge]);Te=!1},d(X){X&&k(e),K&&K.d(),X&&k(h),X&&k(g),X&&k(T),X&&k(M),X&&k(O),j(E,X),X&&k(P),X&&k(I),X&&k(F),X&&k(z),X&&k(Q),X&&k(ne),X&&k(G),X&&k(ee);for(let ge=0;ge<Y.length;ge+=1)Y[ge].d();for(let ge=0;ge<oe.length;ge+=1)oe[ge].d()}}}function a4(n,e,t){let i,s,{collection:l=new dn}=e,o=204,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.deleteRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:204,body:`
await client.records.delete('${(Ge=Q[0])==null?void 0:Ge.name}', 'RECORD_ID');
`),E.$set(ce),ge&20&&(ke=Q[4],Y=_t(Y,ge,ae,1,Q,ke,G,U,bn,ip,null,tp)),ge&20&&(W=Q[4],Ae(),oe=_t(oe,ge,_e,1,Q,W,Ce,x,Gt,sp,null,ep),Pe())},i(Q){if(!Te){A(E.$$.fragment,Q);for(let ge=0;ge<W.length;ge+=1)A(oe[ge]);Te=!0}},o(Q){L(E.$$.fragment,Q);for(let ge=0;ge<oe.length;ge+=1)L(oe[ge]);Te=!1},d(Q){Q&&k(e),K&&K.d(),Q&&k(h),Q&&k(g),Q&&k(T),Q&&k(M),Q&&k(O),j(E,Q),Q&&k(P),Q&&k(I),Q&&k(F),Q&&k(V),Q&&k(Z),Q&&k(te),Q&&k(X),Q&&k(ee);for(let ge=0;ge<Y.length;ge+=1)Y[ge].d();for(let ge=0;ge<oe.length;ge+=1)oe[ge].d()}}}function a4(n,e,t){let i,s,{collection:l=new dn}=e,o=204,r=[];const a=u=>t(2,o=u.code);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=(l==null?void 0:l.deleteRule)===null),n.$$.dirty&3&&l!=null&&l.id&&(r.push({code:204,body:`
null
`}),r.push({code:400,body:`
{
@@ -526,7 +526,7 @@
client.realtime.unsubscribe('${(S=n[0])==null?void 0:S.name}/RECORD_ID') // remove only the record subscription
`}}),c=new _n({props:{content:JSON.stringify({action:"create",record:B.dummyCollectionRecord(n[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){e=_("div"),e.innerHTML=`<strong class="label label-primary">SSE</strong>
<div class="content"><p>/api/realtime</p></div>`,t=D(),i=_("div"),i.innerHTML=`<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p>
<p>Events are send for <strong>create</strong>, <strong>update</strong>
<p>Events are sent for <strong>create</strong>, <strong>update</strong>
and <strong>delete</strong> record operations (see &quot;Event data format&quot; section below).</p>
<div class="alert alert-info m-t-10"><div class="icon"><i class="ri-information-line"></i></div>
<div class="contet"><p><strong>You could subscribe to a single record or to an entire collection.</strong></p>
@@ -535,7 +535,7 @@
the event message.</p>
<p>When you subscribe to an <strong>entire collection</strong>, the collection&#39;s
<strong>ListRule</strong> will be used to determine whether the subscriber has access to receive
the event message.</p></div></div>`,s=D(),l=_("div"),l.textContent="Client SDKs example",o=D(),q(r.$$.fragment),a=D(),u=_("div"),u.textContent="Event data format",f=D(),q(c.$$.fragment),p(e,"class","alert"),p(i,"class","content m-b-base"),p(l,"class","section-title"),p(u,"class","section-title")},m(T,M){w(T,e,M),w(T,t,M),w(T,i,M),w(T,s,M),w(T,l,M),w(T,o,M),H(r,T,M),w(T,a,M),w(T,u,M),w(T,f,M),H(c,T,M),d=!0},p(T,[M]){var P,I,F,z,Q,ne,G,ee;const O={};M&3&&(O.js=`
the event message.</p></div></div>`,s=D(),l=_("div"),l.textContent="Client SDKs example",o=D(),q(r.$$.fragment),a=D(),u=_("div"),u.textContent="Event data format",f=D(),q(c.$$.fragment),p(e,"class","alert"),p(i,"class","content m-b-base"),p(l,"class","section-title"),p(u,"class","section-title")},m(T,M){w(T,e,M),w(T,t,M),w(T,i,M),w(T,s,M),w(T,l,M),w(T,o,M),H(r,T,M),w(T,a,M),w(T,u,M),w(T,f,M),H(c,T,M),d=!0},p(T,[M]){var P,I,F,V,Z,te,X,ee;const O={};M&3&&(O.js=`
import PocketBase from 'pocketbase';
const client = new PocketBase('${T[1]}');
@@ -558,7 +558,7 @@
// Unsubscribe
client.realtime.unsubscribe() // remove all subscriptions
client.realtime.unsubscribe('${(F=T[0])==null?void 0:F.name}') // remove only the collection subscription
client.realtime.unsubscribe('${(z=T[0])==null?void 0:z.name}/RECORD_ID') // remove only the record subscription
client.realtime.unsubscribe('${(V=T[0])==null?void 0:V.name}/RECORD_ID') // remove only the record subscription
`),M&3&&(O.dart=`
import 'package:pocketbase/pocketbase.dart';
@@ -570,35 +570,35 @@
client.users.authViaEmail('test@example.com', '123456');
// Subscribe to changes in any record from the collection
client.realtime.subscribe('${(Q=T[0])==null?void 0:Q.name}', (e) {
client.realtime.subscribe('${(Z=T[0])==null?void 0:Z.name}', (e) {
print(e.record);
});
// Subscribe to changes in a single record
client.realtime.subscribe('${(ne=T[0])==null?void 0:ne.name}/RECORD_ID', (e) {
client.realtime.subscribe('${(te=T[0])==null?void 0:te.name}/RECORD_ID', (e) {
print(e.record);
});
// Unsubscribe
client.realtime.unsubscribe() // remove all subscriptions
client.realtime.unsubscribe('${(G=T[0])==null?void 0:G.name}') // remove only the collection subscription
client.realtime.unsubscribe('${(X=T[0])==null?void 0:X.name}') // remove only the collection subscription
client.realtime.unsubscribe('${(ee=T[0])==null?void 0:ee.name}/RECORD_ID') // remove only the record subscription
`),r.$set(O);const E={};M&1&&(E.content=JSON.stringify({action:"create",record:B.dummyCollectionRecord(T[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),c.$set(E)},i(T){d||(A(r.$$.fragment,T),A(c.$$.fragment,T),d=!0)},o(T){L(r.$$.fragment,T),L(c.$$.fragment,T),d=!1},d(T){T&&k(e),T&&k(t),T&&k(i),T&&k(s),T&&k(l),T&&k(o),j(r,T),T&&k(a),T&&k(u),T&&k(f),j(c,T)}}}function c4(n,e,t){let i,{collection:s=new dn}=e;return n.$$set=l=>{"collection"in l&&t(0,s=l.collection)},t(1,i=B.getApiExampleUrl(ye.baseUrl)),[s,i]}class d4 extends Ee{constructor(e){super(),Oe(this,e,c4,f4,De,{collection:0})}}function lp(n,e,t){const i=n.slice();return i[14]=e[t],i}function op(n,e,t){const i=n.slice();return i[14]=e[t],i}function rp(n){let e,t,i,s;var l=n[14].component;function o(r){return{props:{collection:r[3]}}}return l&&(t=new l(o(n))),{c(){e=_("div"),t&&q(t.$$.fragment),i=D(),p(e,"class","tab-item active")},m(r,a){w(r,e,a),t&&H(t,e,null),m(e,i),s=!0},p(r,a){const u={};if(a&8&&(u.collection=r[3]),l!==(l=r[14].component)){if(t){Ae();const f=t;L(f.$$.fragment,1,0,()=>{j(f,1)}),Pe()}l?(t=new l(o(r)),q(t.$$.fragment),A(t.$$.fragment,1),H(t,e,i)):t=null}else l&&t.$set(u)},i(r){s||(t&&A(t.$$.fragment,r),s=!0)},o(r){t&&L(t.$$.fragment,r),s=!1},d(r){r&&k(e),t&&j(t)}}}function ap(n,e){let t,i,s,l=e[4]===e[14].id&&rp(e);return{key:n,first:null,c(){t=We(),l&&l.c(),i=We(),this.first=t},m(o,r){w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){e=o,e[4]===e[14].id?l?(l.p(e,r),r&16&&A(l,1)):(l=rp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Ae(),L(l,1,1,()=>{l=null}),Pe())},i(o){s||(A(l),s=!0)},o(o){L(l),s=!1},d(o){o&&k(t),l&&l.d(o),o&&k(i)}}}function p4(n){let e,t=[],i=new Map,s,l=n[5];const o=r=>r[14].id;for(let r=0;r<l.length;r+=1){let a=lp(n,l,r),u=o(a);i.set(u,t[r]=ap(u,a))}return{c(){e=_("div");for(let r=0;r<t.length;r+=1)t[r].c();p(e,"class","tabs-content")},m(r,a){w(r,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(r,a){a&56&&(l=r[5],Ae(),t=_t(t,a,o,1,r,l,i,e,Gt,ap,null,lp),Pe())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(t[a]);s=!0}},o(r){for(let a=0;a<t.length;a+=1)L(t[a]);s=!1},d(r){r&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function up(n,e){let t,i,s=e[14].label+"",l,o,r,a;function u(){return e[9](e[14])}function f(...c){return e[10](e[14],...c)}return{key:n,first:null,c(){t=_("button"),i=_("span"),l=N(s),o=D(),p(i,"class","txt"),p(t,"tabindex","0"),p(t,"class","tab-item"),te(t,"active",e[4]===e[14].id),this.first=t},m(c,d){w(c,t,d),m(t,i),m(i,l),m(t,o),r||(a=[J(t,"click",u),J(t,"keydown",Bm(f))],r=!0)},p(c,d){e=c,d&48&&te(t,"active",e[4]===e[14].id)},d(c){c&&k(t),r=!1,Je(a)}}}function h4(n){let e,t,i=n[3].name+"",s,l,o,r,a=[],u=new Map,f=n[5];const c=d=>d[14].id;for(let d=0;d<f.length;d+=1){let h=op(n,f,d),g=c(h);u.set(g,a[d]=up(g,h))}return{c(){e=_("h4"),t=_("strong"),s=N(i),l=N(" records API"),o=D(),r=_("div");for(let d=0;d<a.length;d+=1)a[d].c();p(r,"class","tabs-header stretched")},m(d,h){w(d,e,h),m(e,t),m(t,s),m(e,l),w(d,o,h),w(d,r,h);for(let g=0;g<a.length;g+=1)a[g].m(r,null)},p(d,h){h&8&&i!==(i=d[3].name+"")&&ue(s,i),h&114&&(f=d[5],a=_t(a,h,c,1,d,f,u,r,bn,up,null,op))},d(d){d&&k(e),d&&k(o),d&&k(r);for(let h=0;h<a.length;h+=1)a[h].d()}}}function m4(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function g4(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[m4],header:[h4],default:[p4]},$$scope:{ctx:n}};return e=new ui({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&524312&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[11](null),j(e,s)}}}function _4(n,e,t){const i=[{id:"list",label:"List",component:AC},{id:"view",label:"View",component:IC},{id:"create",label:"Create",component:KC},{id:"update",label:"Update",component:o4},{id:"delete",label:"Delete",component:u4},{id:"realtime",label:"Realtime",component:d4}];let s,l=new dn,o=i[0].id;function r(y){return t(3,l=y),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(y){t(4,o=y)}function f(y,$){(y.code==="Enter"||y.code==="Space")&&(y.preventDefault(),u($))}const c=()=>a(),d=y=>u(y.id),h=(y,$)=>f($,y.id);function g(y){me[y?"unshift":"push"](()=>{s=y,t(2,s)})}function v(y){tt.call(this,n,y)}function b(y){tt.call(this,n,y)}return[a,u,s,l,o,i,f,r,c,d,h,g,v,b]}class b4 extends Ee{constructor(e){super(),Oe(this,e,_4,g4,De,{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 v4(n){let e,t,i,s=[n[3]],l={};for(let o=0;o<s.length;o+=1)l=ut(l,s[o]);return{c(){e=_("textarea"),mi(e,l),te(e,"svelte-1x1pbts",!0)},m(o,r){w(o,e,r),e.autofocus&&e.focus(),n[5](e),Se(e,n[0]),t||(i=[ Line truncated
<span class="txt">Upload new file</span>`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(r,a){w(r,e,a),m(e,t),n[16](t),m(e,i),m(e,s),l||(o=[J(t,"change",n[17]),J(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&k(e),n[16](null),l=!1,Je(o)}}}function _M(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,h,g,v,b=n[4];const y=M=>M[25];for(let M=0;M<b.length;M+=1){let O=dp(n,b,M),E=y(O);d.set(E,c[M]=pp(E,O))}let $=n[0],C=[];for(let M=0;M<$.length;M+=1)C[M]=hp(cp(n,$,M));const S=M=>L(C[M],1,1,()=>{C[M]=null});let T=!n[8]&&mp(n);return{c(){e=_("label"),t=_("i"),s=D(),l=_("span"),r=N(o),u=D(),f=_("div");for(let M=0;M<c.length;M+=1)c[M].c();h=D();for(let M=0;M<C.length;M+=1)C[M].c();g=D(),T&&T.c(),p(t,"class",i=B.getFieldTypeIcon(n[3].type)),p(l,"class","txt"),p(e,"for",a=n[21]),p(f,"class","files-list")},m(M,O){w(M,e,O),m(e,t),m(e,s),m(e,l),m(l,r),w(M,u,O),w(M,f,O);for(let E=0;E<c.length;E+=1)c[E].m(f,null);m(f,h);for(let E=0;E<C.length;E+=1)C[E].m(f,null);m(f,g),T&&T.m(f,null),n[19](f),v=!0},p(M,O){if((!v||O&8&&i!==(i=B.getFieldTypeIcon(M[3].type)))&&p(t,"class",i),(!v||O&8)&&o!==(o=M[3].name+"")&&ue(r,o),(!v||O&2097152&&a!==(a=M[21]))&&p(e,"for",a),O&1558&&(b=M[4],Ae(),c=_t(c,O,y,1,M,b,d,f,Gt,pp,h,dp),Pe()),O&2049){$=M[0];let E;for(E=0;E<$.length;E+=1){const P=cp(M,$,E);C[E]?(C[E].p(P,O),A(C[E],1)):(C[E]=hp(P),C[E].c(),A(C[E],1),C[E].m(f,g))}for(Ae(),E=$.length;E<C.length;E+=1)S(E);Pe()}M[8]?T&&(T.d(1),T=null):T?T.p(M,O):(T=mp(M),T.c(),T.m(f,null))},i(M){if(!v){for(let O=0;O<b.length;O+=1)A(c[O]);for(let O=0;O<$.length;O+=1)A(C[O]);v=!0}},o(M){for(let O=0;O<c.length;O+=1)L(c[O]);C=C.filter(Boolean);for(let O=0;O<C.length;O+=1)L(C[O]);v=!1},d(M){M&&k(e),M&&k(u),M&&k(f);for(let O=0;O<c.length;O+=1)c[O].d();Yt(C,M),T&&T.d(),n[19](null)}}}function bM(n){let e,t;return e=new Ne({props:{class:"form-field form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[_M,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function vM(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 h(E){B.removeByValue(u,E),t(1,u)}function g(E){B.pushUnique(u,E),t(1,u)}function v(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=>h(E),$=E=>g(E),C=E=>v(E);function S(E){me[E?"unshift":"push"](()=>{c=E,t(6,c)})}const T=()=>{for(let E of c.files)a.push(E);t(0,a),t(6,c.value=null,c)},M=()=>c==null?void 0:c.click();function O(E){me[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=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)&&((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,h,g,v,r,y,$,C,S,T,M,O]}class yM extends Ee{constructor(e){super(),Oe(this,e,vM,bM,De,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function gp(n){let e,t;return{c(){e=_("small"),t=N(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s&2&&ue(t,i[1])},d(i){i&&k(e)}}}function kM(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&gp(n);return{c(){e=_("i"),i=D(),s=_("div"),l=_("div"),r=N(o),a=D(),c&&c.c(),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(s,"class","content svelte-1gjwqyd")},m(d,h){w(d,e,h),w(d,i,h),w(d,s,h),m(s,l),m(l,r),m(s,a),c&&c.m(s,null),u||(f=Ye(t=gt.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Nn(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&o!==(o=d[0].id+"")&&ue(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=gp(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:se,o:se,d(d){d&&k(e),d&&k(i),d&&k(s),c&&c.d(),u=!1,f()}}}function wM(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["name","title","label","key","email","heading","content",...ObjectLine truncated
`),r.$set(O);const E={};M&1&&(E.content=JSON.stringify({action:"create",record:B.dummyCollectionRecord(T[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')),c.$set(E)},i(T){d||(A(r.$$.fragment,T),A(c.$$.fragment,T),d=!0)},o(T){L(r.$$.fragment,T),L(c.$$.fragment,T),d=!1},d(T){T&&k(e),T&&k(t),T&&k(i),T&&k(s),T&&k(l),T&&k(o),j(r,T),T&&k(a),T&&k(u),T&&k(f),j(c,T)}}}function c4(n,e,t){let i,{collection:s=new dn}=e;return n.$$set=l=>{"collection"in l&&t(0,s=l.collection)},t(1,i=B.getApiExampleUrl(ye.baseUrl)),[s,i]}class d4 extends Ee{constructor(e){super(),Oe(this,e,c4,f4,De,{collection:0})}}function lp(n,e,t){const i=n.slice();return i[14]=e[t],i}function op(n,e,t){const i=n.slice();return i[14]=e[t],i}function rp(n){let e,t,i,s;var l=n[14].component;function o(r){return{props:{collection:r[3]}}}return l&&(t=new l(o(n))),{c(){e=_("div"),t&&q(t.$$.fragment),i=D(),p(e,"class","tab-item active")},m(r,a){w(r,e,a),t&&H(t,e,null),m(e,i),s=!0},p(r,a){const u={};if(a&8&&(u.collection=r[3]),l!==(l=r[14].component)){if(t){Ae();const f=t;L(f.$$.fragment,1,0,()=>{j(f,1)}),Pe()}l?(t=new l(o(r)),q(t.$$.fragment),A(t.$$.fragment,1),H(t,e,i)):t=null}else l&&t.$set(u)},i(r){s||(t&&A(t.$$.fragment,r),s=!0)},o(r){t&&L(t.$$.fragment,r),s=!1},d(r){r&&k(e),t&&j(t)}}}function ap(n,e){let t,i,s,l=e[4]===e[14].id&&rp(e);return{key:n,first:null,c(){t=We(),l&&l.c(),i=We(),this.first=t},m(o,r){w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){e=o,e[4]===e[14].id?l?(l.p(e,r),r&16&&A(l,1)):(l=rp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Ae(),L(l,1,1,()=>{l=null}),Pe())},i(o){s||(A(l),s=!0)},o(o){L(l),s=!1},d(o){o&&k(t),l&&l.d(o),o&&k(i)}}}function p4(n){let e,t=[],i=new Map,s,l=n[5];const o=r=>r[14].id;for(let r=0;r<l.length;r+=1){let a=lp(n,l,r),u=o(a);i.set(u,t[r]=ap(u,a))}return{c(){e=_("div");for(let r=0;r<t.length;r+=1)t[r].c();p(e,"class","tabs-content")},m(r,a){w(r,e,a);for(let u=0;u<t.length;u+=1)t[u].m(e,null);s=!0},p(r,a){a&56&&(l=r[5],Ae(),t=_t(t,a,o,1,r,l,i,e,Gt,ap,null,lp),Pe())},i(r){if(!s){for(let a=0;a<l.length;a+=1)A(t[a]);s=!0}},o(r){for(let a=0;a<t.length;a+=1)L(t[a]);s=!1},d(r){r&&k(e);for(let a=0;a<t.length;a+=1)t[a].d()}}}function up(n,e){let t,i,s=e[14].label+"",l,o,r,a;function u(){return e[9](e[14])}function f(...c){return e[10](e[14],...c)}return{key:n,first:null,c(){t=_("button"),i=_("span"),l=N(s),o=D(),p(i,"class","txt"),p(t,"tabindex","0"),p(t,"class","tab-item"),ne(t,"active",e[4]===e[14].id),this.first=t},m(c,d){w(c,t,d),m(t,i),m(i,l),m(t,o),r||(a=[J(t,"click",u),J(t,"keydown",Bm(f))],r=!0)},p(c,d){e=c,d&48&&ne(t,"active",e[4]===e[14].id)},d(c){c&&k(t),r=!1,Je(a)}}}function h4(n){let e,t,i=n[3].name+"",s,l,o,r,a=[],u=new Map,f=n[5];const c=d=>d[14].id;for(let d=0;d<f.length;d+=1){let h=op(n,f,d),g=c(h);u.set(g,a[d]=up(g,h))}return{c(){e=_("h4"),t=_("strong"),s=N(i),l=N(" records API"),o=D(),r=_("div");for(let d=0;d<a.length;d+=1)a[d].c();p(r,"class","tabs-header stretched")},m(d,h){w(d,e,h),m(e,t),m(t,s),m(e,l),w(d,o,h),w(d,r,h);for(let g=0;g<a.length;g+=1)a[g].m(r,null)},p(d,h){h&8&&i!==(i=d[3].name+"")&&ue(s,i),h&114&&(f=d[5],a=_t(a,h,c,1,d,f,u,r,bn,up,null,op))},d(d){d&&k(e),d&&k(o),d&&k(r);for(let h=0;h<a.length;h+=1)a[h].d()}}}function m4(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Close</span>',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function g4(n){let e,t,i={class:"overlay-panel-xl colored-header collection-panel",$$slots:{footer:[m4],header:[h4],default:[p4]},$$scope:{ctx:n}};return e=new ui({props:i}),n[11](e),e.$on("hide",n[12]),e.$on("show",n[13]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&524312&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[11](null),j(e,s)}}}function _4(n,e,t){const i=[{id:"list",label:"List",component:AC},{id:"view",label:"View",component:IC},{id:"create",label:"Create",component:KC},{id:"update",label:"Update",component:o4},{id:"delete",label:"Delete",component:u4},{id:"realtime",label:"Realtime",component:d4}];let s,l=new dn,o=i[0].id;function r(y){return t(3,l=y),u(i[0].id),s==null?void 0:s.show()}function a(){return s==null?void 0:s.hide()}function u(y){t(4,o=y)}function f(y,$){(y.code==="Enter"||y.code==="Space")&&(y.preventDefault(),u($))}const c=()=>a(),d=y=>u(y.id),h=(y,$)=>f($,y.id);function g(y){me[y?"unshift":"push"](()=>{s=y,t(2,s)})}function v(y){tt.call(this,n,y)}function b(y){tt.call(this,n,y)}return[a,u,s,l,o,i,f,r,c,d,h,g,v,b]}class b4 extends Ee{constructor(e){super(),Oe(this,e,_4,g4,De,{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 v4(n){let e,t,i,s=[n[3]],l={};for(let o=0;o<s.length;o+=1)l=ut(l,s[o]);return{c(){e=_("textarea"),mi(e,l),ne(e,"svelte-1x1pbts",!0)},m(o,r){w(o,e,r),e.autofocus&&e.focus(),n[5](e),Se(e,n[0]),t||(i=[ Line truncated
<span class="txt">Upload new file</span>`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(r,a){w(r,e,a),m(e,t),n[16](t),m(e,i),m(e,s),l||(o=[J(t,"change",n[17]),J(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&k(e),n[16](null),l=!1,Je(o)}}}function _M(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,h,g,v,b=n[4];const y=M=>M[25];for(let M=0;M<b.length;M+=1){let O=dp(n,b,M),E=y(O);d.set(E,c[M]=pp(E,O))}let $=n[0],C=[];for(let M=0;M<$.length;M+=1)C[M]=hp(cp(n,$,M));const S=M=>L(C[M],1,1,()=>{C[M]=null});let T=!n[8]&&mp(n);return{c(){e=_("label"),t=_("i"),s=D(),l=_("span"),r=N(o),u=D(),f=_("div");for(let M=0;M<c.length;M+=1)c[M].c();h=D();for(let M=0;M<C.length;M+=1)C[M].c();g=D(),T&&T.c(),p(t,"class",i=B.getFieldTypeIcon(n[3].type)),p(l,"class","txt"),p(e,"for",a=n[21]),p(f,"class","files-list")},m(M,O){w(M,e,O),m(e,t),m(e,s),m(e,l),m(l,r),w(M,u,O),w(M,f,O);for(let E=0;E<c.length;E+=1)c[E].m(f,null);m(f,h);for(let E=0;E<C.length;E+=1)C[E].m(f,null);m(f,g),T&&T.m(f,null),n[19](f),v=!0},p(M,O){if((!v||O&8&&i!==(i=B.getFieldTypeIcon(M[3].type)))&&p(t,"class",i),(!v||O&8)&&o!==(o=M[3].name+"")&&ue(r,o),(!v||O&2097152&&a!==(a=M[21]))&&p(e,"for",a),O&1558&&(b=M[4],Ae(),c=_t(c,O,y,1,M,b,d,f,Gt,pp,h,dp),Pe()),O&2049){$=M[0];let E;for(E=0;E<$.length;E+=1){const P=cp(M,$,E);C[E]?(C[E].p(P,O),A(C[E],1)):(C[E]=hp(P),C[E].c(),A(C[E],1),C[E].m(f,g))}for(Ae(),E=$.length;E<C.length;E+=1)S(E);Pe()}M[8]?T&&(T.d(1),T=null):T?T.p(M,O):(T=mp(M),T.c(),T.m(f,null))},i(M){if(!v){for(let O=0;O<b.length;O+=1)A(c[O]);for(let O=0;O<$.length;O+=1)A(C[O]);v=!0}},o(M){for(let O=0;O<c.length;O+=1)L(c[O]);C=C.filter(Boolean);for(let O=0;O<C.length;O+=1)L(C[O]);v=!1},d(M){M&&k(e),M&&k(u),M&&k(f);for(let O=0;O<c.length;O+=1)c[O].d();Yt(C,M),T&&T.d(),n[19](null)}}}function bM(n){let e,t;return e=new Ne({props:{class:"form-field form-field-file "+(n[3].required?"required":""),name:n[3].name,$$slots:{default:[_M,({uniqueId:i})=>({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function vM(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 h(E){B.removeByValue(u,E),t(1,u)}function g(E){B.pushUnique(u,E),t(1,u)}function v(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=>h(E),$=E=>g(E),C=E=>v(E);function S(E){me[E?"unshift":"push"](()=>{c=E,t(6,c)})}const T=()=>{for(let E of c.files)a.push(E);t(0,a),t(6,c.value=null,c)},M=()=>c==null?void 0:c.click();function O(E){me[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=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)&&((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,h,g,v,r,y,$,C,S,T,M,O]}class yM extends Ee{constructor(e){super(),Oe(this,e,vM,bM,De,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function gp(n){let e,t;return{c(){e=_("small"),t=N(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){w(i,e,s),m(e,t)},p(i,s){s&2&&ue(t,i[1])},d(i){i&&k(e)}}}function kM(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&gp(n);return{c(){e=_("i"),i=D(),s=_("div"),l=_("div"),r=N(o),a=D(),c&&c.c(),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(s,"class","content svelte-1gjwqyd")},m(d,h){w(d,e,h),w(d,i,h),w(d,s,h),m(s,l),m(l,r),m(s,a),c&&c.m(s,null),u||(f=Ye(t=gt.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Nn(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&o!==(o=d[0].id+"")&&ue(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=gp(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:se,o:se,d(d){d&&k(e),d&&k(i),d&&k(s),c&&c.d(),u=!1,f()}}}function wM(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["name","title","label","key","email","heading","content",...ObjectLine truncated
`,p(e,"class","block txt-center txt-disabled")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function BM(n){let e,t,i;function s(o){n[31](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new VM({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function UM(n){let e,t,i;function s(o){n[30](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new AM({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function WM(n){let e,t,i,s,l;function o(f){n[27](f,n[40])}function r(f){n[28](f,n[40])}function a(f){n[29](f,n[40])}let u={field:n[40],record:n[2]};return n[2][n[40].name]!==void 0&&(u.value=n[2][n[40].name]),n[3][n[40].name]!==void 0&&(u.uploadedFiles=n[3][n[40].name]),n[4][n[40].name]!==void 0&&(u.deletedFileIndexes=n[4][n[40].name]),e=new yM({props:u}),me.push(()=>Re(e,"value",o)),me.push(()=>Re(e,"uploadedFiles",r)),me.push(()=>Re(e,"deletedFileIndexes",a)),{c(){q(e.$$.fragment)},m(f,c){H(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[40]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[40].name],je(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[40].name],je(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[40].name],je(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){L(e.$$.fragment,f),l=!1},d(f){j(e,f)}}}function YM(n){let e,t,i;function s(o){n[26](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new x4({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function KM(n){let e,t,i;function s(o){n[25](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new Z4({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function JM(n){let e,t,i;function s(o){n[24](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new W4({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function ZM(n){let e,t,i;function s(o){n[23](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new V4({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function GM(n){let e,t,i;function s(o){n[22](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new R4({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function XM(n){let e,t,i;function s(o){n[21](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new L4({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function QM(n){let e,t,i;function s(o){n[20](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new O4({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[40]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[40].name],je(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){j(e,o)}}}function xM(n){let e,t,i;function s(o){n[19](o,n[40])}let l={field:n[40]};return n[2][n[40].name]!==void 0&&(l.value=n[2][n[40].name]),e=new C4({props:l}),me.push(()=>Re(e,"value",s)),{c(){q(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){n=o; Line truncated
<span class="txt">Delete</span>`,p(e,"tabindex","0"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function nT(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",o,r,a,u,f,c=!n[2].isNew&&n[10]&&Mp(n);return{c(){e=_("h4"),i=N(t),s=D(),o=N(l),r=N(" record"),a=D(),c&&c.c(),u=We()},m(d,h){w(d,e,h),m(e,i),m(e,s),m(e,o),m(e,r),w(d,a,h),c&&c.m(d,h),w(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&ue(i,t),(!f||h[0]&1)&&l!==(l=d[0].name+"")&&ue(o,l),!d[2].isNew&&d[10]?c?(c.p(d,h),h[0]&1028&&A(c,1)):(c=Mp(d),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(Ae(),L(c,1,1,()=>{c=null}),Pe())},i(d){f||(A(c),f=!0)},o(d){L(c),f=!1},d(d){d&&k(e),d&&k(a),c&&c.d(d),d&&k(u)}}}function iT(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=D(),s=_("button"),l=_("span"),r=N(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[11]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[9]||n[7],te(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,r),u||(f=J(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ue(r,o),d[0]&640&&a!==(a=!c[9]||c[7])&&(s.disabled=a),d[0]&128&&te(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function sT(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[iT],header:[nT],default:[eT]},$$scope:{ctx:n}};return e=new ui({props:i}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&288&&(o.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[33](null),j(e,s)}}}function Tp(n){return JSON.stringify(n)}function lT(n,e,t){let i,s,l,o;const r=xt(),a="record_"+B.randomString(5);let{collection:u}=e,f,c=null,d=new _o,h=!1,g=!1,v={},b={},y="";function $(ae){return S(ae),t(8,g=!0),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function S(ae){ri({}),c=ae||{},t(2,d=ae!=null&&ae.clone?ae.clone():new _o),t(3,v={}),t(4,b={}),await Zn(),t(15,y=Tp(d))}function T(){if(h||!l)return;t(7,h=!0);const ae=O();let W;d.isNew?W=ye.records.create(u==null?void 0:u.id,ae):W=ye.records.update(u==null?void 0:u.id,d.id,ae),W.then(async _e=>{sn(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),C(),r("save",_e)}).catch(_e=>{ye.errorResponseHandler(_e)}).finally(()=>{t(7,h=!1)})}function M(){!(c!=null&&c.id)||si("Do you really want to delete the selected record?",()=>ye.records.delete(c["@collectionId"],c.id).then(()=>{C(),sn("Successfully deleted record."),r("delete",c)}).catch(ae=>{ye.errorResponseHandler(ae)}))}function O(){const ae=(d==null?void 0:d.export())||{},W=new FormData,_e={};for(const He of(u==null?void 0:u.schema)||[])_e[He.name]=He;for(const He in ae)!_e[He]||(typeof ae[He]>"u"&&(ae[He]=null),B.addValueToFormData(W,He,ae[He]));for(const He in v){const Ue=B.toArray(v[He]);for(const X of Ue)W.append(He,X)}for(const He in b){const Ue=B.toArray(b[He]);for(const X of Ue)W.append(He+"."+X,"")}return W}const E=()=>C(),P=()=>M();function I(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function F(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function z(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function Q(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function ne(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function G(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function ee(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function U(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function Y(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function Z(ae,W){n.$$.not_equal(v[W.name],ae)&&(v[W.name]=ae,t(3,v))}function de(ae,W){n.$$.not_equal(b[W.name],ae)&&(b[W.name]=ae,t(4,b))}function x(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function oe(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}const Ce=()=>s&&g?(si("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,g=!1),C()}),!1):!0;function Te(ae){me[ae?"unshift":"push"](()=>{f=ae,t(6,f)})}function K(ae){tt.call(this,n,ae)}function we(ae){tt.call(this,n,ae)}return n.$$set=ae=>{"collection"in ae&&t(0,u=ae.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(16,i=B.hasNonEmptyProps(v)||B.hasNonEmptyProps(b)),n.$$.dirty[0]&98308&&t(5,s=i||y!=Tp(d)),n.$$.dirty[0]&36&&t(9,l=d.isNew||s),n.$$.dirty[0]&1&&t(10,o=(u==null?void 0:u.name)!=="profiles")},[u,C,d,v,b,s,f,h,g,l,o,a,T,M,$,y,i,E,P,I,F,z,Q,ne,G,ee,U,Y,Z,de,x,oe,Ce,Te,K,we]}class db extends Ee{constructor(e){super(),Oe(this,e,lT,sT,De,{collection:0,show:14,hide:1},null,[-1,-1])}get sLine truncated
`},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function jp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[28]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function qp(n,e){let t,i,s;return i=new pb({props:{record:e[35],field:e[38]}}),{key:n,first:null,c(){t=We(),q(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),H(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8&&(r.record=e[35]),o[0]&2048&&(r.field=e[38]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(t),j(i,l)}}}function Vp(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,g,v=[],b=new Map,y,$,C,S,T,M,O,E,P,I,F,z;function Q(){return e[25](e[35])}h=new sr({props:{id:e[35].id}});let ne=e[11];const G=Y=>Y[38].name;for(let Y=0;Y<ne.length;Y+=1){let Z=Np(e,ne,Y),de=G(Z);b.set(de,v[Y]=qp(de,Z))}C=new Si({props:{date:e[35].created}}),M=new Si({props:{date:e[35].updated}});function ee(){return e[26](e[35])}function U(...Y){return e[27](e[35],...Y)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),l=_("input"),a=D(),u=_("label"),c=D(),d=_("td"),q(h.$$.fragment),g=D();for(let Y=0;Y<v.length;Y+=1)v[Y].c();y=D(),$=_("td"),q(C.$$.fragment),S=D(),T=_("td"),q(M.$$.fragment),O=D(),E=_("td"),E.innerHTML='<i class="ri-arrow-right-line"></i>',P=D(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[35].id),l.checked=r=e[5][e[35].id],p(u,"for",f="checkbox_"+e[35].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(d,"class","col-type-text col-field-id"),p($,"class","col-type-date col-field-created"),p(T,"class","col-type-date col-field-updated"),p(E,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Y,Z){w(Y,t,Z),m(t,i),m(i,s),m(s,l),m(s,a),m(s,u),m(t,c),m(t,d),H(h,d,null),m(t,g);for(let de=0;de<v.length;de+=1)v[de].m(t,null);m(t,y),m(t,$),H(C,$,null),m(t,S),m(t,T),H(M,T,null),m(t,O),m(t,E),m(t,P),I=!0,F||(z=[J(l,"change",Q),J(s,"click",ni(e[19])),J(t,"click",ee),J(t,"keydown",U)],F=!0)},p(Y,Z){e=Y,(!I||Z[0]&8&&o!==(o="checkbox_"+e[35].id))&&p(l,"id",o),(!I||Z[0]&40&&r!==(r=e[5][e[35].id]))&&(l.checked=r),(!I||Z[0]&8&&f!==(f="checkbox_"+e[35].id))&&p(u,"for",f);const de={};Z[0]&8&&(de.id=e[35].id),h.$set(de),Z[0]&2056&&(ne=e[11],Ae(),v=_t(v,Z,G,1,e,ne,b,t,Gt,qp,y,Np),Pe());const x={};Z[0]&8&&(x.date=e[35].created),C.$set(x);const oe={};Z[0]&8&&(oe.date=e[35].updated),M.$set(oe)},i(Y){if(!I){A(h.$$.fragment,Y);for(let Z=0;Z<ne.length;Z+=1)A(v[Z]);A(C.$$.fragment,Y),A(M.$$.fragment,Y),I=!0}},o(Y){L(h.$$.fragment,Y);for(let Z=0;Z<v.length;Z+=1)L(v[Z]);L(C.$$.fragment,Y),L(M.$$.fragment,Y),I=!1},d(Y){Y&&k(t),j(h);for(let Z=0;Z<v.length;Z+=1)v[Z].d();j(C),j(M),F=!1,Je(z)}}}function zp(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a[0]&8&&i!==(i=r[3].length+"")&&ue(s,i),a[0]&16&&ue(o,r[4])},d(r){r&&k(e)}}}function Bp(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),te(t,"btn-loading",n[8]),te(t,"btn-disabled",n[8]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=J(t,"click",n[29]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&ue(o,l),c[0]&256&&te(t,"btn-loading",f[8]),c[0]&256&&te(t,"btn-disabled",f[8])},d(f){f&&k(e),a=!1,u()}}}function Up(n){let e,t,i,s,l,o,r=n[6]===1?"record":"records",a,u,f,c,d,h,g,v,b,y,$;return{c(){e=_("div"),t=_("div"),i=N("Selected "),s=_("strong"),l=N(n[6]),o=D(),a=N(r),u=D(),f=_("button"),f.innerHTML='<span class="txt">Reset</span>',c=D(),d=_("div"),h=D(),g=_("button"),g.innerHTML='<span class="txt">Delete selected</span>',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),te(f,"btn-disabled",n[9]),p(d,"class","flex-fill"),p(g,"type","button"),p(g,"class","btn btn-sm btn-secondary btn-danger"),te(g,"btn-loading",n[9]),te(g,"btn-disabled",n[9]),p(e,"class","bulkbar")},m(C,S){w(C,e,S),m(e,t),m(t,i),m(t,s),m(s,l),m(t,o),m(t,a),m(e,u),m(e,f),m(e,c),m(e,d),m(e,h),m(e,g),b=!0,y||($=[J(f,"click",n[30]),J(g,"click",n[31])],y=!0)},p(C,S){(!b||S[0]&64)&&ue(l,C[6]),(!b||S[0]&64)&&r!==(r=C[6]===1?"record":"records")&&ue(a,r),S[0]&512&&te(f,"btn-disabled",C[9]),S[0]&512&&te(g,"btn-loading",C[9]),S[0]&512&&te(g,"btn-disabled",C[9])},i(C){b||(C&&Tt(()=>{v||(v=st(e,Yn,{duration:150,y:5},!0)),v.run(1)}),b=!0)},o(C){C&&(v||(v=st(e,Yn,{duration:150,y:5},!1)),v.run(0)),b=!1},d(C){C&&k(e),C&&v&&v.end(),y=!1,Je($)}}}function TT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v=[],b=new Map,y,$,C,S,T,M,O,E,P,I,F=[],z=new Map,Q,ne,G,ee,U,Y,Z;function de(ce){n[21](ce)}let x={class:"col-type-text col-field-id",name:"id",$$slots Line truncated
<span class="txt">Delete</span>`,p(e,"tabindex","0"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function nT(n){let e,t=n[2].isNew?"New":"Edit",i,s,l=n[0].name+"",o,r,a,u,f,c=!n[2].isNew&&n[10]&&Mp(n);return{c(){e=_("h4"),i=N(t),s=D(),o=N(l),r=N(" record"),a=D(),c&&c.c(),u=We()},m(d,h){w(d,e,h),m(e,i),m(e,s),m(e,o),m(e,r),w(d,a,h),c&&c.m(d,h),w(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&t!==(t=d[2].isNew?"New":"Edit")&&ue(i,t),(!f||h[0]&1)&&l!==(l=d[0].name+"")&&ue(o,l),!d[2].isNew&&d[10]?c?(c.p(d,h),h[0]&1028&&A(c,1)):(c=Mp(d),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(Ae(),L(c,1,1,()=>{c=null}),Pe())},i(d){f||(A(c),f=!0)},o(d){L(c),f=!1},d(d){d&&k(e),d&&k(a),c&&c.d(d),d&&k(u)}}}function iT(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=D(),s=_("button"),l=_("span"),r=N(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[7],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[11]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[9]||n[7],ne(s,"btn-loading",n[7])},m(c,d){w(c,e,d),m(e,t),w(c,i,d),w(c,s,d),m(s,l),m(l,r),u||(f=J(e,"click",n[17]),u=!0)},p(c,d){d[0]&128&&(e.disabled=c[7]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ue(r,o),d[0]&640&&a!==(a=!c[9]||c[7])&&(s.disabled=a),d[0]&128&&ne(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function sT(n){let e,t,i={class:"overlay-panel-lg record-panel",beforeHide:n[32],$$slots:{footer:[iT],header:[nT],default:[eT]},$$scope:{ctx:n}};return e=new ui({props:i}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&288&&(o.beforeHide=s[32]),l[0]&1693|l[1]&8192&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[33](null),j(e,s)}}}function Tp(n){return JSON.stringify(n)}function lT(n,e,t){let i,s,l,o;const r=xt(),a="record_"+B.randomString(5);let{collection:u}=e,f,c=null,d=new _o,h=!1,g=!1,v={},b={},y="";function $(ae){return S(ae),t(8,g=!0),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function S(ae){ri({}),c=ae||{},t(2,d=ae!=null&&ae.clone?ae.clone():new _o),t(3,v={}),t(4,b={}),await Zn(),t(15,y=Tp(d))}function T(){if(h||!l)return;t(7,h=!0);const ae=O();let W;d.isNew?W=ye.records.create(u==null?void 0:u.id,ae):W=ye.records.update(u==null?void 0:u.id,d.id,ae),W.then(async _e=>{sn(d.isNew?"Successfully created record.":"Successfully updated record."),t(8,g=!1),C(),r("save",_e)}).catch(_e=>{ye.errorResponseHandler(_e)}).finally(()=>{t(7,h=!1)})}function M(){!(c!=null&&c.id)||si("Do you really want to delete the selected record?",()=>ye.records.delete(c["@collectionId"],c.id).then(()=>{C(),sn("Successfully deleted record."),r("delete",c)}).catch(ae=>{ye.errorResponseHandler(ae)}))}function O(){const ae=(d==null?void 0:d.export())||{},W=new FormData,_e={};for(const He of(u==null?void 0:u.schema)||[])_e[He.name]=He;for(const He in ae)!_e[He]||(typeof ae[He]>"u"&&(ae[He]=null),B.addValueToFormData(W,He,ae[He]));for(const He in v){const Ue=B.toArray(v[He]);for(const Q of Ue)W.append(He,Q)}for(const He in b){const Ue=B.toArray(b[He]);for(const Q of Ue)W.append(He+"."+Q,"")}return W}const E=()=>C(),P=()=>M();function I(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function F(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function V(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function Z(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function te(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function X(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function ee(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function U(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function Y(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function G(ae,W){n.$$.not_equal(v[W.name],ae)&&(v[W.name]=ae,t(3,v))}function de(ae,W){n.$$.not_equal(b[W.name],ae)&&(b[W.name]=ae,t(4,b))}function x(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}function oe(ae,W){n.$$.not_equal(d[W.name],ae)&&(d[W.name]=ae,t(2,d))}const Ce=()=>s&&g?(si("You have unsaved changes. Do you really want to close the panel?",()=>{t(8,g=!1),C()}),!1):!0;function Te(ae){me[ae?"unshift":"push"](()=>{f=ae,t(6,f)})}function K(ae){tt.call(this,n,ae)}function ke(ae){tt.call(this,n,ae)}return n.$$set=ae=>{"collection"in ae&&t(0,u=ae.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(16,i=B.hasNonEmptyProps(v)||B.hasNonEmptyProps(b)),n.$$.dirty[0]&98308&&t(5,s=i||y!=Tp(d)),n.$$.dirty[0]&36&&t(9,l=d.isNew||s),n.$$.dirty[0]&1&&t(10,o=(u==null?void 0:u.name)!=="profiles")},[u,C,d,v,b,s,f,h,g,l,o,a,T,M,$,y,i,E,P,I,F,V,Z,te,X,ee,U,Y,G,de,x,oe,Ce,Te,K,ke]}class db extends Ee{constructor(e){super(),Oe(this,e,lT,sT,De,{collection:0,show:14,hide:1},null,[-1,-1])}get sLine truncated
`},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function jp(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[28]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function qp(n,e){let t,i,s;return i=new pb({props:{record:e[35],field:e[38]}}),{key:n,first:null,c(){t=We(),q(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),H(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8&&(r.record=e[35]),o[0]&2048&&(r.field=e[38]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(t),j(i,l)}}}function Vp(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,g,v=[],b=new Map,y,$,C,S,T,M,O,E,P,I,F,V;function Z(){return e[25](e[35])}h=new sr({props:{id:e[35].id}});let te=e[11];const X=Y=>Y[38].name;for(let Y=0;Y<te.length;Y+=1){let G=Np(e,te,Y),de=X(G);b.set(de,v[Y]=qp(de,G))}C=new Si({props:{date:e[35].created}}),M=new Si({props:{date:e[35].updated}});function ee(){return e[26](e[35])}function U(...Y){return e[27](e[35],...Y)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("div"),l=_("input"),a=D(),u=_("label"),c=D(),d=_("td"),q(h.$$.fragment),g=D();for(let Y=0;Y<v.length;Y+=1)v[Y].c();y=D(),$=_("td"),q(C.$$.fragment),S=D(),T=_("td"),q(M.$$.fragment),O=D(),E=_("td"),E.innerHTML='<i class="ri-arrow-right-line"></i>',P=D(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[35].id),l.checked=r=e[5][e[35].id],p(u,"for",f="checkbox_"+e[35].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(d,"class","col-type-text col-field-id"),p($,"class","col-type-date col-field-created"),p(T,"class","col-type-date col-field-updated"),p(E,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Y,G){w(Y,t,G),m(t,i),m(i,s),m(s,l),m(s,a),m(s,u),m(t,c),m(t,d),H(h,d,null),m(t,g);for(let de=0;de<v.length;de+=1)v[de].m(t,null);m(t,y),m(t,$),H(C,$,null),m(t,S),m(t,T),H(M,T,null),m(t,O),m(t,E),m(t,P),I=!0,F||(V=[J(l,"change",Z),J(s,"click",ni(e[19])),J(t,"click",ee),J(t,"keydown",U)],F=!0)},p(Y,G){e=Y,(!I||G[0]&8&&o!==(o="checkbox_"+e[35].id))&&p(l,"id",o),(!I||G[0]&40&&r!==(r=e[5][e[35].id]))&&(l.checked=r),(!I||G[0]&8&&f!==(f="checkbox_"+e[35].id))&&p(u,"for",f);const de={};G[0]&8&&(de.id=e[35].id),h.$set(de),G[0]&2056&&(te=e[11],Ae(),v=_t(v,G,X,1,e,te,b,t,Gt,qp,y,Np),Pe());const x={};G[0]&8&&(x.date=e[35].created),C.$set(x);const oe={};G[0]&8&&(oe.date=e[35].updated),M.$set(oe)},i(Y){if(!I){A(h.$$.fragment,Y);for(let G=0;G<te.length;G+=1)A(v[G]);A(C.$$.fragment,Y),A(M.$$.fragment,Y),I=!0}},o(Y){L(h.$$.fragment,Y);for(let G=0;G<v.length;G+=1)L(v[G]);L(C.$$.fragment,Y),L(M.$$.fragment,Y),I=!1},d(Y){Y&&k(t),j(h);for(let G=0;G<v.length;G+=1)v[G].d();j(C),j(M),F=!1,Je(V)}}}function zp(n){let e,t,i=n[3].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[4]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a[0]&8&&i!==(i=r[3].length+"")&&ue(s,i),a[0]&16&&ue(o,r[4])},d(r){r&&k(e)}}}function Bp(n){let e,t,i,s,l=n[4]-n[3].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ne(t,"btn-loading",n[8]),ne(t,"btn-disabled",n[8]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=J(t,"click",n[29]),a=!0)},p(f,c){c[0]&24&&l!==(l=f[4]-f[3].length+"")&&ue(o,l),c[0]&256&&ne(t,"btn-loading",f[8]),c[0]&256&&ne(t,"btn-disabled",f[8])},d(f){f&&k(e),a=!1,u()}}}function Up(n){let e,t,i,s,l,o,r=n[6]===1?"record":"records",a,u,f,c,d,h,g,v,b,y,$;return{c(){e=_("div"),t=_("div"),i=N("Selected "),s=_("strong"),l=N(n[6]),o=D(),a=N(r),u=D(),f=_("button"),f.innerHTML='<span class="txt">Reset</span>',c=D(),d=_("div"),h=D(),g=_("button"),g.innerHTML='<span class="txt">Delete selected</span>',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ne(f,"btn-disabled",n[9]),p(d,"class","flex-fill"),p(g,"type","button"),p(g,"class","btn btn-sm btn-secondary btn-danger"),ne(g,"btn-loading",n[9]),ne(g,"btn-disabled",n[9]),p(e,"class","bulkbar")},m(C,S){w(C,e,S),m(e,t),m(t,i),m(t,s),m(s,l),m(t,o),m(t,a),m(e,u),m(e,f),m(e,c),m(e,d),m(e,h),m(e,g),b=!0,y||($=[J(f,"click",n[30]),J(g,"click",n[31])],y=!0)},p(C,S){(!b||S[0]&64)&&ue(l,C[6]),(!b||S[0]&64)&&r!==(r=C[6]===1?"record":"records")&&ue(a,r),(!b||S[0]&512)&&ne(f,"btn-disabled",C[9]),(!b||S[0]&512)&&ne(g,"btn-loading",C[9]),(!b||S[0]&512)&&ne(g,"btn-disabled",C[9])},i(C){b||(C&&Tt(()=>{v||(v=st(e,Yn,{duration:150,y:5},!0)),v.run(1)}),b=!0)},o(C){C&&(v||(v=st(e,Yn,{duration:150,y:5},!1)),v.run(0)),b=!1},d(C){C&&k(e),C&&v&&v.end(),y=!1,Je($)}}}function TT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v=[],b=new Map,y,$,C,S,T,M,O,E,P,I,F=[],V=new Map,Z,te,X,ee,U,Y,G;function de(ce){n[21](ce)}let x={class:"col-type-text col-field-id" Line truncated
<span class="txt">API Preview</span>`,v=D(),b=_("button"),b.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New record</span>`,y=D(),q($.$$.fragment),C=D(),q(S.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(g,"type","button"),p(g,"class","btn btn-outline"),p(b,"type","button"),p(b,"class","btn btn-expanded"),p(h,"class","btns-group"),p(e,"class","page-header")},m(ne,G){w(ne,e,G),m(e,t),m(t,i),m(t,s),m(t,l),m(l,r),m(e,a),m(e,u),I&&I.m(u,null),m(u,f),H(c,u,null),m(e,d),m(e,h),m(h,g),m(h,v),m(h,b),w(ne,y,G),H($,ne,G),w(ne,C,G),H(S,ne,G),O=!0,E||(P=[J(g,"click",n[15]),J(b,"click",n[16])],E=!0)},p(ne,G){(!O||G[0]&4)&&o!==(o=ne[2].name+"")&&ue(r,o),ne[9]?I&&(I.d(1),I=null):I?I.p(ne,G):(I=Wp(ne),I.c(),I.m(u,f));const ee={};G[0]&1&&(ee.value=ne[0]),G[0]&4&&(ee.autocompleteCollection=ne[2]),$.$set(ee);const U={};G[0]&4&&(U.collection=ne[2]),!T&&G[0]&1&&(T=!0,U.filter=ne[0],je(()=>T=!1)),!M&&G[0]&2&&(M=!0,U.sort=ne[1],je(()=>M=!1)),S.$set(U)},i(ne){O||(A(c.$$.fragment,ne),A($.$$.fragment,ne),A(S.$$.fragment,ne),O=!0)},o(ne){L(c.$$.fragment,ne),L($.$$.fragment,ne),L(S.$$.fragment,ne),O=!1},d(ne){ne&&k(e),I&&I.d(),j(c),ne&&k(y),j($,ne),ne&&k(C),n[18](null),j(S,ne),E=!1,Je(P)}}}function IT(n){let e,t,i,s,l;return{c(){e=_("h1"),e.textContent="Create your first collection to add records!",t=D(),i=_("button"),i.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New record</span>`,y=D(),q($.$$.fragment),C=D(),q(S.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(g,"type","button"),p(g,"class","btn btn-outline"),p(b,"type","button"),p(b,"class","btn btn-expanded"),p(h,"class","btns-group"),p(e,"class","page-header")},m(te,X){w(te,e,X),m(e,t),m(t,i),m(t,s),m(t,l),m(l,r),m(e,a),m(e,u),I&&I.m(u,null),m(u,f),H(c,u,null),m(e,d),m(e,h),m(h,g),m(h,v),m(h,b),w(te,y,X),H($,te,X),w(te,C,X),H(S,te,X),O=!0,E||(P=[J(g,"click",n[15]),J(b,"click",n[16])],E=!0)},p(te,X){(!O||X[0]&4)&&o!==(o=te[2].name+"")&&ue(r,o),te[9]?I&&(I.d(1),I=null):I?I.p(te,X):(I=Wp(te),I.c(),I.m(u,f));const ee={};X[0]&1&&(ee.value=te[0]),X[0]&4&&(ee.autocompleteCollection=te[2]),$.$set(ee);const U={};X[0]&4&&(U.collection=te[2]),!T&&X[0]&1&&(T=!0,U.filter=te[0],je(()=>T=!1)),!M&&X[0]&2&&(M=!0,U.sort=te[1],je(()=>M=!1)),S.$set(U)},i(te){O||(A(c.$$.fragment,te),A($.$$.fragment,te),A(S.$$.fragment,te),O=!0)},o(te){L(c.$$.fragment,te),L($.$$.fragment,te),L(S.$$.fragment,te),O=!1},d(te){te&&k(e),I&&I.d(),j(c),te&&k(y),j($,te),te&&k(C),n[18](null),j(S,te),E=!1,Je(P)}}}function IT(n){let e,t,i,s,l;return{c(){e=_("h1"),e.textContent="Create your first collection to add records!",t=D(),i=_("button"),i.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">Create new collection</span>`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=J(i,"click",n[12]),s=!0)},p:se,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,l()}}}function NT(n){let e;return{c(){e=_("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function FT(n){let e,t,i;function s(r,a){return r[9]?NT:IT}let l=s(n),o=l(n);return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-database-2-line"></i>',i=D(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){w(r,e,a),m(e,t),m(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&&k(e),o.d()}}}function RT(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
<h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function HT(n){let e,t,i,s,l,o,r,a,u;const f=[PT,AT,ET],c=[];function d(b,y){return b[8]?0:b[7].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new tu({props:h}),n[22](s);let g={};o=new b4({props:g}),n[23](o);let v={collection:n[2]};return a=new db({props:v}),n[24](a),a.$on("save",n[25]),a.$on("delete",n[26]),{c(){t.c(),i=D(),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),q(a.$$.fragment)},m(b,y){c[e].m(b,y),w(b,i,y),H(s,b,y),w(b,l,y),H(o,b,y),w(b,r,y),H(a,b,y),u=!0},p(b,y){let $=e;e=d(b),e===$?c[e].p(b,y):(Ae(),L(c[$],1,1,()=>{c[$]=null}),Pe(),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 C={};s.$set(C);const S={};o.$set(S);const T={};y[0]&4&&(T.collection=b[2]),a.$set(T)},i(b){u||(A(t),A(s.$$.fragment,b),A(o.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){L(t),L(s.$$.fragment,b),L(o.$$.fragment,b),L(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[22](null),j(s,b),b&&k(l),n[23](null),j(o,b),b&&k(r),n[24](null),j(a,b)}}}function jT(n,e,t){let i,s,l,o,r,a,u;at(n,hi,Y=>t(2,s=Y)),at(n,As,Y=>t(11,l=Y)),at(n,Vo,Y=>t(27,o=Y)),at(n,Nt,Y=>t(28,r=Y)),at(n,da,Y=>t(8,a=Y)),at(n,us,Y=>t(9,u=Y)),nn(Nt,r="Collections",r);const f=new URLSearchParams(o);let c,d,h,g,v=f.get("filter")||"",b=f.get("sort")||"-created",y=f.get("collectionId")||"";function $(){t(10,y=s.id),t(1,b="-created"),t(0,v="")}U$(y);const C=()=>c==null?void 0:c.show(),S=()=>c==null?void 0:c.show(s),T=()=>g==null?void 0:g.load(),M=()=>d==null?void 0:d.show(s),O=()=>h==null?void 0:h.show(),E=Y=>t(0,v=Y.detail);function P(Y){me[Y?"unshift":"push"](()=>{g=Y,t(6,g)})}function I(Y){v=Y,t(0,v)}function F(Y){b=Y,t(1,b)}const z=Y=>h==null?void 0:h.show(Y==null?void 0:Y.detail);function Q(Y){me[Y?"unshift":"push"](()=>{c=Y,t(3,c)})}function ne(Y){me[Y?"unshift":"push"](()=>{d=Y,t(4,d)})}function G(Y){me[Y?"unshift":"push"](()=>{h=Y,t(5,h)})}const ee=()=>g==null?void 0:g.load(),U=()=>g==null?void 0:g.load();return n.$$.update=()=>{if(n.$$.dirty[0]&2048&&t(7,i=l.filter(Y=>Y.name!="profiles")),n.$$.dirty[0]&1028&&(s==null?void 0:s.id)&&y!=s.id&&$(),n.$$.dirty[0]&7&&(b||v||(s==null?void 0:s.id))){const Y=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:v,sort:b}).toString();Ci("/collections?"+Y)}},[v,b,s,c,d,h,g,i,a,u,y,l,C,S,T,M,O,E,P,I,F,z,Q,ne,G,ee,U]}class qT extends Ee{constructor(e){super(),Oe(this,e,jT,HT,De,{},null,[-1,-1])}}const wl={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",selfHosted:!0},discordAuth:{title:"Discord",icon:"ri-discord-fill"}};function Yp(n,e,t){const i=n.slice();return i[9]=e[t],i}function VT(n){let e;return{c(){e=_("p"),e.textContent="No authorized OAuth2 providers.",p(e,"class","txt-hint txt-center")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function zT(n){let e,t=n[1],i=[];for(let s=0;s<t.length;s+=1)i[s]=Kp(Yp(n,t,s));return{c(){e=_("div");for(let s=0;s<i.length;s+=1)i[s].c();p(e,"class","list")},m(s,l){w(s,e,l);for(let o=0;o<i.length;o+=1)i[o].m(e,null)},p(s,l){if(l&58){t=s[1];let o;for(o=0;o<t.length;o+=1){const r=Yp(s,t,o);i[o]?i[o].p(r,l):(i[o]=Kp(r),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=t.length}},d(s){s&&k(e),Yt(i,s)}}}function BT(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","block txt-center")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Kp(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,h,g,v,b,y;function $(){return n[6](n[9])}return{c(){e=_("div"),t=_("i"),s=D(),l=_("span"),r=N(o),a=D(),u=_("div"),f=N("ID: "),d=N(c),h=D(),g=_("button"),g.innerHTML='<i class="ri-close-line"></i>',v=D(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(g,"type","button"),p(g,"class","btn btn-secondary link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m(C,S){w(C,e,S),m(e,t),m(e,s),m(e,l),m(l,r),m(e,a),m(e,u),m(u,f),m(u,d),m(e,h),m(e,g),m(e,v),b||(y=J(g,"click",$),b=!0)},p(C,S){n=C,S&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),S&2&&o!==(o=n[3](n[9].provider)+"")&&ue(r,o),S&2&&c!==(c=n[9].providerId+"")&&ue(d,c)},d(C){C&&k(e),b=!1,y()}}}function UT(n){let e;function t(l,o){var r;return l[2]?BT:((r=l[0])==null?void 0:r.id)&&l[1].length?zT:VT}let i=t(n),s=i(n);return{c(){s.c(),e=We()},m(l,o){s.m(l,o),w(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:se,o:se,d(l){s.d(l),l&&k(e)}}}function WT(n,e,t){const i=xt();let{user:s}=e,l=[],o=!1;function r(d){var h;return((h=wl[d+"Auth"])==null?void 0:h.title)||B.sentenize(auth.provider,!1)}function a(d){var h;return((h=wl[d+"Auth"])==null?void 0:h.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=awaiLine truncated
<h1>Loading collections...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function HT(n){let e,t,i,s,l,o,r,a,u;const f=[PT,AT,ET],c=[];function d(b,y){return b[8]?0:b[7].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new tu({props:h}),n[22](s);let g={};o=new b4({props:g}),n[23](o);let v={collection:n[2]};return a=new db({props:v}),n[24](a),a.$on("save",n[25]),a.$on("delete",n[26]),{c(){t.c(),i=D(),q(s.$$.fragment),l=D(),q(o.$$.fragment),r=D(),q(a.$$.fragment)},m(b,y){c[e].m(b,y),w(b,i,y),H(s,b,y),w(b,l,y),H(o,b,y),w(b,r,y),H(a,b,y),u=!0},p(b,y){let $=e;e=d(b),e===$?c[e].p(b,y):(Ae(),L(c[$],1,1,()=>{c[$]=null}),Pe(),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 C={};s.$set(C);const S={};o.$set(S);const T={};y[0]&4&&(T.collection=b[2]),a.$set(T)},i(b){u||(A(t),A(s.$$.fragment,b),A(o.$$.fragment,b),A(a.$$.fragment,b),u=!0)},o(b){L(t),L(s.$$.fragment,b),L(o.$$.fragment,b),L(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&k(i),n[22](null),j(s,b),b&&k(l),n[23](null),j(o,b),b&&k(r),n[24](null),j(a,b)}}}function jT(n,e,t){let i,s,l,o,r,a,u;at(n,hi,Y=>t(2,s=Y)),at(n,As,Y=>t(11,l=Y)),at(n,Vo,Y=>t(27,o=Y)),at(n,Nt,Y=>t(28,r=Y)),at(n,da,Y=>t(8,a=Y)),at(n,us,Y=>t(9,u=Y)),nn(Nt,r="Collections",r);const f=new URLSearchParams(o);let c,d,h,g,v=f.get("filter")||"",b=f.get("sort")||"-created",y=f.get("collectionId")||"";function $(){t(10,y=s.id),t(1,b="-created"),t(0,v="")}U$(y);const C=()=>c==null?void 0:c.show(),S=()=>c==null?void 0:c.show(s),T=()=>g==null?void 0:g.load(),M=()=>d==null?void 0:d.show(s),O=()=>h==null?void 0:h.show(),E=Y=>t(0,v=Y.detail);function P(Y){me[Y?"unshift":"push"](()=>{g=Y,t(6,g)})}function I(Y){v=Y,t(0,v)}function F(Y){b=Y,t(1,b)}const V=Y=>h==null?void 0:h.show(Y==null?void 0:Y.detail);function Z(Y){me[Y?"unshift":"push"](()=>{c=Y,t(3,c)})}function te(Y){me[Y?"unshift":"push"](()=>{d=Y,t(4,d)})}function X(Y){me[Y?"unshift":"push"](()=>{h=Y,t(5,h)})}const ee=()=>g==null?void 0:g.load(),U=()=>g==null?void 0:g.load();return n.$$.update=()=>{if(n.$$.dirty[0]&2048&&t(7,i=l.filter(Y=>Y.name!="profiles")),n.$$.dirty[0]&1028&&(s==null?void 0:s.id)&&y!=s.id&&$(),n.$$.dirty[0]&7&&(b||v||(s==null?void 0:s.id))){const Y=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:v,sort:b}).toString();Ci("/collections?"+Y)}},[v,b,s,c,d,h,g,i,a,u,y,l,C,S,T,M,O,E,P,I,F,V,Z,te,X,ee,U]}class qT extends Ee{constructor(e){super(),Oe(this,e,jT,HT,De,{},null,[-1,-1])}}const wl={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",selfHosted:!0},discordAuth:{title:"Discord",icon:"ri-discord-fill"}};function Yp(n,e,t){const i=n.slice();return i[9]=e[t],i}function VT(n){let e;return{c(){e=_("p"),e.textContent="No authorized OAuth2 providers.",p(e,"class","txt-hint txt-center")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function zT(n){let e,t=n[1],i=[];for(let s=0;s<t.length;s+=1)i[s]=Kp(Yp(n,t,s));return{c(){e=_("div");for(let s=0;s<i.length;s+=1)i[s].c();p(e,"class","list")},m(s,l){w(s,e,l);for(let o=0;o<i.length;o+=1)i[o].m(e,null)},p(s,l){if(l&58){t=s[1];let o;for(o=0;o<t.length;o+=1){const r=Yp(s,t,o);i[o]?i[o].p(r,l):(i[o]=Kp(r),i[o].c(),i[o].m(e,null))}for(;o<i.length;o+=1)i[o].d(1);i.length=t.length}},d(s){s&&k(e),Yt(i,s)}}}function BT(n){let e;return{c(){e=_("div"),e.innerHTML='<span class="loader"></span>',p(e,"class","block txt-center")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Kp(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,h,g,v,b,y;function $(){return n[6](n[9])}return{c(){e=_("div"),t=_("i"),s=D(),l=_("span"),r=N(o),a=D(),u=_("div"),f=N("ID: "),d=N(c),h=D(),g=_("button"),g.innerHTML='<i class="ri-close-line"></i>',v=D(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(g,"type","button"),p(g,"class","btn btn-secondary link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m(C,S){w(C,e,S),m(e,t),m(e,s),m(e,l),m(l,r),m(e,a),m(e,u),m(u,f),m(u,d),m(e,h),m(e,g),m(e,v),b||(y=J(g,"click",$),b=!0)},p(C,S){n=C,S&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),S&2&&o!==(o=n[3](n[9].provider)+"")&&ue(r,o),S&2&&c!==(c=n[9].providerId+"")&&ue(d,c)},d(C){C&&k(e),b=!1,y()}}}function UT(n){let e;function t(l,o){var r;return l[2]?BT:((r=l[0])==null?void 0:r.id)&&l[1].length?zT:VT}let i=t(n),s=i(n);return{c(){s.c(),e=We()},m(l,o){s.m(l,o),w(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:se,o:se,d(l){s.d(l),l&&k(e)}}}function WT(n,e,t){const i=xt();let{user:s}=e,l=[],o=!1;function r(d){var h;return((h=wl[d+"Auth"])==null?void 0:h.title)||B.sentenize(auth.provider,!1)}function a(d){var h;return((h=wl[d+"Auth"])==null?void 0:h.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=awaiLine truncated
<span class="txt">Send verification email</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function eD(n){let e,t,i,s,l=!n[1].verified&&n[1].email&&nh(n);return{c(){l&&l.c(),e=D(),t=_("button"),t.innerHTML=`<i class="ri-delete-bin-7-line"></i>
<span class="txt">Delete</span>`,p(t,"type","button"),p(t,"class","dropdown-item")},m(o,r){l&&l.m(o,r),w(o,e,r),w(o,t,r),i||(s=J(t,"click",n[19]),i=!0)},p(o,r){!o[1].verified&&o[1].email?l?l.p(o,r):(l=nh(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},d(o){l&&l.d(o),o&&k(e),o&&k(t),i=!1,s()}}}function tD(n){let e,t=n[1].isNew?"New user":"Edit user",i,s,l,o,r=!n[1].isNew&&th(n);return{c(){e=_("h4"),i=N(t),s=D(),r&&r.c(),l=We()},m(a,u){w(a,e,u),m(e,i),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){(!o||u[0]&2)&&t!==(t=a[1].isNew?"New user":"Edit user")&&ue(i,t),a[1].isNew?r&&(Ae(),L(r,1,1,()=>{r=null}),Pe()):r?(r.p(a,u),u[0]&2&&A(r,1)):(r=th(a),r.c(),A(r,1),r.m(l.parentNode,l))},i(a){o||(A(r),o=!0)},o(a){L(r),o=!1},d(a){a&&k(e),a&&k(s),r&&r.d(a),a&&k(l)}}}function ih(n){let e,t,i=n[1].isNew?"Create":"Save changes",s,l;return{c(){e=_("button"),t=_("span"),s=N(i),p(t,"class","txt"),p(e,"type","submit"),p(e,"form",n[12]),p(e,"class","btn btn-expanded"),e.disabled=l=!n[11]||n[5],te(e,"btn-loading",n[5])},m(o,r){w(o,e,r),m(e,t),m(t,s)},p(o,r){r[0]&2&&i!==(i=o[1].isNew?"Create":"Save changes")&&ue(s,i),r[0]&2080&&l!==(l=!o[11]||o[5])&&(e.disabled=l),r[0]&32&&te(e,"btn-loading",o[5])},d(o){o&&k(e)}}}function nD(n){let e,t,i,s,l,o,r=n[10]===wi&&ih(n);return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=D(),r&&r.c(),s=We(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[5]},m(a,u){w(a,e,u),m(e,t),w(a,i,u),r&&r.m(a,u),w(a,s,u),l||(o=J(e,"click",n[17]),l=!0)},p(a,u){u[0]&32&&(e.disabled=a[5]),a[10]===wi?r?r.p(a,u):(r=ih(a),r.c(),r.m(s.parentNode,s)):r&&(r.d(1),r=null)},d(a){a&&k(e),a&&k(i),r&&r.d(a),a&&k(s),l=!1,o()}}}function iD(n){let e,t,i={class:"user-panel",popup:n[1].isNew,beforeHide:n[27],$$slots:{footer:[nD],header:[tD],default:[xT]},$$scope:{ctx:n}};return e=new ui({props:i}),n[28](e),e.$on("hide",n[29]),e.$on("show",n[30]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&2&&(o.popup=s[1].isNew),l[0]&2112&&(o.beforeHide=s[27]),l[0]&4014|l[1]&16&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[28](null),j(e,s)}}}const wi="account",Ps="providers";function sD(n,e,t){let i;const s=xt(),l="user_"+B.randomString(5);let o,r=new Ms,a=!1,u=!1,f="",c="",d="",h=!1,g=!0,v=wi;function b(x){return $(x),t(6,u=!0),t(10,v=r.isNew||r.email?wi:Ps),o==null?void 0:o.show()}function y(){return o==null?void 0:o.hide()}function $(x){ri({}),t(1,r=x!=null&&x.clone?x.clone():new Ms),C()}function C(){t(3,h=!1),t(9,g=!0),t(2,f=(r==null?void 0:r.email)||""),t(7,c=""),t(8,d="")}function S(){if(a||!i)return;t(5,a=!0);const x={email:f};(r.isNew||h)&&(x.password=c,x.passwordConfirm=d);let oe;r.isNew?oe=ye.users.create(x):oe=ye.users.update(r.id,x),oe.then(async Ce=>{t(1,r=Ce),g&&M(!1),t(6,u=!1),y(),sn(r.isNew?"Successfully created user.":"Successfully updated user."),s("save",Ce)}).catch(Ce=>{ye.errorResponseHandler(Ce)}).finally(()=>{t(5,a=!1)})}function T(){!(r!=null&&r.id)||si("Do you really want to delete the selected user?",()=>ye.users.delete(r.id).then(()=>{t(6,u=!1),y(),sn("Successfully deleted user."),s("delete",r)}).catch(x=>{ye.errorResponseHandler(x)}))}function M(x=!0){return ye.users.requestVerification(r.email||f).then(()=>{t(6,u=!1),y(),x&&sn(`Successfully sent verification email to ${r.email}.`)}).catch(oe=>{ye.errorResponseHandler(oe)})}const O=()=>y(),E=()=>M(),P=()=>T(),I=()=>t(10,v=wi),F=()=>t(10,v=Ps);function z(){f=this.value,t(2,f)}function Q(){h=this.checked,t(3,h)}function ne(){c=this.value,t(7,c)}function G(){d=this.value,t(8,d)}function ee(){g=this.checked,t(9,g)}const U=()=>i&&u?(si("You have unsaved changes. Do you really want to close the panel?",()=>{t(6,u=!1),y()}),!1):!0;function Y(x){me[x?"unshift":"push"](()=>{o=x,t(4,o)})}function Z(x){tt.call(this,n,x)}function de(x){tt.call(this,n,x)}return n.$$.update=()=>{n.$$.dirty[0]&14&&t(11,i=r.isNew&&f!=""||h||f!==r.email)},[y,r,f,h,o,a,u,c,d,g,v,i,l,S,T,M,b,O,E,P,I,F,z,Q,ne,G,ee,U,Y,Z,de]}class lD extends Ee{constructor(e){super(),Oe(this,e,sD,iD,De,{show:16,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[16]}get hide(){return this.$$.ctx[0]}}function sh(n,e,t){const i=n.slice();return i[41]=e[t],i}function lh(n,e,t){const i=n.slice();return i[44]=e[t],i}function oh(n,e,t){const i=n.slice();return i[44]=e[t],i}function oD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O,E,P=[],I=new Map,F,z,Q,ne,G,ee,U,Y,Z,de,x=[],oe=new Map,Ce,Te,K,we,ae,W,_e=!n[15]&&rh(n);r=new Go({}),r.$on("refresh",n[18]),h=new Zo({props:{value:n[3],placeholder:"Search filter, eg. verified=1",extraAutocompleteKeys:["verified","email"]}}),h.$on("submit",n[20]);function He(be){n[21](be)}let Ue={class:"col-type-text col-field-id",name:"id",$$slots:{default:[aD]},$$scope:{ctx:n}};n[4]!==void 0&&(Ue.sort=n[4]),C=new an({props:Ue}),me.push(()=>Re(C,"sort",He));function X(be){n[22](be)}let ge={class:"col-type-email col-field-email",name:"email"Line truncated
<span class="txt">New user</span>`,d=D(),q(h.$$.fragment),g=D(),v=_("div"),b=_("table"),y=_("thead"),$=_("tr"),q(C.$$.fragment),T=D(),q(M.$$.fragment),E=D();for(let be=0;be<P.length;be+=1)P[be].c();F=D(),q(z.$$.fragment),ne=D(),q(G.$$.fragment),U=D(),Y=_("th"),Z=D(),de=_("tbody");for(let be=0;be<x.length;be+=1)x[be].c();Xe&&Xe.c(),Ce=D(),it&&it.c(),Te=D(),ft&&ft.c(),K=We(),p(i,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(e,"class","page-header"),p(Y,"class","col-type-action min-width"),p(b,"class","table"),te(b,"table-loading",n[10]),p(v,"class","table-wrapper")},m(be,Fe){w(be,e,Fe),m(e,t),m(t,i),m(i,s),m(e,l),_e&&_e.m(e,null),m(e,o),H(r,e,null),m(e,a),m(e,u),m(e,f),m(e,c),w(be,d,Fe),H(h,be,Fe),w(be,g,Fe),w(be,v,Fe),m(v,b),m(b,y),m(y,$),H(C,$,null),m($,T),H(M,$,null),m($,E);for(let dt=0;dt<P.length;dt+=1)P[dt].m($,null);m($,F),H(z,$,null),m($,ne),H(G,$,null),m($,U),m($,Y),m(b,Z),m(b,de);for(let dt=0;dt<x.length;dt+=1)x[dt].m(de,null);Xe&&Xe.m(de,null),w(be,Ce,Fe),it&&it.m(be,Fe),w(be,Te,Fe),ft&&ft.m(be,Fe),w(be,K,Fe),we=!0,ae||(W=J(c,"click",n[19]),ae=!0)},p(be,Fe){(!we||Fe[0]&16384)&&ue(s,be[14]),be[15]?_e&&(_e.d(1),_e=null):_e?_e.p(be,Fe):(_e=rh(be),_e.c(),_e.m(e,o));const dt={};Fe[0]&8&&(dt.value=be[3]),h.$set(dt);const Dt={};Fe[1]&262144&&(Dt.$$scope={dirty:Fe,ctx:be}),!S&&Fe[0]&16&&(S=!0,Dt.sort=be[4],je(()=>S=!1)),C.$set(Dt);const pt={};Fe[1]&262144&&(pt.$$scope={dirty:Fe,ctx:be}),!O&&Fe[0]&16&&(O=!0,pt.sort=be[4],je(()=>O=!1)),M.$set(pt),Fe[0]&4096&&(ce=be[12],P=_t(P,Fe,ke,1,be,ce,I,$,bn,ah,F,oh));const lt={};Fe[1]&262144&&(lt.$$scope={dirty:Fe,ctx:be}),!Q&&Fe[0]&16&&(Q=!0,lt.sort=be[4],je(()=>Q=!1)),z.$set(lt);const Lt={};Fe[1]&262144&&(Lt.$$scope={dirty:Fe,ctx:be}),!ee&&Fe[0]&16&&(ee=!0,Lt.sort=be[4],je(()=>ee=!1)),G.$set(Lt),Fe[0]&5450&&(Me=be[1],Ae(),x=_t(x,Fe,ze,1,be,Me,oe,de,Gt,ph,null,sh),Pe(),!Me.length&&Xe?Xe.p(be,Fe):Me.length?Xe&&(Xe.d(1),Xe=null):(Xe=uh(be),Xe.c(),Xe.m(de,null))),Fe[0]&1024&&te(b,"table-loading",be[10]),be[1].length?it?it.p(be,Fe):(it=hh(be),it.c(),it.m(Te.parentNode,Te)):it&&(it.d(1),it=null),be[1].length&&be[13]?ft?ft.p(be,Fe):(ft=mh(be),ft.c(),ft.m(K.parentNode,K)):ft&&(ft.d(1),ft=null)},i(be){if(!we){A(r.$$.fragment,be),A(h.$$.fragment,be),A(C.$$.fragment,be),A(M.$$.fragment,be),A(z.$$.fragment,be),A(G.$$.fragment,be);for(let Fe=0;Fe<Me.length;Fe+=1)A(x[Fe]);we=!0}},o(be){L(r.$$.fragment,be),L(h.$$.fragment,be),L(C.$$.fragment,be),L(M.$$.fragment,be),L(z.$$.fragment,be),L(G.$$.fragment,be);for(let Fe=0;Fe<x.length;Fe+=1)L(x[Fe]);we=!1},d(be){be&&k(e),_e&&_e.d(),j(r),be&&k(d),j(h,be),be&&k(g),be&&k(v),j(C),j(M);for(let Fe=0;Fe<P.length;Fe+=1)P[Fe].d();j(z),j(G);for(let Fe=0;Fe<x.length;Fe+=1)x[Fe].d();Xe&&Xe.d(),be&&k(Ce),it&&it.d(be),be&&k(Te),ft&&ft.d(be),be&&k(K),ae=!1,W()}}}function rD(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
<span class="txt">Delete</span>`,p(t,"type","button"),p(t,"class","dropdown-item")},m(o,r){l&&l.m(o,r),w(o,e,r),w(o,t,r),i||(s=J(t,"click",n[19]),i=!0)},p(o,r){!o[1].verified&&o[1].email?l?l.p(o,r):(l=nh(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},d(o){l&&l.d(o),o&&k(e),o&&k(t),i=!1,s()}}}function tD(n){let e,t=n[1].isNew?"New user":"Edit user",i,s,l,o,r=!n[1].isNew&&th(n);return{c(){e=_("h4"),i=N(t),s=D(),r&&r.c(),l=We()},m(a,u){w(a,e,u),m(e,i),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){(!o||u[0]&2)&&t!==(t=a[1].isNew?"New user":"Edit user")&&ue(i,t),a[1].isNew?r&&(Ae(),L(r,1,1,()=>{r=null}),Pe()):r?(r.p(a,u),u[0]&2&&A(r,1)):(r=th(a),r.c(),A(r,1),r.m(l.parentNode,l))},i(a){o||(A(r),o=!0)},o(a){L(r),o=!1},d(a){a&&k(e),a&&k(s),r&&r.d(a),a&&k(l)}}}function ih(n){let e,t,i=n[1].isNew?"Create":"Save changes",s,l;return{c(){e=_("button"),t=_("span"),s=N(i),p(t,"class","txt"),p(e,"type","submit"),p(e,"form",n[12]),p(e,"class","btn btn-expanded"),e.disabled=l=!n[11]||n[5],ne(e,"btn-loading",n[5])},m(o,r){w(o,e,r),m(e,t),m(t,s)},p(o,r){r[0]&2&&i!==(i=o[1].isNew?"Create":"Save changes")&&ue(s,i),r[0]&2080&&l!==(l=!o[11]||o[5])&&(e.disabled=l),r[0]&32&&ne(e,"btn-loading",o[5])},d(o){o&&k(e)}}}function nD(n){let e,t,i,s,l,o,r=n[10]===wi&&ih(n);return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=D(),r&&r.c(),s=We(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[5]},m(a,u){w(a,e,u),m(e,t),w(a,i,u),r&&r.m(a,u),w(a,s,u),l||(o=J(e,"click",n[17]),l=!0)},p(a,u){u[0]&32&&(e.disabled=a[5]),a[10]===wi?r?r.p(a,u):(r=ih(a),r.c(),r.m(s.parentNode,s)):r&&(r.d(1),r=null)},d(a){a&&k(e),a&&k(i),r&&r.d(a),a&&k(s),l=!1,o()}}}function iD(n){let e,t,i={class:"user-panel",popup:n[1].isNew,beforeHide:n[27],$$slots:{footer:[nD],header:[tD],default:[xT]},$$scope:{ctx:n}};return e=new ui({props:i}),n[28](e),e.$on("hide",n[29]),e.$on("show",n[30]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&2&&(o.popup=s[1].isNew),l[0]&2112&&(o.beforeHide=s[27]),l[0]&4014|l[1]&16&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[28](null),j(e,s)}}}const wi="account",Ps="providers";function sD(n,e,t){let i;const s=xt(),l="user_"+B.randomString(5);let o,r=new Ms,a=!1,u=!1,f="",c="",d="",h=!1,g=!0,v=wi;function b(x){return $(x),t(6,u=!0),t(10,v=r.isNew||r.email?wi:Ps),o==null?void 0:o.show()}function y(){return o==null?void 0:o.hide()}function $(x){ri({}),t(1,r=x!=null&&x.clone?x.clone():new Ms),C()}function C(){t(3,h=!1),t(9,g=!0),t(2,f=(r==null?void 0:r.email)||""),t(7,c=""),t(8,d="")}function S(){if(a||!i)return;t(5,a=!0);const x={email:f};(r.isNew||h)&&(x.password=c,x.passwordConfirm=d);let oe;r.isNew?oe=ye.users.create(x):oe=ye.users.update(r.id,x),oe.then(async Ce=>{t(1,r=Ce),g&&M(!1),t(6,u=!1),y(),sn(r.isNew?"Successfully created user.":"Successfully updated user."),s("save",Ce)}).catch(Ce=>{ye.errorResponseHandler(Ce)}).finally(()=>{t(5,a=!1)})}function T(){!(r!=null&&r.id)||si("Do you really want to delete the selected user?",()=>ye.users.delete(r.id).then(()=>{t(6,u=!1),y(),sn("Successfully deleted user."),s("delete",r)}).catch(x=>{ye.errorResponseHandler(x)}))}function M(x=!0){return ye.users.requestVerification(r.email||f).then(()=>{t(6,u=!1),y(),x&&sn(`Successfully sent verification email to ${r.email}.`)}).catch(oe=>{ye.errorResponseHandler(oe)})}const O=()=>y(),E=()=>M(),P=()=>T(),I=()=>t(10,v=wi),F=()=>t(10,v=Ps);function V(){f=this.value,t(2,f)}function Z(){h=this.checked,t(3,h)}function te(){c=this.value,t(7,c)}function X(){d=this.value,t(8,d)}function ee(){g=this.checked,t(9,g)}const U=()=>i&&u?(si("You have unsaved changes. Do you really want to close the panel?",()=>{t(6,u=!1),y()}),!1):!0;function Y(x){me[x?"unshift":"push"](()=>{o=x,t(4,o)})}function G(x){tt.call(this,n,x)}function de(x){tt.call(this,n,x)}return n.$$.update=()=>{n.$$.dirty[0]&14&&t(11,i=r.isNew&&f!=""||h||f!==r.email)},[y,r,f,h,o,a,u,c,d,g,v,i,l,S,T,M,b,O,E,P,I,F,V,Z,te,X,ee,U,Y,G,de]}class lD extends Ee{constructor(e){super(),Oe(this,e,sD,iD,De,{show:16,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[16]}get hide(){return this.$$.ctx[0]}}function sh(n,e,t){const i=n.slice();return i[41]=e[t],i}function lh(n,e,t){const i=n.slice();return i[44]=e[t],i}function oh(n,e,t){const i=n.slice();return i[44]=e[t],i}function oD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O,E,P=[],I=new Map,F,V,Z,te,X,ee,U,Y,G,de,x=[],oe=new Map,Ce,Te,K,ke,ae,W,_e=!n[15]&&rh(n);r=new Go({}),r.$on("refresh",n[18]),h=new Zo({props:{value:n[3],placeholder:"Search filter, eg. verified=1",extraAutocompleteKeys:["verified","email"]}}),h.$on("submit",n[20]);function He(be){n[21](be)}let Ue={class:"col-type-text col-field-id",name:"id",$$slots:{default:[aD]},$$scope:{ctx:n}};n[4]!==void 0&&(Ue.sort=n[4]),C=new an({props:Ue}),me.push(()=>Re(C,"sort",He));function Q(be){n[22](be)}let ge={class:"col-type-email col-field-email",name:"email"Line truncated
<span class="txt">New user</span>`,d=D(),q(h.$$.fragment),g=D(),v=_("div"),b=_("table"),y=_("thead"),$=_("tr"),q(C.$$.fragment),T=D(),q(M.$$.fragment),E=D();for(let be=0;be<P.length;be+=1)P[be].c();F=D(),q(V.$$.fragment),te=D(),q(X.$$.fragment),U=D(),Y=_("th"),G=D(),de=_("tbody");for(let be=0;be<x.length;be+=1)x[be].c();Xe&&Xe.c(),Ce=D(),it&&it.c(),Te=D(),ct&&ct.c(),K=We(),p(i,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(e,"class","page-header"),p(Y,"class","col-type-action min-width"),p(b,"class","table"),ne(b,"table-loading",n[10]),p(v,"class","table-wrapper")},m(be,Fe){w(be,e,Fe),m(e,t),m(t,i),m(i,s),m(e,l),_e&&_e.m(e,null),m(e,o),H(r,e,null),m(e,a),m(e,u),m(e,f),m(e,c),w(be,d,Fe),H(h,be,Fe),w(be,g,Fe),w(be,v,Fe),m(v,b),m(b,y),m(y,$),H(C,$,null),m($,T),H(M,$,null),m($,E);for(let dt=0;dt<P.length;dt+=1)P[dt].m($,null);m($,F),H(V,$,null),m($,te),H(X,$,null),m($,U),m($,Y),m(b,G),m(b,de);for(let dt=0;dt<x.length;dt+=1)x[dt].m(de,null);Xe&&Xe.m(de,null),w(be,Ce,Fe),it&&it.m(be,Fe),w(be,Te,Fe),ct&&ct.m(be,Fe),w(be,K,Fe),ke=!0,ae||(W=J(c,"click",n[19]),ae=!0)},p(be,Fe){(!ke||Fe[0]&16384)&&ue(s,be[14]),be[15]?_e&&(_e.d(1),_e=null):_e?_e.p(be,Fe):(_e=rh(be),_e.c(),_e.m(e,o));const dt={};Fe[0]&8&&(dt.value=be[3]),h.$set(dt);const Dt={};Fe[1]&262144&&(Dt.$$scope={dirty:Fe,ctx:be}),!S&&Fe[0]&16&&(S=!0,Dt.sort=be[4],je(()=>S=!1)),C.$set(Dt);const pt={};Fe[1]&262144&&(pt.$$scope={dirty:Fe,ctx:be}),!O&&Fe[0]&16&&(O=!0,pt.sort=be[4],je(()=>O=!1)),M.$set(pt),Fe[0]&4096&&(ce=be[12],P=_t(P,Fe,we,1,be,ce,I,$,bn,ah,F,oh));const lt={};Fe[1]&262144&&(lt.$$scope={dirty:Fe,ctx:be}),!Z&&Fe[0]&16&&(Z=!0,lt.sort=be[4],je(()=>Z=!1)),V.$set(lt);const Lt={};Fe[1]&262144&&(Lt.$$scope={dirty:Fe,ctx:be}),!ee&&Fe[0]&16&&(ee=!0,Lt.sort=be[4],je(()=>ee=!1)),X.$set(Lt),Fe[0]&5450&&(Me=be[1],Ae(),x=_t(x,Fe,ze,1,be,Me,oe,de,Gt,ph,null,sh),Pe(),!Me.length&&Xe?Xe.p(be,Fe):Me.length?Xe&&(Xe.d(1),Xe=null):(Xe=uh(be),Xe.c(),Xe.m(de,null))),(!ke||Fe[0]&1024)&&ne(b,"table-loading",be[10]),be[1].length?it?it.p(be,Fe):(it=hh(be),it.c(),it.m(Te.parentNode,Te)):it&&(it.d(1),it=null),be[1].length&&be[13]?ct?ct.p(be,Fe):(ct=mh(be),ct.c(),ct.m(K.parentNode,K)):ct&&(ct.d(1),ct=null)},i(be){if(!ke){A(r.$$.fragment,be),A(h.$$.fragment,be),A(C.$$.fragment,be),A(M.$$.fragment,be),A(V.$$.fragment,be),A(X.$$.fragment,be);for(let Fe=0;Fe<Me.length;Fe+=1)A(x[Fe]);ke=!0}},o(be){L(r.$$.fragment,be),L(h.$$.fragment,be),L(C.$$.fragment,be),L(M.$$.fragment,be),L(V.$$.fragment,be),L(X.$$.fragment,be);for(let Fe=0;Fe<x.length;Fe+=1)L(x[Fe]);ke=!1},d(be){be&&k(e),_e&&_e.d(),j(r),be&&k(d),j(h,be),be&&k(g),be&&k(v),j(C),j(M);for(let Fe=0;Fe<P.length;Fe+=1)P[Fe].d();j(V),j(X);for(let Fe=0;Fe<x.length;Fe+=1)x[Fe].d();Xe&&Xe.d(),be&&k(Ce),it&&it.d(be),be&&k(Te),ct&&ct.d(be),be&&k(K),ae=!1,W()}}}function rD(n){let e;return{c(){e=_("div"),e.innerHTML=`<span class="loader loader-lg"></span>
<h1>Loading users...</h1>`,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:se,i:se,o:se,d(t){t&&k(e)}}}function rh(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<i class="ri-settings-4-line"></i>',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle")},m(s,l){w(s,e,l),t||(i=[Ye(gt.call(null,e,{text:"Edit profile collection",position:"right"})),J(e,"click",n[17])],t=!0)},p:se,d(s){s&&k(e),t=!1,Je(i)}}}function aD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function uD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function ah(n,e){let t,i,s,l,o,r,a,u=e[44].name+"",f,c,d;return{key:n,first:null,c(){t=_("th"),i=_("div"),s=_("i"),o=D(),r=_("span"),a=N("profile."),f=N(u),p(s,"class",l=B.getFieldTypeIcon(e[44].type)),p(r,"class","txt"),p(i,"class","col-header-content"),p(t,"class",c="col-type-"+e[44].type+" col-field-"+e[44].name),p(t,"name",d=e[44].name),this.first=t},m(h,g){w(h,t,g),m(t,i),m(i,s),m(i,o),m(i,r),m(r,a),m(r,f)},p(h,g){e=h,g[0]&4096&&l!==(l=B.getFieldTypeIcon(e[44].type))&&p(s,"class",l),g[0]&4096&&u!==(u=e[44].name+"")&&ue(f,u),g[0]&4096&&c!==(c="col-type-"+e[44].type+" col-field-"+e[44].name)&&p(t,"class",c),g[0]&4096&&d!==(d=e[44].name)&&p(t,"name",d)},d(h){h&&k(t)}}}function fD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function cD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function uh(n){let e;function t(l,o){return l[10]?pD:dD}let i=t(n),s=i(n);return{c(){s.c(),e=We()},m(l,o){s.m(l,o),w(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&&k(e)}}}function dD(n){var r;let e,t,i,s,l,o=((r=n[3])==null?void 0:r.length)&&fh(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No users found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),m(e,t),m(t,i),m(t,s),o&&o.m(t,null),m(e,l)},p(a,u){var f;(f=a[3])!=null&&f.length?o?o.p(a,u):(o=fh(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function pD(n){let e;return{c(){e=_("tr"),e.innerHTML=`<td colspan="99" class="p-xs"><span class="skeleton-loader"></span></td>
`},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function fh(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[27]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function hD(n){let e,t,i,s=n[41].verified&&ch();return{c(){e=_("div"),e.textContent="N/A",t=D(),s&&s.c(),i=We(),p(e,"class","txt-hint")},m(l,o){w(l,e,o),w(l,t,o),s&&s.m(l,o),w(l,i,o)},p(l,o){l[41].verified?s||(s=ch(),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(l){l&&k(e),l&&k(t),s&&s.d(l),l&&k(i)}}}function mD(n){let e,t=n[41].email+"",i,s,l,o,r=n[41].verified?"Verified":"Unverified",a;return{c(){e=_("span"),i=N(t),l=D(),o=_("span"),a=N(r),p(e,"class","txt"),p(e,"title",s=n[41].email),p(o,"class","label"),te(o,"label-success",n[41].verified),te(o,"label-warning",!n[41].verified)},m(u,f){w(u,e,f),m(e,i),w(u,l,f),w(u,o,f),m(o,a)},p(u,f){f[0]&2&&t!==(t=u[41].email+"")&&ue(i,t),f[0]&2&&s!==(s=u[41].email)&&p(e,"title",s),f[0]&2&&r!==(r=u[41].verified?"Verified":"Unverified")&&ue(a,r),f[0]&2&&te(o,"label-success",u[41].verified),f[0]&2&&te(o,"label-warning",!u[41].verified)},d(u){u&&k(e),u&&k(l),u&&k(o)}}}function ch(n){let e;return{c(){e=_("span"),e.textContent="OAuth2 verified",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dh(n,e){let t,i,s;return i=new pb({props:{field:e[44],record:e[41].profile||{}}}),{key:n,first:null,c(){t=We(),q(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),H(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&4096&&(r.field=e[44]),o[0]&2&&(r.record=e[41].profile||{}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(t),j(i,l)}}}function ph(n,e){let t,i,s,l,o,r,a,u=[],f=new Map,c,d,h,g,v,b,y,$,C,S,T,M,O,E,P;s=new sr({props:{id:e[41].id}});function I(U,Y){return U[41].email?mD:hD}let F=I(e),z=F(e),Q=e[12];const ne=U=>U[44].name;for(let U=0;U<Q.length;U+=1){let Y=lh(e,Q,U),Z=ne(Y);f.set(Z,u[U]=dh(Z,Y))}h=new Si({props:{date:e[41].created}}),b=new Si({props:{date:e[41].updated}});function G(){return e[25](e[41])}function ee(){return e[26](e[41])}return{key:n,first:null,c(){t=_("tr"),i=_("td"),q(s.$$.fragment),l=D(),o=_("td"),r=_("div"),z.c(),a=D();for(let U=0;U<u.length;U+=1)u[U].c();c=D(),d=_("td"),q(h.$$.fragment),g=D(),v=_("td"),q(b.$$.fragment),y=D(),$=_("td"),C=_("button"),C.innerHTML=`<i class="ri-user-settings-line"></i>
`},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function fh(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[27]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function hD(n){let e,t,i,s=n[41].verified&&ch();return{c(){e=_("div"),e.textContent="N/A",t=D(),s&&s.c(),i=We(),p(e,"class","txt-hint")},m(l,o){w(l,e,o),w(l,t,o),s&&s.m(l,o),w(l,i,o)},p(l,o){l[41].verified?s||(s=ch(),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(l){l&&k(e),l&&k(t),s&&s.d(l),l&&k(i)}}}function mD(n){let e,t=n[41].email+"",i,s,l,o,r=n[41].verified?"Verified":"Unverified",a;return{c(){e=_("span"),i=N(t),l=D(),o=_("span"),a=N(r),p(e,"class","txt"),p(e,"title",s=n[41].email),p(o,"class","label"),ne(o,"label-success",n[41].verified),ne(o,"label-warning",!n[41].verified)},m(u,f){w(u,e,f),m(e,i),w(u,l,f),w(u,o,f),m(o,a)},p(u,f){f[0]&2&&t!==(t=u[41].email+"")&&ue(i,t),f[0]&2&&s!==(s=u[41].email)&&p(e,"title",s),f[0]&2&&r!==(r=u[41].verified?"Verified":"Unverified")&&ue(a,r),f[0]&2&&ne(o,"label-success",u[41].verified),f[0]&2&&ne(o,"label-warning",!u[41].verified)},d(u){u&&k(e),u&&k(l),u&&k(o)}}}function ch(n){let e;return{c(){e=_("span"),e.textContent="OAuth2 verified",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dh(n,e){let t,i,s;return i=new pb({props:{field:e[44],record:e[41].profile||{}}}),{key:n,first:null,c(){t=We(),q(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),H(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&4096&&(r.field=e[44]),o[0]&2&&(r.record=e[41].profile||{}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&k(t),j(i,l)}}}function ph(n,e){let t,i,s,l,o,r,a,u=[],f=new Map,c,d,h,g,v,b,y,$,C,S,T,M,O,E,P;s=new sr({props:{id:e[41].id}});function I(U,Y){return U[41].email?mD:hD}let F=I(e),V=F(e),Z=e[12];const te=U=>U[44].name;for(let U=0;U<Z.length;U+=1){let Y=lh(e,Z,U),G=te(Y);f.set(G,u[U]=dh(G,Y))}h=new Si({props:{date:e[41].created}}),b=new Si({props:{date:e[41].updated}});function X(){return e[25](e[41])}function ee(){return e[26](e[41])}return{key:n,first:null,c(){t=_("tr"),i=_("td"),q(s.$$.fragment),l=D(),o=_("td"),r=_("div"),V.c(),a=D();for(let U=0;U<u.length;U+=1)u[U].c();c=D(),d=_("td"),q(h.$$.fragment),g=D(),v=_("td"),q(b.$$.fragment),y=D(),$=_("td"),C=_("button"),C.innerHTML=`<i class="ri-user-settings-line"></i>
<span class="txt">Edit user</span>`,S=D(),T=_("button"),T.innerHTML=`<i class="ri-profile-line"></i>
<span class="txt">Edit profile</span>`,M=D(),p(i,"class","col-type-text col-field-id"),p(r,"class","inline-flex"),p(o,"class","col-type-email col-field-email"),p(d,"class","col-type-date col-field-created"),p(v,"class","col-type-date col-field-updated"),p(C,"type","button"),p(C,"class","btn btn-sm btn-outline"),p(T,"type","button"),p(T,"class","btn btn-sm m-l-10"),p($,"class","col-type-action min-width"),this.first=t},m(U,Y){w(U,t,Y),m(t,i),H(s,i,null),m(t,l),m(t,o),m(o,r),z.m(r,null),m(t,a);for(let Z=0;Z<u.length;Z+=1)u[Z].m(t,null);m(t,c),m(t,d),H(h,d,null),m(t,g),m(t,v),H(b,v,null),m(t,y),m(t,$),m($,C),m($,S),m($,T),m(t,M),O=!0,E||(P=[J(C,"click",ni(G)),J(T,"click",ni(ee))],E=!0)},p(U,Y){e=U;const Z={};Y[0]&2&&(Z.id=e[41].id),s.$set(Z),F===(F=I(e))&&z?z.p(e,Y):(z.d(1),z=F(e),z&&(z.c(),z.m(r,null))),Y[0]&4098&&(Q=e[12],Ae(),u=_t(u,Y,ne,1,e,Q,f,t,Gt,dh,c,lh),Pe());const de={};Y[0]&2&&(de.date=e[41].created),h.$set(de);const x={};Y[0]&2&&(x.date=e[41].updated),b.$set(x)},i(U){if(!O){A(s.$$.fragment,U);for(let Y=0;Y<Q.length;Y+=1)A(u[Y]);A(h.$$.fragment,U),A(b.$$.fragment,U),O=!0}},o(U){L(s.$$.fragment,U);for(let Y=0;Y<u.length;Y+=1)L(u[Y]);L(h.$$.fragment,U),L(b.$$.fragment,U),O=!1},d(U){U&&k(t),j(s),z.d();for(let Y=0;Y<u.length;Y+=1)u[Y].d();j(h),j(b),E=!1,Je(P)}}}function hh(n){let e,t,i=n[1].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[2]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a[0]&2&&i!==(i=r[1].length+"")&&ue(s,i),a[0]&4&&ue(o,r[2])},d(r){r&&k(e)}}}function mh(n){let e,t,i,s,l=n[2]-n[1].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),te(t,"btn-loading",n[10]),te(t,"btn-disabled",n[10]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=J(t,"click",n[28]),a=!0)},p(f,c){c[0]&6&&l!==(l=f[2]-f[1].length+"")&&ue(o,l),c[0]&1024&&te(t,"btn-loading",f[10]),c[0]&1024&&te(t,"btn-disabled",f[10])},d(f){f&&k(e),a=!1,u()}}}function gD(n){let e,t,i,s;const l=[rD,oD],o=[];function r(a,u){return a[11]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=We()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(Ae(),L(o[f],1,1,()=>{o[f]=null}),Pe(),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){L(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function _D(n){let e,t,i,s,l,o,r,a;e=new On({props:{$$slots:{default:[gD]},$$scope:{ctx:n}}});let u={};i=new lD({props:u}),n[29](i),i.$on("save",n[30]),i.$on("delete",n[31]);let f={};l=new tu({props:f}),n[32](l),l.$on("save",n[33]);let c={collection:n[5]};return r=new db({props:c}),n[34](r),r.$on("save",n[35]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment),o=D(),q(r.$$.fragment)},m(d,h){H(e,d,h),w(d,t,h),H(i,d,h),w(d,s,h),H(l,d,h),w(d,o,h),H(r,d,h),a=!0},p(d,h){const g={};h[0]&65534|h[1]&262144&&(g.$$scope={dirty:h,ctx:d}),e.$set(g);const v={};i.$set(v);const b={};l.$set(b);const y={};h[0]&32&&(y.collection=d[5]),r.$set(y)},i(d){a||(A(e.$$.fragment,d),A(i.$$.fragment,d),A(l.$$.fragment,d),A(r.$$.fragment,d),a=!0)},o(d){L(e.$$.fragment,d),L(i.$$.fragment,d),L(l.$$.fragment,d),L(r.$$.fragment,d),a=!1},d(d){j(e,d),d&&k(t),n[29](null),j(i,d),d&&k(s),n[32](null),j(l,d),d&&k(o),n[34](null),j(r,d)}}}function bD(n,e,t){let i,s,l,o,r;at(n,Vo,W=>t(36,l=W)),at(n,Nt,W=>t(14,o=W)),at(n,us,W=>t(15,r=W)),nn(Nt,o="Users",o);const a=new URLSearchParams(l),u=["id","userId","created","updated"];let f,c,d,h=[],g=1,v=0,b=!1,y=a.get("filter")||"",$=a.get("sort")||"-created",C=new dn,S=!1;E();async function T(W=1){return t(10,b=!0),W<=1&&M(),ye.users.getList(W,50,{sort:$||"-created",filter:y}).then(_e=>{t(10,b=!1),t(1,h=h.concat(_e.items)),t(9,g=_e.page),t(2,v=_e.totalItems)}).catch(_e=>{_e!=null&&_e.isAbort||(t(10,b=!1),console.warn(_e),M(),ye.errorResponseHandler(_e,!1))})}function M(){t(1,h=[]),t(9,g=1),t(2,v=0)}function O(W){const _e=h.find(He=>He.id===(W==null?void 0:W.userId));_e&&(_e.profile=W),t(1,h)}async function E(){t(11,S=!0);try{t(5,C=await ye.collections.getOne("profiles"))}catch(W){ye.errorResponseHandler(W)}t(11,S=!1)}const P=()=>c==null?void 0:c.show(C),I=()=>T(),F=()=>f==null?void 0:f.show(),z=W=>t(3,y=W.detail);function Q(W){$=W,t(4,$)}function ne(W){$=W,t(4,$)}function G(W){$=W,t(4,$)}function ee(W){$=W,t(4,$)}const U=W=>f==null?void 0:f.show(W),Y=W=>d==null?void 0:d.show(W.profile),Z=()=>t(3,y=""),de=()=>T(g+1);function x(W){me[W?"unshift":"push"](()=>{f=W,t(6,f)})}const oe=()=>T(),Ce=()=>T();function Te(W){me[W?"unshift":"push"](()=>{c=W,t(7,c)})}const K=W=>t(5,C=W.detail);function we(W){me[W?"unshift":"push"](()=>{d=W,t(8,d)})}const ae=W=>O(W.detail);return n.$$.update=()=>{var W;if(n.$$.dirty[0]&24&&$!==-1&&y!==-1){const _e=new URLSearchParams({filter:y,sort:$}).toString();Ci("/users?"+_Line truncated
<span class="txt">Edit profile</span>`,M=D(),p(i,"class","col-type-text col-field-id"),p(r,"class","inline-flex"),p(o,"class","col-type-email col-field-email"),p(d,"class","col-type-date col-field-created"),p(v,"class","col-type-date col-field-updated"),p(C,"type","button"),p(C,"class","btn btn-sm btn-outline"),p(T,"type","button"),p(T,"class","btn btn-sm m-l-10"),p($,"class","col-type-action min-width"),this.first=t},m(U,Y){w(U,t,Y),m(t,i),H(s,i,null),m(t,l),m(t,o),m(o,r),V.m(r,null),m(t,a);for(let G=0;G<u.length;G+=1)u[G].m(t,null);m(t,c),m(t,d),H(h,d,null),m(t,g),m(t,v),H(b,v,null),m(t,y),m(t,$),m($,C),m($,S),m($,T),m(t,M),O=!0,E||(P=[J(C,"click",ni(X)),J(T,"click",ni(ee))],E=!0)},p(U,Y){e=U;const G={};Y[0]&2&&(G.id=e[41].id),s.$set(G),F===(F=I(e))&&V?V.p(e,Y):(V.d(1),V=F(e),V&&(V.c(),V.m(r,null))),Y[0]&4098&&(Z=e[12],Ae(),u=_t(u,Y,te,1,e,Z,f,t,Gt,dh,c,lh),Pe());const de={};Y[0]&2&&(de.date=e[41].created),h.$set(de);const x={};Y[0]&2&&(x.date=e[41].updated),b.$set(x)},i(U){if(!O){A(s.$$.fragment,U);for(let Y=0;Y<Z.length;Y+=1)A(u[Y]);A(h.$$.fragment,U),A(b.$$.fragment,U),O=!0}},o(U){L(s.$$.fragment,U);for(let Y=0;Y<u.length;Y+=1)L(u[Y]);L(h.$$.fragment,U),L(b.$$.fragment,U),O=!1},d(U){U&&k(t),j(s),V.d();for(let Y=0;Y<u.length;Y+=1)u[Y].d();j(h),j(b),E=!1,Je(P)}}}function hh(n){let e,t,i=n[1].length+"",s,l,o;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),o=N(n[2]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),m(e,t),m(e,s),m(e,l),m(e,o)},p(r,a){a[0]&2&&i!==(i=r[1].length+"")&&ue(s,i),a[0]&4&&ue(o,r[2])},d(r){r&&k(e)}}}function mh(n){let e,t,i,s,l=n[2]-n[1].length+"",o,r,a,u;return{c(){e=_("div"),t=_("button"),i=_("span"),s=N("Load more ("),o=N(l),r=N(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),ne(t,"btn-loading",n[10]),ne(t,"btn-disabled",n[10]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),m(e,t),m(t,i),m(i,s),m(i,o),m(i,r),a||(u=J(t,"click",n[28]),a=!0)},p(f,c){c[0]&6&&l!==(l=f[2]-f[1].length+"")&&ue(o,l),c[0]&1024&&ne(t,"btn-loading",f[10]),c[0]&1024&&ne(t,"btn-disabled",f[10])},d(f){f&&k(e),a=!1,u()}}}function gD(n){let e,t,i,s;const l=[rD,oD],o=[];function r(a,u){return a[11]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=We()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(Ae(),L(o[f],1,1,()=>{o[f]=null}),Pe(),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){L(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function _D(n){let e,t,i,s,l,o,r,a;e=new On({props:{$$slots:{default:[gD]},$$scope:{ctx:n}}});let u={};i=new lD({props:u}),n[29](i),i.$on("save",n[30]),i.$on("delete",n[31]);let f={};l=new tu({props:f}),n[32](l),l.$on("save",n[33]);let c={collection:n[5]};return r=new db({props:c}),n[34](r),r.$on("save",n[35]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment),o=D(),q(r.$$.fragment)},m(d,h){H(e,d,h),w(d,t,h),H(i,d,h),w(d,s,h),H(l,d,h),w(d,o,h),H(r,d,h),a=!0},p(d,h){const g={};h[0]&65534|h[1]&262144&&(g.$$scope={dirty:h,ctx:d}),e.$set(g);const v={};i.$set(v);const b={};l.$set(b);const y={};h[0]&32&&(y.collection=d[5]),r.$set(y)},i(d){a||(A(e.$$.fragment,d),A(i.$$.fragment,d),A(l.$$.fragment,d),A(r.$$.fragment,d),a=!0)},o(d){L(e.$$.fragment,d),L(i.$$.fragment,d),L(l.$$.fragment,d),L(r.$$.fragment,d),a=!1},d(d){j(e,d),d&&k(t),n[29](null),j(i,d),d&&k(s),n[32](null),j(l,d),d&&k(o),n[34](null),j(r,d)}}}function bD(n,e,t){let i,s,l,o,r;at(n,Vo,W=>t(36,l=W)),at(n,Nt,W=>t(14,o=W)),at(n,us,W=>t(15,r=W)),nn(Nt,o="Users",o);const a=new URLSearchParams(l),u=["id","userId","created","updated"];let f,c,d,h=[],g=1,v=0,b=!1,y=a.get("filter")||"",$=a.get("sort")||"-created",C=new dn,S=!1;E();async function T(W=1){return t(10,b=!0),W<=1&&M(),ye.users.getList(W,50,{sort:$||"-created",filter:y}).then(_e=>{t(10,b=!1),t(1,h=h.concat(_e.items)),t(9,g=_e.page),t(2,v=_e.totalItems)}).catch(_e=>{_e!=null&&_e.isAbort||(t(10,b=!1),console.warn(_e),M(),ye.errorResponseHandler(_e,!1))})}function M(){t(1,h=[]),t(9,g=1),t(2,v=0)}function O(W){const _e=h.find(He=>He.id===(W==null?void 0:W.userId));_e&&(_e.profile=W),t(1,h)}async function E(){t(11,S=!0);try{t(5,C=await ye.collections.getOne("profiles"))}catch(W){ye.errorResponseHandler(W)}t(11,S=!1)}const P=()=>c==null?void 0:c.show(C),I=()=>T(),F=()=>f==null?void 0:f.show(),V=W=>t(3,y=W.detail);function Z(W){$=W,t(4,$)}function te(W){$=W,t(4,$)}function X(W){$=W,t(4,$)}function ee(W){$=W,t(4,$)}const U=W=>f==null?void 0:f.show(W),Y=W=>d==null?void 0:d.show(W.profile),G=()=>t(3,y=""),de=()=>T(g+1);function x(W){me[W?"unshift":"push"](()=>{f=W,t(6,f)})}const oe=()=>T(),Ce=()=>T();function Te(W){me[W?"unshift":"push"](()=>{c=W,t(7,c)})}const K=W=>t(5,C=W.detail);function ke(W){me[W?"unshift":"push"](()=>{d=W,t(8,d)})}const ae=W=>O(W.detail);return n.$$.update=()=>{var W;if(n.$$.dirty[0]&24&&$!==-1&&y!==-1){const _e=new URLSearchParams({filter:y,sort:$}).toString();Ci("/users?"+_Line truncated
<span class="txt">Application</span>`,o=D(),r=_("a"),r.innerHTML=`<i class="ri-send-plane-2-line"></i>
<span class="txt">Mail settings</span>`,a=D(),u=_("a"),u.innerHTML=`<i class="ri-archive-drawer-line"></i>
<span class="txt">Files storage</span>`,f=D(),c=_("div"),c.innerHTML=`<span class="txt">Sync</span>
@@ -608,10 +608,10 @@
<span class="txt">Auth providers</span>`,S=D(),T=_("a"),T.innerHTML=`<i class="ri-key-line"></i>
<span class="txt">Token options</span>`,M=D(),O=_("a"),O.innerHTML=`<i class="ri-shield-user-line"></i>
<span class="txt">Admins</span>`,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(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(v,"href","/settings/import-collections"),p(v,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p(C,"href","/settings/auth-providers"),p(C,"class","sidebar-list-item"),p(T,"href","/settings/tokens"),p(T,"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(I,F){w(I,e,F),m(e,t),m(t,i),m(t,s),m(t,l),m(t,o),m(t,r),m(t,a),m(t,u),m(t,f),m(t,c),m(t,d),m(t,h),m(t,g),m(t,v),m(t,b),m(t,y),m(t,$),m(t,C),m(t,S),m(t,T),m(t,M),m(t,O),E||(P=[Ye(Vn.call(null,l,{path:"/settings"})),Ye(mn.call(null,l)),Ye(Vn.call(null,r,{path:"/settings/mail/?.*"})),Ye(mn.call(null,r)),Ye(Vn.call(null,u,{path:"/settings/storage/?.*"})),Ye(mn.call(null,u)),Ye(Vn.call(null,h,{path:"/settings/export-collections/?.*"})),Ye(mn.call(null,h)),Ye(Vn.call(null,v,{path:"/settings/import-collections/?.*"})),Ye(mn.call(null,v)),Ye(Vn.call(null,C,{path:"/settings/auth-providers/?.*"})),Ye(mn.call(null,C)),Ye(Vn.call(null,T,{path:"/settings/tokens/?.*"})),Ye(mn.call(null,T)),Ye(Vn.call(null,O,{path:"/settings/admins/?.*"})),Ye(mn.call(null,O))],E=!0)},p:se,i:se,o:se,d(I){I&&k(e),E=!1,Je(P)}}}class Ui extends Ee{constructor(e){super(),Oe(this,e,null,yD,De,{})}}function gh(n,e,t){const i=n.slice();return i[31]=e[t],i}function _h(n){let e,t;return e=new Ne({props:{class:"form-field disabled",name:"id",$$slots:{default:[kD,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741826|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function kD(n){let e,t,i,s,l,o,r,a,u;return{c(){e=_("label"),t=_("i"),i=D(),s=_("span"),s.textContent="ID",o=D(),r=_("input"),p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","text"),p(r,"id",a=n[30]),r.value=u=n[1].id,r.disabled=!0},m(f,c){w(f,e,c),m(e,t),m(e,i),m(e,s),w(f,o,c),w(f,r,c)},p(f,c){c[0]&1073741824&&l!==(l=f[30])&&p(e,"for",l),c[0]&1073741824&&a!==(a=f[30])&&p(r,"id",a),c[0]&2&&u!==(u=f[1].id)&&r.value!==u&&(r.value=u)},d(f){f&&k(e),f&&k(o),f&&k(r)}}}function bh(n){let e,t,i,s,l,o,r;function a(){return n[17](n[31])}function u(...f){return n[18](n[31],...f)}return{c(){e=_("figure"),t=_("img"),s=D(),ti(t.src,i="./images/avatars/avatar"+n[31]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[31]),p(e,"tabindex","0"),p(e,"class",l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))},m(f,c){w(f,e,c),m(e,t),m(e,s),o||(r=[J(e,"click",a),J(e,"keydown",u)],o=!0)},p(f,c){n=f,c[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[31]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(f){f&&k(e),o=!1,Je(r)}}}function wD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("label"),t=_("i"),i=D(),s=_("span"),s.textContent="Email",o=D(),r=_("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[30]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[30]),r.required=!0},m(c,d){w(c,e,d),m(e,t),m(e,i),m(e,s),w(c,o,d),w(c,r,d),Se(r,n[3]),u||(f=J(r,"input",n[19]),u=!0)},p(c,d){d[0]&1073741824&&l!==(l=c[30])&&p(e,"for",l),d[0]&1073741824&&a!==(a=c[30])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&Se(r,c[3])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function vh(n){let e,t;return e=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[$D,({uniqueId:i})=>({30:i}),({uniqueId:i})=>[i?1073741824:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s[0]&1073741840|s[1]&8&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(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=_("input"),i=D(),s=_("label"),l=N("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[30]),p(s,"for",o=n[30])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),m(s,l),r||(a=J(e,"change",n[20]),r=!0)},p(u,f){f[0]&1073741824&&t!==(t=u[30])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&1073741824&&o!==(o=u[30])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function yh(n){let e,t,i,s,l,o,r,a,u;return s=new Ne({props:{class:"form-field required",name:"password",$$slots:{default:[SD,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),r=new Ne({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[CD,({uniqueId:f})=>({30:f}),({uniqueId:f})=>[f?1073741824:0]]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),i=_("div"),q(s.$$.fragment),l=D(),o=_("div"),q(r.$$.fragment),p(i,"class","col-sm-6"),p(o,Line truncated
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[15]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function OD(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&kh(n);return{c(){h&&h.c(),e=D(),t=_("button"),i=_("span"),i.textContent="Cancel",s=D(),l=_("button"),o=_("span"),a=N(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),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],te(l,"btn-loading",n[6])},m(g,v){h&&h.m(g,v),w(g,e,v),w(g,t,v),m(t,i),w(g,s,v),w(g,l,v),m(l,o),m(o,a),f=!0,c||(d=J(t,"click",n[16]),c=!0)},p(g,v){g[1].isNew?h&&(Ae(),L(h,1,1,()=>{h=null}),Pe()):h?(h.p(g,v),v[0]&2&&A(h,1)):(h=kh(g),h.c(),A(h,1),h.m(e.parentNode,e)),(!f||v[0]&64)&&(t.disabled=g[6]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&ue(a,r),(!f||v[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),v[0]&64&&te(l,"btn-loading",g[6])},i(g){f||(A(h),f=!0)},o(g){L(h),f=!1},d(g){h&&h.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function ED(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[OD],header:[TD],default:[MD]},$$scope:{ctx:n}};return e=new ui({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[23]),l[0]&1886|l[1]&8&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[24](null),j(e,s)}}}function AD(n,e,t){let i;const s=xt(),l="admin_"+B.randomString(5);let o,r=new as,a=!1,u=!1,f=0,c="",d="",h="",g=!1;function v(U){return y(U),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(U){ri({}),t(1,r=U!=null&&U.clone?U.clone():new as),$()}function $(){t(4,g=!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,h="")}function C(){if(a||!i)return;t(6,a=!0);const U={email:c,avatar:f};(r.isNew||g)&&(U.password=d,U.passwordConfirm=h);let Y;r.isNew?Y=ye.admins.create(U):Y=ye.admins.update(r.id,U),Y.then(async Z=>{var de;t(7,u=!1),b(),sn(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",Z),((de=ye.authStore.model)==null?void 0:de.id)===Z.id&&ye.authStore.save(ye.authStore.token,Z)}).catch(Z=>{ye.errorResponseHandler(Z)}).finally(()=>{t(6,a=!1)})}function S(){!(r!=null&&r.id)||si("Do you really want to delete the selected admin?",()=>ye.admins.delete(r.id).then(()=>{t(7,u=!1),b(),sn("Successfully deleted admin."),s("delete",r)}).catch(U=>{ye.errorResponseHandler(U)}))}const T=()=>S(),M=()=>b(),O=U=>t(2,f=U),E=(U,Y)=>{(Y.code==="Enter"||Y.code==="Space")&&(Y.preventDefault(),t(2,f=U))};function P(){c=this.value,t(3,c)}function I(){g=this.checked,t(4,g)}function F(){d=this.value,t(8,d)}function z(){h=this.value,t(9,h)}const Q=()=>i&&u?(si("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function ne(U){me[U?"unshift":"push"](()=>{o=U,t(5,o)})}function G(U){tt.call(this,n,U)}function ee(U){tt.call(this,n,U)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||g||c!==r.email||f!==r.avatar)},[b,r,f,c,g,o,a,u,d,h,i,l,C,S,v,T,M,O,E,P,I,F,z,Q,ne,G,ee]}class PD extends Ee{constructor(e){super(),Oe(this,e,AD,ED,De,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function wh(n,e,t){const i=n.slice();return i[24]=e[t],i}function LD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function ID(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function ND(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function FD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function $h(n){let e;function t(l,o){return l[5]?HD:RD}let i=t(n),s=i(n);return{c(){s.c(),e=We()},m(l,o){s.m(l,o),w(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&&k(e)}}}function RD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Sh(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No admins found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txt-centeLine truncated
`},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Sh(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[17]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function Ch(n){let e;return{c(){e=_("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Mh(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,g=e[24].email+"",v,b,y,$,C,S,T,M,O,E,P,I,F,z;u=new sr({props:{id:e[24].id}});let Q=e[24].id===e[7].id&&Ch();C=new Si({props:{date:e[24].created}}),M=new Si({props:{date:e[24].updated}});function ne(){return e[15](e[24])}function G(...ee){return e[16](e[24],...ee)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("figure"),l=_("img"),r=D(),a=_("td"),q(u.$$.fragment),f=D(),Q&&Q.c(),c=D(),d=_("td"),h=_("span"),v=N(g),y=D(),$=_("td"),q(C.$$.fragment),S=D(),T=_("td"),q(M.$$.fragment),O=D(),E=_("td"),E.innerHTML='<i class="ri-arrow-right-line"></i>',P=D(),ti(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(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",b=e[24].email),p(d,"class","col-type-email col-field-email"),p($,"class","col-type-date col-field-created"),p(T,"class","col-type-date col-field-updated"),p(E,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ee,U){w(ee,t,U),m(t,i),m(i,s),m(s,l),m(t,r),m(t,a),H(u,a,null),m(a,f),Q&&Q.m(a,null),m(t,c),m(t,d),m(d,h),m(h,v),m(t,y),m(t,$),H(C,$,null),m(t,S),m(t,T),H(M,T,null),m(t,O),m(t,E),m(t,P),I=!0,F||(z=[J(t,"click",ne),J(t,"keydown",G)],F=!0)},p(ee,U){e=ee,(!I||U&16&&!ti(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const Y={};U&16&&(Y.id=e[24].id),u.$set(Y),e[24].id===e[7].id?Q||(Q=Ch(),Q.c(),Q.m(a,null)):Q&&(Q.d(1),Q=null),(!I||U&16)&&g!==(g=e[24].email+"")&&ue(v,g),(!I||U&16&&b!==(b=e[24].email))&&p(h,"title",b);const Z={};U&16&&(Z.date=e[24].created),C.$set(Z);const de={};U&16&&(de.date=e[24].updated),M.$set(de)},i(ee){I||(A(u.$$.fragment,ee),A(C.$$.fragment,ee),A(M.$$.fragment,ee),I=!0)},o(ee){L(u.$$.fragment,ee),L(C.$$.fragment,ee),L(M.$$.fragment,ee),I=!1},d(ee){ee&&k(t),j(u),Q&&Q.d(),j(C),j(M),F=!1,Je(z)}}}function Th(n){let e,t,i=n[4].length+"",s,l,o=n[4].length+"",r;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),r=N(o),p(e,"class","block txt-hint txt-right m-t-sm")},m(a,u){w(a,e,u),m(e,t),m(e,s),m(e,l),m(e,r)},p(a,u){u&16&&i!==(i=a[4].length+"")&&ue(s,i),u&16&&o!==(o=a[4].length+"")&&ue(r,o)},d(a){a&&k(e)}}}function jD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O,E,P,I,F,z,Q,ne,G,ee,U,Y,Z,de,x=[],oe=new Map,Ce,Te,K,we,ae;a=new Go({}),a.$on("refresh",n[8]),g=new Zo({props:{value:n[1],placeholder:"Search filter, eg. email='test@example.com'",extraAutocompleteKeys:["email"]}}),g.$on("submit",n[10]);function W(Me){n[11](Me)}let _e={class:"col-type-text",name:"id",$$slots:{default:[LD]},$$scope:{ctx:n}};n[2]!==void 0&&(_e.sort=n[2]),M=new an({props:_e}),me.push(()=>Re(M,"sort",W));function He(Me){n[12](Me)}let Ue={class:"col-type-email col-field-email",name:"email",$$slots:{default:[ID]},$$scope:{ctx:n}};n[2]!==void 0&&(Ue.sort=n[2]),P=new an({props:Ue}),me.push(()=>Re(P,"sort",He));function X(Me){n[13](Me)}let ge={class:"col-type-date col-field-created",name:"created",$$slots:{default:[ND]},$$scope:{ctx:n}};n[2]!==void 0&&(ge.sort=n[2]),z=new an({props:ge}),me.push(()=>Re(z,"sort",X));function ce(Me){n[14](Me)}let ke={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[FD]},$$scope:{ctx:n}};n[2]!==void 0&&(ke.sort=n[2]),G=new an({props:ke}),me.push(()=>Re(G,"sort",ce));let Ge=n[4];const et=Me=>Me[24].id;for(let Me=0;Me<Ge.length;Me+=1){let ze=wh(n,Ge,Me),Xe=et(ze);oe.set(Xe,x[Me]=Mh(Xe,ze))}let Ke=null;Ge.length||(Ke=$h(n));let nt=n[4].length&&Th(n);return{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=D(),l=_("div"),o=N(n[6]),r=D(),q(a.$$.fragment),u=D(),f=_("div"),c=D(),d=_("button"),d.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New admin</span>`,h=D(),q(g.$$.fragment),v=D(),b=_("div"),y=_("table"),$=_("thead"),C=_("tr"),S=_("th"),T=D(),q(M.$$.fragment),E=D(),q(P.$$.fragment),F=D(),q(z.$$.fragment),ne=D(),q(G.$$.fragment),U=D(),Y=_("th"),Z=D(),de=_("tbody");for(let Me=0;Me<x.length;Me+=1)x[Me].c();Ke&&Ke.c(),Ce=D(),nt&&nt.c(),Te=We(),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(S,"class","min-width"),p(Y,"class","col-type-action min-width"),p(y,"class","table"),te(y,"table-loading",n[5]),p(b,"class","table-wrapper")},m(Me,ze){w(Me,e,ze),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(e,r),H(a,e,null),m(e,u),m(e,f),m(e,c),m(e,d),w(Me,h,ze),H(g,Me,ze),w(Me,v,ze),w(Me,b,ze),m(b,y),m(y,$),m($,C),m(C,S),m(C,T),H(M,C,null),m(C,E),H(P,C,null),m(C,F),H(z,C,null),m(C,ne),H(G,C,null),m(C,U),m(C,Y),m(y,Z),m(y,de);for(let Xe=0;Xe<x.length;Xe+=1)x[Xe].m(de,null);Ke&&Ke.m(de,null),w(Me,Ce,ze),nt&&nt.m(Me,ze),w(Me,Te,ze),K=!0,we||(ae=J(d,"click",n[9]),we=!0)},p(Me,ze){(!K||ze&64)&&ue(o,Me[6]);const Xe={};ze&2&&(Xe.value=Me[1]),g.$set(Xe);const it={};ze&134217728&&(it.$$scope={dirty:ze,ctx:Me}),!O&&ze&4&&(O=!0,it.sort=Me[2],je(()=>O=!1)),M.$set(it);const ft={};ze&134217728&&(ft.$$scope={dirty:ze,ctx:Me}),!I&&ze&4&&(I=!0,ft.sort=Me[2],je(()=>I=!1)),P.$set(ft);const be={};ze&134217728&&(be.$$scope={dirty:ze,ctx:Me}),!Q&&ze&4&&(Q=!0,be.sort=Me[2],je(()=>Q=!1)),z.$set(be);const Fe={};ze&134217728&&(Fe.$$scope={dirty:ze,ctx:Me}),!ee&&ze&4&&(ee=!0,Fe.sort=Me[2],je(()=>ee=!1)),G.$set(Fe),ze&186&&(Ge=Me[4],Ae(),x=_t(x,ze,et,1,Me,Ge,oe,de,Gt,Mh,null,wh),Pe(),!Ge.length&&Ke?Ke.p(Me,ze):Ge.length?Ke&&(Ke.d(1),Ke=null):(Ke=$h(Me),Ke.c(),Ke.m(de,null))),ze&32&&te(y,"table-loading",Me[5]),Me[4].length?nt?nt.p(Me,ze):(nt=Th(Me),nt.c(),nt.m(Te.parentNode,Te)):nt&&(nt.d(1),nt=null)},i(Me){if(!K){A(a.$$.fragment,Me),A(g.$$.fragment,Me),A(M.$$.fragment,Me),A(P.$$.fragment,Me),A(z.$$.fragment,Me),A(G.$$.fragment,Me);for(let ze=0;ze<Ge.length;ze+=1)A(x[ze]);K=!0}},o(Me){L(a.$$.fragment,Me),L(g.$$.fragment,Me),L(M.$$.fragment,Me),L(P.$$.fragment,Me),L(z.$$.fragment,Me),L(G.$$.fragment,Me);for(let ze=0;ze<x.length;ze+=1)L(x[ze]);K=!1},d(Me){Me&&k(e),j(a),Me&&k(h),j(g,Me),Me&&k(v),Me&&k(b),j(M),j(P),j(z),j(G);for(let ze=0;ze<x.length;ze+=1)x[ze].d();Ke&&Ke.d(),Me&&k(Ce),nt&&nt.d(Me),Me&&k(Te),we=!1,ae()}}}function qD(n){let e,t,i,s,l,o;e=new Ui({}),i=new On({props:{$$slots:{default:[jD]},$$scope:{ctx:n}}});let r={};return l=new PD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),w(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){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){j(e,a),a&&k(t),j(i,a),a&&k(s),n[18](null),j(l,a)}}}function VD(n,e,t){let i,s,l;at(n,Vo,F=>t(21,i=F)),at(n,Nt,F=>t(6,s=F)),at(n,Ea,F=>t(7,l=F)),nn(Nt,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=[]),ye.admins.getFullList(100,{sort:c||"-created",filter:f}).then(F=>{t(4,a=F),t(5,u=!1)}).catch(F=>{F!=null&&F.isAbort||(t(5,u=!1),console.warn(F),h(),ye.errorResponseHandler(F,!1))})}function h(){t(4,a=[])}const g=()=>d(),v=()=>r==null?void 0:r.show(),b=F=>t(1,f=F.detail);function y(F){c=F,t(2,c)}function $(F){c=F,t(2,c)}function C(F){c=F,t(2,c)}function S(F){c=F,t(2,c)}const T=F=>r==null?void 0:r.show(F),M=(F,z)=>{(z.code==="Enter"||z.code==="Space")&&(z.preventDefault(),r==null||r.show(F))},O=()=>t(1,f="");function E(F){me[F?"unshift":"push"](()=>{r=F,t(3,r)})}const P=()=>d(),I=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const F=new URLSearchParams({filter:f,sort:c}).toString();Ci("/settings/admins?"+F),d()}},[d,f,c,r,a,u,s,l,g,v,b,y,$,C,S,T,M,O,E,P,I]}class zD extends Ee{constructor(e){super(),Oe(this,e,VD,qD,De,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function BD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Email"),s=D(),l=_("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){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0]),l.focus(),r||(a=J(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]&&Se(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function UD(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=_("label"),t=N("Password"),s=D(),l=_("input"),r=D(),a=_("div"),u=_("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,h){w(d,e,h),m(e,t),w(d,s,h),w(d,l,h),Se(l,n[Line truncated
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),te(a,"btn-disabled",n[2]),te(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){w(d,e,h),m(e,t),m(e,i),H(s,e,null),m(e,l),H(o,e,null),m(e,r),m(e,a),u=!0,f||(c=J(e,"submit",Wt(n[3])),f=!0)},p(d,h){const g={};h&769&&(g.$$scope={dirty:h,ctx:d}),s.$set(g);const v={};h&770&&(v.$$scope={dirty:h,ctx:d}),o.$set(v),h&4&&te(a,"btn-disabled",d[2]),h&4&&te(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){L(s.$$.fragment,d),L(o.$$.fragment,d),u=!1},d(d){d&&k(e),j(s),j(o),f=!1,c()}}}function YD(n){let e,t;return e=new l_({props:{$$slots:{default:[WD]},$$scope:{ctx:n}}}),{c(){q(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){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function KD(n,e,t){let i;at(n,Vo,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),ye.admins.authViaEmail(l,o).then(()=>{Ci("/")}).catch(()=>{hl("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 JD extends Ee{constructor(e){super(),Oe(this,e,KD,YD,De,{})}}function ZD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T;i=new Ne({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[XD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[QD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new Ne({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 Ne({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[eO,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&Dh(n);return{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),c=D(),d=_("div"),h=_("div"),g=D(),M&&M.c(),v=D(),b=_("button"),y=_("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(h,"class","flex-fill"),p(y,"class","txt"),p(b,"type","submit"),p(b,"class","btn btn-expanded"),b.disabled=$=!n[3]||n[2],te(b,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,E){w(O,e,E),m(e,t),H(i,t,null),m(e,s),m(e,l),H(o,l,null),m(e,r),H(a,e,null),m(e,u),H(f,e,null),m(e,c),m(e,d),m(d,h),m(d,g),M&&M.m(d,null),m(d,v),m(d,b),m(b,y),C=!0,S||(T=J(b,"click",n[13]),S=!0)},p(O,E){const P={};E&1572865&&(P.$$scope={dirty:E,ctx:O}),i.$set(P);const I={};E&1572865&&(I.$$scope={dirty:E,ctx:O}),o.$set(I);const F={};E&1572865&&(F.$$scope={dirty:E,ctx:O}),a.$set(F);const z={};E&1572865&&(z.$$scope={dirty:E,ctx:O}),f.$set(z),O[3]?M?M.p(O,E):(M=Dh(O),M.c(),M.m(d,v)):M&&(M.d(1),M=null),(!C||E&12&&$!==($=!O[3]||O[2]))&&(b.disabled=$),E&4&&te(b,"btn-loading",O[2])},i(O){C||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),C=!0)},o(O){L(i.$$.fragment,O),L(o.$$.fragment,O),L(a.$$.fragment,O),L(f.$$.fragment,O),C=!1},d(O){O&&k(e),j(i),j(o),j(a),j(f),M&&M.d(),S=!1,T()}}}function GD(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:se,i:se,o:se,d(t){t&&k(e)}}}function XD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Application name"),s=D(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].meta.appName),r||(a=J(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&&Se(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function QD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Application url"),s=D(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].meta.appUrl),r||(a=J(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&&Se(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function xD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Logs max days retention"),s=D(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].logs.maxDays),r||(a=J(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&&Pt(l.value)!==u[0].logs.maxDays&&Se(l,u[0].logs.maxDays)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function eO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("input"),i=D(),s=_("label"),l=_("span"),l.textContent="Line truncated
<span class="txt">Delete</span>`,p(e,"type","button"),p(e,"class","dropdown-item")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[15]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function OD(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&kh(n);return{c(){h&&h.c(),e=D(),t=_("button"),i=_("span"),i.textContent="Cancel",s=D(),l=_("button"),o=_("span"),a=N(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),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],ne(l,"btn-loading",n[6])},m(g,v){h&&h.m(g,v),w(g,e,v),w(g,t,v),m(t,i),w(g,s,v),w(g,l,v),m(l,o),m(o,a),f=!0,c||(d=J(t,"click",n[16]),c=!0)},p(g,v){g[1].isNew?h&&(Ae(),L(h,1,1,()=>{h=null}),Pe()):h?(h.p(g,v),v[0]&2&&A(h,1)):(h=kh(g),h.c(),A(h,1),h.m(e.parentNode,e)),(!f||v[0]&64)&&(t.disabled=g[6]),(!f||v[0]&2)&&r!==(r=g[1].isNew?"Create":"Save changes")&&ue(a,r),(!f||v[0]&1088&&u!==(u=!g[10]||g[6]))&&(l.disabled=u),(!f||v[0]&64)&&ne(l,"btn-loading",g[6])},i(g){f||(A(h),f=!0)},o(g){L(h),f=!1},d(g){h&&h.d(g),g&&k(e),g&&k(t),g&&k(s),g&&k(l),c=!1,d()}}}function ED(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[23],$$slots:{footer:[OD],header:[TD],default:[MD]},$$scope:{ctx:n}};return e=new ui({props:i}),n[24](e),e.$on("hide",n[25]),e.$on("show",n[26]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[23]),l[0]&1886|l[1]&8&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[24](null),j(e,s)}}}function AD(n,e,t){let i;const s=xt(),l="admin_"+B.randomString(5);let o,r=new as,a=!1,u=!1,f=0,c="",d="",h="",g=!1;function v(U){return y(U),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(U){ri({}),t(1,r=U!=null&&U.clone?U.clone():new as),$()}function $(){t(4,g=!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,h="")}function C(){if(a||!i)return;t(6,a=!0);const U={email:c,avatar:f};(r.isNew||g)&&(U.password=d,U.passwordConfirm=h);let Y;r.isNew?Y=ye.admins.create(U):Y=ye.admins.update(r.id,U),Y.then(async G=>{var de;t(7,u=!1),b(),sn(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",G),((de=ye.authStore.model)==null?void 0:de.id)===G.id&&ye.authStore.save(ye.authStore.token,G)}).catch(G=>{ye.errorResponseHandler(G)}).finally(()=>{t(6,a=!1)})}function S(){!(r!=null&&r.id)||si("Do you really want to delete the selected admin?",()=>ye.admins.delete(r.id).then(()=>{t(7,u=!1),b(),sn("Successfully deleted admin."),s("delete",r)}).catch(U=>{ye.errorResponseHandler(U)}))}const T=()=>S(),M=()=>b(),O=U=>t(2,f=U),E=(U,Y)=>{(Y.code==="Enter"||Y.code==="Space")&&(Y.preventDefault(),t(2,f=U))};function P(){c=this.value,t(3,c)}function I(){g=this.checked,t(4,g)}function F(){d=this.value,t(8,d)}function V(){h=this.value,t(9,h)}const Z=()=>i&&u?(si("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function te(U){me[U?"unshift":"push"](()=>{o=U,t(5,o)})}function X(U){tt.call(this,n,U)}function ee(U){tt.call(this,n,U)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||g||c!==r.email||f!==r.avatar)},[b,r,f,c,g,o,a,u,d,h,i,l,C,S,v,T,M,O,E,P,I,F,V,Z,te,X,ee]}class PD extends Ee{constructor(e){super(),Oe(this,e,AD,ED,De,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function wh(n,e,t){const i=n.slice();return i[24]=e[t],i}function LD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function ID(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function ND(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function FD(n){let e,t,i,s;return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),m(e,t),m(e,i),m(e,s)},p:se,d(l){l&&k(e)}}}function $h(n){let e;function t(l,o){return l[5]?HD:RD}let i=t(n),s=i(n);return{c(){s.c(),e=We()},m(l,o){s.m(l,o),w(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&&k(e)}}}function RD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Sh(n);return{c(){e=_("tr"),t=_("td"),i=_("h6"),i.textContent="No admins found.",s=D(),o&&o.c(),l=D(),p(t,"colspan","99"),p(t,"class","txtLine truncated
`},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Sh(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear filters</span>',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[17]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function Ch(n){let e;return{c(){e=_("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Mh(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,g=e[24].email+"",v,b,y,$,C,S,T,M,O,E,P,I,F,V;u=new sr({props:{id:e[24].id}});let Z=e[24].id===e[7].id&&Ch();C=new Si({props:{date:e[24].created}}),M=new Si({props:{date:e[24].updated}});function te(){return e[15](e[24])}function X(...ee){return e[16](e[24],...ee)}return{key:n,first:null,c(){t=_("tr"),i=_("td"),s=_("figure"),l=_("img"),r=D(),a=_("td"),q(u.$$.fragment),f=D(),Z&&Z.c(),c=D(),d=_("td"),h=_("span"),v=N(g),y=D(),$=_("td"),q(C.$$.fragment),S=D(),T=_("td"),q(M.$$.fragment),O=D(),E=_("td"),E.innerHTML='<i class="ri-arrow-right-line"></i>',P=D(),ti(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(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",b=e[24].email),p(d,"class","col-type-email col-field-email"),p($,"class","col-type-date col-field-created"),p(T,"class","col-type-date col-field-updated"),p(E,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ee,U){w(ee,t,U),m(t,i),m(i,s),m(s,l),m(t,r),m(t,a),H(u,a,null),m(a,f),Z&&Z.m(a,null),m(t,c),m(t,d),m(d,h),m(h,v),m(t,y),m(t,$),H(C,$,null),m(t,S),m(t,T),H(M,T,null),m(t,O),m(t,E),m(t,P),I=!0,F||(V=[J(t,"click",te),J(t,"keydown",X)],F=!0)},p(ee,U){e=ee,(!I||U&16&&!ti(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const Y={};U&16&&(Y.id=e[24].id),u.$set(Y),e[24].id===e[7].id?Z||(Z=Ch(),Z.c(),Z.m(a,null)):Z&&(Z.d(1),Z=null),(!I||U&16)&&g!==(g=e[24].email+"")&&ue(v,g),(!I||U&16&&b!==(b=e[24].email))&&p(h,"title",b);const G={};U&16&&(G.date=e[24].created),C.$set(G);const de={};U&16&&(de.date=e[24].updated),M.$set(de)},i(ee){I||(A(u.$$.fragment,ee),A(C.$$.fragment,ee),A(M.$$.fragment,ee),I=!0)},o(ee){L(u.$$.fragment,ee),L(C.$$.fragment,ee),L(M.$$.fragment,ee),I=!1},d(ee){ee&&k(t),j(u),Z&&Z.d(),j(C),j(M),F=!1,Je(V)}}}function Th(n){let e,t,i=n[4].length+"",s,l,o=n[4].length+"",r;return{c(){e=_("small"),t=N("Showing "),s=N(i),l=N(" of "),r=N(o),p(e,"class","block txt-hint txt-right m-t-sm")},m(a,u){w(a,e,u),m(e,t),m(e,s),m(e,l),m(e,r)},p(a,u){u&16&&i!==(i=a[4].length+"")&&ue(s,i),u&16&&o!==(o=a[4].length+"")&&ue(r,o)},d(a){a&&k(e)}}}function jD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O,E,P,I,F,V,Z,te,X,ee,U,Y,G,de,x=[],oe=new Map,Ce,Te,K,ke,ae;a=new Go({}),a.$on("refresh",n[8]),g=new Zo({props:{value:n[1],placeholder:"Search filter, eg. email='test@example.com'",extraAutocompleteKeys:["email"]}}),g.$on("submit",n[10]);function W(Me){n[11](Me)}let _e={class:"col-type-text",name:"id",$$slots:{default:[LD]},$$scope:{ctx:n}};n[2]!==void 0&&(_e.sort=n[2]),M=new an({props:_e}),me.push(()=>Re(M,"sort",W));function He(Me){n[12](Me)}let Ue={class:"col-type-email col-field-email",name:"email",$$slots:{default:[ID]},$$scope:{ctx:n}};n[2]!==void 0&&(Ue.sort=n[2]),P=new an({props:Ue}),me.push(()=>Re(P,"sort",He));function Q(Me){n[13](Me)}let ge={class:"col-type-date col-field-created",name:"created",$$slots:{default:[ND]},$$scope:{ctx:n}};n[2]!==void 0&&(ge.sort=n[2]),V=new an({props:ge}),me.push(()=>Re(V,"sort",Q));function ce(Me){n[14](Me)}let we={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[FD]},$$scope:{ctx:n}};n[2]!==void 0&&(we.sort=n[2]),X=new an({props:we}),me.push(()=>Re(X,"sort",ce));let Ge=n[4];const et=Me=>Me[24].id;for(let Me=0;Me<Ge.length;Me+=1){let ze=wh(n,Ge,Me),Xe=et(ze);oe.set(Xe,x[Me]=Mh(Xe,ze))}let Ke=null;Ge.length||(Ke=$h(n));let nt=n[4].length&&Th(n);return{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=D(),l=_("div"),o=N(n[6]),r=D(),q(a.$$.fragment),u=D(),f=_("div"),c=D(),d=_("button"),d.innerHTML=`<i class="ri-add-line"></i>
<span class="txt">New admin</span>`,h=D(),q(g.$$.fragment),v=D(),b=_("div"),y=_("table"),$=_("thead"),C=_("tr"),S=_("th"),T=D(),q(M.$$.fragment),E=D(),q(P.$$.fragment),F=D(),q(V.$$.fragment),te=D(),q(X.$$.fragment),U=D(),Y=_("th"),G=D(),de=_("tbody");for(let Me=0;Me<x.length;Me+=1)x[Me].c();Ke&&Ke.c(),Ce=D(),nt&&nt.c(),Te=We(),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(S,"class","min-width"),p(Y,"class","col-type-action min-width"),p(y,"class","table"),ne(y,"table-loading",n[5]),p(b,"class","table-wrapper")},m(Me,ze){w(Me,e,ze),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(e,r),H(a,e,null),m(e,u),m(e,f),m(e,c),m(e,d),w(Me,h,ze),H(g,Me,ze),w(Me,v,ze),w(Me,b,ze),m(b,y),m(y,$),m($,C),m(C,S),m(C,T),H(M,C,null),m(C,E),H(P,C,null),m(C,F),H(V,C,null),m(C,te),H(X,C,null),m(C,U),m(C,Y),m(y,G),m(y,de);for(let Xe=0;Xe<x.length;Xe+=1)x[Xe].m(de,null);Ke&&Ke.m(de,null),w(Me,Ce,ze),nt&&nt.m(Me,ze),w(Me,Te,ze),K=!0,ke||(ae=J(d,"click",n[9]),ke=!0)},p(Me,ze){(!K||ze&64)&&ue(o,Me[6]);const Xe={};ze&2&&(Xe.value=Me[1]),g.$set(Xe);const it={};ze&134217728&&(it.$$scope={dirty:ze,ctx:Me}),!O&&ze&4&&(O=!0,it.sort=Me[2],je(()=>O=!1)),M.$set(it);const ct={};ze&134217728&&(ct.$$scope={dirty:ze,ctx:Me}),!I&&ze&4&&(I=!0,ct.sort=Me[2],je(()=>I=!1)),P.$set(ct);const be={};ze&134217728&&(be.$$scope={dirty:ze,ctx:Me}),!Z&&ze&4&&(Z=!0,be.sort=Me[2],je(()=>Z=!1)),V.$set(be);const Fe={};ze&134217728&&(Fe.$$scope={dirty:ze,ctx:Me}),!ee&&ze&4&&(ee=!0,Fe.sort=Me[2],je(()=>ee=!1)),X.$set(Fe),ze&186&&(Ge=Me[4],Ae(),x=_t(x,ze,et,1,Me,Ge,oe,de,Gt,Mh,null,wh),Pe(),!Ge.length&&Ke?Ke.p(Me,ze):Ge.length?Ke&&(Ke.d(1),Ke=null):(Ke=$h(Me),Ke.c(),Ke.m(de,null))),(!K||ze&32)&&ne(y,"table-loading",Me[5]),Me[4].length?nt?nt.p(Me,ze):(nt=Th(Me),nt.c(),nt.m(Te.parentNode,Te)):nt&&(nt.d(1),nt=null)},i(Me){if(!K){A(a.$$.fragment,Me),A(g.$$.fragment,Me),A(M.$$.fragment,Me),A(P.$$.fragment,Me),A(V.$$.fragment,Me),A(X.$$.fragment,Me);for(let ze=0;ze<Ge.length;ze+=1)A(x[ze]);K=!0}},o(Me){L(a.$$.fragment,Me),L(g.$$.fragment,Me),L(M.$$.fragment,Me),L(P.$$.fragment,Me),L(V.$$.fragment,Me),L(X.$$.fragment,Me);for(let ze=0;ze<x.length;ze+=1)L(x[ze]);K=!1},d(Me){Me&&k(e),j(a),Me&&k(h),j(g,Me),Me&&k(v),Me&&k(b),j(M),j(P),j(V),j(X);for(let ze=0;ze<x.length;ze+=1)x[ze].d();Ke&&Ke.d(),Me&&k(Ce),nt&&nt.d(Me),Me&&k(Te),ke=!1,ae()}}}function qD(n){let e,t,i,s,l,o;e=new Ui({}),i=new On({props:{$$slots:{default:[jD]},$$scope:{ctx:n}}});let r={};return l=new PD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),w(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){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){j(e,a),a&&k(t),j(i,a),a&&k(s),n[18](null),j(l,a)}}}function VD(n,e,t){let i,s,l;at(n,Vo,F=>t(21,i=F)),at(n,Nt,F=>t(6,s=F)),at(n,Ea,F=>t(7,l=F)),nn(Nt,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=[]),ye.admins.getFullList(100,{sort:c||"-created",filter:f}).then(F=>{t(4,a=F),t(5,u=!1)}).catch(F=>{F!=null&&F.isAbort||(t(5,u=!1),console.warn(F),h(),ye.errorResponseHandler(F,!1))})}function h(){t(4,a=[])}const g=()=>d(),v=()=>r==null?void 0:r.show(),b=F=>t(1,f=F.detail);function y(F){c=F,t(2,c)}function $(F){c=F,t(2,c)}function C(F){c=F,t(2,c)}function S(F){c=F,t(2,c)}const T=F=>r==null?void 0:r.show(F),M=(F,V)=>{(V.code==="Enter"||V.code==="Space")&&(V.preventDefault(),r==null||r.show(F))},O=()=>t(1,f="");function E(F){me[F?"unshift":"push"](()=>{r=F,t(3,r)})}const P=()=>d(),I=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const F=new URLSearchParams({filter:f,sort:c}).toString();Ci("/settings/admins?"+F),d()}},[d,f,c,r,a,u,s,l,g,v,b,y,$,C,S,T,M,O,E,P,I]}class zD extends Ee{constructor(e){super(),Oe(this,e,VD,qD,De,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function BD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Email"),s=D(),l=_("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){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0]),l.focus(),r||(a=J(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]&&Se(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function UD(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=_("label"),t=N("Password"),s=D(),l=_("input"),r=D(),a=_("div"),u=_("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,h){w(d,e,h),m(e,t),w(d,s,h),w(d,l,h),SLine truncated
<i class="ri-arrow-right-line"></i>`,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),ne(a,"btn-disabled",n[2]),ne(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){w(d,e,h),m(e,t),m(e,i),H(s,e,null),m(e,l),H(o,e,null),m(e,r),m(e,a),u=!0,f||(c=J(e,"submit",Wt(n[3])),f=!0)},p(d,h){const g={};h&769&&(g.$$scope={dirty:h,ctx:d}),s.$set(g);const v={};h&770&&(v.$$scope={dirty:h,ctx:d}),o.$set(v),(!u||h&4)&&ne(a,"btn-disabled",d[2]),(!u||h&4)&&ne(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){L(s.$$.fragment,d),L(o.$$.fragment,d),u=!1},d(d){d&&k(e),j(s),j(o),f=!1,c()}}}function YD(n){let e,t;return e=new l_({props:{$$slots:{default:[WD]},$$scope:{ctx:n}}}),{c(){q(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){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function KD(n,e,t){let i;at(n,Vo,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),ye.admins.authViaEmail(l,o).then(()=>{Ci("/")}).catch(()=>{hl("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 JD extends Ee{constructor(e){super(),Oe(this,e,KD,YD,De,{})}}function ZD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T;i=new Ne({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[XD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[QD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new Ne({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 Ne({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[eO,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&Dh(n);return{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),c=D(),d=_("div"),h=_("div"),g=D(),M&&M.c(),v=D(),b=_("button"),y=_("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(h,"class","flex-fill"),p(y,"class","txt"),p(b,"type","submit"),p(b,"class","btn btn-expanded"),b.disabled=$=!n[3]||n[2],ne(b,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,E){w(O,e,E),m(e,t),H(i,t,null),m(e,s),m(e,l),H(o,l,null),m(e,r),H(a,e,null),m(e,u),H(f,e,null),m(e,c),m(e,d),m(d,h),m(d,g),M&&M.m(d,null),m(d,v),m(d,b),m(b,y),C=!0,S||(T=J(b,"click",n[13]),S=!0)},p(O,E){const P={};E&1572865&&(P.$$scope={dirty:E,ctx:O}),i.$set(P);const I={};E&1572865&&(I.$$scope={dirty:E,ctx:O}),o.$set(I);const F={};E&1572865&&(F.$$scope={dirty:E,ctx:O}),a.$set(F);const V={};E&1572865&&(V.$$scope={dirty:E,ctx:O}),f.$set(V),O[3]?M?M.p(O,E):(M=Dh(O),M.c(),M.m(d,v)):M&&(M.d(1),M=null),(!C||E&12&&$!==($=!O[3]||O[2]))&&(b.disabled=$),(!C||E&4)&&ne(b,"btn-loading",O[2])},i(O){C||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),C=!0)},o(O){L(i.$$.fragment,O),L(o.$$.fragment,O),L(a.$$.fragment,O),L(f.$$.fragment,O),C=!1},d(O){O&&k(e),j(i),j(o),j(a),j(f),M&&M.d(),S=!1,T()}}}function GD(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:se,i:se,o:se,d(t){t&&k(e)}}}function XD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Application name"),s=D(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].meta.appName),r||(a=J(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&&Se(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function QD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Application url"),s=D(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].meta.appUrl),r||(a=J(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&&Se(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function xD(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Logs max days retention"),s=D(),l=_("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].logs.maxDays),r||(a=J(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&&Pt(l.value)!==u[0].logs.maxDays&&Se(l,u[0].logs.maxDays)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function eO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=_("input"),i=D(),s=_("label"),l=_("spanLine truncated
<div class="breadcrumb-item">Application</div></nav>`,t=D(),i=_("div"),s=_("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(h,g){w(h,e,g),w(h,t,g),w(h,i,g),m(i,s),c[l].m(s,null),r=!0,a||(u=J(s,"submit",Wt(n[4])),a=!0)},p(h,g){let v=l;l=d(h),l===v?c[l].p(h,g):(Ae(),L(c[v],1,1,()=>{c[v]=null}),Pe(),o=c[l],o?o.p(h,g):(o=c[l]=f[l](h),o.c()),A(o,1),o.m(s,null))},i(h){r||(A(o),r=!0)},o(h){L(o),r=!1},d(h){h&&k(e),h&&k(t),h&&k(i),c[l].d(),a=!1,u()}}}function nO(n){let e,t,i,s;return e=new Ui({}),i=new On({props:{$$slots:{default:[tO]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){H(e,l,o),w(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){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&k(t),j(i,l)}}}function iO(n,e,t){let i,s,l,o;at(n,us,M=>t(14,s=M)),at(n,wo,M=>t(15,l=M)),at(n,Nt,M=>t(16,o=M)),nn(Nt,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const M=await ye.settings.getAll()||{};g(M)}catch(M){ye.errorResponseHandler(M)}t(1,u=!1)}async function h(){if(!(f||!i)){t(2,f=!0);try{const M=await ye.settings.update(B.filterRedactedProps(a));g(M),sn("Successfully saved application settings.")}catch(M){ye.errorResponseHandler(M)}t(2,f=!1)}}function g(M={}){var O,E;nn(wo,l=(O=M==null?void 0:M.meta)==null?void 0:O.appName,l),nn(us,s=!!((E=M==null?void 0:M.meta)!=null&&E.hideControls),s),t(0,a={meta:(M==null?void 0:M.meta)||{},logs:(M==null?void 0:M.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function v(){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 $(){a.logs.maxDays=Pt(this.value),t(0,a)}function C(){a.meta.hideControls=this.checked,t(0,a)}const S=()=>v(),T=()=>h();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,h,v,r,c,b,y,$,C,S,T]}class sO extends Ee{constructor(e){super(),Oe(this,e,iO,nO,De,{})}}function lO(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o<s.length;o+=1)l=ut(l,s[o]);return{c(){e=_("input"),mi(e,l)},m(o,r){w(o,e,r),e.autofocus&&e.focus(),n[7](e),Se(e,n[0]),t||(i=J(e,"input",n[8]),t=!0)},p(o,r){mi(e,l=pn(s,[{type:"password"},{autocomplete:"new-password"},r&32&&o[5]])),r&1&&e.value!==o[0]&&Se(e,o[0])},d(o){o&&k(e),n[7](null),t=!1,i()}}}function oO(n){let e,t,i,s,l,o,r=[{readOnly:!0},{type:"text"},{placeholder:n[1]},n[5]],a={};for(let u=0;u<r.length;u+=1)a=ut(a,r[u]);return{c(){e=_("div"),t=_("button"),t.innerHTML='<i class="ri-key-line"></i>',i=D(),s=_("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),mi(s,a)},m(u,f){w(u,e,f),m(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(o=[Ye(gt.call(null,t,{position:"left",text:"Set new value"})),J(t,"click",n[6])],l=!0)},p(u,f){mi(s,a=pn(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&k(e),u&&k(i),u&&k(s),l=!1,Je(o)}}}function rO(n){let e;function t(l,o){return l[3]?oO:lO}let i=t(n),s=i(n);return{c(){s.c(),e=We()},m(l,o){s.m(l,o),w(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:se,o:se,d(l){s.d(l),l&&k(e)}}}function aO(n,e,t){const i=["value","mask"];let s=Bt(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await Zn(),r==null||r.focus()}const f=()=>u();function c(h){me[h?"unshift":"push"](()=>{r=h,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=ut(ut({},e),li(h)),t(5,s=Bt(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,o=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class nu extends Ee{constructor(e){super(),Oe(this,e,aO,rO,De,{value:0,mask:1})}}function uO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v;return{c(){e=_("label"),t=N("Subject"),s=D(),l=_("input"),r=D(),a=_("div"),u=N(`Available placeholder parameters:
`),f=_("span"),f.textContent=`{APP_NAME}
`,c=N(`,
@@ -629,8 +629,8 @@
`),g=_("span"),g.textContent=`{TOKEN}
`,v=N(`,
`),b=_("span"),b.textContent=`{ACTION_URL}
`,y=N("."),p(e,"for",i=n[31]),p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(g,"class","label label-sm link-primary txt-mono"),p(b,"class","label label-sm link-primary txt-mono"),p(b,"title","Required parameter"),p(a,"class","help-block")},m(E,P){w(E,e,P),m(e,t),w(E,s,P),M[l].m(E,P),w(E,r,P),w(E,a,P),m(a,u),m(a,f),m(a,c),m(a,d),m(a,h),m(a,g),m(a,v),m(a,b),m(a,y),$=!0,C||(S=[J(f,"click",n[22]),J(d,"click",n[23]),J(g,"click",n[24]),J(b,"click",n[25])],C=!0)},p(E,P){(!$||P[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let I=l;l=O(E),l===I?M[l].p(E,P):(Ae(),L(M[I],1,1,()=>{M[I]=null}),Pe(),o=M[l],o?o.p(E,P):(o=M[l]=T[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){$||(A(o),$=!0)},o(E){L(o),$=!1},d(E){E&&k(e),E&&k(s),M[l].d(E),E&&k(r),E&&k(a),C=!1,Je(S)}}}function hO(n){let e,t,i,s,l,o;return e=new Ne({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[uO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new Ne({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[fO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new Ne({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[pO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(r,a){H(e,r,a),w(r,t,a),H(i,r,a),w(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){L(e.$$.fragment,r),L(i.$$.fragment,r),L(l.$$.fragment,r),o=!1},d(r){j(e,r),r&&k(t),j(i,r),r&&k(s),j(l,r)}}}function Oh(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ye(gt.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Tt(()=>{t||(t=st(e,Tn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=st(e,Tn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function mO(n){let e,t,i,s,l,o,r,a,u,f,c=n[6]&&Oh();return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),l=N(n[2]),o=D(),r=_("div"),a=D(),c&&c.c(),u=We(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(d,h){w(d,e,h),m(e,t),m(e,i),m(e,s),m(s,l),w(d,o,h),w(d,r,h),w(d,a,h),c&&c.m(d,h),w(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&ue(l,d[2]),d[6]?c?h[0]&64&&A(c,1):(c=Oh(),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(Ae(),L(c,1,1,()=>{c=null}),Pe())},i(d){f||(A(c),f=!0)},o(d){L(c),f=!1},d(d){d&&k(e),d&&k(o),d&&k(r),d&&k(a),c&&c.d(d),d&&k(u)}}}function gO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[mO],default:[hO]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ut(s,i[l]);return e=new ir({props:s}),n[26](e),e.$on("expand",n[27]),e.$on("collapse",n[28]),e.$on("toggle",n[29]),{c(){q(e.$$.fragment)},m(l,o){H(e,l,o),t=!0},p(l,o){const r=o[0]&256?pn(i,[oi(l[8])]):{};o[0]&119|o[1]&2&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){L(e.$$.fragment,l),t=!1},d(l){n[26](null),j(e,l)}}}function _O(n,e,t){let i;const s=["key","title","config","expand","collapse","collapseSiblings"];let l=Bt(e,s),o;at(n,Vi,Z=>t(12,o=Z));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c,d=!1;function h(){f==null||f.expand()}function g(){f==null||f.collapse()}function v(){f==null||f.collapseSiblings()}async function b(){c||d||(t(5,d=!0),t(4,c=(await Pi(()=>import("./CodeEditor.4ed72f0a.js"),["CodeEditor.4ed72f0a.js","index.c4d07677.js"],import.meta.url)).default),t(5,d=!1))}function y(Z){B.copyToClipboard(Z),i_(`Copied ${Z} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const C=()=>y("{APP_NAME}"),S=()=>y("{APP_URL}");function T(){u.actionUrl=this.value,t(0,u)}const M=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),E=()=>y("{TOKEN}");function P(Z){n.$$.not_equal(u.body,Z)&&(u.body=Z,t(0,u))}function I(){u.body=this.value,t(0,u)}const F=()=>y("{APP_NAME}"),z=()=>y("{APP_URL}"),Q=()=>y("{TOKEN}"),ne=()=>y("{ACTION_URL}");function G(Z){me[Z?"unshift":"push"](()=>{f=Z,t(3,f)})}function ee(Z){tt.call(this,n,Z)}function U(Z){tt.call(this,n,Z)}function Y(Z){tt.call(this,n,Z)}return n.$$set=Z=>{e=ut(ut({},e),li(Z)),t(8,l=Bt(e,s)),"key"in Z&&t(1,r=Z.key),"title"in Z&&t(2,a=Z.title),"config"in Z&&t(0,u=Z.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Oa(r))},[u,r,a,f,c,d,i,y,l,h,g,v,o,$,C,S,T,M,O,E,P,I,F,z,Q,ne,G,ee,U,Y]}class Ir extends Ee{constructor(e){super(),Oe(this,e,_O,gO,De,{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 colla Line truncated
<span class="txt">Send test email</span>`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[24]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function RO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=D(),s=_("button"),l=_("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary 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],te(s,"btn-loading",n[3])},m(u,f){w(u,e,f),m(e,t),w(u,i,f),w(u,s,f),m(s,l),r||(a=[J(e,"click",n[22]),J(s,"click",n[23])],r=!0)},p(u,f){f&8&&(e.disabled=u[3]),f&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f&8&&te(s,"btn-loading",u[3])},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,Je(a)}}}function HO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b;const y=[TO,MO],$=[];function C(S,T){return S[2]?0:1}return d=C(n),h=$[d]=y[d](n),{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=D(),l=_("div"),o=N(n[5]),r=D(),a=_("div"),u=_("form"),f=_("div"),f.innerHTML="<p>Configure common settings for sending emails.</p>",c=D(),h.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(S,T){w(S,e,T),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),w(S,r,T),w(S,a,T),m(a,u),m(u,f),m(u,c),$[d].m(u,null),g=!0,v||(b=J(u,"submit",Wt(n[25])),v=!0)},p(S,T){(!g||T&32)&&ue(o,S[5]);let M=d;d=C(S),d===M?$[d].p(S,T):(Ae(),L($[M],1,1,()=>{$[M]=null}),Pe(),h=$[d],h?h.p(S,T):(h=$[d]=y[d](S),h.c()),A(h,1),h.m(u,null))},i(S){g||(A(h),g=!0)},o(S){L(h),g=!1},d(S){S&&k(e),S&&k(r),S&&k(a),$[d].d(),v=!1,b()}}}function jO(n){let e,t,i,s,l,o;e=new Ui({}),i=new On({props:{$$slots:{default:[HO]},$$scope:{ctx:n}}});let r={};return l=new CO({props:r}),n[26](l),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),w(a,s,u),H(l,a,u),o=!0},p(a,[u]){const f={};u&1073741887&&(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){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){j(e,a),a&&k(t),j(i,a),a&&k(s),n[26](null),j(l,a)}}}function qO(n,e,t){let i,s,l;at(n,Nt,ee=>t(5,l=ee));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}];nn(Nt,l="Mail settings",l);let r,a={},u={},f=!1,c=!1;d();async function d(){t(2,f=!0);try{const ee=await ye.settings.getAll()||{};g(ee)}catch(ee){ye.errorResponseHandler(ee)}t(2,f=!1)}async function h(){if(!(c||!s)){t(3,c=!0);try{const ee=await ye.settings.update(B.filterRedactedProps(u));g(ee),ri({}),sn("Successfully saved mail settings.")}catch(ee){ye.errorResponseHandler(ee)}t(3,c=!1)}}function g(ee={}){t(0,u={meta:(ee==null?void 0:ee.meta)||{},smtp:(ee==null?void 0:ee.smtp)||{}}),t(9,a=JSON.parse(JSON.stringify(u)))}function v(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(){u.meta.senderName=this.value,t(0,u)}function y(){u.meta.senderAddress=this.value,t(0,u)}function $(ee){n.$$.not_equal(u.meta.verificationTemplate,ee)&&(u.meta.verificationTemplate=ee,t(0,u))}function C(ee){n.$$.not_equal(u.meta.resetPasswordTemplate,ee)&&(u.meta.resetPasswordTemplate=ee,t(0,u))}function S(ee){n.$$.not_equal(u.meta.confirmEmailChangeTemplate,ee)&&(u.meta.confirmEmailChangeTemplate=ee,t(0,u))}function T(){u.smtp.enabled=this.checked,t(0,u)}function M(){u.smtp.host=this.value,t(0,u)}function O(){u.smtp.port=Pt(this.value),t(0,u)}function E(ee){n.$$.not_equal(u.smtp.tls,ee)&&(u.smtp.tls=ee,t(0,u))}function P(){u.smtp.username=this.value,t(0,u)}function I(ee){n.$$.not_equal(u.smtp.password,ee)&&(u.smtp.password=ee,t(0,u))}const F=()=>v(),z=()=>h(),Q=()=>r==null?void 0:r.show(),ne=()=>h();function G(ee){me[ee?"unshift":"push"](()=>{r=ee,t(1,r)})}return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(4,s=i!=JSON.stringify(u))},[u,r,f,c,s,l,o,h,v,a,i,b,y,$,C,S,T,M,O,E,P,I,F,z,Q,ne,G]}class VO extends Ee{constructor(e){super(),Oe(this,e,qO,jO,De,{})}}function zO(n){var S,T;let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v;e=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[UO,({uniqueId:M})=>({25:M}),({uniqueId:M})=>M?33554432:0]},$$scope:{ctx:n}}});let b=((S=n[0].s3)==null?void 0:S.enabled)!=n[1].s3.enabled&&Ih(n),y=n[1].s3.enabled&&Nh(n),$=((T=n[1].s3)==null?void 0:T.enabled)&&!n[6]&&!n[3]&&Fh(n),C=n[6]&&Rh(n);return{c(){q(e.$$.fragment),t=D(),b&&b.c(),i=D(),y&&y.c(),s=D(),l=_("div"),o=_("div"),r=D(),$&&$.c(),a=D(),C&&C.c(),u=D(),f=_("button"),c=_("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],te(f,"btn-loading",n[3]),p(l,"class","flex")},m(M,O){H(e,M,O),w(M,t,O),b&&b.m(M,O),w(M,i,O),y&&y.m(M,O),w(M,s,O),w(M,l,O),m(l,o),m(l,r),Line truncated
`,y=N("."),p(e,"for",i=n[31]),p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(g,"class","label label-sm link-primary txt-mono"),p(b,"class","label label-sm link-primary txt-mono"),p(b,"title","Required parameter"),p(a,"class","help-block")},m(E,P){w(E,e,P),m(e,t),w(E,s,P),M[l].m(E,P),w(E,r,P),w(E,a,P),m(a,u),m(a,f),m(a,c),m(a,d),m(a,h),m(a,g),m(a,v),m(a,b),m(a,y),$=!0,C||(S=[J(f,"click",n[22]),J(d,"click",n[23]),J(g,"click",n[24]),J(b,"click",n[25])],C=!0)},p(E,P){(!$||P[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let I=l;l=O(E),l===I?M[l].p(E,P):(Ae(),L(M[I],1,1,()=>{M[I]=null}),Pe(),o=M[l],o?o.p(E,P):(o=M[l]=T[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){$||(A(o),$=!0)},o(E){L(o),$=!1},d(E){E&&k(e),E&&k(s),M[l].d(E),E&&k(r),E&&k(a),C=!1,Je(S)}}}function hO(n){let e,t,i,s,l,o;return e=new Ne({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[uO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new Ne({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[fO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new Ne({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[pO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(r,a){H(e,r,a),w(r,t,a),H(i,r,a),w(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){L(e.$$.fragment,r),L(i.$$.fragment,r),L(l.$$.fragment,r),o=!1},d(r){j(e,r),r&&k(t),j(i,r),r&&k(s),j(l,r)}}}function Oh(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ye(gt.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Tt(()=>{t||(t=st(e,Tn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=st(e,Tn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function mO(n){let e,t,i,s,l,o,r,a,u,f,c=n[6]&&Oh();return{c(){e=_("div"),t=_("i"),i=D(),s=_("span"),l=N(n[2]),o=D(),r=_("div"),a=D(),c&&c.c(),u=We(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(d,h){w(d,e,h),m(e,t),m(e,i),m(e,s),m(s,l),w(d,o,h),w(d,r,h),w(d,a,h),c&&c.m(d,h),w(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&ue(l,d[2]),d[6]?c?h[0]&64&&A(c,1):(c=Oh(),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(Ae(),L(c,1,1,()=>{c=null}),Pe())},i(d){f||(A(c),f=!0)},o(d){L(c),f=!1},d(d){d&&k(e),d&&k(o),d&&k(r),d&&k(a),c&&c.d(d),d&&k(u)}}}function gO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[mO],default:[hO]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ut(s,i[l]);return e=new ir({props:s}),n[26](e),e.$on("expand",n[27]),e.$on("collapse",n[28]),e.$on("toggle",n[29]),{c(){q(e.$$.fragment)},m(l,o){H(e,l,o),t=!0},p(l,o){const r=o[0]&256?pn(i,[oi(l[8])]):{};o[0]&119|o[1]&2&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){L(e.$$.fragment,l),t=!1},d(l){n[26](null),j(e,l)}}}function _O(n,e,t){let i;const s=["key","title","config","expand","collapse","collapseSiblings"];let l=Bt(e,s),o;at(n,Vi,G=>t(12,o=G));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c,d=!1;function h(){f==null||f.expand()}function g(){f==null||f.collapse()}function v(){f==null||f.collapseSiblings()}async function b(){c||d||(t(5,d=!0),t(4,c=(await Pi(()=>import("./CodeEditor.d0ed3707.js"),["CodeEditor.d0ed3707.js","index.2148ad18.js"],import.meta.url)).default),t(5,d=!1))}function y(G){B.copyToClipboard(G),i_(`Copied ${G} to clipboard`,2e3)}b();function $(){u.subject=this.value,t(0,u)}const C=()=>y("{APP_NAME}"),S=()=>y("{APP_URL}");function T(){u.actionUrl=this.value,t(0,u)}const M=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),E=()=>y("{TOKEN}");function P(G){n.$$.not_equal(u.body,G)&&(u.body=G,t(0,u))}function I(){u.body=this.value,t(0,u)}const F=()=>y("{APP_NAME}"),V=()=>y("{APP_URL}"),Z=()=>y("{TOKEN}"),te=()=>y("{ACTION_URL}");function X(G){me[G?"unshift":"push"](()=>{f=G,t(3,f)})}function ee(G){tt.call(this,n,G)}function U(G){tt.call(this,n,G)}function Y(G){tt.call(this,n,G)}return n.$$set=G=>{e=ut(ut({},e),li(G)),t(8,l=Bt(e,s)),"key"in G&&t(1,r=G.key),"title"in G&&t(2,a=G.title),"config"in G&&t(0,u=G.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Oa(r))},[u,r,a,f,c,d,i,y,l,h,g,v,o,$,C,S,T,M,O,E,P,I,F,V,Z,te,X,ee,U,Y]}class Ir extends Ee{constructor(e){super(),Oe(this,e,_O,gO,De,{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 colla Line truncated
<span class="txt">Send test email</span>`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[24]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function RO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",i=D(),s=_("button"),l=_("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary 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],ne(s,"btn-loading",n[3])},m(u,f){w(u,e,f),m(e,t),w(u,i,f),w(u,s,f),m(s,l),r||(a=[J(e,"click",n[22]),J(s,"click",n[23])],r=!0)},p(u,f){f&8&&(e.disabled=u[3]),f&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f&8&&ne(s,"btn-loading",u[3])},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,Je(a)}}}function HO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b;const y=[TO,MO],$=[];function C(S,T){return S[2]?0:1}return d=C(n),h=$[d]=y[d](n),{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=D(),l=_("div"),o=N(n[5]),r=D(),a=_("div"),u=_("form"),f=_("div"),f.innerHTML="<p>Configure common settings for sending emails.</p>",c=D(),h.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(S,T){w(S,e,T),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),w(S,r,T),w(S,a,T),m(a,u),m(u,f),m(u,c),$[d].m(u,null),g=!0,v||(b=J(u,"submit",Wt(n[25])),v=!0)},p(S,T){(!g||T&32)&&ue(o,S[5]);let M=d;d=C(S),d===M?$[d].p(S,T):(Ae(),L($[M],1,1,()=>{$[M]=null}),Pe(),h=$[d],h?h.p(S,T):(h=$[d]=y[d](S),h.c()),A(h,1),h.m(u,null))},i(S){g||(A(h),g=!0)},o(S){L(h),g=!1},d(S){S&&k(e),S&&k(r),S&&k(a),$[d].d(),v=!1,b()}}}function jO(n){let e,t,i,s,l,o;e=new Ui({}),i=new On({props:{$$slots:{default:[HO]},$$scope:{ctx:n}}});let r={};return l=new CO({props:r}),n[26](l),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),w(a,s,u),H(l,a,u),o=!0},p(a,[u]){const f={};u&1073741887&&(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){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){j(e,a),a&&k(t),j(i,a),a&&k(s),n[26](null),j(l,a)}}}function qO(n,e,t){let i,s,l;at(n,Nt,ee=>t(5,l=ee));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}];nn(Nt,l="Mail settings",l);let r,a={},u={},f=!1,c=!1;d();async function d(){t(2,f=!0);try{const ee=await ye.settings.getAll()||{};g(ee)}catch(ee){ye.errorResponseHandler(ee)}t(2,f=!1)}async function h(){if(!(c||!s)){t(3,c=!0);try{const ee=await ye.settings.update(B.filterRedactedProps(u));g(ee),ri({}),sn("Successfully saved mail settings.")}catch(ee){ye.errorResponseHandler(ee)}t(3,c=!1)}}function g(ee={}){t(0,u={meta:(ee==null?void 0:ee.meta)||{},smtp:(ee==null?void 0:ee.smtp)||{}}),t(9,a=JSON.parse(JSON.stringify(u)))}function v(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(){u.meta.senderName=this.value,t(0,u)}function y(){u.meta.senderAddress=this.value,t(0,u)}function $(ee){n.$$.not_equal(u.meta.verificationTemplate,ee)&&(u.meta.verificationTemplate=ee,t(0,u))}function C(ee){n.$$.not_equal(u.meta.resetPasswordTemplate,ee)&&(u.meta.resetPasswordTemplate=ee,t(0,u))}function S(ee){n.$$.not_equal(u.meta.confirmEmailChangeTemplate,ee)&&(u.meta.confirmEmailChangeTemplate=ee,t(0,u))}function T(){u.smtp.enabled=this.checked,t(0,u)}function M(){u.smtp.host=this.value,t(0,u)}function O(){u.smtp.port=Pt(this.value),t(0,u)}function E(ee){n.$$.not_equal(u.smtp.tls,ee)&&(u.smtp.tls=ee,t(0,u))}function P(){u.smtp.username=this.value,t(0,u)}function I(ee){n.$$.not_equal(u.smtp.password,ee)&&(u.smtp.password=ee,t(0,u))}const F=()=>v(),V=()=>h(),Z=()=>r==null?void 0:r.show(),te=()=>h();function X(ee){me[ee?"unshift":"push"](()=>{r=ee,t(1,r)})}return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(4,s=i!=JSON.stringify(u))},[u,r,f,c,s,l,o,h,v,a,i,b,y,$,C,S,T,M,O,E,P,I,F,V,Z,te,X]}class VO extends Ee{constructor(e){super(),Oe(this,e,qO,jO,De,{})}}function zO(n){var S,T;let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v;e=new Ne({props:{class:"form-field form-field-toggle",$$slots:{default:[UO,({uniqueId:M})=>({25:M}),({uniqueId:M})=>M?33554432:0]},$$scope:{ctx:n}}});let b=((S=n[0].s3)==null?void 0:S.enabled)!=n[1].s3.enabled&&Ih(n),y=n[1].s3.enabled&&Nh(n),$=((T=n[1].s3)==null?void 0:T.enabled)&&!n[6]&&!n[3]&&Fh(n),C=n[6]&&Rh(n);return{c(){q(e.$$.fragment),t=D(),b&&b.c(),i=D(),y&&y.c(),s=D(),l=_("div"),o=_("div"),r=D(),$&&$.c(),a=D(),C&&C.c(),u=D(),f=_("button"),c=_("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],ne(f,"btn-loading",n[3]),p(l,"class","flex")},m(M,O){H(e,M,O),w(M,t,O),b&&b.m(M,O),w(M,i,O),y&&y.m(M,O),w(M,s,O),w(M,l,O),m(l,o),m(l,r),Line truncated
the
`),r=_("strong"),u=N(a),f=N(`
to the
@@ -640,22 +640,22 @@
`),y=_("a"),y.textContent=`rclone
`,$=N(`,
`),C=_("a"),C.textContent=`s5cmd
`,S=N(", etc."),T=D(),M=_("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener"),p(y,"class","txt-bold"),p(C,"href","https://github.com/peak/s5cmd"),p(C,"target","_blank"),p(C,"rel","noopener"),p(C,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(M,"class","clearfix m-t-base")},m(I,F){w(I,e,F),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(c,h),m(l,g),m(l,v),m(l,b),m(l,y),m(l,$),m(l,C),m(l,S),m(e,T),m(e,M),E=!0},p(I,F){var z;(!E||F&1)&&a!==(a=(z=I[0].s3)!=null&&z.enabled?"S3 storage":"local file system")&&ue(u,a),(!E||F&2)&&d!==(d=I[1].s3.enabled?"S3 storage":"local file system")&&ue(h,d)},i(I){E||(I&&Tt(()=>{O||(O=st(e,on,{duration:150},!0)),O.run(1)}),E=!0)},o(I){I&&(O||(O=st(e,on,{duration:150},!1)),O.run(0)),E=!1},d(I){I&&k(e),I&&O&&O.end()}}}function Nh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M;return i=new Ne({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[WO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[YO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field required",name:"s3.region",$$slots:{default:[KO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[JO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),v=new Ne({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[ZO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),$=new Ne({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[GO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),r=D(),a=_("div"),q(u.$$.fragment),f=D(),c=_("div"),q(d.$$.fragment),h=D(),g=_("div"),q(v.$$.fragment),b=D(),y=_("div"),q($.$$.fragment),C=D(),S=_("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(g,"class","col-lg-6"),p(y,"class","col-lg-12"),p(S,"class","col-lg-12"),p(e,"class","grid")},m(O,E){w(O,e,E),m(e,t),H(i,t,null),m(e,s),m(e,l),H(o,l,null),m(e,r),m(e,a),H(u,a,null),m(e,f),m(e,c),H(d,c,null),m(e,h),m(e,g),H(v,g,null),m(e,b),m(e,y),H($,y,null),m(e,C),m(e,S),M=!0},p(O,E){const P={};E&100663298&&(P.$$scope={dirty:E,ctx:O}),i.$set(P);const I={};E&100663298&&(I.$$scope={dirty:E,ctx:O}),o.$set(I);const F={};E&100663298&&(F.$$scope={dirty:E,ctx:O}),u.$set(F);const z={};E&100663298&&(z.$$scope={dirty:E,ctx:O}),d.$set(z);const Q={};E&100663298&&(Q.$$scope={dirty:E,ctx:O}),v.$set(Q);const ne={};E&100663298&&(ne.$$scope={dirty:E,ctx:O}),$.$set(ne)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(v.$$.fragment,O),A($.$$.fragment,O),O&&Tt(()=>{T||(T=st(e,on,{duration:150},!0)),T.run(1)}),M=!0)},o(O){L(i.$$.fragment,O),L(o.$$.fragment,O),L(u.$$.fragment,O),L(d.$$.fragment,O),L(v.$$.fragment,O),L($.$$.fragment,O),O&&(T||(T=st(e,on,{duration:150},!1)),T.run(0)),M=!1},d(O){O&&k(e),j(i),j(o),j(u),j(d),j(v),j($),O&&T&&T.end()}}}function WO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Endpoint"),s=D(),l=_("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[1].s3.endpoint),r||(a=J(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&&Se(l,u[1].s3.endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function YO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Bucket"),s=D(),l=_("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[1].s3.bucket),r||(a=J(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&&Se(l,u[1].s3.bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function KO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Region"),s=D(),l=_("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[1].s3.region),r||(a=J(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&&Se(l,u[1].s3.region)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function JO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Access key"),s=D(),l=_("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[1].s3.accessKey),r||(a=J(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", Line truncated
`,S=N(", etc."),T=D(),M=_("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener"),p(y,"class","txt-bold"),p(C,"href","https://github.com/peak/s5cmd"),p(C,"target","_blank"),p(C,"rel","noopener"),p(C,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(M,"class","clearfix m-t-base")},m(I,F){w(I,e,F),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),m(l,r),m(r,u),m(l,f),m(l,c),m(c,h),m(l,g),m(l,v),m(l,b),m(l,y),m(l,$),m(l,C),m(l,S),m(e,T),m(e,M),E=!0},p(I,F){var V;(!E||F&1)&&a!==(a=(V=I[0].s3)!=null&&V.enabled?"S3 storage":"local file system")&&ue(u,a),(!E||F&2)&&d!==(d=I[1].s3.enabled?"S3 storage":"local file system")&&ue(h,d)},i(I){E||(I&&Tt(()=>{O||(O=st(e,on,{duration:150},!0)),O.run(1)}),E=!0)},o(I){I&&(O||(O=st(e,on,{duration:150},!1)),O.run(0)),E=!1},d(I){I&&k(e),I&&O&&O.end()}}}function Nh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M;return i=new Ne({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[WO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[YO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field required",name:"s3.region",$$slots:{default:[KO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),d=new Ne({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[JO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),v=new Ne({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[ZO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),$=new Ne({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[GO,({uniqueId:O})=>({25:O}),({uniqueId:O})=>O?33554432:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),r=D(),a=_("div"),q(u.$$.fragment),f=D(),c=_("div"),q(d.$$.fragment),h=D(),g=_("div"),q(v.$$.fragment),b=D(),y=_("div"),q($.$$.fragment),C=D(),S=_("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(g,"class","col-lg-6"),p(y,"class","col-lg-12"),p(S,"class","col-lg-12"),p(e,"class","grid")},m(O,E){w(O,e,E),m(e,t),H(i,t,null),m(e,s),m(e,l),H(o,l,null),m(e,r),m(e,a),H(u,a,null),m(e,f),m(e,c),H(d,c,null),m(e,h),m(e,g),H(v,g,null),m(e,b),m(e,y),H($,y,null),m(e,C),m(e,S),M=!0},p(O,E){const P={};E&100663298&&(P.$$scope={dirty:E,ctx:O}),i.$set(P);const I={};E&100663298&&(I.$$scope={dirty:E,ctx:O}),o.$set(I);const F={};E&100663298&&(F.$$scope={dirty:E,ctx:O}),u.$set(F);const V={};E&100663298&&(V.$$scope={dirty:E,ctx:O}),d.$set(V);const Z={};E&100663298&&(Z.$$scope={dirty:E,ctx:O}),v.$set(Z);const te={};E&100663298&&(te.$$scope={dirty:E,ctx:O}),$.$set(te)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(v.$$.fragment,O),A($.$$.fragment,O),O&&Tt(()=>{T||(T=st(e,on,{duration:150},!0)),T.run(1)}),M=!0)},o(O){L(i.$$.fragment,O),L(o.$$.fragment,O),L(u.$$.fragment,O),L(d.$$.fragment,O),L(v.$$.fragment,O),L($.$$.fragment,O),O&&(T||(T=st(e,on,{duration:150},!1)),T.run(0)),M=!1},d(O){O&&k(e),j(i),j(o),j(u),j(d),j(v),j($),O&&T&&T.end()}}}function WO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Endpoint"),s=D(),l=_("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[1].s3.endpoint),r||(a=J(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&&Se(l,u[1].s3.endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function YO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Bucket"),s=D(),l=_("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[1].s3.bucket),r||(a=J(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&&Se(l,u[1].s3.bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function KO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Region"),s=D(),l=_("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[1].s3.region),r||(a=J(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&&Se(l,u[1].s3.region)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function JO(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Access key"),s=D(),l=_("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[1].s3.accessKey),r||(a=J(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", Line truncated
<span class="txt">S3 connected successfully</span>`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function QO(n){let e,t,i,s;return{c(){e=_("div"),e.innerHTML=`<i class="ri-error-warning-line txt-warning"></i>
<span class="txt">Failed to establish S3 connection</span>`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Ye(t=gt.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Nn(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function xO(n){let e;return{c(){e=_("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function Rh(n){let e,t,i,s;return{c(){e=_("button"),t=_("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3]},m(l,o){w(l,e,o),m(e,t),i||(s=J(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&k(e),i=!1,s()}}}function e5(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b;const y=[BO,zO],$=[];function C(S,T){return S[2]?0:1}return d=C(n),h=$[d]=y[d](n),{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=D(),l=_("div"),o=N(n[7]),r=D(),a=_("div"),u=_("form"),f=_("div"),f.innerHTML=`<p>By default PocketBase uses the local file system to store uploaded files.</p>
<p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,c=D(),h.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(S,T){w(S,e,T),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),w(S,r,T),w(S,a,T),m(a,u),m(u,f),m(u,c),$[d].m(u,null),g=!0,v||(b=J(u,"submit",Wt(n[20])),v=!0)},p(S,T){(!g||T&128)&&ue(o,S[7]);let M=d;d=C(S),d===M?$[d].p(S,T):(Ae(),L($[M],1,1,()=>{$[M]=null}),Pe(),h=$[d],h?h.p(S,T):(h=$[d]=y[d](S),h.c()),A(h,1),h.m(u,null))},i(S){g||(A(h),g=!0)},o(S){L(h),g=!1},d(S){S&&k(e),S&&k(r),S&&k(a),$[d].d(),v=!1,b()}}}function t5(n){let e,t,i,s;return e=new Ui({}),i=new On({props:{$$slots:{default:[e5]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){H(e,l,o),w(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){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&k(t),j(i,l)}}}const Fr="s3_test_request";function n5(n,e,t){let i,s,l;at(n,Nt,z=>t(7,l=z)),nn(Nt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;h();async function h(){t(2,a=!0);try{const z=await ye.settings.getAll()||{};b(z)}catch(z){ye.errorResponseHandler(z)}t(2,a=!1)}async function g(){if(t(5,c=null),!!r.s3.enabled){t(4,f=!0);try{await ye.settings.testS3({$cancelKey:Fr})}catch(z){t(5,c=z)}t(4,f=!1)}}async function v(){if(!(u||!s)){t(3,u=!0),clearTimeout(d),d=setTimeout(()=>{ye.cancelRequest(Fr),addErrorToast("S3 test connection timeout.")},3e4);try{ye.cancelRequest(Fr);const z=await ye.settings.update(B.filterRedactedProps(r));ri({}),await b(z),J0(),c?K0("Successfully saved but failed to establish S3 connection."):sn("Successfully saved files storage settings.")}catch(z){ye.errorResponseHandler(z)}clearTimeout(d),t(3,u=!1)}}async function b(z={}){t(1,r={s3:(z==null?void 0:z.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await g()}async function y(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await g()}function $(){r.s3.enabled=this.checked,t(1,r)}function C(){r.s3.endpoint=this.value,t(1,r)}function S(){r.s3.bucket=this.value,t(1,r)}function T(){r.s3.region=this.value,t(1,r)}function M(){r.s3.accessKey=this.value,t(1,r)}function O(z){n.$$.not_equal(r.s3.secret,z)&&(r.s3.secret=z,t(1,r))}function E(){r.s3.forcePathStyle=this.checked,t(1,r)}const P=()=>y(),I=()=>v(),F=()=>v();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,v,y,i,$,C,S,T,M,O,E,P,I,F]}class i5 extends Ee{constructor(e){super(),Oe(this,e,n5,t5,De,{})}}function s5(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=D(),s=_("label"),l=N("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[16]),p(s,"for",o=n[16])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&65536&&t!==(t=u[16])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&65536&&o!==(o=u[16])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Hh(n){let e,t,i,s,l,o,r,a,u,f,c;return i=new Ne({props:{class:"form-field required",name:"emailAuth.minPasswordLength",$$slots:{default:[l5,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field "+(B.isEmpty(n[0].onlyDomains)?"":"disabled"),name:"emailAuth.exceptDomains",$$slots:{default:[o5,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field "+(B.isEmpty(n[0].exceptDomains)?"":"disabled"),name:"emailAuth.onlyDomains",$$slots:{default:[r5,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),r=D(),a=_("div"),q(u.$$.fragment),p(t,"class","col-sm-12 m-t-sm"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(e,"class","grid")},m(d,h){w(d,e,h),m(e,t),H(i,t,null),m(e,s),m(e,l),H(o,l,null),m(e,r),m(e,a),H(u,a,null),c=!0},p(d,h){const g={};h&196609&&(g.$$scope={dirty:h,ctx:d}),i.$set(g);const v={};h&1&&(v.class="form-field "+(B.isEmpty(d[0].onlyDomains)?"":"disabled")),h&196609&&(v.$$scope={dirty:h,ctx:d}),o.$set(v);const b={};h&1&&(b.class="form-field "+(B.isEmpty(d[0].exceptDomains)?"":"disabled")),h&196609&&(b.$$scope={dirty:h,ctx:d}),u.$set(b)},i(d){c||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),d&&Tt(()=>{f||(f=st(e,on,{duration:150},!0)),f.run(1)}),c=!0)},o(d){L(i.$$.fragment,d),L(o.$$.fragment,d),L(u.$$.fragment,d),d&&(f||(f=st(e,on,{duration:150},!1)),f.run(0)),c=!1},d(d){d&&k(e),j(i),j(o),j(u),d&&f&&f.end()}}}function l5(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Minimum password length"),s=D(),l=_("input"),p(e,"for",i=n[16]),p(l,"type","number"),p(l,"id",o=n[16]),l.required=!0,p(l,"min","5"),p(l,"max","200")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].minPassworLine truncated
<p>If you have limited disk space, you could optionally connect to a S3 compatible storage.</p>`,c=D(),h.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(S,T){w(S,e,T),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),w(S,r,T),w(S,a,T),m(a,u),m(u,f),m(u,c),$[d].m(u,null),g=!0,v||(b=J(u,"submit",Wt(n[20])),v=!0)},p(S,T){(!g||T&128)&&ue(o,S[7]);let M=d;d=C(S),d===M?$[d].p(S,T):(Ae(),L($[M],1,1,()=>{$[M]=null}),Pe(),h=$[d],h?h.p(S,T):(h=$[d]=y[d](S),h.c()),A(h,1),h.m(u,null))},i(S){g||(A(h),g=!0)},o(S){L(h),g=!1},d(S){S&&k(e),S&&k(r),S&&k(a),$[d].d(),v=!1,b()}}}function t5(n){let e,t,i,s;return e=new Ui({}),i=new On({props:{$$slots:{default:[e5]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){H(e,l,o),w(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){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&k(t),j(i,l)}}}const Fr="s3_test_request";function n5(n,e,t){let i,s,l;at(n,Nt,V=>t(7,l=V)),nn(Nt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;h();async function h(){t(2,a=!0);try{const V=await ye.settings.getAll()||{};b(V)}catch(V){ye.errorResponseHandler(V)}t(2,a=!1)}async function g(){if(t(5,c=null),!!r.s3.enabled){t(4,f=!0);try{await ye.settings.testS3({$cancelKey:Fr})}catch(V){t(5,c=V)}t(4,f=!1)}}async function v(){if(!(u||!s)){t(3,u=!0),clearTimeout(d),d=setTimeout(()=>{ye.cancelRequest(Fr),addErrorToast("S3 test connection timeout.")},3e4);try{ye.cancelRequest(Fr);const V=await ye.settings.update(B.filterRedactedProps(r));ri({}),await b(V),J0(),c?K0("Successfully saved but failed to establish S3 connection."):sn("Successfully saved files storage settings.")}catch(V){ye.errorResponseHandler(V)}clearTimeout(d),t(3,u=!1)}}async function b(V={}){t(1,r={s3:(V==null?void 0:V.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await g()}async function y(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await g()}function $(){r.s3.enabled=this.checked,t(1,r)}function C(){r.s3.endpoint=this.value,t(1,r)}function S(){r.s3.bucket=this.value,t(1,r)}function T(){r.s3.region=this.value,t(1,r)}function M(){r.s3.accessKey=this.value,t(1,r)}function O(V){n.$$.not_equal(r.s3.secret,V)&&(r.s3.secret=V,t(1,r))}function E(){r.s3.forcePathStyle=this.checked,t(1,r)}const P=()=>y(),I=()=>v(),F=()=>v();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,v,y,i,$,C,S,T,M,O,E,P,I,F]}class i5 extends Ee{constructor(e){super(),Oe(this,e,n5,t5,De,{})}}function s5(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=D(),s=_("label"),l=N("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[16]),p(s,"for",o=n[16])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&65536&&t!==(t=u[16])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&65536&&o!==(o=u[16])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Hh(n){let e,t,i,s,l,o,r,a,u,f,c;return i=new Ne({props:{class:"form-field required",name:"emailAuth.minPasswordLength",$$slots:{default:[l5,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),o=new Ne({props:{class:"form-field "+(B.isEmpty(n[0].onlyDomains)?"":"disabled"),name:"emailAuth.exceptDomains",$$slots:{default:[o5,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),u=new Ne({props:{class:"form-field "+(B.isEmpty(n[0].exceptDomains)?"":"disabled"),name:"emailAuth.onlyDomains",$$slots:{default:[r5,({uniqueId:d})=>({16:d}),({uniqueId:d})=>d?65536:0]},$$scope:{ctx:n}}}),{c(){e=_("div"),t=_("div"),q(i.$$.fragment),s=D(),l=_("div"),q(o.$$.fragment),r=D(),a=_("div"),q(u.$$.fragment),p(t,"class","col-sm-12 m-t-sm"),p(l,"class","col-lg-6"),p(a,"class","col-lg-6"),p(e,"class","grid")},m(d,h){w(d,e,h),m(e,t),H(i,t,null),m(e,s),m(e,l),H(o,l,null),m(e,r),m(e,a),H(u,a,null),c=!0},p(d,h){const g={};h&196609&&(g.$$scope={dirty:h,ctx:d}),i.$set(g);const v={};h&1&&(v.class="form-field "+(B.isEmpty(d[0].onlyDomains)?"":"disabled")),h&196609&&(v.$$scope={dirty:h,ctx:d}),o.$set(v);const b={};h&1&&(b.class="form-field "+(B.isEmpty(d[0].exceptDomains)?"":"disabled")),h&196609&&(b.$$scope={dirty:h,ctx:d}),u.$set(b)},i(d){c||(A(i.$$.fragment,d),A(o.$$.fragment,d),A(u.$$.fragment,d),d&&Tt(()=>{f||(f=st(e,on,{duration:150},!0)),f.run(1)}),c=!0)},o(d){L(i.$$.fragment,d),L(o.$$.fragment,d),L(u.$$.fragment,d),d&&(f||(f=st(e,on,{duration:150},!1)),f.run(0)),c=!1},d(d){d&&k(e),j(i),j(o),j(u),d&&f&&f.end()}}}function l5(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Minimum password length"),s=D(),l=_("input"),p(e,"for",i=n[16]),p(l,"type","number"),p(l,"id",o=n[16]),l.required=!0,p(l,"min","5"),p(l,"max","200")},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].minPassworLine truncated
This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&65536&&l!==(l=b[16]))&&p(e,"for",l);const $={};y&65536&&($.id=b[16]),y&1&&($.disabled=!B.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,$.value=b[0].exceptDomains,je(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){L(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),j(r,b),b&&k(u),b&&k(f),d=!1,h()}}}function r5(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function g(b){n[11](b)}let v={id:n[16]+".config.onlyDomains",disabled:!B.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(v.value=n[0].onlyDomains),r=new hs({props:v}),me.push(()=>Re(r,"value",g)),{c(){e=_("label"),t=_("span"),t.textContent="Only domains",i=D(),s=_("i"),o=D(),q(r.$$.fragment),u=D(),f=_("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[16]+".config.onlyDomains"),p(f,"class","help-block")},m(b,y){w(b,e,y),m(e,t),m(e,i),m(e,s),w(b,o,y),H(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(h=Ye(gt.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&65536&&l!==(l=b[16]+".config.onlyDomains"))&&p(e,"for",l);const $={};y&65536&&($.id=b[16]+".config.onlyDomains"),y&1&&($.disabled=!B.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,$.value=b[0].onlyDomains,je(()=>a=!1)),r.$set($)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){L(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),j(r,b),b&&k(u),b&&k(f),d=!1,h()}}}function a5(n){let e,t,i,s;e=new Ne({props:{class:"form-field form-field-toggle m-b-0",name:"emailAuth.enabled",$$slots:{default:[s5,({uniqueId:o})=>({16:o}),({uniqueId:o})=>o?65536:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&Hh(n);return{c(){q(e.$$.fragment),t=D(),l&&l.c(),i=We()},m(o,r){H(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&196609&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].enabled?l?(l.p(o,r),r&1&&A(l,1)):(l=Hh(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(Ae(),L(l,1,1,()=>{l=null}),Pe())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){j(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function u5(n){let e;return{c(){e=_("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function f5(n){let e;return{c(){e=_("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function jh(n){let e,t,i,s,l;return{c(){e=_("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ye(gt.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Tt(()=>{t||(t=st(e,Tn,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=st(e,Tn,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function c5(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].enabled?f5:u5}let u=a(n),f=u(n),c=n[2]&&jh();return{c(){e=_("div"),e.innerHTML=`<i class="ri-mail-lock-line"></i>
<span class="txt">Email/Password</span>`,t=D(),f.c(),i=D(),s=_("div"),l=D(),c&&c.c(),o=We(),p(e,"class","inline-flex"),p(s,"class","flex-fill")},m(d,h){w(d,e,h),w(d,t,h),f.m(d,h),w(d,i,h),w(d,s,h),w(d,l,h),c&&c.m(d,h),w(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(i.parentNode,i))),d[2]?c?h&4&&A(c,1):(c=jh(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(Ae(),L(c,1,1,()=>{c=null}),Pe())},i(d){r||(A(c),r=!0)},o(d){L(c),r=!1},d(d){d&&k(e),d&&k(t),f.d(d),d&&k(i),d&&k(s),d&&k(l),c&&c.d(d),d&&k(o)}}}function d5(n){let e,t;const i=[n[3]];let s={$$slots:{header:[c5],default:[a5]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ut(s,i[l]);return e=new ir({props:s}),n[12](e),e.$on("expand",n[13]),e.$on("collapse",n[14]),e.$on("toggle",n[15]),{c(){q(e.$$.fragment)},m(l,o){H(e,l,o),t=!0},p(l,[o]){const r=o&8?pn(i,[oi(l[3])]):{};o&131077&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){L(e.$$.fragment,l),t=!1},d(l){n[12](null),j(e,l)}}}function p5(n,e,t){let i;const s=["config","expand","collapse","collapseSiblings"];let l=Bt(e,s),o;at(n,Vi,S=>t(7,o=S));let{config:r={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){r.enabled=this.checked,t(0,r)}function h(){r.minPasswordLength=Pt(this.value),t(0,r)}function g(S){n.$$.not_equal(r.exceptDomains,S)&&(r.exceptDomains=S,t(0,r))}function v(S){n.$$.not_equal(r.onlyDomains,S)&&(r.onlyDomains=S,t(0,r))}function b(S){me[S?"unshift":"push"](()=>{a=S,t(1,a)})}function y(S){tt.call(this,n,S)}function $(S){tt.call(this,n,S)}function C(S){tt.call(this,n,S)}return n.$$set=S=>{e=ut(ut({},e),li(S)),t(3,l=Bt(e,s)),"config"in S&&t(0,r=S.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!B.isEmpty(o==null?void 0:o.emailAuth))},[r,a,i,l,u,f,c,o,d,h,g,v,b,y,$,C]}class h5 extends Ee{constructor(e){super(),Oe(this,e,p5,d5,De,{config:0,expand:4,collapse:5,collapseSiblings:6})}get expand(){return this.$$.ctx[4]}get collapse(){return this.$$.ctx[5]}get collapseSiblings(){return this.$$.ctx[6]}}function m5(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=D(),s=_("label"),l=N("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[23]),p(s,"for",o=n[23])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),r||(a=J(e,"change",n[12]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&8388608&&o!==(o=u[23])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function qh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g;l=new Ne({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[g5,({uniqueId:b})=>({23:b}),({uniqueId:b})=>b?8388608:0]},$$scope:{ctx:n}}}),a=new Ne({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[_5,({uniqueId:b})=>({23:b}),({uniqueId:b})=>b?8388608:0]},$$scope:{ctx:n}}}),c=new Ne({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[b5,({uniqueId:b})=>({23:b}),({uniqueId:b})=>b?8388608:0]},$$scope:{ctx:n}}});let v=n[4]&&Vh(n);return{c(){e=_("div"),t=_("div"),i=D(),s=_("div"),q(l.$$.fragment),o=D(),r=_("div"),q(a.$$.fragment),u=D(),f=_("div"),q(c.$$.fragment),d=D(),v&&v.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(r,"class","col-lg-6"),p(f,"class","col-lg-12"),p(e,"class","grid")},m(b,y){w(b,e,y),m(e,t),m(e,i),m(e,s),H(l,s,null),m(e,o),m(e,r),H(a,r,null),m(e,u),m(e,f),H(c,f,null),m(e,d),v&&v.m(e,null),g=!0},p(b,y){const $={};y&2&&($.name=b[1]+".clientId"),y&25165825&&($.$$scope={dirty:y,ctx:b}),l.$set($);const C={};y&2&&(C.name=b[1]+".clientSecret"),y&25165825&&(C.$$scope={dirty:y,ctx:b}),a.$set(C);const S={};y&2&&(S.name=b[1]+".allowRegistrations"),y&25165825&&(S.$$scope={dirty:y,ctx:b}),c.$set(S),b[4]?v?(v.p(b,y),y&16&&A(v,1)):(v=Vh(b),v.c(),A(v,1),v.m(e,null)):v&&(Ae(),L(v,1,1,()=>{v=null}),Pe())},i(b){g||(A(l.$$.fragment,b),A(a.$$.fragment,b),A(c.$$.fragment,b),A(v),b&&Tt(()=>{h||(h=st(e,on,{duration:200},!0)),h.run(1)}),g=!0)},o(b){L(l.$$.fragment,b),L(a.$$.fragment,b),L(c.$$.fragment,b),L(v),b&&(h||(h=st(e,on,{duration:200},!1)),h.run(0)),g=!1},d(b){b&&k(e),j(l),j(a),j(c),v&&v.d(),b&&h&&h.end()}}}function g5(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Client ID"),s=D(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].clientId),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&Se(l,u[0].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function _5(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[23],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new nu({props:u}),me.push(()=>Re(l,"value",a)),{c(){e=_("label"),t=N("Client Secret"),s=D(),q(l.$$.fragment),p(e,"for",i=n[23])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&8388608&&i!==(i=f[23]))&&p(e,"for",i);const d={};c&8388608&&(d.id=f[23]),!o&&c&1&&(Line truncated
<span class="txt">Email/Password</span>`,t=D(),f.c(),i=D(),s=_("div"),l=D(),c&&c.c(),o=We(),p(e,"class","inline-flex"),p(s,"class","flex-fill")},m(d,h){w(d,e,h),w(d,t,h),f.m(d,h),w(d,i,h),w(d,s,h),w(d,l,h),c&&c.m(d,h),w(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(i.parentNode,i))),d[2]?c?h&4&&A(c,1):(c=jh(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(Ae(),L(c,1,1,()=>{c=null}),Pe())},i(d){r||(A(c),r=!0)},o(d){L(c),r=!1},d(d){d&&k(e),d&&k(t),f.d(d),d&&k(i),d&&k(s),d&&k(l),c&&c.d(d),d&&k(o)}}}function d5(n){let e,t;const i=[n[3]];let s={$$slots:{header:[c5],default:[a5]},$$scope:{ctx:n}};for(let l=0;l<i.length;l+=1)s=ut(s,i[l]);return e=new ir({props:s}),n[12](e),e.$on("expand",n[13]),e.$on("collapse",n[14]),e.$on("toggle",n[15]),{c(){q(e.$$.fragment)},m(l,o){H(e,l,o),t=!0},p(l,[o]){const r=o&8?pn(i,[oi(l[3])]):{};o&131077&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){L(e.$$.fragment,l),t=!1},d(l){n[12](null),j(e,l)}}}function p5(n,e,t){let i;const s=["config","expand","collapse","collapseSiblings"];let l=Bt(e,s),o;at(n,Vi,S=>t(7,o=S));let{config:r={}}=e,a;function u(){a==null||a.expand()}function f(){a==null||a.collapse()}function c(){a==null||a.collapseSiblings()}function d(){r.enabled=this.checked,t(0,r)}function h(){r.minPasswordLength=Pt(this.value),t(0,r)}function g(S){n.$$.not_equal(r.exceptDomains,S)&&(r.exceptDomains=S,t(0,r))}function v(S){n.$$.not_equal(r.onlyDomains,S)&&(r.onlyDomains=S,t(0,r))}function b(S){me[S?"unshift":"push"](()=>{a=S,t(1,a)})}function y(S){tt.call(this,n,S)}function $(S){tt.call(this,n,S)}function C(S){tt.call(this,n,S)}return n.$$set=S=>{e=ut(ut({},e),li(S)),t(3,l=Bt(e,s)),"config"in S&&t(0,r=S.config)},n.$$.update=()=>{n.$$.dirty&128&&t(2,i=!B.isEmpty(o==null?void 0:o.emailAuth))},[r,a,i,l,u,f,c,o,d,h,g,v,b,y,$,C]}class h5 extends Ee{constructor(e){super(),Oe(this,e,p5,d5,De,{config:0,expand:4,collapse:5,collapseSiblings:6})}get expand(){return this.$$.ctx[4]}get collapse(){return this.$$.ctx[5]}get collapseSiblings(){return this.$$.ctx[6]}}function m5(n){let e,t,i,s,l,o,r,a;return{c(){e=_("input"),i=D(),s=_("label"),l=N("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[23]),p(s,"for",o=n[23])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),m(s,l),r||(a=J(e,"change",n[12]),r=!0)},p(u,f){f&8388608&&t!==(t=u[23])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&8388608&&o!==(o=u[23])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function qh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g;l=new Ne({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[g5,({uniqueId:b})=>({23:b}),({uniqueId:b})=>b?8388608:0]},$$scope:{ctx:n}}}),a=new Ne({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[_5,({uniqueId:b})=>({23:b}),({uniqueId:b})=>b?8388608:0]},$$scope:{ctx:n}}}),c=new Ne({props:{class:"form-field",name:n[1]+".allowRegistrations",$$slots:{default:[b5,({uniqueId:b})=>({23:b}),({uniqueId:b})=>b?8388608:0]},$$scope:{ctx:n}}});let v=n[4]&&Vh(n);return{c(){e=_("div"),t=_("div"),i=D(),s=_("div"),q(l.$$.fragment),o=D(),r=_("div"),q(a.$$.fragment),u=D(),f=_("div"),q(c.$$.fragment),d=D(),v&&v.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(r,"class","col-lg-6"),p(f,"class","col-lg-12"),p(e,"class","grid")},m(b,y){w(b,e,y),m(e,t),m(e,i),m(e,s),H(l,s,null),m(e,o),m(e,r),H(a,r,null),m(e,u),m(e,f),H(c,f,null),m(e,d),v&&v.m(e,null),g=!0},p(b,y){const $={};y&2&&($.name=b[1]+".clientId"),y&25165825&&($.$$scope={dirty:y,ctx:b}),l.$set($);const C={};y&2&&(C.name=b[1]+".clientSecret"),y&25165825&&(C.$$scope={dirty:y,ctx:b}),a.$set(C);const S={};y&2&&(S.name=b[1]+".allowRegistrations"),y&25165825&&(S.$$scope={dirty:y,ctx:b}),c.$set(S),b[4]?v?(v.p(b,y),y&16&&A(v,1)):(v=Vh(b),v.c(),A(v,1),v.m(e,null)):v&&(Ae(),L(v,1,1,()=>{v=null}),Pe())},i(b){g||(A(l.$$.fragment,b),A(a.$$.fragment,b),A(c.$$.fragment,b),A(v),b&&Tt(()=>{h||(h=st(e,on,{duration:200},!0)),h.run(1)}),g=!0)},o(b){L(l.$$.fragment,b),L(a.$$.fragment,b),L(c.$$.fragment,b),L(v),b&&(h||(h=st(e,on,{duration:200},!1)),h.run(0)),g=!1},d(b){b&&k(e),j(l),j(a),j(c),v&&v.d(),b&&h&&h.end()}}}function g5(n){let e,t,i,s,l,o,r,a;return{c(){e=_("label"),t=N("Client ID"),s=D(),l=_("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),m(e,t),w(u,s,f),w(u,l,f),Se(l,n[0].clientId),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&Se(l,u[0].clientId)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function _5(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[23],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new nu({props:u}),me.push(()=>Re(l,"value",a)),{c(){e=_("label"),t=N("Client Secret"),s=D(),q(l.$$.fragment),p(e,"for",i=n[23])},m(f,c){w(f,e,c),m(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&8388608&&i!==(i=f[23]))&&p(e,"for",i);const d={};c&8388608&&(d.id=f[23]),!o&&c&1&&(Line truncated
another PocketBase environment.</p>`,t=D(),i=_("div"),s=_("button"),s.innerHTML='<span class="txt">Copy</span>',l=D(),q(o.$$.fragment),r=D(),a=_("div"),u=_("div"),f=D(),c=_("button"),c.innerHTML=`<i class="ri-download-line"></i>
<span class="txt">Download as JSON</span>`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-secondary 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(v,b){w(v,e,b),w(v,t,b),w(v,i,b),m(i,s),m(i,l),H(o,i,null),n[8](i),w(v,r,b),w(v,a,b),m(a,u),m(a,f),m(a,c),d=!0,h||(g=[J(s,"click",n[7]),J(i,"keydown",n[9]),J(c,"click",n[10])],h=!0)},p(v,b){const y={};b&4&&(y.content=v[2]),o.$set(y)},i(v){d||(A(o.$$.fragment,v),d=!0)},o(v){L(o.$$.fragment,v),d=!1},d(v){v&&k(e),v&&k(t),v&&k(i),j(o),n[8](null),v&&k(r),v&&k(a),h=!1,Je(g)}}}function B5(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:se,i:se,o:se,d(t){t&&k(e)}}}function U5(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[B5,z5],g=[];function v(b,y){return b[1]?0:1}return f=v(n),c=g[f]=h[f](n),{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=D(),l=_("div"),o=N(n[3]),r=D(),a=_("div"),u=_("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){w(b,e,y),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),w(b,r,y),w(b,a,y),m(a,u),g[f].m(u,null),d=!0},p(b,y){(!d||y&8)&&ue(o,b[3]);let $=f;f=v(b),f===$?g[f].p(b,y):(Ae(),L(g[$],1,1,()=>{g[$]=null}),Pe(),c=g[f],c?c.p(b,y):(c=g[f]=h[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){L(c),d=!1},d(b){b&&k(e),b&&k(r),b&&k(a),g[f].d()}}}function W5(n){let e,t,i,s;return e=new Ui({}),i=new On({props:{$$slots:{default:[U5]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){H(e,l,o),w(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){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&k(t),j(i,l)}}}function Y5(n,e,t){let i,s;at(n,Nt,b=>t(3,s=b)),nn(Nt,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 ye.collections.getFullList(100,{$cancelKey:l}));for(let b of r)delete b.created,delete b.updated}catch(b){ye.errorResponseHandler(b)}t(1,a=!1)}function f(){B.downloadJson(r,"pb_schema")}function c(){B.copyToClipboard(i),i_("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function h(b){me[b?"unshift":"push"](()=>{o=b,t(0,o)})}const g=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const y=window.getSelection(),$=document.createRange();$.selectNodeContents(o),y.removeAllRanges(),y.addRange($)}},v=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,h,g,v]}class K5 extends Ee{constructor(e){super(),Oe(this,e,Y5,W5,De,{})}}function Gh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Qh(n,e,t){const i=n.slice();return i[14]=e[t],i}function xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function em(n,e,t){const i=n.slice();return i[14]=e[t],i}function tm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function nm(n,e,t){const i=n.slice();return i[30]=e[t],i}function J5(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&im(),a=n[0].name!==n[1].name&&sm(n);return{c(){e=_("div"),r&&r.c(),t=D(),a&&a.c(),i=D(),s=_("strong"),o=N(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){w(u,e,f),r&&r.m(e,null),m(e,t),a&&a.m(e,null),m(e,i),m(e,s),m(s,o)},p(u,f){u[9]?r||(r=im(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=sm(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&ue(o,l)},d(u){u&&k(e),r&&r.d(),a&&a.d()}}}function Z5(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=_("span"),e.textContent="Deleted",t=D(),i=_("strong"),l=N(s),p(e,"class","label label-danger")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),m(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&ue(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function G5(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=_("span"),e.textContent="Added",t=D(),i=_("strong"),l=N(s),p(e,"class","label label-success")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),m(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&ue(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function im(n){let e;return{c(){e=_("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function sm(n){let e,t=n[0].name+"",i,s,l;return{c(){e=_("strong"),i=N(t),s=D(),l=_("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){w(o,e,r),m(e,i),w(o,s,r),w(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&ue(i,t)},d(o){o&&k(e),o&&k(s),o&&k(l)}}}function lm(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]])+""Line truncated
<span class="txt">Download as JSON</span>`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-secondary 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(v,b){w(v,e,b),w(v,t,b),w(v,i,b),m(i,s),m(i,l),H(o,i,null),n[8](i),w(v,r,b),w(v,a,b),m(a,u),m(a,f),m(a,c),d=!0,h||(g=[J(s,"click",n[7]),J(i,"keydown",n[9]),J(c,"click",n[10])],h=!0)},p(v,b){const y={};b&4&&(y.content=v[2]),o.$set(y)},i(v){d||(A(o.$$.fragment,v),d=!0)},o(v){L(o.$$.fragment,v),d=!1},d(v){v&&k(e),v&&k(t),v&&k(i),j(o),n[8](null),v&&k(r),v&&k(a),h=!1,Je(g)}}}function B5(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:se,i:se,o:se,d(t){t&&k(e)}}}function U5(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[B5,z5],g=[];function v(b,y){return b[1]?0:1}return f=v(n),c=g[f]=h[f](n),{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=D(),l=_("div"),o=N(n[3]),r=D(),a=_("div"),u=_("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){w(b,e,y),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),w(b,r,y),w(b,a,y),m(a,u),g[f].m(u,null),d=!0},p(b,y){(!d||y&8)&&ue(o,b[3]);let $=f;f=v(b),f===$?g[f].p(b,y):(Ae(),L(g[$],1,1,()=>{g[$]=null}),Pe(),c=g[f],c?c.p(b,y):(c=g[f]=h[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){L(c),d=!1},d(b){b&&k(e),b&&k(r),b&&k(a),g[f].d()}}}function W5(n){let e,t,i,s;return e=new Ui({}),i=new On({props:{$$slots:{default:[U5]},$$scope:{ctx:n}}}),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment)},m(l,o){H(e,l,o),w(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){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){j(e,l),l&&k(t),j(i,l)}}}function Y5(n,e,t){let i,s;at(n,Nt,b=>t(3,s=b)),nn(Nt,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 ye.collections.getFullList(100,{$cancelKey:l}));for(let b of r)delete b.created,delete b.updated}catch(b){ye.errorResponseHandler(b)}t(1,a=!1)}function f(){B.downloadJson(r,"pb_schema")}function c(){B.copyToClipboard(i),i_("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function h(b){me[b?"unshift":"push"](()=>{o=b,t(0,o)})}const g=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const y=window.getSelection(),$=document.createRange();$.selectNodeContents(o),y.removeAllRanges(),y.addRange($)}},v=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,h,g,v]}class K5 extends Ee{constructor(e){super(),Oe(this,e,Y5,W5,De,{})}}function Gh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Qh(n,e,t){const i=n.slice();return i[14]=e[t],i}function xh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function em(n,e,t){const i=n.slice();return i[14]=e[t],i}function tm(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function nm(n,e,t){const i=n.slice();return i[30]=e[t],i}function J5(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&im(),a=n[0].name!==n[1].name&&sm(n);return{c(){e=_("div"),r&&r.c(),t=D(),a&&a.c(),i=D(),s=_("strong"),o=N(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){w(u,e,f),r&&r.m(e,null),m(e,t),a&&a.m(e,null),m(e,i),m(e,s),m(s,o)},p(u,f){u[9]?r||(r=im(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=sm(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&ue(o,l)},d(u){u&&k(e),r&&r.d(),a&&a.d()}}}function Z5(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=_("span"),e.textContent="Deleted",t=D(),i=_("strong"),l=N(s),p(e,"class","label label-danger")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),m(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&ue(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function G5(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=_("span"),e.textContent="Added",t=D(),i=_("strong"),l=N(s),p(e,"class","label label-success")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),m(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&ue(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function im(n){let e;return{c(){e=_("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function sm(n){let e,t=n[0].name+"",i,s,l;return{c(){e=_("strong"),i=N(t),s=D(),l=_("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){w(o,e,r),m(e,i),w(o,s,r),w(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&ue(i,t)},d(o){o&&k(e),o&&k(s),o&&k(l)}}}function lm(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]])+""Line truncated
<th width="10%" class="svelte-lmkr38">Old</th>
<th width="10%" class="svelte-lmkr38">New</th></tr>`,l=D(),o=_("tbody");for(let S=0;S<g.length;S+=1)g[S].c();r=D(),v&&v.c(),a=D();for(let S=0;S<y.length;S+=1)y[S].c();u=D();for(let S=0;S<C.length;S+=1)C[S].c();p(e,"class","section-title"),p(i,"class","table collections-diff-table m-b-base svelte-lmkr38")},m(S,T){w(S,e,T),d.m(e,null),w(S,t,T),w(S,i,T),m(i,s),m(i,l),m(i,o);for(let M=0;M<g.length;M+=1)g[M].m(o,null);m(o,r),v&&v.m(o,null),m(o,a);for(let M=0;M<y.length;M+=1)y[M].m(o,null);m(o,u);for(let M=0;M<C.length;M+=1)C[M].m(o,null)},p(S,T){if(c===(c=f(S))&&d?d.p(S,T):(d.d(1),d=c(S),d&&(d.c(),d.m(e,null))),T[0]&7203){h=S[11];let M;for(M=0;M<h.length;M+=1){const O=nm(S,h,M);g[M]?g[M].p(O,T):(g[M]=lm(O),g[M].c(),g[M].m(o,r))}for(;M<g.length;M+=1)g[M].d(1);g.length=h.length}if(S[2]||S[5]?v?v.p(S,T):(v=om(S),v.c(),v.m(o,a)):v&&(v.d(1),v=null),T[0]&4248){b=S[7];let M;for(M=0;M<b.length;M+=1){const O=Qh(S,b,M);y[M]?y[M].p(O,T):(y[M]=cm(O),y[M].c(),y[M].m(o,u))}for(;M<y.length;M+=1)y[M].d(1);y.length=b.length}if(T[0]&4352){$=S[8];let M;for(M=0;M<$.length;M+=1){const O=Gh(S,$,M);C[M]?C[M].p(O,T):(C[M]=pm(O),C[M].c(),C[M].m(o,null))}for(;M<C.length;M+=1)C[M].d(1);C.length=$.length}},i:se,o:se,d(S){S&&k(e),d.d(),S&&k(t),S&&k(i),Yt(g,S),v&&v.d(),Yt(y,S),Yt(C,S)}}}function zn(n,e){n=n||[];for(let t of n)if(t.id==e)return t;return null}function yn(n,e){return n===e?!1:JSON.stringify(n)!==JSON.stringify(e)}function Q5(n,e,t){let i,s,l,{collectionA:o=new dn}=e,{collectionB:r=new dn}=e,{deleteMissing:a=!1}=e,u=[],f=[],c=[],d=[],h=[];const g=Object.keys(new dn().export()).filter(y=>!["schema","created","updated"].includes(y));function v(){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($=>y.id==$.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")&&v(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find($=>y.id==$.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find($=>$.id==y.id))),n.$$.dirty[0]&24&&t(8,h=f.filter(y=>!u.find($=>$.id==y.id))),n.$$.dirty[0]&7&&t(9,l=B.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,h,l,s,g,b]}class x5 extends Ee{constructor(e){super(),Oe(this,e,Q5,X5,De,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function hm(n,e,t){const i=n.slice();return i[17]=e[t],i}function mm(n){let e,t;return e=new x5({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){q(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){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function eE(n){let e,t,i=n[2],s=[];for(let o=0;o<i.length;o+=1)s[o]=mm(hm(n,i,o));const l=o=>L(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=We()},m(o,r){for(let a=0;a<s.length;a+=1)s[a].m(o,r);w(o,e,r),t=!0},p(o,r){if(r&12){i=o[2];let a;for(a=0;a<i.length;a+=1){const u=hm(o,i,a);s[a]?(s[a].p(u,r),A(s[a],1)):(s[a]=mm(u),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(Ae(),a=i.length;a<s.length;a+=1)l(a);Pe()}},i(o){if(!t){for(let r=0;r<i.length;r+=1)A(s[r]);t=!0}},o(o){s=s.filter(Boolean);for(let r=0;r<s.length;r+=1)L(s[r]);t=!1},d(o){Yt(s,o),o&&k(e)}}}function tE(n){let e;return{c(){e=_("h4"),e.textContent="Side-by-side diff",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function nE(n){let e,t,i,s,l,o,r;return{c(){e=_("button"),t=N("Close"),i=D(),s=_("button"),l=_("span"),l.textContent="Confirm and import",p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=n[4],te(s,"btn-loading",n[4])},m(a,u){w(a,e,u),m(e,t),w(a,i,u),w(a,s,u),m(s,l),o||(r=[J(e,"click",n[0]),J(s,"click",n[9])],o=!0)},p(a,u){u&16&&(e.disabled=a[4]),u&16&&(s.disabled=a[4]),u&16&&te(s,"btn-loading",a[4])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,Je(r)}}}function iE(n){let e,t,i={class:"full-width-popup import-popup",overlayClose:!1,escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[nE],header:[tE],default:[eE]},$$scope:{ctx:n}};return e=new ui({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[10]),l&1048604&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[11](null),j(e,s)}}}function sE(n,e,t){const i=xt();let s,Line truncated
<th width="10%" class="svelte-lmkr38">New</th></tr>`,l=D(),o=_("tbody");for(let S=0;S<g.length;S+=1)g[S].c();r=D(),v&&v.c(),a=D();for(let S=0;S<y.length;S+=1)y[S].c();u=D();for(let S=0;S<C.length;S+=1)C[S].c();p(e,"class","section-title"),p(i,"class","table collections-diff-table m-b-base svelte-lmkr38")},m(S,T){w(S,e,T),d.m(e,null),w(S,t,T),w(S,i,T),m(i,s),m(i,l),m(i,o);for(let M=0;M<g.length;M+=1)g[M].m(o,null);m(o,r),v&&v.m(o,null),m(o,a);for(let M=0;M<y.length;M+=1)y[M].m(o,null);m(o,u);for(let M=0;M<C.length;M+=1)C[M].m(o,null)},p(S,T){if(c===(c=f(S))&&d?d.p(S,T):(d.d(1),d=c(S),d&&(d.c(),d.m(e,null))),T[0]&7203){h=S[11];let M;for(M=0;M<h.length;M+=1){const O=nm(S,h,M);g[M]?g[M].p(O,T):(g[M]=lm(O),g[M].c(),g[M].m(o,r))}for(;M<g.length;M+=1)g[M].d(1);g.length=h.length}if(S[2]||S[5]?v?v.p(S,T):(v=om(S),v.c(),v.m(o,a)):v&&(v.d(1),v=null),T[0]&4248){b=S[7];let M;for(M=0;M<b.length;M+=1){const O=Qh(S,b,M);y[M]?y[M].p(O,T):(y[M]=cm(O),y[M].c(),y[M].m(o,u))}for(;M<y.length;M+=1)y[M].d(1);y.length=b.length}if(T[0]&4352){$=S[8];let M;for(M=0;M<$.length;M+=1){const O=Gh(S,$,M);C[M]?C[M].p(O,T):(C[M]=pm(O),C[M].c(),C[M].m(o,null))}for(;M<C.length;M+=1)C[M].d(1);C.length=$.length}},i:se,o:se,d(S){S&&k(e),d.d(),S&&k(t),S&&k(i),Yt(g,S),v&&v.d(),Yt(y,S),Yt(C,S)}}}function zn(n,e){n=n||[];for(let t of n)if(t.id==e)return t;return null}function yn(n,e){return n===e?!1:JSON.stringify(n)!==JSON.stringify(e)}function Q5(n,e,t){let i,s,l,{collectionA:o=new dn}=e,{collectionB:r=new dn}=e,{deleteMissing:a=!1}=e,u=[],f=[],c=[],d=[],h=[];const g=Object.keys(new dn().export()).filter(y=>!["schema","created","updated"].includes(y));function v(){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($=>y.id==$.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")&&v(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find($=>y.id==$.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find($=>$.id==y.id))),n.$$.dirty[0]&24&&t(8,h=f.filter(y=>!u.find($=>$.id==y.id))),n.$$.dirty[0]&7&&t(9,l=B.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,h,l,s,g,b]}class x5 extends Ee{constructor(e){super(),Oe(this,e,Q5,X5,De,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function hm(n,e,t){const i=n.slice();return i[17]=e[t],i}function mm(n){let e,t;return e=new x5({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){q(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){L(e.$$.fragment,i),t=!1},d(i){j(e,i)}}}function eE(n){let e,t,i=n[2],s=[];for(let o=0;o<i.length;o+=1)s[o]=mm(hm(n,i,o));const l=o=>L(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o<s.length;o+=1)s[o].c();e=We()},m(o,r){for(let a=0;a<s.length;a+=1)s[a].m(o,r);w(o,e,r),t=!0},p(o,r){if(r&12){i=o[2];let a;for(a=0;a<i.length;a+=1){const u=hm(o,i,a);s[a]?(s[a].p(u,r),A(s[a],1)):(s[a]=mm(u),s[a].c(),A(s[a],1),s[a].m(e.parentNode,e))}for(Ae(),a=i.length;a<s.length;a+=1)l(a);Pe()}},i(o){if(!t){for(let r=0;r<i.length;r+=1)A(s[r]);t=!0}},o(o){s=s.filter(Boolean);for(let r=0;r<s.length;r+=1)L(s[r]);t=!1},d(o){Yt(s,o),o&&k(e)}}}function tE(n){let e;return{c(){e=_("h4"),e.textContent="Side-by-side diff",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:se,d(t){t&&k(e)}}}function nE(n){let e,t,i,s,l,o,r;return{c(){e=_("button"),t=N("Close"),i=D(),s=_("button"),l=_("span"),l.textContent="Confirm and import",p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=n[4],ne(s,"btn-loading",n[4])},m(a,u){w(a,e,u),m(e,t),w(a,i,u),w(a,s,u),m(s,l),o||(r=[J(e,"click",n[0]),J(s,"click",n[9])],o=!0)},p(a,u){u&16&&(e.disabled=a[4]),u&16&&(s.disabled=a[4]),u&16&&ne(s,"btn-loading",a[4])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,Je(r)}}}function iE(n){let e,t,i={class:"full-width-popup import-popup",overlayClose:!1,escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[nE],header:[tE],default:[eE]},$$scope:{ctx:n}};return e=new ui({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){q(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[10]),l&1048604&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[11](null),j(e,s)}}}function sE(n,e,t){const i=xt();let s,Line truncated
- ${S.join(`
- `)}`,()=>{g()}):g()}async function g(){if(!u){t(4,u=!0);try{await ye.collections.import(o,a),sn("Successfully imported collections configuration."),i("submit")}catch(S){ye.errorResponseHandler(S)}t(4,u=!1),c()}}const v=()=>h(),b=()=>!u;function y(S){me[S?"unshift":"push"](()=>{s=S,t(1,s)})}function $(S){tt.call(this,n,S)}function C(S){tt.call(this,n,S)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,h,f,l,o,v,b,y,$,C]}class lE extends Ee{constructor(e){super(),Oe(this,e,sE,iE,De,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function gm(n,e,t){const i=n.slice();return i[32]=e[t],i}function _m(n,e,t){const i=n.slice();return i[35]=e[t],i}function bm(n,e,t){const i=n.slice();return i[32]=e[t],i}function oE(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O;a=new Ne({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[aE,({uniqueId:Q})=>({40:Q}),({uniqueId:Q})=>[0,Q?512:0]]},$$scope:{ctx:n}}});let E=!1,P=n[6]&&n[1].length&&!n[7]&&ym(),I=n[6]&&n[1].length&&n[7]&&km(n),F=n[13].length&&Pm(n),z=!!n[0]&&Lm(n);return{c(){e=_("input"),t=D(),i=_("div"),s=_("p"),l=N(`Paste below the collections configuration you want to import or
`),o=_("button"),o.innerHTML='<span class="txt">Load from JSON file</span>',r=D(),q(a.$$.fragment),u=D(),f=D(),P&&P.c(),c=D(),I&&I.c(),d=D(),F&&F.c(),h=D(),g=_("div"),z&&z.c(),v=D(),b=_("div"),y=D(),$=_("button"),C=_("span"),C.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"),te(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(b,"class","flex-fill"),p(C,"class","txt"),p($,"type","button"),p($,"class","btn btn-expanded btn-warning m-l-auto"),$.disabled=S=!n[14],p(g,"class","flex m-t-base")},m(Q,ne){w(Q,e,ne),n[19](e),w(Q,t,ne),w(Q,i,ne),m(i,s),m(s,l),m(s,o),w(Q,r,ne),H(a,Q,ne),w(Q,u,ne),w(Q,f,ne),P&&P.m(Q,ne),w(Q,c,ne),I&&I.m(Q,ne),w(Q,d,ne),F&&F.m(Q,ne),w(Q,h,ne),w(Q,g,ne),z&&z.m(g,null),m(g,v),m(g,b),m(g,y),m(g,$),m($,C),T=!0,M||(O=[J(e,"change",n[20]),J(o,"click",n[21]),J($,"click",n[26])],M=!0)},p(Q,ne){ne[0]&4096&&te(o,"btn-loading",Q[12]);const G={};ne[0]&64&&(G.class="form-field "+(Q[6]?"":"field-error")),ne[0]&65|ne[1]&1536&&(G.$$scope={dirty:ne,ctx:Q}),a.$set(G),Q[6]&&Q[1].length&&!Q[7]?P||(P=ym(),P.c(),P.m(c.parentNode,c)):P&&(P.d(1),P=null),Q[6]&&Q[1].length&&Q[7]?I?I.p(Q,ne):(I=km(Q),I.c(),I.m(d.parentNode,d)):I&&(I.d(1),I=null),Q[13].length?F?F.p(Q,ne):(F=Pm(Q),F.c(),F.m(h.parentNode,h)):F&&(F.d(1),F=null),Q[0]?z?z.p(Q,ne):(z=Lm(Q),z.c(),z.m(g,v)):z&&(z.d(1),z=null),(!T||ne[0]&16384&&S!==(S=!Q[14]))&&($.disabled=S)},i(Q){T||(A(a.$$.fragment,Q),A(E),T=!0)},o(Q){L(a.$$.fragment,Q),L(E),T=!1},d(Q){Q&&k(e),n[19](null),Q&&k(t),Q&&k(i),Q&&k(r),j(a,Q),Q&&k(u),Q&&k(f),P&&P.d(Q),Q&&k(c),I&&I.d(Q),Q&&k(d),F&&F.d(Q),Q&&k(h),Q&&k(g),z&&z.d(),M=!1,Je(O)}}}function rE(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:se,i:se,o:se,d(t){t&&k(e)}}}function vm(n){let e;return{c(){e=_("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function aE(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&vm();return{c(){e=_("label"),t=N("Collections"),s=D(),l=_("textarea"),r=D(),c&&c.c(),a=We(),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,h){w(d,e,h),m(e,t),w(d,s,h),w(d,l,h),Se(l,n[0]),w(d,r,h),c&&c.m(d,h),w(d,a,h),u||(f=J(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&Se(l,d[0]),!!d[0]&&!d[6]?c||(c=vm(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),c&&c.d(d),d&&k(a),u=!1,f()}}}function ym(n){let e;return{c(){e=_("div"),e.innerHTML=`<div class="icon"><i class="ri-information-line"></i></div>
- `)}`,()=>{g()}):g()}async function g(){if(!u){t(4,u=!0);try{await ye.collections.import(o,a),sn("Successfully imported collections configuration."),i("submit")}catch(S){ye.errorResponseHandler(S)}t(4,u=!1),c()}}const v=()=>h(),b=()=>!u;function y(S){me[S?"unshift":"push"](()=>{s=S,t(1,s)})}function $(S){tt.call(this,n,S)}function C(S){tt.call(this,n,S)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,h,f,l,o,v,b,y,$,C]}class lE extends Ee{constructor(e){super(),Oe(this,e,sE,iE,De,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function gm(n,e,t){const i=n.slice();return i[32]=e[t],i}function _m(n,e,t){const i=n.slice();return i[35]=e[t],i}function bm(n,e,t){const i=n.slice();return i[32]=e[t],i}function oE(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,g,v,b,y,$,C,S,T,M,O;a=new Ne({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[aE,({uniqueId:Z})=>({40:Z}),({uniqueId:Z})=>[0,Z?512:0]]},$$scope:{ctx:n}}});let E=!1,P=n[6]&&n[1].length&&!n[7]&&ym(),I=n[6]&&n[1].length&&n[7]&&km(n),F=n[13].length&&Pm(n),V=!!n[0]&&Lm(n);return{c(){e=_("input"),t=D(),i=_("div"),s=_("p"),l=N(`Paste below the collections configuration you want to import or
`),o=_("button"),o.innerHTML='<span class="txt">Load from JSON file</span>',r=D(),q(a.$$.fragment),u=D(),f=D(),P&&P.c(),c=D(),I&&I.c(),d=D(),F&&F.c(),h=D(),g=_("div"),V&&V.c(),v=D(),b=_("div"),y=D(),$=_("button"),C=_("span"),C.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"),ne(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(b,"class","flex-fill"),p(C,"class","txt"),p($,"type","button"),p($,"class","btn btn-expanded btn-warning m-l-auto"),$.disabled=S=!n[14],p(g,"class","flex m-t-base")},m(Z,te){w(Z,e,te),n[19](e),w(Z,t,te),w(Z,i,te),m(i,s),m(s,l),m(s,o),w(Z,r,te),H(a,Z,te),w(Z,u,te),w(Z,f,te),P&&P.m(Z,te),w(Z,c,te),I&&I.m(Z,te),w(Z,d,te),F&&F.m(Z,te),w(Z,h,te),w(Z,g,te),V&&V.m(g,null),m(g,v),m(g,b),m(g,y),m(g,$),m($,C),T=!0,M||(O=[J(e,"change",n[20]),J(o,"click",n[21]),J($,"click",n[26])],M=!0)},p(Z,te){(!T||te[0]&4096)&&ne(o,"btn-loading",Z[12]);const X={};te[0]&64&&(X.class="form-field "+(Z[6]?"":"field-error")),te[0]&65|te[1]&1536&&(X.$$scope={dirty:te,ctx:Z}),a.$set(X),Z[6]&&Z[1].length&&!Z[7]?P||(P=ym(),P.c(),P.m(c.parentNode,c)):P&&(P.d(1),P=null),Z[6]&&Z[1].length&&Z[7]?I?I.p(Z,te):(I=km(Z),I.c(),I.m(d.parentNode,d)):I&&(I.d(1),I=null),Z[13].length?F?F.p(Z,te):(F=Pm(Z),F.c(),F.m(h.parentNode,h)):F&&(F.d(1),F=null),Z[0]?V?V.p(Z,te):(V=Lm(Z),V.c(),V.m(g,v)):V&&(V.d(1),V=null),(!T||te[0]&16384&&S!==(S=!Z[14]))&&($.disabled=S)},i(Z){T||(A(a.$$.fragment,Z),A(E),T=!0)},o(Z){L(a.$$.fragment,Z),L(E),T=!1},d(Z){Z&&k(e),n[19](null),Z&&k(t),Z&&k(i),Z&&k(r),j(a,Z),Z&&k(u),Z&&k(f),P&&P.d(Z),Z&&k(c),I&&I.d(Z),Z&&k(d),F&&F.d(Z),Z&&k(h),Z&&k(g),V&&V.d(),M=!1,Je(O)}}}function rE(n){let e;return{c(){e=_("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:se,i:se,o:se,d(t){t&&k(e)}}}function vm(n){let e;return{c(){e=_("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function aE(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&vm();return{c(){e=_("label"),t=N("Collections"),s=D(),l=_("textarea"),r=D(),c&&c.c(),a=We(),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,h){w(d,e,h),m(e,t),w(d,s,h),w(d,l,h),Se(l,n[0]),w(d,r,h),c&&c.m(d,h),w(d,a,h),u||(f=J(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&Se(l,d[0]),!!d[0]&&!d[6]?c||(c=vm(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),c&&c.d(d),d&&k(a),u=!1,f()}}}function ym(n){let e;return{c(){e=_("div"),e.innerHTML=`<div class="icon"><i class="ri-information-line"></i></div>
<div class="content"><string>Your collections configuration is already up-to-date!</string></div>`,p(e,"class","alert alert-info")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function km(n){let e,t,i,s,l,o=n[9].length&&wm(n),r=n[4].length&&Cm(n),a=n[8].length&&Om(n);return{c(){e=_("h5"),e.textContent="Detected changes",t=D(),i=_("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){w(u,e,f),w(u,t,f),w(u,i,f),o&&o.m(i,null),m(i,s),r&&r.m(i,null),m(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=wm(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=Cm(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=Om(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),u&&k(t),u&&k(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function wm(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;o<s.length;o+=1){let r=bm(n,s,o),a=l(r);t.set(a,e[o]=Sm(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=We()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&512&&(s=o[9],e=_t(e,r,l,1,o,s,t,i.parentNode,bn,Sm,i,bm))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&k(i)}}}function $m(n){let e,t,i=n[32].id+"",s,l;return{c(){e=_("small"),t=N("("),s=N(i),l=N(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),m(e,t),m(e,s),m(e,l)},p(o,r){r[0]&512&&i!==(i=o[32].id+"")&&ue(s,i)},d(o){o&&k(e)}}}function Sm(n,e){let t,i,s,l,o=e[32].name+"",r,a,u,f=e[32].id&&$m(e);return{key:n,first:null,c(){t=_("div"),i=_("span"),i.textContent="Deleted",s=D(),l=_("strong"),r=N(o),a=D(),f&&f.c(),u=D(),p(i,"class","label label-danger list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){w(c,t,d),m(t,i),m(t,s),m(t,l),m(l,r),m(t,a),f&&f.m(t,null),m(t,u)},p(c,d){e=c,d[0]&512&&o!==(o=e[32].name+"")&&ue(r,o),e[32].id?f?f.p(e,d):(f=$m(e),f.c(),f.m(t,u)):f&&(f.d(1),f=null)},d(c){c&&k(t),f&&f.d()}}}function Cm(n){let e=[],t=new Map,i,s=n[4];const l=o=>o[35].old.id+o[35].new.id;for(let o=0;o<s.length;o+=1){let r=_m(n,s,o),a=l(r);t.set(a,e[o]=Dm(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=We()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&16&&(s=o[4],e=_t(e,r,l,1,o,s,t,i.parentNode,bn,Dm,i,_m))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&k(i)}}}function Mm(n){let e,t=n[35].old.name+"",i,s,l;return{c(){e=_("strong"),i=N(t),s=D(),l=_("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){w(o,e,r),m(e,i),w(o,s,r),w(o,l,r)},p(o,r){r[0]&16&&t!==(t=o[35].old.name+"")&&ue(i,t)},d(o){o&&k(e),o&&k(s),o&&k(l)}}}function Tm(n){let e,t,i=n[35].new.id+"",s,l;return{c(){e=_("small"),t=N("("),s=N(i),l=N(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),m(e,t),m(e,s),m(e,l)},p(o,r){r[0]&16&&i!==(i=o[35].new.id+"")&&ue(s,i)},d(o){o&&k(e)}}}function Dm(n,e){let t,i,s,l,o,r,a=e[35].new.name+"",u,f,c,d=e[35].old.name!==e[35].new.name&&Mm(e),h=e[35].new.id&&Tm(e);return{key:n,first:null,c(){t=_("div"),i=_("span"),i.textContent="Changed",s=D(),l=_("div"),d&&d.c(),o=D(),r=_("strong"),u=N(a),f=D(),h&&h.c(),c=D(),p(i,"class","label label-warning list-label svelte-1jx20fl"),p(l,"class","inline-flex flex-gap-5"),p(t,"class","list-item"),this.first=t},m(g,v){w(g,t,v),m(t,i),m(t,s),m(t,l),d&&d.m(l,null),m(l,o),m(l,r),m(r,u),m(l,f),h&&h.m(l,null),m(t,c)},p(g,v){e=g,e[35].old.name!==e[35].new.name?d?d.p(e,v):(d=Mm(e),d.c(),d.m(l,o)):d&&(d.d(1),d=null),v[0]&16&&a!==(a=e[35].new.name+"")&&ue(u,a),e[35].new.id?h?h.p(e,v):(h=Tm(e),h.c(),h.m(l,null)):h&&(h.d(1),h=null)},d(g){g&&k(t),d&&d.d(),h&&h.d()}}}function Om(n){let e=[],t=new Map,i,s=n[8];const l=o=>o[32].id;for(let o=0;o<s.length;o+=1){let r=gm(n,s,o),a=l(r);t.set(a,e[o]=Am(a,r))}return{c(){for(let o=0;o<e.length;o+=1)e[o].c();i=We()},m(o,r){for(let a=0;a<e.length;a+=1)e[a].m(o,r);w(o,i,r)},p(o,r){r[0]&256&&(s=o[8],e=_t(e,r,l,1,o,s,t,i.parentNode,bn,Am,i,gm))},d(o){for(let r=0;r<e.length;r+=1)e[r].d(o);o&&k(i)}}}function Em(n){let e,t,i=n[32].id+"",s,l;return{c(){e=_("small"),t=N("("),s=N(i),l=N(")"),p(e,"class","txt-hint")},m(o,r){w(o,e,r),m(e,t),m(e,s),m(e,l)},p(o,r){r[0]&256&&i!==(i=o[32].id+"")&&ue(s,i)},d(o){o&&k(e)}}}function Am(n,e){let t,i,s,l,o=e[32].name+"",r,a,u,f=e[32].id&&Em(e);return{key:n,first:null,c(){t=_("div"),i=_("span"),i.textContent="Added",s=D(),l=_("strong"),r=N(o),a=D(),f&&f.c(),u=D(),p(i,"class","label label-success list-label svelte-1jx20fl"),p(t,"class","list-item"),this.first=t},m(c,d){w(c,t,d),m(t,i),m(t,s),m(t,l),m(l,r),m(t,a),f&&f.m(t,null),m(t,u)},p(c,d){e=c,d[0]&256&&o!==(o=e[32].name+"")&&ue(r,o),e[32].id?f?f.p(e,d):(f=Em(e),f.c(),f.m(t,u)):f&&(f.d(1),f=null)},d(c){c&&k(t),f&&f.d()}}}function Pm(n){let e,t,i,s,l,o,r,a;return{c(){e=_("div"),t=_("div"),t.innerHTML='<i class="ri-error-warning-line"></i>',i=D(),s=_("div"),s.innerHTML=`<string>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.</string>`,l=D(),o=_("button"),o.innerHTML='<span class="txt">Replace with original ids</span>',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){w(u,e,f),m(e,t),m(e,i),m(e,s),m(e,l),m(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:se,d(u){u&&k(e),r=!1,a()}}}function Lm(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear</span>',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function uE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[rE,oE],g=[];function v(b,y){return b[5]?0:1}return f=v(n),c=g[f]=h[f](n),{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=D(),l=_("div"),o=N(n[15]),r=D(),a=_("div"),u=_("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){w(b,e,y),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),w(b,r,y),w(b,a,y),m(a,u),g[f].m(u,null),d=!0},p(b,y){(!d||y[0]&32768)&&ue(o,b[15]);let $=f;f=v(b),f===$?g[f].p(b,y):(Ae(),L(g[$],1,1,()=>{g[$]=null}),Pe(),c=g[f],c?c.p(b,y):(c=g[f]=h[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){L(c),d=!1},d(b){b&&k(e),b&&k(r),b&&k(a),g[f].d()}}}function fE(n){let e,t,i,s,l,o;e=new Ui({}),i=new On({props:{$$slots:{default:[uE]},$$scope:{ctx:n}}});let r={};return l=new lE({props:r}),n[27](l),l.$on("submit",n[28]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),w(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){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){j(e,a),a&&k(t),j(i,a),a&&k(s),n[27](null),j(l,a)}}}function cE(n,e,t){let i,s,l,o,r,a,u;at(n,Nt,Z=>t(15,u=Z)),nn(Nt,u="Import collections",u);let f,c,d="",h=!1,g=[],v=[],b=!0,y=[],$=!1;C();async function C(){t(5,$=!0);try{t(2,v=await ye.collections.getFullList(200));for(let Z of v)delete Z.created,delete Z.updated}catch(Z){ye.errorResponseHandler(Z)}t(5,$=!1)}function S(){if(t(4,y=[]),!!i)for(let Z of g){const de=B.findByKey(v,"id",Z.id);!(de!=null&&de.id)||!B.hasCollectionChanges(de,Z,b)||y.push({new:Z,old:de})}}function T(){t(1,g=[]);try{t(1,g=JSON.parse(d))}catch{}Array.isArray(g)?t(1,g=B.filterDuplicatesByKey(g)):t(1,g=[]);for(let Z of g)delete Z.created,delete Z.updated,Z.schema=B.filterDuplicatesByKey(Z.schema)}function M(){var Z,de;for(let x of g){const oe=B.findByKey(v,"name",x.name)||B.findByKey(v,"id",x.id);if(!oe)continue;const Ce=x.id,Te=oe.id;x.id=Te;const K=Array.isArray(oe.schema)?oe.schema:[],we=Array.isArray(x.schema)?x.schema:[];for(const ae of we){const W=B.findByKey(K,"name",ae.name);W&&W.id&&(ae.id=W.id)}for(let ae of g)if(!!Array.isArray(ae.schema))for(let W of ae.schema)((Z=W.options)==null?void 0:Z.collectionId)&&((de=W.options)==null?void 0:de.collectionId)===Ce&&(W.options.collectionId=Te)}t(0,d=JSON.stringify(g,null,4))}function O(Z){t(12,h=!0);const de=new FileReader;de.onload=async x=>{t(12,h=!1),t(10,f.value="",f),t(0,d=x.target.result),await Zn(),g.length||(hl("Invalid collections configuration."),E())},de.onerror=x=>{console.warn(x),hl("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},de.readAsText(Z)}function E(){t(0,d=""),t(10,f.value="",f),ri({})}function P(Z){me[Z?"unshift":"push"](()=>{f=Z,t(10,f)})}const I=()=>{f.files.length&&O(f.files[0])},F=()=>{f.click()};function z(){d=this.value,t(0,d)}function Q(){b=this.checked,t(3,b)}const ne=()=>M(),G=()=>E(),ee=()=>c==null?void 0:c.show(v,g,b);function U(Z){me[Z?"unshift":"push"](()=>{c=Z,t(11,c)})}const Y=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&T(),n.$$.dirty[0]&3&&t(6,i=!!d&&g.length&&g.length===g.filter(Z=>!!Z.id&&!!Z.name).length),n.$$.dirty[0]&78&&t(9,s=v.filter(Z=>i&&b&&!B.findByKey(g,"id",Z.id))),n.$$.dirty[0]&70&&t(8,l=g.filter(Z=>i&&!B.findByKey(v,"id",Z.id))),n.$$.dirty[0]&10&&(typeof g<"u"||typeof b<"u")&&S(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=g.filter(Z=>{let de=B.findByKey(v,"name",Z.name)||B.findByKey(v,"id",Z.id);if(!de)return!1;if(de.id!=Z.id)return!0;const x=Array.isArray(de.schema)?de.schema:[],oe=Array.isArray(Z.schema)?Z.schema:[];for(const Ce of oe){if(B.findByKey(x,"id",Ce.id))continue;const K=B.findByKey(x,"name",Ce.name);if(K&&Ce.id!=K.id)return!0}return!1}))},[d,g,v,b,y,$,i,o,l,s,f,c,h,a,r,u,M,O,E,P,I,F,z,Q,ne,G,ee,U,Y]}class dE extends Ee{constructor(e){super(),Oe(this,e,cE,fE,De,{},null,[-1,-1])}}const rn=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Ci("/"):!0}],pE={"/login":tn({component:JD,conditions:rn.conLine truncated
to.</string>`,l=D(),o=_("button"),o.innerHTML='<span class="txt">Replace with original ids</span>',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){w(u,e,f),m(e,t),m(e,i),m(e,s),m(e,l),m(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:se,d(u){u&&k(e),r=!1,a()}}}function Lm(n){let e,t,i;return{c(){e=_("button"),e.innerHTML='<span class="txt">Clear</span>',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:se,d(s){s&&k(e),t=!1,i()}}}function uE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[rE,oE],g=[];function v(b,y){return b[5]?0:1}return f=v(n),c=g[f]=h[f](n),{c(){e=_("header"),t=_("nav"),i=_("div"),i.textContent="Settings",s=D(),l=_("div"),o=N(n[15]),r=D(),a=_("div"),u=_("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){w(b,e,y),m(e,t),m(t,i),m(t,s),m(t,l),m(l,o),w(b,r,y),w(b,a,y),m(a,u),g[f].m(u,null),d=!0},p(b,y){(!d||y[0]&32768)&&ue(o,b[15]);let $=f;f=v(b),f===$?g[f].p(b,y):(Ae(),L(g[$],1,1,()=>{g[$]=null}),Pe(),c=g[f],c?c.p(b,y):(c=g[f]=h[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){L(c),d=!1},d(b){b&&k(e),b&&k(r),b&&k(a),g[f].d()}}}function fE(n){let e,t,i,s,l,o;e=new Ui({}),i=new On({props:{$$slots:{default:[uE]},$$scope:{ctx:n}}});let r={};return l=new lE({props:r}),n[27](l),l.$on("submit",n[28]),{c(){q(e.$$.fragment),t=D(),q(i.$$.fragment),s=D(),q(l.$$.fragment)},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),w(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){L(e.$$.fragment,a),L(i.$$.fragment,a),L(l.$$.fragment,a),o=!1},d(a){j(e,a),a&&k(t),j(i,a),a&&k(s),n[27](null),j(l,a)}}}function cE(n,e,t){let i,s,l,o,r,a,u;at(n,Nt,G=>t(15,u=G)),nn(Nt,u="Import collections",u);let f,c,d="",h=!1,g=[],v=[],b=!0,y=[],$=!1;C();async function C(){t(5,$=!0);try{t(2,v=await ye.collections.getFullList(200));for(let G of v)delete G.created,delete G.updated}catch(G){ye.errorResponseHandler(G)}t(5,$=!1)}function S(){if(t(4,y=[]),!!i)for(let G of g){const de=B.findByKey(v,"id",G.id);!(de!=null&&de.id)||!B.hasCollectionChanges(de,G,b)||y.push({new:G,old:de})}}function T(){t(1,g=[]);try{t(1,g=JSON.parse(d))}catch{}Array.isArray(g)?t(1,g=B.filterDuplicatesByKey(g)):t(1,g=[]);for(let G of g)delete G.created,delete G.updated,G.schema=B.filterDuplicatesByKey(G.schema)}function M(){var G,de;for(let x of g){const oe=B.findByKey(v,"name",x.name)||B.findByKey(v,"id",x.id);if(!oe)continue;const Ce=x.id,Te=oe.id;x.id=Te;const K=Array.isArray(oe.schema)?oe.schema:[],ke=Array.isArray(x.schema)?x.schema:[];for(const ae of ke){const W=B.findByKey(K,"name",ae.name);W&&W.id&&(ae.id=W.id)}for(let ae of g)if(!!Array.isArray(ae.schema))for(let W of ae.schema)((G=W.options)==null?void 0:G.collectionId)&&((de=W.options)==null?void 0:de.collectionId)===Ce&&(W.options.collectionId=Te)}t(0,d=JSON.stringify(g,null,4))}function O(G){t(12,h=!0);const de=new FileReader;de.onload=async x=>{t(12,h=!1),t(10,f.value="",f),t(0,d=x.target.result),await Zn(),g.length||(hl("Invalid collections configuration."),E())},de.onerror=x=>{console.warn(x),hl("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},de.readAsText(G)}function E(){t(0,d=""),t(10,f.value="",f),ri({})}function P(G){me[G?"unshift":"push"](()=>{f=G,t(10,f)})}const I=()=>{f.files.length&&O(f.files[0])},F=()=>{f.click()};function V(){d=this.value,t(0,d)}function Z(){b=this.checked,t(3,b)}const te=()=>M(),X=()=>E(),ee=()=>c==null?void 0:c.show(v,g,b);function U(G){me[G?"unshift":"push"](()=>{c=G,t(11,c)})}const Y=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&T(),n.$$.dirty[0]&3&&t(6,i=!!d&&g.length&&g.length===g.filter(G=>!!G.id&&!!G.name).length),n.$$.dirty[0]&78&&t(9,s=v.filter(G=>i&&b&&!B.findByKey(g,"id",G.id))),n.$$.dirty[0]&70&&t(8,l=g.filter(G=>i&&!B.findByKey(v,"id",G.id))),n.$$.dirty[0]&10&&(typeof g<"u"||typeof b<"u")&&S(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!$&&i&&o),n.$$.dirty[0]&6&&t(13,a=g.filter(G=>{let de=B.findByKey(v,"name",G.name)||B.findByKey(v,"id",G.id);if(!de)return!1;if(de.id!=G.id)return!0;const x=Array.isArray(de.schema)?de.schema:[],oe=Array.isArray(G.schema)?G.schema:[];for(const Ce of oe){if(B.findByKey(x,"id",Ce.id))continue;const K=B.findByKey(x,"name",Ce.name);if(K&&Ce.id!=K.id)return!0}return!1}))},[d,g,v,b,y,$,i,o,l,s,f,c,h,a,r,u,M,O,E,P,I,F,V,Z,te,X,ee,U,Y]}class dE extends Ee{constructor(e){super(),Oe(this,e,cE,fE,De,{},null,[-1,-1])}}const rn=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?Ci("/"):!0}],pE={"/login":tn({component:JD,conditions:rn.conLine truncated
<span class="txt">Manage admins</span>`,t=D(),i=_("hr"),s=D(),l=_("div"),l.innerHTML=`<i class="ri-logout-circle-line"></i>
<span class="txt">Logout</span>`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),o||(r=[Ye(mn.call(null,e)),J(l,"click",n[6])],o=!0)},p:se,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,Je(r)}}}function DE(n){var h;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=B.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((h=n[0])==null?void 0:h.id)&&n[1]&&Fm(n);return o=new Ib({props:{routes:pE}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new kE({}),f=new ME({}),{c(){t=D(),i=_("div"),d&&d.c(),s=D(),l=_("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(g,v){w(g,t,v),w(g,i,v),d&&d.m(i,null),m(i,s),m(i,l),H(o,l,null),m(l,r),H(a,l,null),w(g,u,v),H(f,g,v),c=!0},p(g,[v]){var b;(!c||v&12)&&e!==(e=B.joinNonEmpty([g[3],g[2],"PocketBase"]," - "))&&(document.title=e),((b=g[0])==null?void 0:b.id)&&g[1]?d?(d.p(g,v),v&3&&A(d,1)):(d=Fm(g),d.c(),A(d,1),d.m(i,s)):d&&(Ae(),L(d,1,1,()=>{d=null}),Pe())},i(g){c||(A(d),A(o.$$.fragment,g),A(a.$$.fragment,g),A(f.$$.fragment,g),c=!0)},o(g){L(d),L(o.$$.fragment,g),L(a.$$.fragment,g),L(f.$$.fragment,g),c=!1},d(g){g&&k(t),g&&k(i),d&&d.d(),j(o),j(a),g&&k(u),j(f,g)}}}function OE(n,e,t){let i,s,l,o;at(n,us,h=>t(8,i=h)),at(n,wo,h=>t(2,s=h)),at(n,Ea,h=>t(0,l=h)),at(n,Nt,h=>t(3,o=h));let r,a=!1;function u(h){var g,v,b,y;((g=h==null?void 0:h.detail)==null?void 0:g.location)!==r&&(t(1,a=!!((b=(v=h==null?void 0:h.detail)==null?void 0:v.userData)!=null&&b.showAppSidebar)),r=(y=h==null?void 0:h.detail)==null?void 0:y.location,nn(Nt,o="",o),ri({}),ob())}function f(){Ci("/")}async function c(){var h,g;if(!!(l!=null&&l.id))try{const v=await ye.settings.getAll({$cancelKey:"initialAppSettings"});nn(wo,s=((h=v==null?void 0:v.meta)==null?void 0:h.appName)||"",s),nn(us,i=!!((g=v==null?void 0:v.meta)!=null&&g.hideControls),i)}catch(v){console.warn("Failed to load app settings.",v)}}function d(){ye.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class EE extends Ee{constructor(e){super(),Oe(this,e,OE,DE,De,{})}}new EE({target:document.getElementById("app")});export{Je as A,sn as B,B as C,Ci as D,We as E,l_ as F,va as G,at as H,As as I,xt as J,dn as K,Fn as L,me as M,lu as N,Ee as S,L as a,D as b,q as c,j as d,_ as e,p as f,w as g,m as h,Oe as i,Ye as j,Ae as k,mn as l,H as m,Pe as n,k as o,ye as p,Ne as q,te as r,De as s,A as t,J as u,Wt as v,N as w,ue as x,se as y,Se as z};
<span class="txt">Logout</span>`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),o||(r=[Ye(mn.call(null,e)),J(l,"click",n[6])],o=!0)},p:se,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,Je(r)}}}function DE(n){var h;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=B.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((h=n[0])==null?void 0:h.id)&&n[1]&&Fm(n);return o=new Ib({props:{routes:pE}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new kE({}),f=new ME({}),{c(){t=D(),i=_("div"),d&&d.c(),s=D(),l=_("div"),q(o.$$.fragment),r=D(),q(a.$$.fragment),u=D(),q(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(g,v){w(g,t,v),w(g,i,v),d&&d.m(i,null),m(i,s),m(i,l),H(o,l,null),m(l,r),H(a,l,null),w(g,u,v),H(f,g,v),c=!0},p(g,[v]){var b;(!c||v&12)&&e!==(e=B.joinNonEmpty([g[3],g[2],"PocketBase"]," - "))&&(document.title=e),((b=g[0])==null?void 0:b.id)&&g[1]?d?(d.p(g,v),v&3&&A(d,1)):(d=Fm(g),d.c(),A(d,1),d.m(i,s)):d&&(Ae(),L(d,1,1,()=>{d=null}),Pe())},i(g){c||(A(d),A(o.$$.fragment,g),A(a.$$.fragment,g),A(f.$$.fragment,g),c=!0)},o(g){L(d),L(o.$$.fragment,g),L(a.$$.fragment,g),L(f.$$.fragment,g),c=!1},d(g){g&&k(t),g&&k(i),d&&d.d(),j(o),j(a),g&&k(u),j(f,g)}}}function OE(n,e,t){let i,s,l,o;at(n,us,h=>t(8,i=h)),at(n,wo,h=>t(2,s=h)),at(n,Ea,h=>t(0,l=h)),at(n,Nt,h=>t(3,o=h));let r,a=!1;function u(h){var g,v,b,y;((g=h==null?void 0:h.detail)==null?void 0:g.location)!==r&&(t(1,a=!!((b=(v=h==null?void 0:h.detail)==null?void 0:v.userData)!=null&&b.showAppSidebar)),r=(y=h==null?void 0:h.detail)==null?void 0:y.location,nn(Nt,o="",o),ri({}),ob())}function f(){Ci("/")}async function c(){var h,g;if(!!(l!=null&&l.id))try{const v=await ye.settings.getAll({$cancelKey:"initialAppSettings"});nn(wo,s=((h=v==null?void 0:v.meta)==null?void 0:h.appName)||"",s),nn(us,i=!!((g=v==null?void 0:v.meta)!=null&&g.hideControls),i)}catch(v){console.warn("Failed to load app settings.",v)}}function d(){ye.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class EE extends Ee{constructor(e){super(),Oe(this,e,OE,DE,De,{})}}new EE({target:document.getElementById("app")});export{Je as A,sn as B,B as C,Ci as D,We as E,l_ as F,va as G,at as H,As as I,xt as J,dn as K,Fn as L,me as M,lu as N,Ee as S,L as a,D as b,q as c,j as d,_ as e,p as f,w as g,m as h,Oe as i,Ye as j,Ae as k,mn as l,H as m,Pe as n,k as o,ye as p,Ne as q,ne as r,De as s,A as t,J as u,Wt as v,N as w,ue as x,se as y,Se as z};
-12
View File
@@ -1,12 +0,0 @@
class N{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 ti(this),r=new ti(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 ti(this,e)}iterRange(e,t=this.length){return new Yo(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 _o(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]?N.empty:e.length<=32?new J(e):He.from(J.split(e,[]))}}class J extends N{constructor(e,t=Ra(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 Ea(s,l,i,o);s=l+1,i++}}decompose(e,t,i,s){let r=e<=0&&t>=this.length?this:new J(yr(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(s&1){let o=i.pop(),l=Fi(r.text,o.text.slice(),0,r.length);if(l.length<=32)i.push(new J(l,o.length+r.length));else{let h=l.length>>1;i.push(new J(l.slice(0,h)),new J(l.slice(h)))}}else i.push(r)}replace(e,t,i){if(!(i instanceof J))return super.replace(e,t,i);let s=Fi(this.text,Fi(i.text,yr(this.text,0,e)),t),r=this.length+i.length-(t-e);return s.length<=32?new J(s,r):He.from(J.split(s,[]),r)}sliceString(e,t=this.length,i=`
`){let s="";for(let r=0,o=0;r<=t&&o<this.text.length;o++){let l=this.text[o],h=r+l.length;r>e&&o&&(s+=i),e<h&&t>r&&(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 J(i,s)),i=[],s=-1);return s>-1&&t.push(new J(i,s)),t}}class He extends N{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<this.children.length;r++){let l=this.children[r],h=o+l.length;if(e<=h&&t>=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<this.lines)for(let s=0,r=0;s<this.children.length;s++){let o=this.children[s],l=r+o.length;if(e>=r&&t<=l){let h=o.replace(e-r,t-r,i),a=this.lines-o.lines+h.lines;if(h.lines<a>>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;r<this.children.length&&o<=t;r++){let l=this.children[r],h=o+l.length;o>e&&r&&(s+=i),e<h&&t>o&&(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 J(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 J&&h&&(p=c[c.length-1])instanceof J&&d.lines+p.lines<=32?(h+=d.lines,a+=d.length+1,c[c.length-1]=new J(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)}}N.empty=new J([""],0);function Ra(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Fi(n,e,t=0,i=1e9){for(let s=0,r=0,o=!0;r<n.length&&s<=i;r++){let l=n[r],h=s+l.length;h>=t&&(h>i&&(l=l.slice(0,i-s)),s<t&&(l=l.slice(t-s)),o?(e[e.length-1]+=l,o=!1):e.push(l)),s=h+1}return e}function yr(n,e,t){return Fi(n,[""],e,t)}class ti{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof J?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 J?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 J){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 J?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 Yo{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new ti(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 _o{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"&&(N.prototype[Symbol.iterator]=function(){return this.iter()},ti.prototype[Symbol.iterator]=Yo.prototype[Symbol.iterator]=_o.prototype[Symbol.iterator]=function(){return this});class Ea{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 Bt="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;n<Bt.length;n++)Bt[n]+=Bt[n-1];function Ia(n){for(let e=1;e<Bt.length;e+=2)if(Bt[e]>n)return Bt[e-1]<=n;return!1}function br(n){return n>=127462&&n<=127487}const wr=8205;function fe(n,e,t=!0,i=!0){return(t?Qo:Na)(n,e,i)}function Qo(n,e,t){if(e==n.length)return e;e&&Zo(n.charCodeAt(e))&&el(n.charCodeAt(e-1))&&e--;let i=ie(n,e);for(e+=ve(i);e<n.length;){let s=ie(n,e);if(i==wr||s==wr||t&&Ia(s))e+=ve(s),i=s;else if(br(s)){let r=0,o=e-2;for(;o>=0&&br(ie(n,o));)r++,o-=2;if(r%2==0)break;e+=2}else break}return e}function Na(n,e,t){for(;e>0;){let i=Qo(n,e-2,t);if(i<e)return i;e--}return 0}function Zo(n){return n>=56320&&n<57344}function el(n){return n>=55296&&n<56320}function ie(n,e){let t=n.charCodeAt(e);if(!el(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return Zo(i)?(t-55296<<10)+(i-56320)+65536:t}function Ws(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function ve(n){return n<65536?1:2}const Yn=/\r\n?|\n/;var le=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(le||(le={}));class je{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,s=0;t<this.sections.length;){let r=this.sections[t++],o=this.sections[t++];o<0?(e(i,s,r),s+=r):s+=o,i+=r}}iterChangedRanges(e,t=!1){_n(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],s=this.sections[t++];s<0?e.push(i,s):e.push(s Line truncated
`}get readOnly(){return this.facet(cl)}phrase(e,...t){for(let i of this.facet(I.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(sl))for(let o of r(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&s.push(o[e]);return s}charCategorizer(e){return Ga(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=fe(t,o,!1);if(r(t.slice(h,o))!=j.Word)break;o=h}for(;l<s;){let h=fe(t,l);if(r(t.slice(l,h))!=j.Word)break;l=h}return o==l?null:m.range(o+i,l+i)}}I.allowMultipleSelections=rl;I.tabSize=D.define({combine:n=>n.length?n[0]:4});I.lineSeparator=ol;I.readOnly=cl;I.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])}});I.languageData=sl;I.changeFilter=ll;I.transactionFilter=hl;I.transactionExtender=al;gn.reconfigure=R.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 yt{eq(e){return this==e}range(e,t=e){return li.create(e,t,this)}}yt.prototype.startSide=yt.prototype.endSide=0;yt.prototype.point=!1;yt.prototype.mapMode=le.TrackDel;class li{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new li(e,t,i)}}function ns(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class qs{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);r<o;r++)if(s(this.from[r]+e,this.to[r]+e,this.value[r])===!1)return!1}map(e,t){let i=[],s=[],r=[],o=-1,l=-1;for(let h=0;h<this.value.length;h++){let a=this.value[h],c=this.from[h]+e,f=this.to[h]+e,u,d;if(c==f){let p=t.mapPos(c,a.startSide,a.mapMode);if(p==null||(u=d=p,a.startSide!=a.endSide&&(d=t.mapPos(c,a.endSide),d<u)))continue}else if(u=t.mapPos(c,a.startSide),d=t.mapPos(f,a.endSide),u>d||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 qs(s,r,i,l):null,pos:o}}}class ${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 $(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(ns)),this.isEmpty)return t.length?$.of(t):this;let l=new dl(this,null,-1).goto(0),h=0,a=[],c=new bt;for(;l.value||h<t.length;)if(h<t.length&&(l.from-t[h].from||l.startSide-t[h].value.startSide)>=0){let f=t[h++];c.addInner(f.from,f.to,f.value)||a.push(f)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(h==t.length||this.chunkEnd(l.chunkIndex)<t[h].from)&&(!o||s>this.chunkEnd(l.chunkIndex)||r<this.chunkPos[l.chunkIndex])&&c.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||s>l.to||r<l.from||o(l.from,l.to,l.value))&&(c.addInner(l.from,l.to,l.value)||a.push(li.create(l.from,l.to,l.value))),l.next());return c.finishInner(this.nextLayer.isEmpty&&!a.length?$.empty:this.nextLayer.update({add:a,filter:o,filterFrom:s,filterTo:r}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],s=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],h=this.chunk[o],a=e.touchesRange(l,l+h.length);if(a===!1)s=Math.max(s,h.maxPoint),t.push(h),i.push(e.mapPos(l));else if(a===!0){let{mapped:c,pos:f}=h.map(l,e);c&&(s=Math.max(s,c.maxPoint),t.push(c),i.push(f))}}let r=this.nextLayer.map(e);return t.length==0?r:new $(i,t,r||$.empty,s)}between(e,t,i){if(!this.isEmpty){for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],o=this.chunk[s];if(t>=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 hi.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return hi.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=Sr(o,l,i),a=new Ut(o,h,r),c=new Ut(l,h Line truncated
`)}static newName(){let e=Mr[Ar]||1;return Mr[Ar]=e+1,os+e.toString(36)}static mount(e,t){(e[ls]||new Xa(e)).mount(Array.isArray(t)?t:[t])}}let Ci=null;class Xa{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(Ci)return e.adoptedStyleSheets=[Ci.sheet].concat(e.adoptedStyleSheets),e[ls]=Ci;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),Ci=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[ls]=this}mount(e){let t=this.sheet,i=0,s=0;for(let r=0;r<e.length;r++){let o=e[r],l=this.modules.indexOf(o);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),t)for(let h=0;h<o.rules.length;h++)t.insertRule(o.rules[h],i++)}else{for(;s<l;)i+=this.modules[s++].rules.length;i+=o.rules.length,s++}}if(!t){let r="";for(let o=0;o<this.modules.length;o++)r+=this.modules[o].getRules()+`
`;this.styleTag.textContent=r}}}var lt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ai={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Dr=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent);typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent);var Ya=typeof navigator<"u"&&/Mac/.test(navigator.platform),_a=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Qa=Ya||Dr&&+Dr[1]<57;for(var ne=0;ne<10;ne++)lt[48+ne]=lt[96+ne]=String(ne);for(var ne=1;ne<=24;ne++)lt[ne+111]="F"+ne;for(var ne=65;ne<=90;ne++)lt[ne]=String.fromCharCode(ne+32),ai[ne]=String.fromCharCode(ne);for(var Pn in lt)ai.hasOwnProperty(Pn)||(ai[Pn]=lt[Pn]);function Za(n){var e=Qa&&(n.ctrlKey||n.altKey||n.metaKey)||_a&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?ai: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 Ui(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Et(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function ec(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Hi(n,e){if(!e.anchorNode)return!1;try{return Et(n,e.anchorNode)}catch{return!1}}function ci(n){return n.nodeType==3?It(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function Gi(n,e,t,i){return t?Or(n,e,t,i,-1)||Or(n,e,t,i,1):!1}function Ji(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Or(n,e,t,i,s){for(;;){if(n==t&&e==i)return!0;if(e==(s<0?0:fi(n))){if(n.nodeName=="DIV")return!1;let r=n.parentNode;if(!r||r.nodeType!=1)return!1;e=Ji(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?fi(n):0}else return!1}}function fi(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}const pl={left:0,right:0,top:0,bottom:0};function mn(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function tc(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function ic(n,e,t,i,s,r,o,l){let h=n.ownerDocument,a=h.defaultView;for(let c=n;c;)if(c.nodeType==1){let f,u=c==h.body;if(u)f=tc(a);else{if(c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=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.top<f.top?(p=-(f.top-e.top+o),t>0&&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-p<f.top&&(p=-(f.top+p-e.top+o)));else{let g=e.bottom-e.top,y=f.bottom-f.top;p=(s=="center"&&g<=y?e.top+g/2-y/2:s=="start"||s=="center"&&t<0?e.top-o:e.bottom-y+o)-f.top}if(i=="nearest"?e.left<f.left?(d=-(f.left-e.left+r),t>0&&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.left<f.left+d&&(d=-(f.left+d-e.left+r))):d=(i=="center"?e.left+(e.right-e.left)/2-(f.right-f.left)/2:i=="start"==l?e.left-r:e.right-(f.right-f.left)+r)-f.left,d||p)if(u)a.scrollBy(d,p);else{if(p){let g=c.scrollTop;c.scrollTop+=p,p=c.scrollTop-g}if(d){let g=c.scrollLeft;c.scrollLeft+=d,d=c.scrollLeft-g}e={left:e.left-d,top:e.top-p,right:e.right-d,bottom:e.bottom-p}}if(u)break;c=c.assignedSlot||c.parentNode,i=s="nearest"}else if(c.nodeType==11)c=c.host;else break}class nc{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 gl(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;t<e.length;){let i=e[t++],s=e[t++],r=e[t++];i.scrollTop!=s&&(i.scrollTop=s),i.scrollLeft!=r&&(i.scrollLeft=r)}}}let Tr;function It(n,e,t=e){leLine truncated
`,s=n.state.doc.line(s.number+(t?1:-1)),r=n.bidiSpans(s),a=m.cursor(t?s.from:s.to)}if(h){if(!h(c))return l}else{if(!i)return a;h=i(c)}l=a}}function Bc(n,e,t){let i=n.state.charCategorizer(e),s=i(t);return r=>{let o=i(r);return s==j.Space&&(s=o),s==o}}function Pc(n,e,t,i){let s=e.head,r=t?1:-1;if(s==(t?n.state.doc.length:0))return m.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!=null?i:n.defaultLineHeight>>1;for(let d=0;;d+=10){let p=l+(u+d)*r,g=jl(n,{x:f,y:p},!1,r);if(p<h.top||p>h.bottom||(r<0?g<s:g>s))return m.cursor(g,e.assoc,void 0,o)}}function In(n,e,t){let i=n.state.facet(Nl).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.from<l&&(t=e.from>t.from?m.cursor(o,1):m.cursor(l,-1),s=!0)});if(!s)return t}}class Lc{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.rapidCompositionStart=!1,this.mouseSelection=null;for(let t in Z){let i=Z[t];e.contentDOM.addEventListener(t,s=>{!Kr(e,s)||this.ignoreDuringComposition(s)||t=="keydown"&&this.keydown(e,s)||(this.mustFlushObserver(s)&&e.observer.forceFlush(),this.runCustomHandlers(t,e,s)?s.preventDefault():i(e,s))},xs[t]),this.registeredEvents.push(t)}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=>{!Kr(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){Re(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){Re(e.state,r)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(A.android&&A.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let i;return A.ios&&!t.synthetic&&!t.altKey&&!t.metaKey&&((i=Kl.find(s=>s.keyCode==t.keyCode))&&!t.ctrlKey||Rc.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,ni(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||e.type=="compositionend"&&!A.ios}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 Kl=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Rc="dthko",Ul=[16,17,18,20,91,92,224,225];class Ec{constructor(e,t,i,s){this.view=e,this.style=i,this.mustSelect=s,this.lastEvent=t;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(I.allowMultipleSelections)&&Ic(e,t),this.dragMove=Nc(e,t),this.dragging=Vc(e,t)&&Us(t)==1?null:!1,this.dragging===!1&&(t.preventDefault(),this.select(t))}move(e){if(e.buttons==0)return this.destroy();this.dragging===!1&&this.select(this.lastEvent=e)}up(e){this Line truncated
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,As),Df={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 Fn=null;function Of(){var n;if(Fn==null&&typeof document<"u"&&document.body){let e=document.body.style;Fn=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return Fn||!1}const qi=D.define({combine(n){let e=Ct(n,{render:null,specialChars:Mf,addSpecialChars:null});return(e.replaceTabs=!Of())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,As)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,As)),e}});function cg(n={}){return[qi.of(n),Tf()]}let uo=null;function Tf(){return uo||(uo=de.fromClass(class{constructor(n){this.view=n,this.decorations=T.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(qi)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new Af({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:s}=t.state,r=ie(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 Rf((l-h%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=T.replace({widget:new Lf(n,r)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(qi);n.startState.facet(qi)!=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 Bf="\u2022";function Pf(n){return n>=32?Bf:n==10?"\u2424":String.fromCharCode(9216+n)}class Lf extends at{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=Pf(this.code),i=e.state.phrase("Control character")+" "+(Df[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 Rf extends at{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 Ef extends at{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 fg(n){return de.fromClass(class{constructor(e){this.view=e,this.placeholder=T.set([T.widget({widget:new Ef(n),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?T.none:this.placeholder}},{decorations:e=>e.decorations})}const Ms=2e3;function If(n,e,t){let i=Math.min(e.line,t.line),s=Math.max(e.line,t.line),r=[];if(e.off>Ms||t.off>Ms||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(m.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=rs(a.text,o,n.tabSize,!0);if(c>-1){let f=rs(a.text,l,n.tabSize);r.push(m.range(a.from+c,a.from+f))}}}return r}function Nf(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function po(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>Ms?-1:s==i.length?Nf(n,e.clientX):yi(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:r,off:s}}function Vf(n,e){let t=po(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=po(n,s);if(!l)return i;let h=If(n.state,t,l);return h.length?o?m.create(h.concat(i.ranges)):m.create(h):i}}:null}function ug(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return O.mouseSelectionStyle.of((t,i)=>e(i)?Vf(t,i):null)}const Wn="-10000px";class Ff{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){let t=e.state.facet(this.facet),i=t.filt Line truncated
`&&(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;t+=this.ranges[++this.rangeIndex].from-s}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,i,s,r){if(this.ranges.length>1){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 Oh(t,e?e.state.tabSize:4,e?kt(e.state):2);if(o.eol())r.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=Ph(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.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=F.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Nu,topID:0,maxBufferLength:2048,reused:this.chunkReused});e=new F(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new F(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function Ph(n,e,t){e.start=e.pos;for(let i=0;i<10;i++){let s=n(e,t);if(e.pos>e.start)return s}throw new Error("Stream parser failed to advance stream.")}const tr=Object.create(null),pi=[pe.none],Nu=new Xs(pi),To=[],Lh=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"]])Lh[n]=Eh(tr,e);class Rh{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),Lh)}resolve(e){return e?this.table[e]||(this.table[e]=Eh(this.extra,e)):0}}const Vu=new Rh(tr);function Kn(n,e){To.indexOf(n)>-1||(To.push(n),console.warn(e))}function Eh(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):Kn(r,`Modifier ${r} used at start of tag`):t?Kn(r,`Tag ${r} used as modifier`):t=o:Kn(r,`Unknown highlighting tag ${r}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),s=pe.define({id:pi.length,name:i,props:[hu({[i]:t})]});return pi.push(s),s.id}function Fu(n){let e=pe.define({id:pi.length,name:"Document",props:[Ft.add(()=>n)]});return pi.push(e),e}const Wu=n=>{let e=nr(n.state);return e.line?Hu(n):e.block?qu(n):!1};function ir(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 Hu=ir(Ku,0),zu=ir(Ih,0),qu=ir((n,e)=>Ih(n,e,ju(e)),0);function nr(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Xt=50;function $u(n,{open:e,close:t},i,s){let r=n.sliceDoc(i-Xt,i),o=n.sliceDoc(s,s+Xt),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*Xt?c=f=n.sliceDoc(i,s):(c=n.sliceDoc(i,i+Xt),f=n.sliceDoc(s-Xt,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 ju(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 Ih(n,e,t=e.selection.ranges){let i=t.map(r=>nr(e,r.from).block);if(!i.every(r=>r))return null;let s=t.map((r,o)=>$u(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;o<s.length;o++)if(l=s[o]){let h=i[o],{open:a,close:c}=l;r.push({from:a.pos-h.open.length,to:a.pos+a.margin},{from:c.pos-c.margin,to:c.pos+h.close.length})}return{changes:r}}return null}function Ku(n,e,t=e.selection.ranges){let i=[],s=-1;for(let{from:r,to:o}of t){let l=i.length,h=1e9;for(let a=r;a<=o;){let c=e.doc.lineAt(a);if(c.from>s&&(r==o||o>c.from)){s=c.from;let f=nr(e,a).line;if(!f)continue;let u=/^\s*/.exec(c.text)[0].length,d=u==c Line truncated
`:i=="r"?"\r":i=="t"?" ":"\\"),this.wholeWord=!!e.wholeWord}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 hp(this):new op(this)}getCursor(e,t=0,i){let s=e.doc?e:I.create({doc:e});return i==null&&(i=s.doc.length),this.regexp?Tt(this,s,t,i):Ot(this,s,t,i)}}class ba{constructor(e){this.spec=e}}function Ot(n,e,t,i){return new qt(e.doc,n.unquoted,t,i,n.caseSensitive?void 0:s=>s.toLowerCase(),n.wholeWord?rp(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function rp(n,e){return(t,i,s,r)=>((r>t||r+s.length<i)&&(r=Math.max(0,t-2),s=n.sliceString(r,Math.min(n.length,i+2))),e(an(s,t-r))!=j.Word||e(hn(s,i-r))!=j.Word||e(hn(s,t-r))!=j.Word&&e(an(s,i-r))!=j.Word)}class op extends ba{constructor(e){super(e)}nextMatch(e,t,i){let s=Ot(this.spec,e,i,e.doc.length).nextOverlapping();return s.done&&(s=Ot(this.spec,e,0,t).nextOverlapping()),s.done?null:s.value}prevMatchInRange(e,t,i){for(let s=i;;){let r=Math.max(t,s-1e4-this.spec.unquoted.length),o=Ot(this.spec,e,r,s),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(r==t)return null;s-=1e4}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.replace}matchAll(e,t){let i=Ot(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(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 pa(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:n.wholeWord?lp(e.charCategorizer(e.selection.main.head)):void 0},t,i)}function hn(n,e){return n.slice(fe(n,e,!1),e)}function an(n,e){return n.slice(e,fe(n,e))}function lp(n){return(e,t,i)=>!i[0].length||n(an(i.input,i.index))!=j.Word||n(hn(i.input,i.index+i[0].length))!=j.Word||n(hn(i.input,i.index))!=j.Word&&n(an(i.input,i.index+i[0].length))!=j.Word}class hp extends ba{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.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i<e.match.length?e.match[i]:t)}matchAll(e,t){let i=Tt(this.spec,e,0,e.doc.length),s=[];for(;!i.next().done;){if(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-250),Math.min(i+250,e.doc.length));for(;!r.next().done;)s(r.value.from,r.value.to)}}const gi=R.define(),lr=R.define(),st=me.define({create(n){return new Jn(Vs(n).create(),null)},update(n,e){for(let t of e.effects)t.is(gi)?n=new Jn(t.value.create(),n.panel):t.is(lr)&&(n=new Jn(n.query,t.value?hr:null));return n},provide:n=>Zi.from(n,e=>e.panel)});class Jn{constructor(e,t){this.query=e,this.panel=t}}const ap=T.mark({class:"cm-searchMatch"}),cp=T.mark({class:"cm-searchMatch cm-searchMatch-selected"}),fp=de.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 bt;for(let s=0,r=t.visibleRanges,o=r.length;s<o;s++){let{from:l,to:h}=r[s];for(;s<o-1&&h>r[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?cp:ap)})}return i.finish()}},{decorations:n=>n.decorations});function wi(n){return e=>{let t=e.state.field(st,!1);return t&&t.query.spec.valid?n(e,t):wa(e)}}const cn=wi((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:ar(n,i),userEvent:"select.search"}),!0):!1}),fn=wi((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:ar(n,s),userEvent:"select.search"}),!0):!1}),up=wi((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:m.create(t.map(i=>m.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 qt(n.doc,n.sliceDoc(i,s));!l.next().done;){if(r.length>1e3)return!1;l.value.from==i&&(o=r.length),r.push(m.range(l.value.from,l.value.to))}return e(n.update({selection:m.create(r,o),userEvent:"select Line truncated
+2 -2
View File
@@ -24,8 +24,8 @@
window.Prism = window.Prism || {};
window.Prism.manual = true;
</script>
<script type="module" crossorigin src="./assets/index.bdac21fd.js"></script>
<link rel="stylesheet" href="./assets/index.9a52adce.css">
<script type="module" crossorigin src="./assets/index.bbd53e70.js"></script>
<link rel="stylesheet" href="./assets/index.126056bc.css">
</head>
<body>
<div id="app"></div>
+233 -231
View File
@@ -29,9 +29,9 @@
}
},
"node_modules/@codemirror/autocomplete": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.1.0.tgz",
"integrity": "sha512-wtO4O5WDyXhhCd4q4utDIDZxnQfmJ++3dGBCG9LMtI79+92OcA1DVk/n7BEupKmjIr8AzvptDz7YQ9ud6OkU+A==",
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.2.0.tgz",
"integrity": "sha512-yNCm2CEE4kE4L2Sf7WeyCej1Q3951ccaCWfomrlBkoERKCss+TzuEeqGe5VnAJTEybLy1yzf1BdMUY/988bfpg==",
"dev": true,
"dependencies": {
"@codemirror/language": "^6.0.0",
@@ -71,9 +71,9 @@
}
},
"node_modules/@codemirror/lang-html": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.1.0.tgz",
"integrity": "sha512-gA7NmJxqvnhwza05CvR7W/39Ap9r/4Vs9uiC0IeFYo1hSlJzc/8N6Evviz6vTW1x8SpHcRYyqKOf6rpl6LfWtg==",
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.1.1.tgz",
"integrity": "sha512-+hV1kVZySmr7GxCgSVM+BodaVlsgD98laEJbj/GALhgIrfnHTSiRuTz2EPTjNCKeq5uEQXeOKFY711/CxJbYrg==",
"dev": true,
"dependencies": {
"@codemirror/autocomplete": "^6.0.0",
@@ -81,8 +81,9 @@
"@codemirror/lang-javascript": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.2.2",
"@lezer/common": "^1.0.0",
"@lezer/html": "^1.0.0"
"@lezer/html": "^1.0.1"
}
},
"node_modules/@codemirror/lang-javascript": {
@@ -152,9 +153,9 @@
"dev": true
},
"node_modules/@codemirror/view": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.2.2.tgz",
"integrity": "sha512-RwtFlBM/+xnv95urH1D8bVsX3KYLZGygGyZG2TZoXW2Q/GMrI+AuUXh7jBE1M38IOX3YnLTlp6RdgCx3Xo2jVA==",
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.2.3.tgz",
"integrity": "sha512-cgN9gWS9+kv9+eOgVJWMrGUk4EwYKBZpuFYvxIlu4CmMye3+U+gMzuZhBgtPDOCbCp30hxFIOO0MENhGfnaC/g==",
"dev": true,
"dependencies": {
"@codemirror/state": "^6.0.0",
@@ -163,9 +164,9 @@
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
"integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.7.tgz",
"integrity": "sha512-IKznSJOsVUuyt7cDzzSZyqBEcZe+7WlBqTVXiF1OXP/4Nm387ToaXZ0fyLwI1iBlI/bzpxVq411QE2/Bt2XWWw==",
"cpu": [
"loong64"
],
@@ -247,16 +248,16 @@
}
},
"node_modules/@sveltejs/vite-plugin-svelte": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.4.tgz",
"integrity": "sha512-UZco2fdj0OVuRWC0SUJjEOftITc2IeHLFJNp00ym9MuQ9dShnlO4P29G8KUxRlcS7kSpzHuko6eCR9MOALj7lQ==",
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.5.tgz",
"integrity": "sha512-CmSdSow0Dr5ua1A11BQMtreWnE0JZmkVIcRU/yG3PKbycKUpXjNdgYTWFSbStLB0vdlGnBbm2+Y4sBVj+C+TIw==",
"dev": true,
"dependencies": {
"@rollup/pluginutils": "^4.2.1",
"debug": "^4.3.4",
"deepmerge": "^4.2.2",
"kleur": "^4.1.5",
"magic-string": "^0.26.2",
"magic-string": "^0.26.3",
"svelte-hmr": "^0.14.12"
},
"engines": {
@@ -265,7 +266,7 @@
"peerDependencies": {
"diff-match-patch": "^1.0.5",
"svelte": "^3.44.0",
"vite": "^3.0.0 || ^3.1.0-beta.1"
"vite": "^3.0.0"
},
"peerDependenciesMeta": {
"diff-match-patch": {
@@ -383,9 +384,9 @@
}
},
"node_modules/esbuild": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
"integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.7.tgz",
"integrity": "sha512-7V8tzllIbAQV1M4QoE52ImKu8hT/NLGlGXkiDsbEU5PS6K8Mn09ZnYoS+dcmHxOS9CRsV4IRAMdT3I67IyUNXw==",
"dev": true,
"hasInstallScript": true,
"bin": {
@@ -395,33 +396,33 @@
"node": ">=12"
},
"optionalDependencies": {
"@esbuild/linux-loong64": "0.14.54",
"esbuild-android-64": "0.14.54",
"esbuild-android-arm64": "0.14.54",
"esbuild-darwin-64": "0.14.54",
"esbuild-darwin-arm64": "0.14.54",
"esbuild-freebsd-64": "0.14.54",
"esbuild-freebsd-arm64": "0.14.54",
"esbuild-linux-32": "0.14.54",
"esbuild-linux-64": "0.14.54",
"esbuild-linux-arm": "0.14.54",
"esbuild-linux-arm64": "0.14.54",
"esbuild-linux-mips64le": "0.14.54",
"esbuild-linux-ppc64le": "0.14.54",
"esbuild-linux-riscv64": "0.14.54",
"esbuild-linux-s390x": "0.14.54",
"esbuild-netbsd-64": "0.14.54",
"esbuild-openbsd-64": "0.14.54",
"esbuild-sunos-64": "0.14.54",
"esbuild-windows-32": "0.14.54",
"esbuild-windows-64": "0.14.54",
"esbuild-windows-arm64": "0.14.54"
"@esbuild/linux-loong64": "0.15.7",
"esbuild-android-64": "0.15.7",
"esbuild-android-arm64": "0.15.7",
"esbuild-darwin-64": "0.15.7",
"esbuild-darwin-arm64": "0.15.7",
"esbuild-freebsd-64": "0.15.7",
"esbuild-freebsd-arm64": "0.15.7",
"esbuild-linux-32": "0.15.7",
"esbuild-linux-64": "0.15.7",
"esbuild-linux-arm": "0.15.7",
"esbuild-linux-arm64": "0.15.7",
"esbuild-linux-mips64le": "0.15.7",
"esbuild-linux-ppc64le": "0.15.7",
"esbuild-linux-riscv64": "0.15.7",
"esbuild-linux-s390x": "0.15.7",
"esbuild-netbsd-64": "0.15.7",
"esbuild-openbsd-64": "0.15.7",
"esbuild-sunos-64": "0.15.7",
"esbuild-windows-32": "0.15.7",
"esbuild-windows-64": "0.15.7",
"esbuild-windows-arm64": "0.15.7"
}
},
"node_modules/esbuild-android-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
"integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.7.tgz",
"integrity": "sha512-p7rCvdsldhxQr3YHxptf1Jcd86dlhvc3EQmQJaZzzuAxefO9PvcI0GLOa5nCWem1AJ8iMRu9w0r5TG8pHmbi9w==",
"cpu": [
"x64"
],
@@ -435,9 +436,9 @@
}
},
"node_modules/esbuild-android-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
"integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.7.tgz",
"integrity": "sha512-L775l9ynJT7rVqRM5vo+9w5g2ysbOCfsdLV4CWanTZ1k/9Jb3IYlQ06VCI1edhcosTYJRECQFJa3eAvkx72eyQ==",
"cpu": [
"arm64"
],
@@ -451,9 +452,9 @@
}
},
"node_modules/esbuild-darwin-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
"integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.7.tgz",
"integrity": "sha512-KGPt3r1c9ww009t2xLB6Vk0YyNOXh7hbjZ3EecHoVDxgtbUlYstMPDaReimKe6eOEfyY4hBEEeTvKwPsiH5WZg==",
"cpu": [
"x64"
],
@@ -467,9 +468,9 @@
}
},
"node_modules/esbuild-darwin-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
"integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.7.tgz",
"integrity": "sha512-kBIHvtVqbSGajN88lYMnR3aIleH3ABZLLFLxwL2stiuIGAjGlQW741NxVTpUHQXUmPzxi6POqc9npkXa8AcSZQ==",
"cpu": [
"arm64"
],
@@ -483,9 +484,9 @@
}
},
"node_modules/esbuild-freebsd-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
"integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.7.tgz",
"integrity": "sha512-hESZB91qDLV5MEwNxzMxPfbjAhOmtfsr9Wnuci7pY6TtEh4UDuevmGmkUIjX/b+e/k4tcNBMf7SRQ2mdNuK/HQ==",
"cpu": [
"x64"
],
@@ -499,9 +500,9 @@
}
},
"node_modules/esbuild-freebsd-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
"integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.7.tgz",
"integrity": "sha512-dLFR0ChH5t+b3J8w0fVKGvtwSLWCv7GYT2Y2jFGulF1L5HftQLzVGN+6pi1SivuiVSmTh28FwUhi9PwQicXI6Q==",
"cpu": [
"arm64"
],
@@ -515,9 +516,9 @@
}
},
"node_modules/esbuild-linux-32": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
"integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.7.tgz",
"integrity": "sha512-v3gT/LsONGUZcjbt2swrMjwxo32NJzk+7sAgtxhGx1+ZmOFaTRXBAi1PPfgpeo/J//Un2jIKm/I+qqeo4caJvg==",
"cpu": [
"ia32"
],
@@ -531,9 +532,9 @@
}
},
"node_modules/esbuild-linux-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
"integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.7.tgz",
"integrity": "sha512-LxXEfLAKwOVmm1yecpMmWERBshl+Kv5YJ/1KnyAr6HRHFW8cxOEsEfisD3sVl/RvHyW//lhYUVSuy9jGEfIRAQ==",
"cpu": [
"x64"
],
@@ -547,9 +548,9 @@
}
},
"node_modules/esbuild-linux-arm": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
"integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.7.tgz",
"integrity": "sha512-JKgAHtMR5f75wJTeuNQbyznZZa+pjiUHV7sRZp42UNdyXC6TiUYMW/8z8yIBAr2Fpad8hM1royZKQisqPABPvQ==",
"cpu": [
"arm"
],
@@ -563,9 +564,9 @@
}
},
"node_modules/esbuild-linux-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
"integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.7.tgz",
"integrity": "sha512-P3cfhudpzWDkglutWgXcT2S7Ft7o2e3YDMrP1n0z2dlbUZghUkKCyaWw0zhp4KxEEzt/E7lmrtRu/pGWnwb9vw==",
"cpu": [
"arm64"
],
@@ -579,9 +580,9 @@
}
},
"node_modules/esbuild-linux-mips64le": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
"integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.7.tgz",
"integrity": "sha512-T7XKuxl0VpeFLCJXub6U+iybiqh0kM/bWOTb4qcPyDDwNVhLUiPcGdG2/0S7F93czUZOKP57YiLV8YQewgLHKw==",
"cpu": [
"mips64el"
],
@@ -595,9 +596,9 @@
}
},
"node_modules/esbuild-linux-ppc64le": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
"integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.7.tgz",
"integrity": "sha512-6mGuC19WpFN7NYbecMIJjeQgvDb5aMuvyk0PDYBJrqAEMkTwg3Z98kEKuCm6THHRnrgsdr7bp4SruSAxEM4eJw==",
"cpu": [
"ppc64"
],
@@ -611,9 +612,9 @@
}
},
"node_modules/esbuild-linux-riscv64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
"integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.7.tgz",
"integrity": "sha512-uUJsezbswAYo/X7OU/P+PuL/EI9WzxsEQXDekfwpQ23uGiooxqoLFAPmXPcRAt941vjlY9jtITEEikWMBr+F/g==",
"cpu": [
"riscv64"
],
@@ -627,9 +628,9 @@
}
},
"node_modules/esbuild-linux-s390x": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
"integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.7.tgz",
"integrity": "sha512-+tO+xOyTNMc34rXlSxK7aCwJgvQyffqEM5MMdNDEeMU3ss0S6wKvbBOQfgd5jRPblfwJ6b+bKiz0g5nABpY0QQ==",
"cpu": [
"s390x"
],
@@ -643,9 +644,9 @@
}
},
"node_modules/esbuild-netbsd-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
"integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.7.tgz",
"integrity": "sha512-yVc4Wz+Pu3cP5hzm5kIygNPrjar/v5WCSoRmIjCPWfBVJkZNb5brEGKUlf+0Y759D48BCWa0WHrWXaNy0DULTQ==",
"cpu": [
"x64"
],
@@ -659,9 +660,9 @@
}
},
"node_modules/esbuild-openbsd-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
"integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.7.tgz",
"integrity": "sha512-GsimbwC4FSR4lN3wf8XmTQ+r8/0YSQo21rWDL0XFFhLHKlzEA4SsT1Tl8bPYu00IU6UWSJ+b3fG/8SB69rcuEQ==",
"cpu": [
"x64"
],
@@ -675,9 +676,9 @@
}
},
"node_modules/esbuild-sunos-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
"integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.7.tgz",
"integrity": "sha512-8CDI1aL/ts0mDGbWzjEOGKXnU7p3rDzggHSBtVryQzkSOsjCHRVe0iFYUuhczlxU1R3LN/E7HgUO4NXzGGP/Ag==",
"cpu": [
"x64"
],
@@ -691,9 +692,9 @@
}
},
"node_modules/esbuild-windows-32": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
"integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.7.tgz",
"integrity": "sha512-cOnKXUEPS8EGCzRSFa1x6NQjGhGsFlVgjhqGEbLTPsA7x4RRYiy2RKoArNUU4iR2vHmzqS5Gr84MEumO/wxYKA==",
"cpu": [
"ia32"
],
@@ -707,9 +708,9 @@
}
},
"node_modules/esbuild-windows-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
"integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.7.tgz",
"integrity": "sha512-7MI08Ec2sTIDv+zH6StNBKO+2hGUYIT42GmFyW6MBBWWtJhTcQLinKS6ldIN1d52MXIbiJ6nXyCJ+LpL4jBm3Q==",
"cpu": [
"x64"
],
@@ -723,9 +724,9 @@
}
},
"node_modules/esbuild-windows-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
"integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.7.tgz",
"integrity": "sha512-R06nmqBlWjKHddhRJYlqDd3Fabx9LFdKcjoOy08YLimwmsswlFBJV4rXzZCxz/b7ZJXvrZgj8DDv1ewE9+StMw==",
"cpu": [
"arm64"
],
@@ -1025,9 +1026,9 @@
}
},
"node_modules/rollup": {
"version": "2.77.3",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz",
"integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==",
"version": "2.78.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz",
"integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==",
"dev": true,
"bin": {
"rollup": "dist/bin/rollup"
@@ -1040,9 +1041,9 @@
}
},
"node_modules/sass": {
"version": "1.54.8",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.8.tgz",
"integrity": "sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==",
"version": "1.54.9",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.9.tgz",
"integrity": "sha512-xb1hjASzEH+0L0WI9oFjqhRi51t/gagWnxLiwUNMltA0Ab6jIDkAacgKiGYKM9Jhy109osM7woEEai6SXeJo5Q==",
"dev": true,
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0",
@@ -1090,9 +1091,9 @@
}
},
"node_modules/svelte": {
"version": "3.49.0",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.49.0.tgz",
"integrity": "sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==",
"version": "3.50.1",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.50.1.tgz",
"integrity": "sha512-bS4odcsdj5D5jEg6riZuMg5NKelzPtmsCbD9RG+8umU03TeNkdWnP6pqbCm0s8UQNBkqk29w/Bdubn3C+HWSwA==",
"dev": true,
"engines": {
"node": ">= 8"
@@ -1147,15 +1148,15 @@
}
},
"node_modules/vite": {
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.0.9.tgz",
"integrity": "sha512-waYABTM+G6DBTCpYAxvevpG50UOlZuynR0ckTK5PawNVt7ebX6X7wNXHaGIO6wYYFXSM7/WcuFuO2QzhBB6aMw==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.1.0.tgz",
"integrity": "sha512-YBg3dUicDpDWFCGttmvMbVyS9ydjntwEjwXRj2KBFwSB8SxmGcudo1yb8FW5+M/G86aS8x828ujnzUVdsLjs9g==",
"dev": true,
"dependencies": {
"esbuild": "^0.14.47",
"esbuild": "^0.15.6",
"postcss": "^8.4.16",
"resolve": "^1.22.1",
"rollup": ">=2.75.6 <2.77.0 || ~2.77.0"
"rollup": "~2.78.0"
},
"bin": {
"vite": "bin/vite.js"
@@ -1196,9 +1197,9 @@
},
"dependencies": {
"@codemirror/autocomplete": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.1.0.tgz",
"integrity": "sha512-wtO4O5WDyXhhCd4q4utDIDZxnQfmJ++3dGBCG9LMtI79+92OcA1DVk/n7BEupKmjIr8AzvptDz7YQ9ud6OkU+A==",
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.2.0.tgz",
"integrity": "sha512-yNCm2CEE4kE4L2Sf7WeyCej1Q3951ccaCWfomrlBkoERKCss+TzuEeqGe5VnAJTEybLy1yzf1BdMUY/988bfpg==",
"dev": true,
"requires": {
"@codemirror/language": "^6.0.0",
@@ -1232,9 +1233,9 @@
}
},
"@codemirror/lang-html": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.1.0.tgz",
"integrity": "sha512-gA7NmJxqvnhwza05CvR7W/39Ap9r/4Vs9uiC0IeFYo1hSlJzc/8N6Evviz6vTW1x8SpHcRYyqKOf6rpl6LfWtg==",
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.1.1.tgz",
"integrity": "sha512-+hV1kVZySmr7GxCgSVM+BodaVlsgD98laEJbj/GALhgIrfnHTSiRuTz2EPTjNCKeq5uEQXeOKFY711/CxJbYrg==",
"dev": true,
"requires": {
"@codemirror/autocomplete": "^6.0.0",
@@ -1242,8 +1243,9 @@
"@codemirror/lang-javascript": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.2.2",
"@lezer/common": "^1.0.0",
"@lezer/html": "^1.0.0"
"@lezer/html": "^1.0.1"
}
},
"@codemirror/lang-javascript": {
@@ -1313,9 +1315,9 @@
"dev": true
},
"@codemirror/view": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.2.2.tgz",
"integrity": "sha512-RwtFlBM/+xnv95urH1D8bVsX3KYLZGygGyZG2TZoXW2Q/GMrI+AuUXh7jBE1M38IOX3YnLTlp6RdgCx3Xo2jVA==",
"version": "6.2.3",
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.2.3.tgz",
"integrity": "sha512-cgN9gWS9+kv9+eOgVJWMrGUk4EwYKBZpuFYvxIlu4CmMye3+U+gMzuZhBgtPDOCbCp30hxFIOO0MENhGfnaC/g==",
"dev": true,
"requires": {
"@codemirror/state": "^6.0.0",
@@ -1324,9 +1326,9 @@
}
},
"@esbuild/linux-loong64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.14.54.tgz",
"integrity": "sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.15.7.tgz",
"integrity": "sha512-IKznSJOsVUuyt7cDzzSZyqBEcZe+7WlBqTVXiF1OXP/4Nm387ToaXZ0fyLwI1iBlI/bzpxVq411QE2/Bt2XWWw==",
"dev": true,
"optional": true
},
@@ -1396,16 +1398,16 @@
}
},
"@sveltejs/vite-plugin-svelte": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.4.tgz",
"integrity": "sha512-UZco2fdj0OVuRWC0SUJjEOftITc2IeHLFJNp00ym9MuQ9dShnlO4P29G8KUxRlcS7kSpzHuko6eCR9MOALj7lQ==",
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.5.tgz",
"integrity": "sha512-CmSdSow0Dr5ua1A11BQMtreWnE0JZmkVIcRU/yG3PKbycKUpXjNdgYTWFSbStLB0vdlGnBbm2+Y4sBVj+C+TIw==",
"dev": true,
"requires": {
"@rollup/pluginutils": "^4.2.1",
"debug": "^4.3.4",
"deepmerge": "^4.2.2",
"kleur": "^4.1.5",
"magic-string": "^0.26.2",
"magic-string": "^0.26.3",
"svelte-hmr": "^0.14.12"
}
},
@@ -1485,171 +1487,171 @@
"dev": true
},
"esbuild": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.14.54.tgz",
"integrity": "sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.15.7.tgz",
"integrity": "sha512-7V8tzllIbAQV1M4QoE52ImKu8hT/NLGlGXkiDsbEU5PS6K8Mn09ZnYoS+dcmHxOS9CRsV4IRAMdT3I67IyUNXw==",
"dev": true,
"requires": {
"@esbuild/linux-loong64": "0.14.54",
"esbuild-android-64": "0.14.54",
"esbuild-android-arm64": "0.14.54",
"esbuild-darwin-64": "0.14.54",
"esbuild-darwin-arm64": "0.14.54",
"esbuild-freebsd-64": "0.14.54",
"esbuild-freebsd-arm64": "0.14.54",
"esbuild-linux-32": "0.14.54",
"esbuild-linux-64": "0.14.54",
"esbuild-linux-arm": "0.14.54",
"esbuild-linux-arm64": "0.14.54",
"esbuild-linux-mips64le": "0.14.54",
"esbuild-linux-ppc64le": "0.14.54",
"esbuild-linux-riscv64": "0.14.54",
"esbuild-linux-s390x": "0.14.54",
"esbuild-netbsd-64": "0.14.54",
"esbuild-openbsd-64": "0.14.54",
"esbuild-sunos-64": "0.14.54",
"esbuild-windows-32": "0.14.54",
"esbuild-windows-64": "0.14.54",
"esbuild-windows-arm64": "0.14.54"
"@esbuild/linux-loong64": "0.15.7",
"esbuild-android-64": "0.15.7",
"esbuild-android-arm64": "0.15.7",
"esbuild-darwin-64": "0.15.7",
"esbuild-darwin-arm64": "0.15.7",
"esbuild-freebsd-64": "0.15.7",
"esbuild-freebsd-arm64": "0.15.7",
"esbuild-linux-32": "0.15.7",
"esbuild-linux-64": "0.15.7",
"esbuild-linux-arm": "0.15.7",
"esbuild-linux-arm64": "0.15.7",
"esbuild-linux-mips64le": "0.15.7",
"esbuild-linux-ppc64le": "0.15.7",
"esbuild-linux-riscv64": "0.15.7",
"esbuild-linux-s390x": "0.15.7",
"esbuild-netbsd-64": "0.15.7",
"esbuild-openbsd-64": "0.15.7",
"esbuild-sunos-64": "0.15.7",
"esbuild-windows-32": "0.15.7",
"esbuild-windows-64": "0.15.7",
"esbuild-windows-arm64": "0.15.7"
}
},
"esbuild-android-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.54.tgz",
"integrity": "sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.15.7.tgz",
"integrity": "sha512-p7rCvdsldhxQr3YHxptf1Jcd86dlhvc3EQmQJaZzzuAxefO9PvcI0GLOa5nCWem1AJ8iMRu9w0r5TG8pHmbi9w==",
"dev": true,
"optional": true
},
"esbuild-android-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.54.tgz",
"integrity": "sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.15.7.tgz",
"integrity": "sha512-L775l9ynJT7rVqRM5vo+9w5g2ysbOCfsdLV4CWanTZ1k/9Jb3IYlQ06VCI1edhcosTYJRECQFJa3eAvkx72eyQ==",
"dev": true,
"optional": true
},
"esbuild-darwin-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.54.tgz",
"integrity": "sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.15.7.tgz",
"integrity": "sha512-KGPt3r1c9ww009t2xLB6Vk0YyNOXh7hbjZ3EecHoVDxgtbUlYstMPDaReimKe6eOEfyY4hBEEeTvKwPsiH5WZg==",
"dev": true,
"optional": true
},
"esbuild-darwin-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.54.tgz",
"integrity": "sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.7.tgz",
"integrity": "sha512-kBIHvtVqbSGajN88lYMnR3aIleH3ABZLLFLxwL2stiuIGAjGlQW741NxVTpUHQXUmPzxi6POqc9npkXa8AcSZQ==",
"dev": true,
"optional": true
},
"esbuild-freebsd-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.54.tgz",
"integrity": "sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.7.tgz",
"integrity": "sha512-hESZB91qDLV5MEwNxzMxPfbjAhOmtfsr9Wnuci7pY6TtEh4UDuevmGmkUIjX/b+e/k4tcNBMf7SRQ2mdNuK/HQ==",
"dev": true,
"optional": true
},
"esbuild-freebsd-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.54.tgz",
"integrity": "sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.7.tgz",
"integrity": "sha512-dLFR0ChH5t+b3J8w0fVKGvtwSLWCv7GYT2Y2jFGulF1L5HftQLzVGN+6pi1SivuiVSmTh28FwUhi9PwQicXI6Q==",
"dev": true,
"optional": true
},
"esbuild-linux-32": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.54.tgz",
"integrity": "sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.15.7.tgz",
"integrity": "sha512-v3gT/LsONGUZcjbt2swrMjwxo32NJzk+7sAgtxhGx1+ZmOFaTRXBAi1PPfgpeo/J//Un2jIKm/I+qqeo4caJvg==",
"dev": true,
"optional": true
},
"esbuild-linux-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.54.tgz",
"integrity": "sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.7.tgz",
"integrity": "sha512-LxXEfLAKwOVmm1yecpMmWERBshl+Kv5YJ/1KnyAr6HRHFW8cxOEsEfisD3sVl/RvHyW//lhYUVSuy9jGEfIRAQ==",
"dev": true,
"optional": true
},
"esbuild-linux-arm": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.54.tgz",
"integrity": "sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.15.7.tgz",
"integrity": "sha512-JKgAHtMR5f75wJTeuNQbyznZZa+pjiUHV7sRZp42UNdyXC6TiUYMW/8z8yIBAr2Fpad8hM1royZKQisqPABPvQ==",
"dev": true,
"optional": true
},
"esbuild-linux-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.54.tgz",
"integrity": "sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.7.tgz",
"integrity": "sha512-P3cfhudpzWDkglutWgXcT2S7Ft7o2e3YDMrP1n0z2dlbUZghUkKCyaWw0zhp4KxEEzt/E7lmrtRu/pGWnwb9vw==",
"dev": true,
"optional": true
},
"esbuild-linux-mips64le": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.54.tgz",
"integrity": "sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.7.tgz",
"integrity": "sha512-T7XKuxl0VpeFLCJXub6U+iybiqh0kM/bWOTb4qcPyDDwNVhLUiPcGdG2/0S7F93czUZOKP57YiLV8YQewgLHKw==",
"dev": true,
"optional": true
},
"esbuild-linux-ppc64le": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.54.tgz",
"integrity": "sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.7.tgz",
"integrity": "sha512-6mGuC19WpFN7NYbecMIJjeQgvDb5aMuvyk0PDYBJrqAEMkTwg3Z98kEKuCm6THHRnrgsdr7bp4SruSAxEM4eJw==",
"dev": true,
"optional": true
},
"esbuild-linux-riscv64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.54.tgz",
"integrity": "sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.7.tgz",
"integrity": "sha512-uUJsezbswAYo/X7OU/P+PuL/EI9WzxsEQXDekfwpQ23uGiooxqoLFAPmXPcRAt941vjlY9jtITEEikWMBr+F/g==",
"dev": true,
"optional": true
},
"esbuild-linux-s390x": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.54.tgz",
"integrity": "sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.7.tgz",
"integrity": "sha512-+tO+xOyTNMc34rXlSxK7aCwJgvQyffqEM5MMdNDEeMU3ss0S6wKvbBOQfgd5jRPblfwJ6b+bKiz0g5nABpY0QQ==",
"dev": true,
"optional": true
},
"esbuild-netbsd-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.54.tgz",
"integrity": "sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.7.tgz",
"integrity": "sha512-yVc4Wz+Pu3cP5hzm5kIygNPrjar/v5WCSoRmIjCPWfBVJkZNb5brEGKUlf+0Y759D48BCWa0WHrWXaNy0DULTQ==",
"dev": true,
"optional": true
},
"esbuild-openbsd-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.54.tgz",
"integrity": "sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.7.tgz",
"integrity": "sha512-GsimbwC4FSR4lN3wf8XmTQ+r8/0YSQo21rWDL0XFFhLHKlzEA4SsT1Tl8bPYu00IU6UWSJ+b3fG/8SB69rcuEQ==",
"dev": true,
"optional": true
},
"esbuild-sunos-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.54.tgz",
"integrity": "sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.15.7.tgz",
"integrity": "sha512-8CDI1aL/ts0mDGbWzjEOGKXnU7p3rDzggHSBtVryQzkSOsjCHRVe0iFYUuhczlxU1R3LN/E7HgUO4NXzGGP/Ag==",
"dev": true,
"optional": true
},
"esbuild-windows-32": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.54.tgz",
"integrity": "sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.15.7.tgz",
"integrity": "sha512-cOnKXUEPS8EGCzRSFa1x6NQjGhGsFlVgjhqGEbLTPsA7x4RRYiy2RKoArNUU4iR2vHmzqS5Gr84MEumO/wxYKA==",
"dev": true,
"optional": true
},
"esbuild-windows-64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.54.tgz",
"integrity": "sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.15.7.tgz",
"integrity": "sha512-7MI08Ec2sTIDv+zH6StNBKO+2hGUYIT42GmFyW6MBBWWtJhTcQLinKS6ldIN1d52MXIbiJ6nXyCJ+LpL4jBm3Q==",
"dev": true,
"optional": true
},
"esbuild-windows-arm64": {
"version": "0.14.54",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.54.tgz",
"integrity": "sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==",
"version": "0.15.7",
"resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.7.tgz",
"integrity": "sha512-R06nmqBlWjKHddhRJYlqDd3Fabx9LFdKcjoOy08YLimwmsswlFBJV4rXzZCxz/b7ZJXvrZgj8DDv1ewE9+StMw==",
"dev": true,
"optional": true
},
@@ -1857,18 +1859,18 @@
}
},
"rollup": {
"version": "2.77.3",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.77.3.tgz",
"integrity": "sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==",
"version": "2.78.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.78.1.tgz",
"integrity": "sha512-VeeCgtGi4P+o9hIg+xz4qQpRl6R401LWEXBmxYKOV4zlF82lyhgh2hTZnheFUbANE8l2A41F458iwj2vEYaXJg==",
"dev": true,
"requires": {
"fsevents": "~2.3.2"
}
},
"sass": {
"version": "1.54.8",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.8.tgz",
"integrity": "sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==",
"version": "1.54.9",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.54.9.tgz",
"integrity": "sha512-xb1hjASzEH+0L0WI9oFjqhRi51t/gagWnxLiwUNMltA0Ab6jIDkAacgKiGYKM9Jhy109osM7woEEai6SXeJo5Q==",
"dev": true,
"requires": {
"chokidar": ">=3.0.0 <4.0.0",
@@ -1901,9 +1903,9 @@
"dev": true
},
"svelte": {
"version": "3.49.0",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.49.0.tgz",
"integrity": "sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==",
"version": "3.50.1",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.50.1.tgz",
"integrity": "sha512-bS4odcsdj5D5jEg6riZuMg5NKelzPtmsCbD9RG+8umU03TeNkdWnP6pqbCm0s8UQNBkqk29w/Bdubn3C+HWSwA==",
"dev": true
},
"svelte-flatpickr": {
@@ -1941,16 +1943,16 @@
}
},
"vite": {
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.0.9.tgz",
"integrity": "sha512-waYABTM+G6DBTCpYAxvevpG50UOlZuynR0ckTK5PawNVt7ebX6X7wNXHaGIO6wYYFXSM7/WcuFuO2QzhBB6aMw==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/vite/-/vite-3.1.0.tgz",
"integrity": "sha512-YBg3dUicDpDWFCGttmvMbVyS9ydjntwEjwXRj2KBFwSB8SxmGcudo1yb8FW5+M/G86aS8x828ujnzUVdsLjs9g==",
"dev": true,
"requires": {
"esbuild": "^0.14.47",
"esbuild": "^0.15.6",
"fsevents": "~2.3.2",
"postcss": "^8.4.16",
"resolve": "^1.22.1",
"rollup": ">=2.75.6 <2.77.0 || ~2.77.0"
"rollup": "~2.78.0"
}
},
"w3c-keyname": {
+1 -1
View File
@@ -189,7 +189,7 @@
submitShortcut,
...closeBracketsKeymap,
...defaultKeymap,
...searchKeymap,
searchKeymap.find((item) => item.key === "Mod-d"),
...historyKeymap,
...completionKeymap,
]),
@@ -379,7 +379,7 @@
submitShortcut,
...closeBracketsKeymap,
...defaultKeymap,
...searchKeymap,
searchKeymap.find((item) => item.key === "Mod-d"),
...historyKeymap,
...completionKeymap,
]),
+3 -2
View File
@@ -25,8 +25,9 @@
let newSelected = [];
for (let item of items) {
if (CommonHelper.inArray(newKeyOfSelected, item[selectionKey])) {
for (let v of newKeyOfSelected) {
const item = CommonHelper.findByKey(items, selectionKey, v);
if (item) {
newSelected.push(item);
}
}
+1 -1
View File
@@ -36,7 +36,7 @@
$: filteredItems = filterItems(items, searchTerm);
$: isSelected = function (item) {
let normalized = CommonHelper.toArray(selected);
const normalized = CommonHelper.toArray(selected);
return CommonHelper.inArray(normalized, item);
};
@@ -20,7 +20,7 @@
<div class="content m-b-base">
<p>Subscribe to realtime changes via Server-Sent Events (SSE).</p>
<p>
Events are send for <strong>create</strong>, <strong>update</strong>
Events are sent for <strong>create</strong>, <strong>update</strong>
and <strong>delete</strong> record operations (see "Event data format" section below).
</p>
<div class="alert alert-info m-t-10">
@@ -14,7 +14,7 @@
};
}
// leave the validation to the api
// note: leave the validation to the api
// $: if (!CommonHelper.isEmpty(options.values) && options.maxSelect > options.values.length) {
// options.maxSelect = options.values.length;
// }
+19 -9
View File
@@ -8,7 +8,7 @@
// original select props
export let multiple = false;
export let selected = multiple ? [] : undefined;
export let selected = [];
export let keyOfSelected = multiple ? [] : undefined;
export let selectPlaceholder = "- Select -";
export let optionComponent = RecordSelectOption; // custom component to use for each dropdown option item
@@ -23,15 +23,15 @@
let isLoadingSelected = false;
$: if (collectionId) {
loadList(true);
loadSelected().then(() => {
loadList(true);
});
}
$: isLoading = isLoadingList || isLoadingSelected;
$: canLoadMore = totalItems > list.length;
loadSelected();
async function loadSelected() {
const selectedIds = CommonHelper.toArray(keyOfSelected);
@@ -47,14 +47,22 @@
filters.push(`id="${id}"`);
}
selected = await ApiClient.records.getFullList(collectionId, 200, {
sort: "-created",
const result = await ApiClient.records.getFullList(collectionId, 200, {
filter: filters.join("||"),
$cancelKey: uniqueId + "loadSelected",
});
// preserve selected order
selected = [];
for (const id of selectedIds) {
const item = CommonHelper.findByKey(result, "id", id);
if (item) {
selected.push(item);
}
}
// add the selected models to the list (if not already)
list = CommonHelper.filterDuplicatesByKey(list.concat(selected));
list = CommonHelper.filterDuplicatesByKey(selected.concat(list));
} catch (err) {
ApiClient.errorResponseHandler(err);
}
@@ -78,10 +86,12 @@
});
if (reset) {
list = [];
list = CommonHelper.toArray(selected).slice();
}
list = CommonHelper.filterDuplicatesByKey(list.concat(result.items));
list = CommonHelper.filterDuplicatesByKey(
list.concat(result.items, CommonHelper.toArray(selected))
);
currentPage = result.page;
totalItems = result.totalItems;
} catch (err) {
+18 -8
View File
@@ -23,9 +23,9 @@
$: canLoadMore = totalItems > list.length;
loadList(true);
loadSelected();
loadList(true).then(() => {
loadSelected();
});
async function loadSelected() {
const selectedIds = CommonHelper.toArray(keyOfSelected);
@@ -41,14 +41,22 @@
filters.push(`id="${id}"`);
}
selected = await ApiClient.users.getFullList(100, {
sort: "-created",
const result = await ApiClient.users.getFullList(100, {
filter: filters.join("||"),
$cancelKey: uniqueId + "loadSelected",
});
// preserve selected order
selected = [];
for (const id of selectedIds) {
const item = CommonHelper.findByKey(result, "id", id);
if (item) {
selected.push(item);
}
}
// add the selected models to the list (if not already)
list = CommonHelper.filterDuplicatesByKey(list.concat(selected));
list = CommonHelper.filterDuplicatesByKey(selected.concat(list));
} catch (err) {
ApiClient.errorResponseHandler(err);
}
@@ -68,10 +76,12 @@
});
if (reset) {
list = [];
list = CommonHelper.toArray(selected).slice();
}
list = CommonHelper.filterDuplicatesByKey(list.concat(result.items));
list = CommonHelper.filterDuplicatesByKey(
list.concat(result.items, CommonHelper.toArray(selected))
);
currentPage = result.page;
totalItems = result.totalItems;
} catch (err) {
+4
View File
@@ -374,6 +374,10 @@ select,
textarea {
@extend %input;
}
input {
// Safari and GNOME Web has a default height and ignores the min-height
height: var(--inputHeight);
}
input:-webkit-autofill {
-webkit-text-fill-color: var(--txtPrimaryColor);
-webkit-box-shadow: inset 0 0 0 50px var(--baseAlt1Color);