diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e8789fe..c4ca8e3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v0.20.0-rc3 + +- Synced with the recent fixes in v0.19.4. + + ## v0.20.0-rc2 - Synced with the recent fixes in v0.19.3. @@ -35,12 +40,17 @@ - Other minor fixes and impovements (eg. added negative string number normalization support for the `json` field type) -## v0.19.4-WIP +## v0.19.4 - Fixed TinyMCE source code viewer textarea styles ([#3715](https://github.com/pocketbase/pocketbase/issues/3715)). - Fixed `text` field min/max validators to properly count multi-byte characters ([#3735](https://github.com/pocketbase/pocketbase/issues/3735)). +- Allowed hyphens in `username` ([#3697](https://github.com/pocketbase/pocketbase/issues/3697)). + _More control over the system fields settings will be available in the future._ + +- Updated the JSVM generated types to use directly the value type instead of `* | undefined` union in functions/methods return declarations. + ## v0.19.3 diff --git a/forms/record_upsert.go b/forms/record_upsert.go index 8ba1a546..f4bfde50 100644 --- a/forms/record_upsert.go +++ b/forms/record_upsert.go @@ -25,7 +25,7 @@ import ( ) // username value regex pattern -var usernameRegex = regexp.MustCompile(`^[\w][\w\.]*$`) +var usernameRegex = regexp.MustCompile(`^[\w][\w\.\-]*$`) // RecordUpsert is a [models.Record] upsert (create/update) form. type RecordUpsert struct { diff --git a/forms/record_upsert_test.go b/forms/record_upsert_test.go index cf7aabe9..22bb86ef 100644 --- a/forms/record_upsert_test.go +++ b/forms/record_upsert_test.go @@ -753,7 +753,7 @@ func TestRecordUpsertAuthRecord(t *testing.T) { "create with all allowed auth fields", "", map[string]any{ - "username": "test_new", + "username": "test_new-a.b", "email": "test_new@example.com", "emailVisibility": true, "password": "12345678", diff --git a/go.mod b/go.mod index 159f5fdc..bc9dcb9b 100644 --- a/go.mod +++ b/go.mod @@ -19,14 +19,14 @@ require ( github.com/labstack/echo/v5 v5.0.0-20230722203903-ec5b858dab61 github.com/mattn/go-sqlite3 v1.14.17 github.com/pocketbase/dbx v1.10.1 - github.com/pocketbase/tygoja v0.0.0-20231028133025-25a94364de58 + github.com/pocketbase/tygoja v0.0.0-20231111102932-5420517293f4 github.com/spf13/cast v1.5.1 github.com/spf13/cobra v1.7.0 gocloud.dev v0.34.0 - golang.org/x/crypto v0.14.0 - golang.org/x/net v0.17.0 + golang.org/x/crypto v0.15.0 + golang.org/x/net v0.18.0 golang.org/x/oauth2 v0.13.0 - golang.org/x/sync v0.4.0 + golang.org/x/sync v0.5.0 modernc.org/sqlite v1.26.0 ) @@ -72,12 +72,12 @@ require ( github.com/valyala/fasttemplate v1.2.2 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/image v0.13.0 // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/term v0.14.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.14.0 // indirect + golang.org/x/tools v0.15.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/api v0.148.0 // indirect google.golang.org/appengine v1.6.8 // indirect diff --git a/go.sum b/go.sum index aea6169a..d0b99f33 100644 --- a/go.sum +++ b/go.sum @@ -205,6 +205,8 @@ github.com/pocketbase/tygoja v0.0.0-20231028131333-2278fd471632 h1:5R+G0Gy05vPxu github.com/pocketbase/tygoja v0.0.0-20231028131333-2278fd471632/go.mod h1:dOJ+pCyqm/jRn5kO/TX598J0e5xGDcJAZerK5atCrKI= github.com/pocketbase/tygoja v0.0.0-20231028133025-25a94364de58 h1:1Hu0uwRZrgpQchMEMXz+ZAJxV5l+o06L00svTqeP2RQ= github.com/pocketbase/tygoja v0.0.0-20231028133025-25a94364de58/go.mod h1:dOJ+pCyqm/jRn5kO/TX598J0e5xGDcJAZerK5atCrKI= +github.com/pocketbase/tygoja v0.0.0-20231111102932-5420517293f4 h1:85kAYIKrKEeau7WgXg8B7Km8etrVavJAyH7XcR5MkFw= +github.com/pocketbase/tygoja v0.0.0-20231111102932-5420517293f4/go.mod h1:dOJ+pCyqm/jRn5kO/TX598J0e5xGDcJAZerK5atCrKI= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= @@ -240,6 +242,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= +golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg= @@ -251,6 +255,8 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -266,6 +272,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= @@ -276,6 +284,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -294,6 +304,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -301,6 +313,8 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= +golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -312,6 +326,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -325,6 +341,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= diff --git a/plugins/jsvm/internal/types/generated/types.d.ts b/plugins/jsvm/internal/types/generated/types.d.ts index 66bc6b0a..8e6a38c3 100644 --- a/plugins/jsvm/internal/types/generated/types.d.ts +++ b/plugins/jsvm/internal/types/generated/types.d.ts @@ -1431,7 +1431,7 @@ namespace os { * On Unix systems, FindProcess always succeeds and returns a Process * for the given pid, regardless of whether the process exists. */ - (pid: number): (Process | undefined) + (pid: number): (Process) } interface startProcess { /** @@ -1449,7 +1449,7 @@ namespace os { * * If there is an error, it will be of type *PathError. */ - (name: string, argv: Array, attr: ProcAttr): (Process | undefined) + (name: string, argv: Array, attr: ProcAttr): (Process) } interface Process { /** @@ -1475,7 +1475,7 @@ namespace os { * On most operating systems, the Process must be a child * of the current process or an error will be returned. */ - wait(): (ProcessState | undefined) + wait(): (ProcessState) } interface Process { /** @@ -1611,8 +1611,8 @@ namespace os { */ readFrom(r: io.Reader): number } - type _subMFqGN = io.Writer - interface onlyWriter extends _subMFqGN { + type _subRuCbV = io.Writer + interface onlyWriter extends _subRuCbV { } interface File { /** @@ -1675,7 +1675,7 @@ namespace os { * descriptor has mode O_RDONLY. * If there is an error, it will be of type *PathError. */ - (name: string): (File | undefined) + (name: string): (File) } interface create { /** @@ -1685,7 +1685,7 @@ namespace os { * be used for I/O; the associated file descriptor has mode O_RDWR. * If there is an error, it will be of type *PathError. */ - (name: string): (File | undefined) + (name: string): (File) } interface openFile { /** @@ -1696,7 +1696,7 @@ namespace os { * methods on the returned File can be used for I/O. * If there is an error, it will be of type *PathError. */ - (name: string, flag: number, perm: FileMode): (File | undefined) + (name: string, flag: number, perm: FileMode): (File) } interface rename { /** @@ -2010,7 +2010,7 @@ namespace os { * conditions described in the comments of the Fd method, and the same * constraints apply. */ - (fd: number, name: string): (File | undefined) + (fd: number, name: string): (File) } /** * newFileKind describes the kind of file to newFile. @@ -2110,7 +2110,7 @@ namespace os { * Pipe returns a connected pair of Files; reads from r return bytes written to w. * It returns the files and an error, if any. */ - (): [(File | undefined), (File | undefined)] + (): [(File), (File)] } interface getuid { /** @@ -2217,7 +2217,7 @@ namespace os { * The caller can use the file's Name method to find the pathname of the file. * It is the caller's responsibility to remove the file when it is no longer needed. */ - (dir: string): (File | undefined) + (dir: string): (File) } interface mkdirTemp { /** @@ -2240,8 +2240,8 @@ namespace os { /** * File represents an open file descriptor. */ - type _subQOPpE = file - interface File extends _subQOPpE { + type _subtyPSi = file + interface File extends _subtyPSi { } /** * A FileInfo describes a file and is returned by Stat and Lstat. @@ -2609,6 +2609,2037 @@ namespace filepath { } } +/** + * Package dbx provides a set of DB-agnostic and easy-to-use query building methods for relational databases. + */ +namespace dbx { + /** + * Builder supports building SQL statements in a DB-agnostic way. + * Builder mainly provides two sets of query building methods: those building SELECT statements + * and those manipulating DB data or schema (e.g. INSERT statements, CREATE TABLE statements). + */ + interface Builder { + [key:string]: any; + /** + * NewQuery creates a new Query object with the given SQL statement. + * The SQL statement may contain parameter placeholders which can be bound with actual parameter + * values before the statement is executed. + */ + newQuery(_arg0: string): (Query) + /** + * Select returns a new SelectQuery object that can be used to build a SELECT statement. + * The parameters to this method should be the list column names to be selected. + * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). + */ + select(..._arg0: string[]): (SelectQuery) + /** + * ModelQuery returns a new ModelQuery object that can be used to perform model insertion, update, and deletion. + * The parameter to this method should be a pointer to the model struct that needs to be inserted, updated, or deleted. + */ + model(_arg0: { + }): (ModelQuery) + /** + * GeneratePlaceholder generates an anonymous parameter placeholder with the given parameter ID. + */ + generatePlaceholder(_arg0: number): string + /** + * Quote quotes a string so that it can be embedded in a SQL statement as a string value. + */ + quote(_arg0: string): string + /** + * QuoteSimpleTableName quotes a simple table name. + * A simple table name does not contain any schema prefix. + */ + quoteSimpleTableName(_arg0: string): string + /** + * QuoteSimpleColumnName quotes a simple column name. + * A simple column name does not contain any table prefix. + */ + quoteSimpleColumnName(_arg0: string): string + /** + * QueryBuilder returns the query builder supporting the current DB. + */ + queryBuilder(): QueryBuilder + /** + * Insert creates a Query that represents an INSERT SQL statement. + * The keys of cols are the column names, while the values of cols are the corresponding column + * values to be inserted. + */ + insert(table: string, cols: Params): (Query) + /** + * Upsert creates a Query that represents an UPSERT SQL statement. + * Upsert inserts a row into the table if the primary key or unique index is not found. + * Otherwise it will update the row with the new values. + * The keys of cols are the column names, while the values of cols are the corresponding column + * values to be inserted. + */ + upsert(table: string, cols: Params, ...constraints: string[]): (Query) + /** + * Update creates a Query that represents an UPDATE SQL statement. + * The keys of cols are the column names, while the values of cols are the corresponding new column + * values. If the "where" expression is nil, the UPDATE SQL statement will have no WHERE clause + * (be careful in this case as the SQL statement will update ALL rows in the table). + */ + update(table: string, cols: Params, where: Expression): (Query) + /** + * Delete creates a Query that represents a DELETE SQL statement. + * If the "where" expression is nil, the DELETE SQL statement will have no WHERE clause + * (be careful in this case as the SQL statement will delete ALL rows in the table). + */ + delete(table: string, where: Expression): (Query) + /** + * CreateTable creates a Query that represents a CREATE TABLE SQL statement. + * The keys of cols are the column names, while the values of cols are the corresponding column types. + * The optional "options" parameters will be appended to the generated SQL statement. + */ + createTable(table: string, cols: _TygojaDict, ...options: string[]): (Query) + /** + * RenameTable creates a Query that can be used to rename a table. + */ + renameTable(oldName: string): (Query) + /** + * DropTable creates a Query that can be used to drop a table. + */ + dropTable(table: string): (Query) + /** + * TruncateTable creates a Query that can be used to truncate a table. + */ + truncateTable(table: string): (Query) + /** + * AddColumn creates a Query that can be used to add a column to a table. + */ + addColumn(table: string): (Query) + /** + * DropColumn creates a Query that can be used to drop a column from a table. + */ + dropColumn(table: string): (Query) + /** + * RenameColumn creates a Query that can be used to rename a column in a table. + */ + renameColumn(table: string): (Query) + /** + * AlterColumn creates a Query that can be used to change the definition of a table column. + */ + alterColumn(table: string): (Query) + /** + * AddPrimaryKey creates a Query that can be used to specify primary key(s) for a table. + * The "name" parameter specifies the name of the primary key constraint. + */ + addPrimaryKey(table: string, ...cols: string[]): (Query) + /** + * DropPrimaryKey creates a Query that can be used to remove the named primary key constraint from a table. + */ + dropPrimaryKey(table: string): (Query) + /** + * AddForeignKey creates a Query that can be used to add a foreign key constraint to a table. + * The length of cols and refCols must be the same as they refer to the primary and referential columns. + * The optional "options" parameters will be appended to the SQL statement. They can be used to + * specify options such as "ON DELETE CASCADE". + */ + addForeignKey(table: string, cols: Array, refTable: string, ...options: string[]): (Query) + /** + * DropForeignKey creates a Query that can be used to remove the named foreign key constraint from a table. + */ + dropForeignKey(table: string): (Query) + /** + * CreateIndex creates a Query that can be used to create an index for a table. + */ + createIndex(table: string, ...cols: string[]): (Query) + /** + * CreateUniqueIndex creates a Query that can be used to create a unique index for a table. + */ + createUniqueIndex(table: string, ...cols: string[]): (Query) + /** + * DropIndex creates a Query that can be used to remove the named index from a table. + */ + dropIndex(table: string): (Query) + } + /** + * BaseBuilder provides a basic implementation of the Builder interface. + */ + interface BaseBuilder { + } + interface newBaseBuilder { + /** + * NewBaseBuilder creates a new BaseBuilder instance. + */ + (db: DB, executor: Executor): (BaseBuilder) + } + interface BaseBuilder { + /** + * DB returns the DB instance that this builder is associated with. + */ + db(): (DB) + } + interface BaseBuilder { + /** + * Executor returns the executor object (a DB instance or a transaction) for executing SQL statements. + */ + executor(): Executor + } + interface BaseBuilder { + /** + * NewQuery creates a new Query object with the given SQL statement. + * The SQL statement may contain parameter placeholders which can be bound with actual parameter + * values before the statement is executed. + */ + newQuery(sql: string): (Query) + } + interface BaseBuilder { + /** + * GeneratePlaceholder generates an anonymous parameter placeholder with the given parameter ID. + */ + generatePlaceholder(_arg0: number): string + } + interface BaseBuilder { + /** + * Quote quotes a string so that it can be embedded in a SQL statement as a string value. + */ + quote(s: string): string + } + interface BaseBuilder { + /** + * QuoteSimpleTableName quotes a simple table name. + * A simple table name does not contain any schema prefix. + */ + quoteSimpleTableName(s: string): string + } + interface BaseBuilder { + /** + * QuoteSimpleColumnName quotes a simple column name. + * A simple column name does not contain any table prefix. + */ + quoteSimpleColumnName(s: string): string + } + interface BaseBuilder { + /** + * Insert creates a Query that represents an INSERT SQL statement. + * The keys of cols are the column names, while the values of cols are the corresponding column + * values to be inserted. + */ + insert(table: string, cols: Params): (Query) + } + interface BaseBuilder { + /** + * Upsert creates a Query that represents an UPSERT SQL statement. + * Upsert inserts a row into the table if the primary key or unique index is not found. + * Otherwise it will update the row with the new values. + * The keys of cols are the column names, while the values of cols are the corresponding column + * values to be inserted. + */ + upsert(table: string, cols: Params, ...constraints: string[]): (Query) + } + interface BaseBuilder { + /** + * Update creates a Query that represents an UPDATE SQL statement. + * The keys of cols are the column names, while the values of cols are the corresponding new column + * values. If the "where" expression is nil, the UPDATE SQL statement will have no WHERE clause + * (be careful in this case as the SQL statement will update ALL rows in the table). + */ + update(table: string, cols: Params, where: Expression): (Query) + } + interface BaseBuilder { + /** + * Delete creates a Query that represents a DELETE SQL statement. + * If the "where" expression is nil, the DELETE SQL statement will have no WHERE clause + * (be careful in this case as the SQL statement will delete ALL rows in the table). + */ + delete(table: string, where: Expression): (Query) + } + interface BaseBuilder { + /** + * CreateTable creates a Query that represents a CREATE TABLE SQL statement. + * The keys of cols are the column names, while the values of cols are the corresponding column types. + * The optional "options" parameters will be appended to the generated SQL statement. + */ + createTable(table: string, cols: _TygojaDict, ...options: string[]): (Query) + } + interface BaseBuilder { + /** + * RenameTable creates a Query that can be used to rename a table. + */ + renameTable(oldName: string): (Query) + } + interface BaseBuilder { + /** + * DropTable creates a Query that can be used to drop a table. + */ + dropTable(table: string): (Query) + } + interface BaseBuilder { + /** + * TruncateTable creates a Query that can be used to truncate a table. + */ + truncateTable(table: string): (Query) + } + interface BaseBuilder { + /** + * AddColumn creates a Query that can be used to add a column to a table. + */ + addColumn(table: string): (Query) + } + interface BaseBuilder { + /** + * DropColumn creates a Query that can be used to drop a column from a table. + */ + dropColumn(table: string): (Query) + } + interface BaseBuilder { + /** + * RenameColumn creates a Query that can be used to rename a column in a table. + */ + renameColumn(table: string): (Query) + } + interface BaseBuilder { + /** + * AlterColumn creates a Query that can be used to change the definition of a table column. + */ + alterColumn(table: string): (Query) + } + interface BaseBuilder { + /** + * AddPrimaryKey creates a Query that can be used to specify primary key(s) for a table. + * The "name" parameter specifies the name of the primary key constraint. + */ + addPrimaryKey(table: string, ...cols: string[]): (Query) + } + interface BaseBuilder { + /** + * DropPrimaryKey creates a Query that can be used to remove the named primary key constraint from a table. + */ + dropPrimaryKey(table: string): (Query) + } + interface BaseBuilder { + /** + * AddForeignKey creates a Query that can be used to add a foreign key constraint to a table. + * The length of cols and refCols must be the same as they refer to the primary and referential columns. + * The optional "options" parameters will be appended to the SQL statement. They can be used to + * specify options such as "ON DELETE CASCADE". + */ + addForeignKey(table: string, cols: Array, refTable: string, ...options: string[]): (Query) + } + interface BaseBuilder { + /** + * DropForeignKey creates a Query that can be used to remove the named foreign key constraint from a table. + */ + dropForeignKey(table: string): (Query) + } + interface BaseBuilder { + /** + * CreateIndex creates a Query that can be used to create an index for a table. + */ + createIndex(table: string, ...cols: string[]): (Query) + } + interface BaseBuilder { + /** + * CreateUniqueIndex creates a Query that can be used to create a unique index for a table. + */ + createUniqueIndex(table: string, ...cols: string[]): (Query) + } + interface BaseBuilder { + /** + * DropIndex creates a Query that can be used to remove the named index from a table. + */ + dropIndex(table: string): (Query) + } + /** + * MssqlBuilder is the builder for SQL Server databases. + */ + type _subHRoxB = BaseBuilder + interface MssqlBuilder extends _subHRoxB { + } + /** + * MssqlQueryBuilder is the query builder for SQL Server databases. + */ + type _subJSCYu = BaseQueryBuilder + interface MssqlQueryBuilder extends _subJSCYu { + } + interface newMssqlBuilder { + /** + * NewMssqlBuilder creates a new MssqlBuilder instance. + */ + (db: DB, executor: Executor): Builder + } + interface MssqlBuilder { + /** + * QueryBuilder returns the query builder supporting the current DB. + */ + queryBuilder(): QueryBuilder + } + interface MssqlBuilder { + /** + * Select returns a new SelectQuery object that can be used to build a SELECT statement. + * The parameters to this method should be the list column names to be selected. + * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). + */ + select(...cols: string[]): (SelectQuery) + } + interface MssqlBuilder { + /** + * Model returns a new ModelQuery object that can be used to perform model-based DB operations. + * The model passed to this method should be a pointer to a model struct. + */ + model(model: { + }): (ModelQuery) + } + interface MssqlBuilder { + /** + * QuoteSimpleTableName quotes a simple table name. + * A simple table name does not contain any schema prefix. + */ + quoteSimpleTableName(s: string): string + } + interface MssqlBuilder { + /** + * QuoteSimpleColumnName quotes a simple column name. + * A simple column name does not contain any table prefix. + */ + quoteSimpleColumnName(s: string): string + } + interface MssqlBuilder { + /** + * RenameTable creates a Query that can be used to rename a table. + */ + renameTable(oldName: string): (Query) + } + interface MssqlBuilder { + /** + * RenameColumn creates a Query that can be used to rename a column in a table. + */ + renameColumn(table: string): (Query) + } + interface MssqlBuilder { + /** + * AlterColumn creates a Query that can be used to change the definition of a table column. + */ + alterColumn(table: string): (Query) + } + interface MssqlQueryBuilder { + /** + * BuildOrderByAndLimit generates the ORDER BY and LIMIT clauses. + */ + buildOrderByAndLimit(sql: string, cols: Array, limit: number, offset: number): string + } + /** + * MysqlBuilder is the builder for MySQL databases. + */ + type _subxqxbT = BaseBuilder + interface MysqlBuilder extends _subxqxbT { + } + interface newMysqlBuilder { + /** + * NewMysqlBuilder creates a new MysqlBuilder instance. + */ + (db: DB, executor: Executor): Builder + } + interface MysqlBuilder { + /** + * QueryBuilder returns the query builder supporting the current DB. + */ + queryBuilder(): QueryBuilder + } + interface MysqlBuilder { + /** + * Select returns a new SelectQuery object that can be used to build a SELECT statement. + * The parameters to this method should be the list column names to be selected. + * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). + */ + select(...cols: string[]): (SelectQuery) + } + interface MysqlBuilder { + /** + * Model returns a new ModelQuery object that can be used to perform model-based DB operations. + * The model passed to this method should be a pointer to a model struct. + */ + model(model: { + }): (ModelQuery) + } + interface MysqlBuilder { + /** + * QuoteSimpleTableName quotes a simple table name. + * A simple table name does not contain any schema prefix. + */ + quoteSimpleTableName(s: string): string + } + interface MysqlBuilder { + /** + * QuoteSimpleColumnName quotes a simple column name. + * A simple column name does not contain any table prefix. + */ + quoteSimpleColumnName(s: string): string + } + interface MysqlBuilder { + /** + * Upsert creates a Query that represents an UPSERT SQL statement. + * Upsert inserts a row into the table if the primary key or unique index is not found. + * Otherwise it will update the row with the new values. + * The keys of cols are the column names, while the values of cols are the corresponding column + * values to be inserted. + */ + upsert(table: string, cols: Params, ...constraints: string[]): (Query) + } + interface MysqlBuilder { + /** + * RenameColumn creates a Query that can be used to rename a column in a table. + */ + renameColumn(table: string): (Query) + } + interface MysqlBuilder { + /** + * DropPrimaryKey creates a Query that can be used to remove the named primary key constraint from a table. + */ + dropPrimaryKey(table: string): (Query) + } + interface MysqlBuilder { + /** + * DropForeignKey creates a Query that can be used to remove the named foreign key constraint from a table. + */ + dropForeignKey(table: string): (Query) + } + /** + * OciBuilder is the builder for Oracle databases. + */ + type _subaCEKN = BaseBuilder + interface OciBuilder extends _subaCEKN { + } + /** + * OciQueryBuilder is the query builder for Oracle databases. + */ + type _subSoIYN = BaseQueryBuilder + interface OciQueryBuilder extends _subSoIYN { + } + interface newOciBuilder { + /** + * NewOciBuilder creates a new OciBuilder instance. + */ + (db: DB, executor: Executor): Builder + } + interface OciBuilder { + /** + * Select returns a new SelectQuery object that can be used to build a SELECT statement. + * The parameters to this method should be the list column names to be selected. + * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). + */ + select(...cols: string[]): (SelectQuery) + } + interface OciBuilder { + /** + * Model returns a new ModelQuery object that can be used to perform model-based DB operations. + * The model passed to this method should be a pointer to a model struct. + */ + model(model: { + }): (ModelQuery) + } + interface OciBuilder { + /** + * GeneratePlaceholder generates an anonymous parameter placeholder with the given parameter ID. + */ + generatePlaceholder(i: number): string + } + interface OciBuilder { + /** + * QueryBuilder returns the query builder supporting the current DB. + */ + queryBuilder(): QueryBuilder + } + interface OciBuilder { + /** + * DropIndex creates a Query that can be used to remove the named index from a table. + */ + dropIndex(table: string): (Query) + } + interface OciBuilder { + /** + * RenameTable creates a Query that can be used to rename a table. + */ + renameTable(oldName: string): (Query) + } + interface OciBuilder { + /** + * AlterColumn creates a Query that can be used to change the definition of a table column. + */ + alterColumn(table: string): (Query) + } + interface OciQueryBuilder { + /** + * BuildOrderByAndLimit generates the ORDER BY and LIMIT clauses. + */ + buildOrderByAndLimit(sql: string, cols: Array, limit: number, offset: number): string + } + /** + * PgsqlBuilder is the builder for PostgreSQL databases. + */ + type _subZsTVQ = BaseBuilder + interface PgsqlBuilder extends _subZsTVQ { + } + interface newPgsqlBuilder { + /** + * NewPgsqlBuilder creates a new PgsqlBuilder instance. + */ + (db: DB, executor: Executor): Builder + } + interface PgsqlBuilder { + /** + * Select returns a new SelectQuery object that can be used to build a SELECT statement. + * The parameters to this method should be the list column names to be selected. + * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). + */ + select(...cols: string[]): (SelectQuery) + } + interface PgsqlBuilder { + /** + * Model returns a new ModelQuery object that can be used to perform model-based DB operations. + * The model passed to this method should be a pointer to a model struct. + */ + model(model: { + }): (ModelQuery) + } + interface PgsqlBuilder { + /** + * GeneratePlaceholder generates an anonymous parameter placeholder with the given parameter ID. + */ + generatePlaceholder(i: number): string + } + interface PgsqlBuilder { + /** + * QueryBuilder returns the query builder supporting the current DB. + */ + queryBuilder(): QueryBuilder + } + interface PgsqlBuilder { + /** + * Upsert creates a Query that represents an UPSERT SQL statement. + * Upsert inserts a row into the table if the primary key or unique index is not found. + * Otherwise it will update the row with the new values. + * The keys of cols are the column names, while the values of cols are the corresponding column + * values to be inserted. + */ + upsert(table: string, cols: Params, ...constraints: string[]): (Query) + } + interface PgsqlBuilder { + /** + * DropIndex creates a Query that can be used to remove the named index from a table. + */ + dropIndex(table: string): (Query) + } + interface PgsqlBuilder { + /** + * RenameTable creates a Query that can be used to rename a table. + */ + renameTable(oldName: string): (Query) + } + interface PgsqlBuilder { + /** + * AlterColumn creates a Query that can be used to change the definition of a table column. + */ + alterColumn(table: string): (Query) + } + /** + * SqliteBuilder is the builder for SQLite databases. + */ + type _sublVyAE = BaseBuilder + interface SqliteBuilder extends _sublVyAE { + } + interface newSqliteBuilder { + /** + * NewSqliteBuilder creates a new SqliteBuilder instance. + */ + (db: DB, executor: Executor): Builder + } + interface SqliteBuilder { + /** + * QueryBuilder returns the query builder supporting the current DB. + */ + queryBuilder(): QueryBuilder + } + interface SqliteBuilder { + /** + * Select returns a new SelectQuery object that can be used to build a SELECT statement. + * The parameters to this method should be the list column names to be selected. + * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). + */ + select(...cols: string[]): (SelectQuery) + } + interface SqliteBuilder { + /** + * Model returns a new ModelQuery object that can be used to perform model-based DB operations. + * The model passed to this method should be a pointer to a model struct. + */ + model(model: { + }): (ModelQuery) + } + interface SqliteBuilder { + /** + * QuoteSimpleTableName quotes a simple table name. + * A simple table name does not contain any schema prefix. + */ + quoteSimpleTableName(s: string): string + } + interface SqliteBuilder { + /** + * QuoteSimpleColumnName quotes a simple column name. + * A simple column name does not contain any table prefix. + */ + quoteSimpleColumnName(s: string): string + } + interface SqliteBuilder { + /** + * DropIndex creates a Query that can be used to remove the named index from a table. + */ + dropIndex(table: string): (Query) + } + interface SqliteBuilder { + /** + * TruncateTable creates a Query that can be used to truncate a table. + */ + truncateTable(table: string): (Query) + } + interface SqliteBuilder { + /** + * RenameTable creates a Query that can be used to rename a table. + */ + renameTable(oldName: string): (Query) + } + interface SqliteBuilder { + /** + * AlterColumn creates a Query that can be used to change the definition of a table column. + */ + alterColumn(table: string): (Query) + } + interface SqliteBuilder { + /** + * AddPrimaryKey creates a Query that can be used to specify primary key(s) for a table. + * The "name" parameter specifies the name of the primary key constraint. + */ + addPrimaryKey(table: string, ...cols: string[]): (Query) + } + interface SqliteBuilder { + /** + * DropPrimaryKey creates a Query that can be used to remove the named primary key constraint from a table. + */ + dropPrimaryKey(table: string): (Query) + } + interface SqliteBuilder { + /** + * AddForeignKey creates a Query that can be used to add a foreign key constraint to a table. + * The length of cols and refCols must be the same as they refer to the primary and referential columns. + * The optional "options" parameters will be appended to the SQL statement. They can be used to + * specify options such as "ON DELETE CASCADE". + */ + addForeignKey(table: string, cols: Array, refTable: string, ...options: string[]): (Query) + } + interface SqliteBuilder { + /** + * DropForeignKey creates a Query that can be used to remove the named foreign key constraint from a table. + */ + dropForeignKey(table: string): (Query) + } + /** + * StandardBuilder is the builder that is used by DB for an unknown driver. + */ + type _subnuCqZ = BaseBuilder + interface StandardBuilder extends _subnuCqZ { + } + interface newStandardBuilder { + /** + * NewStandardBuilder creates a new StandardBuilder instance. + */ + (db: DB, executor: Executor): Builder + } + interface StandardBuilder { + /** + * QueryBuilder returns the query builder supporting the current DB. + */ + queryBuilder(): QueryBuilder + } + interface StandardBuilder { + /** + * Select returns a new SelectQuery object that can be used to build a SELECT statement. + * The parameters to this method should be the list column names to be selected. + * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). + */ + select(...cols: string[]): (SelectQuery) + } + interface StandardBuilder { + /** + * Model returns a new ModelQuery object that can be used to perform model-based DB operations. + * The model passed to this method should be a pointer to a model struct. + */ + model(model: { + }): (ModelQuery) + } + /** + * LogFunc logs a message for each SQL statement being executed. + * This method takes one or multiple parameters. If a single parameter + * is provided, it will be treated as the log message. If multiple parameters + * are provided, they will be passed to fmt.Sprintf() to generate the log message. + */ + interface LogFunc {(format: string, ...a: { + }[]): void } + /** + * PerfFunc is called when a query finishes execution. + * The query execution time is passed to this function so that the DB performance + * can be profiled. The "ns" parameter gives the number of nanoseconds that the + * SQL statement takes to execute, while the "execute" parameter indicates whether + * the SQL statement is executed or queried (usually SELECT statements). + */ + interface PerfFunc {(ns: number, sql: string, execute: boolean): void } + /** + * QueryLogFunc is called each time when performing a SQL query. + * The "t" parameter gives the time that the SQL statement takes to execute, + * while rows and err are the result of the query. + */ + interface QueryLogFunc {(ctx: context.Context, t: time.Duration, sql: string, rows: sql.Rows, err: Error): void } + /** + * ExecLogFunc is called each time when a SQL statement is executed. + * The "t" parameter gives the time that the SQL statement takes to execute, + * while result and err refer to the result of the execution. + */ + interface ExecLogFunc {(ctx: context.Context, t: time.Duration, sql: string, result: sql.Result, err: Error): void } + /** + * BuilderFunc creates a Builder instance using the given DB instance and Executor. + */ + interface BuilderFunc {(_arg0: DB, _arg1: Executor): Builder } + /** + * DB enhances sql.DB by providing a set of DB-agnostic query building methods. + * DB allows easier query building and population of data into Go variables. + */ + type _subkdJgr = Builder + interface DB extends _subkdJgr { + /** + * FieldMapper maps struct fields to DB columns. Defaults to DefaultFieldMapFunc. + */ + fieldMapper: FieldMapFunc + /** + * TableMapper maps structs to table names. Defaults to GetTableName. + */ + tableMapper: TableMapFunc + /** + * LogFunc logs the SQL statements being executed. Defaults to nil, meaning no logging. + */ + logFunc: LogFunc + /** + * PerfFunc logs the SQL execution time. Defaults to nil, meaning no performance profiling. + * Deprecated: Please use QueryLogFunc and ExecLogFunc instead. + */ + perfFunc: PerfFunc + /** + * QueryLogFunc is called each time when performing a SQL query that returns data. + */ + queryLogFunc: QueryLogFunc + /** + * ExecLogFunc is called each time when a SQL statement is executed. + */ + execLogFunc: ExecLogFunc + } + /** + * Errors represents a list of errors. + */ + interface Errors extends Array{} + interface newFromDB { + /** + * NewFromDB encapsulates an existing database connection. + */ + (sqlDB: sql.DB, driverName: string): (DB) + } + interface open { + /** + * Open opens a database specified by a driver name and data source name (DSN). + * Note that Open does not check if DSN is specified correctly. It doesn't try to establish a DB connection either. + * Please refer to sql.Open() for more information. + */ + (driverName: string): (DB) + } + interface mustOpen { + /** + * MustOpen opens a database and establishes a connection to it. + * Please refer to sql.Open() and sql.Ping() for more information. + */ + (driverName: string): (DB) + } + interface DB { + /** + * Clone makes a shallow copy of DB. + */ + clone(): (DB) + } + interface DB { + /** + * WithContext returns a new instance of DB associated with the given context. + */ + withContext(ctx: context.Context): (DB) + } + interface DB { + /** + * Context returns the context associated with the DB instance. + * It returns nil if no context is associated. + */ + context(): context.Context + } + interface DB { + /** + * DB returns the sql.DB instance encapsulated by dbx.DB. + */ + db(): (sql.DB) + } + interface DB { + /** + * Close closes the database, releasing any open resources. + * It is rare to Close a DB, as the DB handle is meant to be + * long-lived and shared between many goroutines. + */ + close(): void + } + interface DB { + /** + * Begin starts a transaction. + */ + begin(): (Tx) + } + interface DB { + /** + * BeginTx starts a transaction with the given context and transaction options. + */ + beginTx(ctx: context.Context, opts: sql.TxOptions): (Tx) + } + interface DB { + /** + * Wrap encapsulates an existing transaction. + */ + wrap(sqlTx: sql.Tx): (Tx) + } + interface DB { + /** + * Transactional starts a transaction and executes the given function. + * If the function returns an error, the transaction will be rolled back. + * Otherwise, the transaction will be committed. + */ + transactional(f: (_arg0: Tx) => void): void + } + interface DB { + /** + * TransactionalContext starts a transaction and executes the given function with the given context and transaction options. + * If the function returns an error, the transaction will be rolled back. + * Otherwise, the transaction will be committed. + */ + transactionalContext(ctx: context.Context, opts: sql.TxOptions, f: (_arg0: Tx) => void): void + } + interface DB { + /** + * DriverName returns the name of the DB driver. + */ + driverName(): string + } + interface DB { + /** + * QuoteTableName quotes the given table name appropriately. + * If the table name contains DB schema prefix, it will be handled accordingly. + * This method will do nothing if the table name is already quoted or if it contains parenthesis. + */ + quoteTableName(s: string): string + } + interface DB { + /** + * QuoteColumnName quotes the given column name appropriately. + * If the table name contains table name prefix, it will be handled accordingly. + * This method will do nothing if the column name is already quoted or if it contains parenthesis. + */ + quoteColumnName(s: string): string + } + interface Errors { + /** + * Error returns the error string of Errors. + */ + error(): string + } + /** + * Expression represents a DB expression that can be embedded in a SQL statement. + */ + interface Expression { + [key:string]: any; + /** + * Build converts an expression into a SQL fragment. + * If the expression contains binding parameters, they will be added to the given Params. + */ + build(_arg0: DB, _arg1: Params): string + } + /** + * HashExp represents a hash expression. + * + * A hash expression is a map whose keys are DB column names which need to be filtered according + * to the corresponding values. For example, HashExp{"level": 2, "dept": 10} will generate + * the SQL: "level"=2 AND "dept"=10. + * + * HashExp also handles nil values and slice values. For example, HashExp{"level": []interface{}{1, 2}, "dept": nil} + * will generate: "level" IN (1, 2) AND "dept" IS NULL. + */ + interface HashExp extends _TygojaDict{} + interface newExp { + /** + * NewExp generates an expression with the specified SQL fragment and the optional binding parameters. + */ + (e: string, ...params: Params[]): Expression + } + interface not { + /** + * Not generates a NOT expression which prefixes "NOT" to the specified expression. + */ + (e: Expression): Expression + } + interface and { + /** + * And generates an AND expression which concatenates the given expressions with "AND". + */ + (...exps: Expression[]): Expression + } + interface or { + /** + * Or generates an OR expression which concatenates the given expressions with "OR". + */ + (...exps: Expression[]): Expression + } + interface _in { + /** + * In generates an IN expression for the specified column and the list of allowed values. + * If values is empty, a SQL "0=1" will be generated which represents a false expression. + */ + (col: string, ...values: { + }[]): Expression + } + interface notIn { + /** + * NotIn generates an NOT IN expression for the specified column and the list of disallowed values. + * If values is empty, an empty string will be returned indicating a true expression. + */ + (col: string, ...values: { + }[]): Expression + } + interface like { + /** + * Like generates a LIKE expression for the specified column and the possible strings that the column should be like. + * If multiple values are present, the column should be like *all* of them. For example, Like("name", "key", "word") + * will generate a SQL expression: "name" LIKE "%key%" AND "name" LIKE "%word%". + * + * By default, each value will be surrounded by "%" to enable partial matching. If a value contains special characters + * such as "%", "\", "_", they will also be properly escaped. + * + * You may call Escape() and/or Match() to change the default behavior. For example, Like("name", "key").Match(false, true) + * generates "name" LIKE "key%". + */ + (col: string, ...values: string[]): (LikeExp) + } + interface notLike { + /** + * NotLike generates a NOT LIKE expression. + * For example, NotLike("name", "key", "word") will generate a SQL expression: + * "name" NOT LIKE "%key%" AND "name" NOT LIKE "%word%". Please see Like() for more details. + */ + (col: string, ...values: string[]): (LikeExp) + } + interface orLike { + /** + * OrLike generates an OR LIKE expression. + * This is similar to Like() except that the column should be like one of the possible values. + * For example, OrLike("name", "key", "word") will generate a SQL expression: + * "name" LIKE "%key%" OR "name" LIKE "%word%". Please see Like() for more details. + */ + (col: string, ...values: string[]): (LikeExp) + } + interface orNotLike { + /** + * OrNotLike generates an OR NOT LIKE expression. + * For example, OrNotLike("name", "key", "word") will generate a SQL expression: + * "name" NOT LIKE "%key%" OR "name" NOT LIKE "%word%". Please see Like() for more details. + */ + (col: string, ...values: string[]): (LikeExp) + } + interface exists { + /** + * Exists generates an EXISTS expression by prefixing "EXISTS" to the given expression. + */ + (exp: Expression): Expression + } + interface notExists { + /** + * NotExists generates an EXISTS expression by prefixing "NOT EXISTS" to the given expression. + */ + (exp: Expression): Expression + } + interface between { + /** + * Between generates a BETWEEN expression. + * For example, Between("age", 10, 30) generates: "age" BETWEEN 10 AND 30 + */ + (col: string, from: { + }): Expression + } + interface notBetween { + /** + * NotBetween generates a NOT BETWEEN expression. + * For example, NotBetween("age", 10, 30) generates: "age" NOT BETWEEN 10 AND 30 + */ + (col: string, from: { + }): Expression + } + /** + * Exp represents an expression with a SQL fragment and a list of optional binding parameters. + */ + interface Exp { + } + interface Exp { + /** + * Build converts an expression into a SQL fragment. + */ + build(db: DB, params: Params): string + } + interface HashExp { + /** + * Build converts an expression into a SQL fragment. + */ + build(db: DB, params: Params): string + } + /** + * NotExp represents an expression that should prefix "NOT" to a specified expression. + */ + interface NotExp { + } + interface NotExp { + /** + * Build converts an expression into a SQL fragment. + */ + build(db: DB, params: Params): string + } + /** + * AndOrExp represents an expression that concatenates multiple expressions using either "AND" or "OR". + */ + interface AndOrExp { + } + interface AndOrExp { + /** + * Build converts an expression into a SQL fragment. + */ + build(db: DB, params: Params): string + } + /** + * InExp represents an "IN" or "NOT IN" expression. + */ + interface InExp { + } + interface InExp { + /** + * Build converts an expression into a SQL fragment. + */ + build(db: DB, params: Params): string + } + /** + * LikeExp represents a variant of LIKE expressions. + */ + interface LikeExp { + /** + * Like stores the LIKE operator. It can be "LIKE", "NOT LIKE". + * It may also be customized as something like "ILIKE". + */ + like: string + } + interface LikeExp { + /** + * Escape specifies how a LIKE expression should be escaped. + * Each string at position 2i represents a special character and the string at position 2i+1 is + * the corresponding escaped version. + */ + escape(...chars: string[]): (LikeExp) + } + interface LikeExp { + /** + * Match specifies whether to do wildcard matching on the left and/or right of given strings. + */ + match(left: boolean): (LikeExp) + } + interface LikeExp { + /** + * Build converts an expression into a SQL fragment. + */ + build(db: DB, params: Params): string + } + /** + * ExistsExp represents an EXISTS or NOT EXISTS expression. + */ + interface ExistsExp { + } + interface ExistsExp { + /** + * Build converts an expression into a SQL fragment. + */ + build(db: DB, params: Params): string + } + /** + * BetweenExp represents a BETWEEN or a NOT BETWEEN expression. + */ + interface BetweenExp { + } + interface BetweenExp { + /** + * Build converts an expression into a SQL fragment. + */ + build(db: DB, params: Params): string + } + interface enclose { + /** + * Enclose surrounds the provided nonempty expression with parenthesis "()". + */ + (exp: Expression): Expression + } + /** + * EncloseExp represents a parenthesis enclosed expression. + */ + interface EncloseExp { + } + interface EncloseExp { + /** + * Build converts an expression into a SQL fragment. + */ + build(db: DB, params: Params): string + } + /** + * TableModel is the interface that should be implemented by models which have unconventional table names. + */ + interface TableModel { + [key:string]: any; + tableName(): string + } + /** + * ModelQuery represents a query associated with a struct model. + */ + interface ModelQuery { + } + interface newModelQuery { + (model: { + }, fieldMapFunc: FieldMapFunc, db: DB, builder: Builder): (ModelQuery) + } + interface ModelQuery { + /** + * Context returns the context associated with the query. + */ + context(): context.Context + } + interface ModelQuery { + /** + * WithContext associates a context with the query. + */ + withContext(ctx: context.Context): (ModelQuery) + } + interface ModelQuery { + /** + * Exclude excludes the specified struct fields from being inserted/updated into the DB table. + */ + exclude(...attrs: string[]): (ModelQuery) + } + interface ModelQuery { + /** + * Insert inserts a row in the table using the struct model associated with this query. + * + * By default, it inserts *all* public fields into the table, including those nil or empty ones. + * You may pass a list of the fields to this method to indicate that only those fields should be inserted. + * You may also call Exclude to exclude some fields from being inserted. + * + * If a model has an empty primary key, it is considered auto-incremental and the corresponding struct + * field will be filled with the generated primary key value after a successful insertion. + */ + insert(...attrs: string[]): void + } + interface ModelQuery { + /** + * Update updates a row in the table using the struct model associated with this query. + * The row being updated has the same primary key as specified by the model. + * + * By default, it updates *all* public fields in the table, including those nil or empty ones. + * You may pass a list of the fields to this method to indicate that only those fields should be updated. + * You may also call Exclude to exclude some fields from being updated. + */ + update(...attrs: string[]): void + } + interface ModelQuery { + /** + * Delete deletes a row in the table using the primary key specified by the struct model associated with this query. + */ + delete(): void + } + /** + * ExecHookFunc executes before op allowing custom handling like auto fail/retry. + */ + interface ExecHookFunc {(q: Query, op: () => void): void } + /** + * OneHookFunc executes right before the query populate the row result from One() call (aka. op). + */ + interface OneHookFunc {(q: Query, a: { + }, op: (b: { + }) => void): void } + /** + * AllHookFunc executes right before the query populate the row result from All() call (aka. op). + */ + interface AllHookFunc {(q: Query, sliceA: { + }, op: (sliceB: { + }) => void): void } + /** + * Params represents a list of parameter values to be bound to a SQL statement. + * The map keys are the parameter names while the map values are the corresponding parameter values. + */ + interface Params extends _TygojaDict{} + /** + * Executor prepares, executes, or queries a SQL statement. + */ + interface Executor { + [key:string]: any; + /** + * Exec executes a SQL statement + */ + exec(query: string, ...args: { + }[]): sql.Result + /** + * ExecContext executes a SQL statement with the given context + */ + execContext(ctx: context.Context, query: string, ...args: { + }[]): sql.Result + /** + * Query queries a SQL statement + */ + query(query: string, ...args: { + }[]): (sql.Rows) + /** + * QueryContext queries a SQL statement with the given context + */ + queryContext(ctx: context.Context, query: string, ...args: { + }[]): (sql.Rows) + /** + * Prepare creates a prepared statement + */ + prepare(query: string): (sql.Stmt) + } + /** + * Query represents a SQL statement to be executed. + */ + interface Query { + /** + * FieldMapper maps struct field names to DB column names. + */ + fieldMapper: FieldMapFunc + /** + * LastError contains the last error (if any) of the query. + * LastError is cleared by Execute(), Row(), Rows(), One(), and All(). + */ + lastError: Error + /** + * LogFunc is used to log the SQL statement being executed. + */ + logFunc: LogFunc + /** + * PerfFunc is used to log the SQL execution time. It is ignored if nil. + * Deprecated: Please use QueryLogFunc and ExecLogFunc instead. + */ + perfFunc: PerfFunc + /** + * QueryLogFunc is called each time when performing a SQL query that returns data. + */ + queryLogFunc: QueryLogFunc + /** + * ExecLogFunc is called each time when a SQL statement is executed. + */ + execLogFunc: ExecLogFunc + } + interface newQuery { + /** + * NewQuery creates a new Query with the given SQL statement. + */ + (db: DB, executor: Executor, sql: string): (Query) + } + interface Query { + /** + * SQL returns the original SQL used to create the query. + * The actual SQL (RawSQL) being executed is obtained by replacing the named + * parameter placeholders with anonymous ones. + */ + sql(): string + } + interface Query { + /** + * Context returns the context associated with the query. + */ + context(): context.Context + } + interface Query { + /** + * WithContext associates a context with the query. + */ + withContext(ctx: context.Context): (Query) + } + interface Query { + /** + * WithExecHook associates the provided exec hook function with the query. + * + * It is called for every Query resolver (Execute(), One(), All(), Row(), Column()), + * allowing you to implement auto fail/retry or any other additional handling. + */ + withExecHook(fn: ExecHookFunc): (Query) + } + interface Query { + /** + * WithOneHook associates the provided hook function with the query, + * called on q.One(), allowing you to implement custom struct scan based + * on the One() argument and/or result. + */ + withOneHook(fn: OneHookFunc): (Query) + } + interface Query { + /** + * WithOneHook associates the provided hook function with the query, + * called on q.All(), allowing you to implement custom slice scan based + * on the All() argument and/or result. + */ + withAllHook(fn: AllHookFunc): (Query) + } + interface Query { + /** + * Params returns the parameters to be bound to the SQL statement represented by this query. + */ + params(): Params + } + interface Query { + /** + * Prepare creates a prepared statement for later queries or executions. + * Close() should be called after finishing all queries. + */ + prepare(): (Query) + } + interface Query { + /** + * Close closes the underlying prepared statement. + * Close does nothing if the query has not been prepared before. + */ + close(): void + } + interface Query { + /** + * Bind sets the parameters that should be bound to the SQL statement. + * The parameter placeholders in the SQL statement are in the format of "{:ParamName}". + */ + bind(params: Params): (Query) + } + interface Query { + /** + * Execute executes the SQL statement without retrieving data. + */ + execute(): sql.Result + } + interface Query { + /** + * One executes the SQL statement and populates the first row of the result into a struct or NullStringMap. + * Refer to Rows.ScanStruct() and Rows.ScanMap() for more details on how to specify + * the variable to be populated. + * Note that when the query has no rows in the result set, an sql.ErrNoRows will be returned. + */ + one(a: { + }): void + } + interface Query { + /** + * All executes the SQL statement and populates all the resulting rows into a slice of struct or NullStringMap. + * The slice must be given as a pointer. Each slice element must be either a struct or a NullStringMap. + * Refer to Rows.ScanStruct() and Rows.ScanMap() for more details on how each slice element can be. + * If the query returns no row, the slice will be an empty slice (not nil). + */ + all(slice: { + }): void + } + interface Query { + /** + * Row executes the SQL statement and populates the first row of the result into a list of variables. + * Note that the number of the variables should match to that of the columns in the query result. + * Note that when the query has no rows in the result set, an sql.ErrNoRows will be returned. + */ + row(...a: { + }[]): void + } + interface Query { + /** + * Column executes the SQL statement and populates the first column of the result into a slice. + * Note that the parameter must be a pointer to a slice. + */ + column(a: { + }): void + } + interface Query { + /** + * Rows executes the SQL statement and returns a Rows object to allow retrieving data row by row. + */ + rows(): (Rows) + } + /** + * QueryBuilder builds different clauses for a SELECT SQL statement. + */ + interface QueryBuilder { + [key:string]: any; + /** + * BuildSelect generates a SELECT clause from the given selected column names. + */ + buildSelect(cols: Array, distinct: boolean, option: string): string + /** + * BuildFrom generates a FROM clause from the given tables. + */ + buildFrom(tables: Array): string + /** + * BuildGroupBy generates a GROUP BY clause from the given group-by columns. + */ + buildGroupBy(cols: Array): string + /** + * BuildJoin generates a JOIN clause from the given join information. + */ + buildJoin(_arg0: Array, _arg1: Params): string + /** + * BuildWhere generates a WHERE clause from the given expression. + */ + buildWhere(_arg0: Expression, _arg1: Params): string + /** + * BuildHaving generates a HAVING clause from the given expression. + */ + buildHaving(_arg0: Expression, _arg1: Params): string + /** + * BuildOrderByAndLimit generates the ORDER BY and LIMIT clauses. + */ + buildOrderByAndLimit(_arg0: string, _arg1: Array, _arg2: number, _arg3: number): string + /** + * BuildUnion generates a UNION clause from the given union information. + */ + buildUnion(_arg0: Array, _arg1: Params): string + } + /** + * BaseQueryBuilder provides a basic implementation of QueryBuilder. + */ + interface BaseQueryBuilder { + } + interface newBaseQueryBuilder { + /** + * NewBaseQueryBuilder creates a new BaseQueryBuilder instance. + */ + (db: DB): (BaseQueryBuilder) + } + interface BaseQueryBuilder { + /** + * DB returns the DB instance associated with the query builder. + */ + db(): (DB) + } + interface BaseQueryBuilder { + /** + * BuildSelect generates a SELECT clause from the given selected column names. + */ + buildSelect(cols: Array, distinct: boolean, option: string): string + } + interface BaseQueryBuilder { + /** + * BuildFrom generates a FROM clause from the given tables. + */ + buildFrom(tables: Array): string + } + interface BaseQueryBuilder { + /** + * BuildJoin generates a JOIN clause from the given join information. + */ + buildJoin(joins: Array, params: Params): string + } + interface BaseQueryBuilder { + /** + * BuildWhere generates a WHERE clause from the given expression. + */ + buildWhere(e: Expression, params: Params): string + } + interface BaseQueryBuilder { + /** + * BuildHaving generates a HAVING clause from the given expression. + */ + buildHaving(e: Expression, params: Params): string + } + interface BaseQueryBuilder { + /** + * BuildGroupBy generates a GROUP BY clause from the given group-by columns. + */ + buildGroupBy(cols: Array): string + } + interface BaseQueryBuilder { + /** + * BuildOrderByAndLimit generates the ORDER BY and LIMIT clauses. + */ + buildOrderByAndLimit(sql: string, cols: Array, limit: number, offset: number): string + } + interface BaseQueryBuilder { + /** + * BuildUnion generates a UNION clause from the given union information. + */ + buildUnion(unions: Array, params: Params): string + } + interface BaseQueryBuilder { + /** + * BuildOrderBy generates the ORDER BY clause. + */ + buildOrderBy(cols: Array): string + } + interface BaseQueryBuilder { + /** + * BuildLimit generates the LIMIT clause. + */ + buildLimit(limit: number, offset: number): string + } + /** + * VarTypeError indicates a variable type error when trying to populating a variable with DB result. + */ + interface VarTypeError extends String{} + interface VarTypeError { + /** + * Error returns the error message. + */ + error(): string + } + /** + * NullStringMap is a map of sql.NullString that can be used to hold DB query result. + * The map keys correspond to the DB column names, while the map values are their corresponding column values. + */ + interface NullStringMap extends _TygojaDict{} + /** + * Rows enhances sql.Rows by providing additional data query methods. + * Rows can be obtained by calling Query.Rows(). It is mainly used to populate data row by row. + */ + type _subWXHzf = sql.Rows + interface Rows extends _subWXHzf { + } + interface Rows { + /** + * ScanMap populates the current row of data into a NullStringMap. + * Note that the NullStringMap must not be nil, or it will panic. + * The NullStringMap will be populated using column names as keys and their values as + * the corresponding element values. + */ + scanMap(a: NullStringMap): void + } + interface Rows { + /** + * ScanStruct populates the current row of data into a struct. + * The struct must be given as a pointer. + * + * ScanStruct associates struct fields with DB table columns through a field mapping function. + * It populates a struct field with the data of its associated column. + * Note that only exported struct fields will be populated. + * + * By default, DefaultFieldMapFunc() is used to map struct fields to table columns. + * This function separates each word in a field name with a underscore and turns every letter into lower case. + * For example, "LastName" is mapped to "last_name", "MyID" is mapped to "my_id", and so on. + * To change the default behavior, set DB.FieldMapper with your custom mapping function. + * You may also set Query.FieldMapper to change the behavior for particular queries. + */ + scanStruct(a: { + }): void + } + /** + * BuildHookFunc defines a callback function that is executed on Query creation. + */ + interface BuildHookFunc {(q: Query): void } + /** + * SelectQuery represents a DB-agnostic SELECT query. + * It can be built into a DB-specific query by calling the Build() method. + */ + interface SelectQuery { + /** + * FieldMapper maps struct field names to DB column names. + */ + fieldMapper: FieldMapFunc + /** + * TableMapper maps structs to DB table names. + */ + tableMapper: TableMapFunc + } + /** + * JoinInfo contains the specification for a JOIN clause. + */ + interface JoinInfo { + join: string + table: string + on: Expression + } + /** + * UnionInfo contains the specification for a UNION clause. + */ + interface UnionInfo { + all: boolean + query?: Query + } + interface newSelectQuery { + /** + * NewSelectQuery creates a new SelectQuery instance. + */ + (builder: Builder, db: DB): (SelectQuery) + } + interface SelectQuery { + /** + * WithBuildHook runs the provided hook function with the query created on Build(). + */ + withBuildHook(fn: BuildHookFunc): (SelectQuery) + } + interface SelectQuery { + /** + * Context returns the context associated with the query. + */ + context(): context.Context + } + interface SelectQuery { + /** + * WithContext associates a context with the query. + */ + withContext(ctx: context.Context): (SelectQuery) + } + interface SelectQuery { + /** + * Select specifies the columns to be selected. + * Column names will be automatically quoted. + */ + select(...cols: string[]): (SelectQuery) + } + interface SelectQuery { + /** + * AndSelect adds additional columns to be selected. + * Column names will be automatically quoted. + */ + andSelect(...cols: string[]): (SelectQuery) + } + interface SelectQuery { + /** + * Distinct specifies whether to select columns distinctively. + * By default, distinct is false. + */ + distinct(v: boolean): (SelectQuery) + } + interface SelectQuery { + /** + * SelectOption specifies additional option that should be append to "SELECT". + */ + selectOption(option: string): (SelectQuery) + } + interface SelectQuery { + /** + * From specifies which tables to select from. + * Table names will be automatically quoted. + */ + from(...tables: string[]): (SelectQuery) + } + interface SelectQuery { + /** + * Where specifies the WHERE condition. + */ + where(e: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * AndWhere concatenates a new WHERE condition with the existing one (if any) using "AND". + */ + andWhere(e: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * OrWhere concatenates a new WHERE condition with the existing one (if any) using "OR". + */ + orWhere(e: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * Join specifies a JOIN clause. + * The "typ" parameter specifies the JOIN type (e.g. "INNER JOIN", "LEFT JOIN"). + */ + join(typ: string, table: string, on: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * InnerJoin specifies an INNER JOIN clause. + * This is a shortcut method for Join. + */ + innerJoin(table: string, on: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * LeftJoin specifies a LEFT JOIN clause. + * This is a shortcut method for Join. + */ + leftJoin(table: string, on: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * RightJoin specifies a RIGHT JOIN clause. + * This is a shortcut method for Join. + */ + rightJoin(table: string, on: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * OrderBy specifies the ORDER BY clause. + * Column names will be properly quoted. A column name can contain "ASC" or "DESC" to indicate its ordering direction. + */ + orderBy(...cols: string[]): (SelectQuery) + } + interface SelectQuery { + /** + * AndOrderBy appends additional columns to the existing ORDER BY clause. + * Column names will be properly quoted. A column name can contain "ASC" or "DESC" to indicate its ordering direction. + */ + andOrderBy(...cols: string[]): (SelectQuery) + } + interface SelectQuery { + /** + * GroupBy specifies the GROUP BY clause. + * Column names will be properly quoted. + */ + groupBy(...cols: string[]): (SelectQuery) + } + interface SelectQuery { + /** + * AndGroupBy appends additional columns to the existing GROUP BY clause. + * Column names will be properly quoted. + */ + andGroupBy(...cols: string[]): (SelectQuery) + } + interface SelectQuery { + /** + * Having specifies the HAVING clause. + */ + having(e: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * AndHaving concatenates a new HAVING condition with the existing one (if any) using "AND". + */ + andHaving(e: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * OrHaving concatenates a new HAVING condition with the existing one (if any) using "OR". + */ + orHaving(e: Expression): (SelectQuery) + } + interface SelectQuery { + /** + * Union specifies a UNION clause. + */ + union(q: Query): (SelectQuery) + } + interface SelectQuery { + /** + * UnionAll specifies a UNION ALL clause. + */ + unionAll(q: Query): (SelectQuery) + } + interface SelectQuery { + /** + * Limit specifies the LIMIT clause. + * A negative limit means no limit. + */ + limit(limit: number): (SelectQuery) + } + interface SelectQuery { + /** + * Offset specifies the OFFSET clause. + * A negative offset means no offset. + */ + offset(offset: number): (SelectQuery) + } + interface SelectQuery { + /** + * Bind specifies the parameter values to be bound to the query. + */ + bind(params: Params): (SelectQuery) + } + interface SelectQuery { + /** + * AndBind appends additional parameters to be bound to the query. + */ + andBind(params: Params): (SelectQuery) + } + interface SelectQuery { + /** + * Build builds the SELECT query and returns an executable Query object. + */ + build(): (Query) + } + interface SelectQuery { + /** + * One executes the SELECT query and populates the first row of the result into the specified variable. + * + * If the query does not specify a "from" clause, the method will try to infer the name of the table + * to be selected from by calling getTableName() which will return either the variable type name + * or the TableName() method if the variable implements the TableModel interface. + * + * Note that when the query has no rows in the result set, an sql.ErrNoRows will be returned. + */ + one(a: { + }): void + } + interface SelectQuery { + /** + * Model selects the row with the specified primary key and populates the model with the row data. + * + * The model variable should be a pointer to a struct. If the query does not specify a "from" clause, + * it will use the model struct to determine which table to select data from. It will also use the model + * to infer the name of the primary key column. Only simple primary key is supported. For composite primary keys, + * please use Where() to specify the filtering condition. + */ + model(pk: { + }): void + } + interface SelectQuery { + /** + * All executes the SELECT query and populates all rows of the result into a slice. + * + * Note that the slice must be passed in as a pointer. + * + * If the query does not specify a "from" clause, the method will try to infer the name of the table + * to be selected from by calling getTableName() which will return either the type name of the slice elements + * or the TableName() method if the slice element implements the TableModel interface. + */ + all(slice: { + }): void + } + interface SelectQuery { + /** + * Rows builds and executes the SELECT query and returns a Rows object for data retrieval purpose. + * This is a shortcut to SelectQuery.Build().Rows() + */ + rows(): (Rows) + } + interface SelectQuery { + /** + * Row builds and executes the SELECT query and populates the first row of the result into the specified variables. + * This is a shortcut to SelectQuery.Build().Row() + */ + row(...a: { + }[]): void + } + interface SelectQuery { + /** + * Column builds and executes the SELECT statement and populates the first column of the result into a slice. + * Note that the parameter must be a pointer to a slice. + * This is a shortcut to SelectQuery.Build().Column() + */ + column(a: { + }): void + } + /** + * QueryInfo represents a debug/info struct with exported SelectQuery fields. + */ + interface QueryInfo { + builder: Builder + selects: Array + distinct: boolean + selectOption: string + from: Array + where: Expression + join: Array + orderBy: Array + groupBy: Array + having: Expression + union: Array + limit: number + offset: number + params: Params + context: context.Context + buildHook: BuildHookFunc + } + interface SelectQuery { + /** + * Info exports common SelectQuery fields allowing to inspect the + * current select query options. + */ + info(): (QueryInfo) + } + /** + * FieldMapFunc converts a struct field name into a DB column name. + */ + interface FieldMapFunc {(_arg0: string): string } + /** + * TableMapFunc converts a sample struct into a DB table name. + */ + interface TableMapFunc {(a: { + }): string } + interface structInfo { + } + type _subAZzsa = structInfo + interface structValue extends _subAZzsa { + } + interface fieldInfo { + } + interface structInfoMapKey { + } + /** + * PostScanner is an optional interface used by ScanStruct. + */ + interface PostScanner { + [key:string]: any; + /** + * PostScan executes right after the struct has been populated + * with the DB values, allowing you to further normalize or validate + * the loaded data. + */ + postScan(): void + } + interface defaultFieldMapFunc { + /** + * DefaultFieldMapFunc maps a field name to a DB column name. + * The mapping rule set by this method is that words in a field name will be separated by underscores + * and the name will be turned into lower case. For example, "FirstName" maps to "first_name", and "MyID" becomes "my_id". + * See DB.FieldMapper for more details. + */ + (f: string): string + } + interface getTableName { + /** + * GetTableName implements the default way of determining the table name corresponding to the given model struct + * or slice of structs. To get the actual table name for a model, you should use DB.TableMapFunc() instead. + * Do not call this method in a model's TableName() method because it will cause infinite loop. + */ + (a: { + }): string + } + /** + * Tx enhances sql.Tx with additional querying methods. + */ + type _submANru = Builder + interface Tx extends _submANru { + } + interface Tx { + /** + * Commit commits the transaction. + */ + commit(): void + } + interface Tx { + /** + * Rollback aborts the transaction. + */ + rollback(): void + } +} + +/** + * Package validation provides configurable and extensible rules for validating data of various types. + */ +namespace ozzo_validation { + /** + * Error interface represents an validation error + */ + interface Error { + [key:string]: any; + error(): string + code(): string + message(): string + setMessage(_arg0: string): Error + params(): _TygojaDict + setParams(_arg0: _TygojaDict): Error + } +} + /** * Package exec runs external commands. It wraps os.StartProcess to make it * easier to remap stdin and stdout, connect I/O with pipes, and do other @@ -2731,2038 +4762,7 @@ namespace exec { * quoting yourself and provide the full command line in SysProcAttr.CmdLine, * leaving Args empty. */ - (name: string, ...arg: string[]): (Cmd | undefined) - } -} - -/** - * Package validation provides configurable and extensible rules for validating data of various types. - */ -namespace ozzo_validation { - /** - * Error interface represents an validation error - */ - interface Error { - [key:string]: any; - error(): string - code(): string - message(): string - setMessage(_arg0: string): Error - params(): _TygojaDict - setParams(_arg0: _TygojaDict): Error - } -} - -/** - * Package dbx provides a set of DB-agnostic and easy-to-use query building methods for relational databases. - */ -namespace dbx { - /** - * Builder supports building SQL statements in a DB-agnostic way. - * Builder mainly provides two sets of query building methods: those building SELECT statements - * and those manipulating DB data or schema (e.g. INSERT statements, CREATE TABLE statements). - */ - interface Builder { - [key:string]: any; - /** - * NewQuery creates a new Query object with the given SQL statement. - * The SQL statement may contain parameter placeholders which can be bound with actual parameter - * values before the statement is executed. - */ - newQuery(_arg0: string): (Query | undefined) - /** - * Select returns a new SelectQuery object that can be used to build a SELECT statement. - * The parameters to this method should be the list column names to be selected. - * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). - */ - select(..._arg0: string[]): (SelectQuery | undefined) - /** - * ModelQuery returns a new ModelQuery object that can be used to perform model insertion, update, and deletion. - * The parameter to this method should be a pointer to the model struct that needs to be inserted, updated, or deleted. - */ - model(_arg0: { - }): (ModelQuery | undefined) - /** - * GeneratePlaceholder generates an anonymous parameter placeholder with the given parameter ID. - */ - generatePlaceholder(_arg0: number): string - /** - * Quote quotes a string so that it can be embedded in a SQL statement as a string value. - */ - quote(_arg0: string): string - /** - * QuoteSimpleTableName quotes a simple table name. - * A simple table name does not contain any schema prefix. - */ - quoteSimpleTableName(_arg0: string): string - /** - * QuoteSimpleColumnName quotes a simple column name. - * A simple column name does not contain any table prefix. - */ - quoteSimpleColumnName(_arg0: string): string - /** - * QueryBuilder returns the query builder supporting the current DB. - */ - queryBuilder(): QueryBuilder - /** - * Insert creates a Query that represents an INSERT SQL statement. - * The keys of cols are the column names, while the values of cols are the corresponding column - * values to be inserted. - */ - insert(table: string, cols: Params): (Query | undefined) - /** - * Upsert creates a Query that represents an UPSERT SQL statement. - * Upsert inserts a row into the table if the primary key or unique index is not found. - * Otherwise it will update the row with the new values. - * The keys of cols are the column names, while the values of cols are the corresponding column - * values to be inserted. - */ - upsert(table: string, cols: Params, ...constraints: string[]): (Query | undefined) - /** - * Update creates a Query that represents an UPDATE SQL statement. - * The keys of cols are the column names, while the values of cols are the corresponding new column - * values. If the "where" expression is nil, the UPDATE SQL statement will have no WHERE clause - * (be careful in this case as the SQL statement will update ALL rows in the table). - */ - update(table: string, cols: Params, where: Expression): (Query | undefined) - /** - * Delete creates a Query that represents a DELETE SQL statement. - * If the "where" expression is nil, the DELETE SQL statement will have no WHERE clause - * (be careful in this case as the SQL statement will delete ALL rows in the table). - */ - delete(table: string, where: Expression): (Query | undefined) - /** - * CreateTable creates a Query that represents a CREATE TABLE SQL statement. - * The keys of cols are the column names, while the values of cols are the corresponding column types. - * The optional "options" parameters will be appended to the generated SQL statement. - */ - createTable(table: string, cols: _TygojaDict, ...options: string[]): (Query | undefined) - /** - * RenameTable creates a Query that can be used to rename a table. - */ - renameTable(oldName: string): (Query | undefined) - /** - * DropTable creates a Query that can be used to drop a table. - */ - dropTable(table: string): (Query | undefined) - /** - * TruncateTable creates a Query that can be used to truncate a table. - */ - truncateTable(table: string): (Query | undefined) - /** - * AddColumn creates a Query that can be used to add a column to a table. - */ - addColumn(table: string): (Query | undefined) - /** - * DropColumn creates a Query that can be used to drop a column from a table. - */ - dropColumn(table: string): (Query | undefined) - /** - * RenameColumn creates a Query that can be used to rename a column in a table. - */ - renameColumn(table: string): (Query | undefined) - /** - * AlterColumn creates a Query that can be used to change the definition of a table column. - */ - alterColumn(table: string): (Query | undefined) - /** - * AddPrimaryKey creates a Query that can be used to specify primary key(s) for a table. - * The "name" parameter specifies the name of the primary key constraint. - */ - addPrimaryKey(table: string, ...cols: string[]): (Query | undefined) - /** - * DropPrimaryKey creates a Query that can be used to remove the named primary key constraint from a table. - */ - dropPrimaryKey(table: string): (Query | undefined) - /** - * AddForeignKey creates a Query that can be used to add a foreign key constraint to a table. - * The length of cols and refCols must be the same as they refer to the primary and referential columns. - * The optional "options" parameters will be appended to the SQL statement. They can be used to - * specify options such as "ON DELETE CASCADE". - */ - addForeignKey(table: string, cols: Array, refTable: string, ...options: string[]): (Query | undefined) - /** - * DropForeignKey creates a Query that can be used to remove the named foreign key constraint from a table. - */ - dropForeignKey(table: string): (Query | undefined) - /** - * CreateIndex creates a Query that can be used to create an index for a table. - */ - createIndex(table: string, ...cols: string[]): (Query | undefined) - /** - * CreateUniqueIndex creates a Query that can be used to create a unique index for a table. - */ - createUniqueIndex(table: string, ...cols: string[]): (Query | undefined) - /** - * DropIndex creates a Query that can be used to remove the named index from a table. - */ - dropIndex(table: string): (Query | undefined) - } - /** - * BaseBuilder provides a basic implementation of the Builder interface. - */ - interface BaseBuilder { - } - interface newBaseBuilder { - /** - * NewBaseBuilder creates a new BaseBuilder instance. - */ - (db: DB, executor: Executor): (BaseBuilder | undefined) - } - interface BaseBuilder { - /** - * DB returns the DB instance that this builder is associated with. - */ - db(): (DB | undefined) - } - interface BaseBuilder { - /** - * Executor returns the executor object (a DB instance or a transaction) for executing SQL statements. - */ - executor(): Executor - } - interface BaseBuilder { - /** - * NewQuery creates a new Query object with the given SQL statement. - * The SQL statement may contain parameter placeholders which can be bound with actual parameter - * values before the statement is executed. - */ - newQuery(sql: string): (Query | undefined) - } - interface BaseBuilder { - /** - * GeneratePlaceholder generates an anonymous parameter placeholder with the given parameter ID. - */ - generatePlaceholder(_arg0: number): string - } - interface BaseBuilder { - /** - * Quote quotes a string so that it can be embedded in a SQL statement as a string value. - */ - quote(s: string): string - } - interface BaseBuilder { - /** - * QuoteSimpleTableName quotes a simple table name. - * A simple table name does not contain any schema prefix. - */ - quoteSimpleTableName(s: string): string - } - interface BaseBuilder { - /** - * QuoteSimpleColumnName quotes a simple column name. - * A simple column name does not contain any table prefix. - */ - quoteSimpleColumnName(s: string): string - } - interface BaseBuilder { - /** - * Insert creates a Query that represents an INSERT SQL statement. - * The keys of cols are the column names, while the values of cols are the corresponding column - * values to be inserted. - */ - insert(table: string, cols: Params): (Query | undefined) - } - interface BaseBuilder { - /** - * Upsert creates a Query that represents an UPSERT SQL statement. - * Upsert inserts a row into the table if the primary key or unique index is not found. - * Otherwise it will update the row with the new values. - * The keys of cols are the column names, while the values of cols are the corresponding column - * values to be inserted. - */ - upsert(table: string, cols: Params, ...constraints: string[]): (Query | undefined) - } - interface BaseBuilder { - /** - * Update creates a Query that represents an UPDATE SQL statement. - * The keys of cols are the column names, while the values of cols are the corresponding new column - * values. If the "where" expression is nil, the UPDATE SQL statement will have no WHERE clause - * (be careful in this case as the SQL statement will update ALL rows in the table). - */ - update(table: string, cols: Params, where: Expression): (Query | undefined) - } - interface BaseBuilder { - /** - * Delete creates a Query that represents a DELETE SQL statement. - * If the "where" expression is nil, the DELETE SQL statement will have no WHERE clause - * (be careful in this case as the SQL statement will delete ALL rows in the table). - */ - delete(table: string, where: Expression): (Query | undefined) - } - interface BaseBuilder { - /** - * CreateTable creates a Query that represents a CREATE TABLE SQL statement. - * The keys of cols are the column names, while the values of cols are the corresponding column types. - * The optional "options" parameters will be appended to the generated SQL statement. - */ - createTable(table: string, cols: _TygojaDict, ...options: string[]): (Query | undefined) - } - interface BaseBuilder { - /** - * RenameTable creates a Query that can be used to rename a table. - */ - renameTable(oldName: string): (Query | undefined) - } - interface BaseBuilder { - /** - * DropTable creates a Query that can be used to drop a table. - */ - dropTable(table: string): (Query | undefined) - } - interface BaseBuilder { - /** - * TruncateTable creates a Query that can be used to truncate a table. - */ - truncateTable(table: string): (Query | undefined) - } - interface BaseBuilder { - /** - * AddColumn creates a Query that can be used to add a column to a table. - */ - addColumn(table: string): (Query | undefined) - } - interface BaseBuilder { - /** - * DropColumn creates a Query that can be used to drop a column from a table. - */ - dropColumn(table: string): (Query | undefined) - } - interface BaseBuilder { - /** - * RenameColumn creates a Query that can be used to rename a column in a table. - */ - renameColumn(table: string): (Query | undefined) - } - interface BaseBuilder { - /** - * AlterColumn creates a Query that can be used to change the definition of a table column. - */ - alterColumn(table: string): (Query | undefined) - } - interface BaseBuilder { - /** - * AddPrimaryKey creates a Query that can be used to specify primary key(s) for a table. - * The "name" parameter specifies the name of the primary key constraint. - */ - addPrimaryKey(table: string, ...cols: string[]): (Query | undefined) - } - interface BaseBuilder { - /** - * DropPrimaryKey creates a Query that can be used to remove the named primary key constraint from a table. - */ - dropPrimaryKey(table: string): (Query | undefined) - } - interface BaseBuilder { - /** - * AddForeignKey creates a Query that can be used to add a foreign key constraint to a table. - * The length of cols and refCols must be the same as they refer to the primary and referential columns. - * The optional "options" parameters will be appended to the SQL statement. They can be used to - * specify options such as "ON DELETE CASCADE". - */ - addForeignKey(table: string, cols: Array, refTable: string, ...options: string[]): (Query | undefined) - } - interface BaseBuilder { - /** - * DropForeignKey creates a Query that can be used to remove the named foreign key constraint from a table. - */ - dropForeignKey(table: string): (Query | undefined) - } - interface BaseBuilder { - /** - * CreateIndex creates a Query that can be used to create an index for a table. - */ - createIndex(table: string, ...cols: string[]): (Query | undefined) - } - interface BaseBuilder { - /** - * CreateUniqueIndex creates a Query that can be used to create a unique index for a table. - */ - createUniqueIndex(table: string, ...cols: string[]): (Query | undefined) - } - interface BaseBuilder { - /** - * DropIndex creates a Query that can be used to remove the named index from a table. - */ - dropIndex(table: string): (Query | undefined) - } - /** - * MssqlBuilder is the builder for SQL Server databases. - */ - type _subIkwnE = BaseBuilder - interface MssqlBuilder extends _subIkwnE { - } - /** - * MssqlQueryBuilder is the query builder for SQL Server databases. - */ - type _subrANYB = BaseQueryBuilder - interface MssqlQueryBuilder extends _subrANYB { - } - interface newMssqlBuilder { - /** - * NewMssqlBuilder creates a new MssqlBuilder instance. - */ - (db: DB, executor: Executor): Builder - } - interface MssqlBuilder { - /** - * QueryBuilder returns the query builder supporting the current DB. - */ - queryBuilder(): QueryBuilder - } - interface MssqlBuilder { - /** - * Select returns a new SelectQuery object that can be used to build a SELECT statement. - * The parameters to this method should be the list column names to be selected. - * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). - */ - select(...cols: string[]): (SelectQuery | undefined) - } - interface MssqlBuilder { - /** - * Model returns a new ModelQuery object that can be used to perform model-based DB operations. - * The model passed to this method should be a pointer to a model struct. - */ - model(model: { - }): (ModelQuery | undefined) - } - interface MssqlBuilder { - /** - * QuoteSimpleTableName quotes a simple table name. - * A simple table name does not contain any schema prefix. - */ - quoteSimpleTableName(s: string): string - } - interface MssqlBuilder { - /** - * QuoteSimpleColumnName quotes a simple column name. - * A simple column name does not contain any table prefix. - */ - quoteSimpleColumnName(s: string): string - } - interface MssqlBuilder { - /** - * RenameTable creates a Query that can be used to rename a table. - */ - renameTable(oldName: string): (Query | undefined) - } - interface MssqlBuilder { - /** - * RenameColumn creates a Query that can be used to rename a column in a table. - */ - renameColumn(table: string): (Query | undefined) - } - interface MssqlBuilder { - /** - * AlterColumn creates a Query that can be used to change the definition of a table column. - */ - alterColumn(table: string): (Query | undefined) - } - interface MssqlQueryBuilder { - /** - * BuildOrderByAndLimit generates the ORDER BY and LIMIT clauses. - */ - buildOrderByAndLimit(sql: string, cols: Array, limit: number, offset: number): string - } - /** - * MysqlBuilder is the builder for MySQL databases. - */ - type _subsIvgZ = BaseBuilder - interface MysqlBuilder extends _subsIvgZ { - } - interface newMysqlBuilder { - /** - * NewMysqlBuilder creates a new MysqlBuilder instance. - */ - (db: DB, executor: Executor): Builder - } - interface MysqlBuilder { - /** - * QueryBuilder returns the query builder supporting the current DB. - */ - queryBuilder(): QueryBuilder - } - interface MysqlBuilder { - /** - * Select returns a new SelectQuery object that can be used to build a SELECT statement. - * The parameters to this method should be the list column names to be selected. - * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). - */ - select(...cols: string[]): (SelectQuery | undefined) - } - interface MysqlBuilder { - /** - * Model returns a new ModelQuery object that can be used to perform model-based DB operations. - * The model passed to this method should be a pointer to a model struct. - */ - model(model: { - }): (ModelQuery | undefined) - } - interface MysqlBuilder { - /** - * QuoteSimpleTableName quotes a simple table name. - * A simple table name does not contain any schema prefix. - */ - quoteSimpleTableName(s: string): string - } - interface MysqlBuilder { - /** - * QuoteSimpleColumnName quotes a simple column name. - * A simple column name does not contain any table prefix. - */ - quoteSimpleColumnName(s: string): string - } - interface MysqlBuilder { - /** - * Upsert creates a Query that represents an UPSERT SQL statement. - * Upsert inserts a row into the table if the primary key or unique index is not found. - * Otherwise it will update the row with the new values. - * The keys of cols are the column names, while the values of cols are the corresponding column - * values to be inserted. - */ - upsert(table: string, cols: Params, ...constraints: string[]): (Query | undefined) - } - interface MysqlBuilder { - /** - * RenameColumn creates a Query that can be used to rename a column in a table. - */ - renameColumn(table: string): (Query | undefined) - } - interface MysqlBuilder { - /** - * DropPrimaryKey creates a Query that can be used to remove the named primary key constraint from a table. - */ - dropPrimaryKey(table: string): (Query | undefined) - } - interface MysqlBuilder { - /** - * DropForeignKey creates a Query that can be used to remove the named foreign key constraint from a table. - */ - dropForeignKey(table: string): (Query | undefined) - } - /** - * OciBuilder is the builder for Oracle databases. - */ - type _subPWIgg = BaseBuilder - interface OciBuilder extends _subPWIgg { - } - /** - * OciQueryBuilder is the query builder for Oracle databases. - */ - type _subOMCck = BaseQueryBuilder - interface OciQueryBuilder extends _subOMCck { - } - interface newOciBuilder { - /** - * NewOciBuilder creates a new OciBuilder instance. - */ - (db: DB, executor: Executor): Builder - } - interface OciBuilder { - /** - * Select returns a new SelectQuery object that can be used to build a SELECT statement. - * The parameters to this method should be the list column names to be selected. - * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). - */ - select(...cols: string[]): (SelectQuery | undefined) - } - interface OciBuilder { - /** - * Model returns a new ModelQuery object that can be used to perform model-based DB operations. - * The model passed to this method should be a pointer to a model struct. - */ - model(model: { - }): (ModelQuery | undefined) - } - interface OciBuilder { - /** - * GeneratePlaceholder generates an anonymous parameter placeholder with the given parameter ID. - */ - generatePlaceholder(i: number): string - } - interface OciBuilder { - /** - * QueryBuilder returns the query builder supporting the current DB. - */ - queryBuilder(): QueryBuilder - } - interface OciBuilder { - /** - * DropIndex creates a Query that can be used to remove the named index from a table. - */ - dropIndex(table: string): (Query | undefined) - } - interface OciBuilder { - /** - * RenameTable creates a Query that can be used to rename a table. - */ - renameTable(oldName: string): (Query | undefined) - } - interface OciBuilder { - /** - * AlterColumn creates a Query that can be used to change the definition of a table column. - */ - alterColumn(table: string): (Query | undefined) - } - interface OciQueryBuilder { - /** - * BuildOrderByAndLimit generates the ORDER BY and LIMIT clauses. - */ - buildOrderByAndLimit(sql: string, cols: Array, limit: number, offset: number): string - } - /** - * PgsqlBuilder is the builder for PostgreSQL databases. - */ - type _subBmcvR = BaseBuilder - interface PgsqlBuilder extends _subBmcvR { - } - interface newPgsqlBuilder { - /** - * NewPgsqlBuilder creates a new PgsqlBuilder instance. - */ - (db: DB, executor: Executor): Builder - } - interface PgsqlBuilder { - /** - * Select returns a new SelectQuery object that can be used to build a SELECT statement. - * The parameters to this method should be the list column names to be selected. - * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). - */ - select(...cols: string[]): (SelectQuery | undefined) - } - interface PgsqlBuilder { - /** - * Model returns a new ModelQuery object that can be used to perform model-based DB operations. - * The model passed to this method should be a pointer to a model struct. - */ - model(model: { - }): (ModelQuery | undefined) - } - interface PgsqlBuilder { - /** - * GeneratePlaceholder generates an anonymous parameter placeholder with the given parameter ID. - */ - generatePlaceholder(i: number): string - } - interface PgsqlBuilder { - /** - * QueryBuilder returns the query builder supporting the current DB. - */ - queryBuilder(): QueryBuilder - } - interface PgsqlBuilder { - /** - * Upsert creates a Query that represents an UPSERT SQL statement. - * Upsert inserts a row into the table if the primary key or unique index is not found. - * Otherwise it will update the row with the new values. - * The keys of cols are the column names, while the values of cols are the corresponding column - * values to be inserted. - */ - upsert(table: string, cols: Params, ...constraints: string[]): (Query | undefined) - } - interface PgsqlBuilder { - /** - * DropIndex creates a Query that can be used to remove the named index from a table. - */ - dropIndex(table: string): (Query | undefined) - } - interface PgsqlBuilder { - /** - * RenameTable creates a Query that can be used to rename a table. - */ - renameTable(oldName: string): (Query | undefined) - } - interface PgsqlBuilder { - /** - * AlterColumn creates a Query that can be used to change the definition of a table column. - */ - alterColumn(table: string): (Query | undefined) - } - /** - * SqliteBuilder is the builder for SQLite databases. - */ - type _subIvgID = BaseBuilder - interface SqliteBuilder extends _subIvgID { - } - interface newSqliteBuilder { - /** - * NewSqliteBuilder creates a new SqliteBuilder instance. - */ - (db: DB, executor: Executor): Builder - } - interface SqliteBuilder { - /** - * QueryBuilder returns the query builder supporting the current DB. - */ - queryBuilder(): QueryBuilder - } - interface SqliteBuilder { - /** - * Select returns a new SelectQuery object that can be used to build a SELECT statement. - * The parameters to this method should be the list column names to be selected. - * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). - */ - select(...cols: string[]): (SelectQuery | undefined) - } - interface SqliteBuilder { - /** - * Model returns a new ModelQuery object that can be used to perform model-based DB operations. - * The model passed to this method should be a pointer to a model struct. - */ - model(model: { - }): (ModelQuery | undefined) - } - interface SqliteBuilder { - /** - * QuoteSimpleTableName quotes a simple table name. - * A simple table name does not contain any schema prefix. - */ - quoteSimpleTableName(s: string): string - } - interface SqliteBuilder { - /** - * QuoteSimpleColumnName quotes a simple column name. - * A simple column name does not contain any table prefix. - */ - quoteSimpleColumnName(s: string): string - } - interface SqliteBuilder { - /** - * DropIndex creates a Query that can be used to remove the named index from a table. - */ - dropIndex(table: string): (Query | undefined) - } - interface SqliteBuilder { - /** - * TruncateTable creates a Query that can be used to truncate a table. - */ - truncateTable(table: string): (Query | undefined) - } - interface SqliteBuilder { - /** - * RenameTable creates a Query that can be used to rename a table. - */ - renameTable(oldName: string): (Query | undefined) - } - interface SqliteBuilder { - /** - * AlterColumn creates a Query that can be used to change the definition of a table column. - */ - alterColumn(table: string): (Query | undefined) - } - interface SqliteBuilder { - /** - * AddPrimaryKey creates a Query that can be used to specify primary key(s) for a table. - * The "name" parameter specifies the name of the primary key constraint. - */ - addPrimaryKey(table: string, ...cols: string[]): (Query | undefined) - } - interface SqliteBuilder { - /** - * DropPrimaryKey creates a Query that can be used to remove the named primary key constraint from a table. - */ - dropPrimaryKey(table: string): (Query | undefined) - } - interface SqliteBuilder { - /** - * AddForeignKey creates a Query that can be used to add a foreign key constraint to a table. - * The length of cols and refCols must be the same as they refer to the primary and referential columns. - * The optional "options" parameters will be appended to the SQL statement. They can be used to - * specify options such as "ON DELETE CASCADE". - */ - addForeignKey(table: string, cols: Array, refTable: string, ...options: string[]): (Query | undefined) - } - interface SqliteBuilder { - /** - * DropForeignKey creates a Query that can be used to remove the named foreign key constraint from a table. - */ - dropForeignKey(table: string): (Query | undefined) - } - /** - * StandardBuilder is the builder that is used by DB for an unknown driver. - */ - type _subUEOmd = BaseBuilder - interface StandardBuilder extends _subUEOmd { - } - interface newStandardBuilder { - /** - * NewStandardBuilder creates a new StandardBuilder instance. - */ - (db: DB, executor: Executor): Builder - } - interface StandardBuilder { - /** - * QueryBuilder returns the query builder supporting the current DB. - */ - queryBuilder(): QueryBuilder - } - interface StandardBuilder { - /** - * Select returns a new SelectQuery object that can be used to build a SELECT statement. - * The parameters to this method should be the list column names to be selected. - * A column name may have an optional alias name. For example, Select("id", "my_name AS name"). - */ - select(...cols: string[]): (SelectQuery | undefined) - } - interface StandardBuilder { - /** - * Model returns a new ModelQuery object that can be used to perform model-based DB operations. - * The model passed to this method should be a pointer to a model struct. - */ - model(model: { - }): (ModelQuery | undefined) - } - /** - * LogFunc logs a message for each SQL statement being executed. - * This method takes one or multiple parameters. If a single parameter - * is provided, it will be treated as the log message. If multiple parameters - * are provided, they will be passed to fmt.Sprintf() to generate the log message. - */ - interface LogFunc {(format: string, ...a: { - }[]): void } - /** - * PerfFunc is called when a query finishes execution. - * The query execution time is passed to this function so that the DB performance - * can be profiled. The "ns" parameter gives the number of nanoseconds that the - * SQL statement takes to execute, while the "execute" parameter indicates whether - * the SQL statement is executed or queried (usually SELECT statements). - */ - interface PerfFunc {(ns: number, sql: string, execute: boolean): void } - /** - * QueryLogFunc is called each time when performing a SQL query. - * The "t" parameter gives the time that the SQL statement takes to execute, - * while rows and err are the result of the query. - */ - interface QueryLogFunc {(ctx: context.Context, t: time.Duration, sql: string, rows: sql.Rows, err: Error): void } - /** - * ExecLogFunc is called each time when a SQL statement is executed. - * The "t" parameter gives the time that the SQL statement takes to execute, - * while result and err refer to the result of the execution. - */ - interface ExecLogFunc {(ctx: context.Context, t: time.Duration, sql: string, result: sql.Result, err: Error): void } - /** - * BuilderFunc creates a Builder instance using the given DB instance and Executor. - */ - interface BuilderFunc {(_arg0: DB, _arg1: Executor): Builder } - /** - * DB enhances sql.DB by providing a set of DB-agnostic query building methods. - * DB allows easier query building and population of data into Go variables. - */ - type _subqRxar = Builder - interface DB extends _subqRxar { - /** - * FieldMapper maps struct fields to DB columns. Defaults to DefaultFieldMapFunc. - */ - fieldMapper: FieldMapFunc - /** - * TableMapper maps structs to table names. Defaults to GetTableName. - */ - tableMapper: TableMapFunc - /** - * LogFunc logs the SQL statements being executed. Defaults to nil, meaning no logging. - */ - logFunc: LogFunc - /** - * PerfFunc logs the SQL execution time. Defaults to nil, meaning no performance profiling. - * Deprecated: Please use QueryLogFunc and ExecLogFunc instead. - */ - perfFunc: PerfFunc - /** - * QueryLogFunc is called each time when performing a SQL query that returns data. - */ - queryLogFunc: QueryLogFunc - /** - * ExecLogFunc is called each time when a SQL statement is executed. - */ - execLogFunc: ExecLogFunc - } - /** - * Errors represents a list of errors. - */ - interface Errors extends Array{} - interface newFromDB { - /** - * NewFromDB encapsulates an existing database connection. - */ - (sqlDB: sql.DB, driverName: string): (DB | undefined) - } - interface open { - /** - * Open opens a database specified by a driver name and data source name (DSN). - * Note that Open does not check if DSN is specified correctly. It doesn't try to establish a DB connection either. - * Please refer to sql.Open() for more information. - */ - (driverName: string): (DB | undefined) - } - interface mustOpen { - /** - * MustOpen opens a database and establishes a connection to it. - * Please refer to sql.Open() and sql.Ping() for more information. - */ - (driverName: string): (DB | undefined) - } - interface DB { - /** - * Clone makes a shallow copy of DB. - */ - clone(): (DB | undefined) - } - interface DB { - /** - * WithContext returns a new instance of DB associated with the given context. - */ - withContext(ctx: context.Context): (DB | undefined) - } - interface DB { - /** - * Context returns the context associated with the DB instance. - * It returns nil if no context is associated. - */ - context(): context.Context - } - interface DB { - /** - * DB returns the sql.DB instance encapsulated by dbx.DB. - */ - db(): (sql.DB | undefined) - } - interface DB { - /** - * Close closes the database, releasing any open resources. - * It is rare to Close a DB, as the DB handle is meant to be - * long-lived and shared between many goroutines. - */ - close(): void - } - interface DB { - /** - * Begin starts a transaction. - */ - begin(): (Tx | undefined) - } - interface DB { - /** - * BeginTx starts a transaction with the given context and transaction options. - */ - beginTx(ctx: context.Context, opts: sql.TxOptions): (Tx | undefined) - } - interface DB { - /** - * Wrap encapsulates an existing transaction. - */ - wrap(sqlTx: sql.Tx): (Tx | undefined) - } - interface DB { - /** - * Transactional starts a transaction and executes the given function. - * If the function returns an error, the transaction will be rolled back. - * Otherwise, the transaction will be committed. - */ - transactional(f: (_arg0: Tx) => void): void - } - interface DB { - /** - * TransactionalContext starts a transaction and executes the given function with the given context and transaction options. - * If the function returns an error, the transaction will be rolled back. - * Otherwise, the transaction will be committed. - */ - transactionalContext(ctx: context.Context, opts: sql.TxOptions, f: (_arg0: Tx) => void): void - } - interface DB { - /** - * DriverName returns the name of the DB driver. - */ - driverName(): string - } - interface DB { - /** - * QuoteTableName quotes the given table name appropriately. - * If the table name contains DB schema prefix, it will be handled accordingly. - * This method will do nothing if the table name is already quoted or if it contains parenthesis. - */ - quoteTableName(s: string): string - } - interface DB { - /** - * QuoteColumnName quotes the given column name appropriately. - * If the table name contains table name prefix, it will be handled accordingly. - * This method will do nothing if the column name is already quoted or if it contains parenthesis. - */ - quoteColumnName(s: string): string - } - interface Errors { - /** - * Error returns the error string of Errors. - */ - error(): string - } - /** - * Expression represents a DB expression that can be embedded in a SQL statement. - */ - interface Expression { - [key:string]: any; - /** - * Build converts an expression into a SQL fragment. - * If the expression contains binding parameters, they will be added to the given Params. - */ - build(_arg0: DB, _arg1: Params): string - } - /** - * HashExp represents a hash expression. - * - * A hash expression is a map whose keys are DB column names which need to be filtered according - * to the corresponding values. For example, HashExp{"level": 2, "dept": 10} will generate - * the SQL: "level"=2 AND "dept"=10. - * - * HashExp also handles nil values and slice values. For example, HashExp{"level": []interface{}{1, 2}, "dept": nil} - * will generate: "level" IN (1, 2) AND "dept" IS NULL. - */ - interface HashExp extends _TygojaDict{} - interface newExp { - /** - * NewExp generates an expression with the specified SQL fragment and the optional binding parameters. - */ - (e: string, ...params: Params[]): Expression - } - interface not { - /** - * Not generates a NOT expression which prefixes "NOT" to the specified expression. - */ - (e: Expression): Expression - } - interface and { - /** - * And generates an AND expression which concatenates the given expressions with "AND". - */ - (...exps: Expression[]): Expression - } - interface or { - /** - * Or generates an OR expression which concatenates the given expressions with "OR". - */ - (...exps: Expression[]): Expression - } - interface _in { - /** - * In generates an IN expression for the specified column and the list of allowed values. - * If values is empty, a SQL "0=1" will be generated which represents a false expression. - */ - (col: string, ...values: { - }[]): Expression - } - interface notIn { - /** - * NotIn generates an NOT IN expression for the specified column and the list of disallowed values. - * If values is empty, an empty string will be returned indicating a true expression. - */ - (col: string, ...values: { - }[]): Expression - } - interface like { - /** - * Like generates a LIKE expression for the specified column and the possible strings that the column should be like. - * If multiple values are present, the column should be like *all* of them. For example, Like("name", "key", "word") - * will generate a SQL expression: "name" LIKE "%key%" AND "name" LIKE "%word%". - * - * By default, each value will be surrounded by "%" to enable partial matching. If a value contains special characters - * such as "%", "\", "_", they will also be properly escaped. - * - * You may call Escape() and/or Match() to change the default behavior. For example, Like("name", "key").Match(false, true) - * generates "name" LIKE "key%". - */ - (col: string, ...values: string[]): (LikeExp | undefined) - } - interface notLike { - /** - * NotLike generates a NOT LIKE expression. - * For example, NotLike("name", "key", "word") will generate a SQL expression: - * "name" NOT LIKE "%key%" AND "name" NOT LIKE "%word%". Please see Like() for more details. - */ - (col: string, ...values: string[]): (LikeExp | undefined) - } - interface orLike { - /** - * OrLike generates an OR LIKE expression. - * This is similar to Like() except that the column should be like one of the possible values. - * For example, OrLike("name", "key", "word") will generate a SQL expression: - * "name" LIKE "%key%" OR "name" LIKE "%word%". Please see Like() for more details. - */ - (col: string, ...values: string[]): (LikeExp | undefined) - } - interface orNotLike { - /** - * OrNotLike generates an OR NOT LIKE expression. - * For example, OrNotLike("name", "key", "word") will generate a SQL expression: - * "name" NOT LIKE "%key%" OR "name" NOT LIKE "%word%". Please see Like() for more details. - */ - (col: string, ...values: string[]): (LikeExp | undefined) - } - interface exists { - /** - * Exists generates an EXISTS expression by prefixing "EXISTS" to the given expression. - */ - (exp: Expression): Expression - } - interface notExists { - /** - * NotExists generates an EXISTS expression by prefixing "NOT EXISTS" to the given expression. - */ - (exp: Expression): Expression - } - interface between { - /** - * Between generates a BETWEEN expression. - * For example, Between("age", 10, 30) generates: "age" BETWEEN 10 AND 30 - */ - (col: string, from: { - }): Expression - } - interface notBetween { - /** - * NotBetween generates a NOT BETWEEN expression. - * For example, NotBetween("age", 10, 30) generates: "age" NOT BETWEEN 10 AND 30 - */ - (col: string, from: { - }): Expression - } - /** - * Exp represents an expression with a SQL fragment and a list of optional binding parameters. - */ - interface Exp { - } - interface Exp { - /** - * Build converts an expression into a SQL fragment. - */ - build(db: DB, params: Params): string - } - interface HashExp { - /** - * Build converts an expression into a SQL fragment. - */ - build(db: DB, params: Params): string - } - /** - * NotExp represents an expression that should prefix "NOT" to a specified expression. - */ - interface NotExp { - } - interface NotExp { - /** - * Build converts an expression into a SQL fragment. - */ - build(db: DB, params: Params): string - } - /** - * AndOrExp represents an expression that concatenates multiple expressions using either "AND" or "OR". - */ - interface AndOrExp { - } - interface AndOrExp { - /** - * Build converts an expression into a SQL fragment. - */ - build(db: DB, params: Params): string - } - /** - * InExp represents an "IN" or "NOT IN" expression. - */ - interface InExp { - } - interface InExp { - /** - * Build converts an expression into a SQL fragment. - */ - build(db: DB, params: Params): string - } - /** - * LikeExp represents a variant of LIKE expressions. - */ - interface LikeExp { - /** - * Like stores the LIKE operator. It can be "LIKE", "NOT LIKE". - * It may also be customized as something like "ILIKE". - */ - like: string - } - interface LikeExp { - /** - * Escape specifies how a LIKE expression should be escaped. - * Each string at position 2i represents a special character and the string at position 2i+1 is - * the corresponding escaped version. - */ - escape(...chars: string[]): (LikeExp | undefined) - } - interface LikeExp { - /** - * Match specifies whether to do wildcard matching on the left and/or right of given strings. - */ - match(left: boolean): (LikeExp | undefined) - } - interface LikeExp { - /** - * Build converts an expression into a SQL fragment. - */ - build(db: DB, params: Params): string - } - /** - * ExistsExp represents an EXISTS or NOT EXISTS expression. - */ - interface ExistsExp { - } - interface ExistsExp { - /** - * Build converts an expression into a SQL fragment. - */ - build(db: DB, params: Params): string - } - /** - * BetweenExp represents a BETWEEN or a NOT BETWEEN expression. - */ - interface BetweenExp { - } - interface BetweenExp { - /** - * Build converts an expression into a SQL fragment. - */ - build(db: DB, params: Params): string - } - interface enclose { - /** - * Enclose surrounds the provided nonempty expression with parenthesis "()". - */ - (exp: Expression): Expression - } - /** - * EncloseExp represents a parenthesis enclosed expression. - */ - interface EncloseExp { - } - interface EncloseExp { - /** - * Build converts an expression into a SQL fragment. - */ - build(db: DB, params: Params): string - } - /** - * TableModel is the interface that should be implemented by models which have unconventional table names. - */ - interface TableModel { - [key:string]: any; - tableName(): string - } - /** - * ModelQuery represents a query associated with a struct model. - */ - interface ModelQuery { - } - interface newModelQuery { - (model: { - }, fieldMapFunc: FieldMapFunc, db: DB, builder: Builder): (ModelQuery | undefined) - } - interface ModelQuery { - /** - * Context returns the context associated with the query. - */ - context(): context.Context - } - interface ModelQuery { - /** - * WithContext associates a context with the query. - */ - withContext(ctx: context.Context): (ModelQuery | undefined) - } - interface ModelQuery { - /** - * Exclude excludes the specified struct fields from being inserted/updated into the DB table. - */ - exclude(...attrs: string[]): (ModelQuery | undefined) - } - interface ModelQuery { - /** - * Insert inserts a row in the table using the struct model associated with this query. - * - * By default, it inserts *all* public fields into the table, including those nil or empty ones. - * You may pass a list of the fields to this method to indicate that only those fields should be inserted. - * You may also call Exclude to exclude some fields from being inserted. - * - * If a model has an empty primary key, it is considered auto-incremental and the corresponding struct - * field will be filled with the generated primary key value after a successful insertion. - */ - insert(...attrs: string[]): void - } - interface ModelQuery { - /** - * Update updates a row in the table using the struct model associated with this query. - * The row being updated has the same primary key as specified by the model. - * - * By default, it updates *all* public fields in the table, including those nil or empty ones. - * You may pass a list of the fields to this method to indicate that only those fields should be updated. - * You may also call Exclude to exclude some fields from being updated. - */ - update(...attrs: string[]): void - } - interface ModelQuery { - /** - * Delete deletes a row in the table using the primary key specified by the struct model associated with this query. - */ - delete(): void - } - /** - * ExecHookFunc executes before op allowing custom handling like auto fail/retry. - */ - interface ExecHookFunc {(q: Query, op: () => void): void } - /** - * OneHookFunc executes right before the query populate the row result from One() call (aka. op). - */ - interface OneHookFunc {(q: Query, a: { - }, op: (b: { - }) => void): void } - /** - * AllHookFunc executes right before the query populate the row result from All() call (aka. op). - */ - interface AllHookFunc {(q: Query, sliceA: { - }, op: (sliceB: { - }) => void): void } - /** - * Params represents a list of parameter values to be bound to a SQL statement. - * The map keys are the parameter names while the map values are the corresponding parameter values. - */ - interface Params extends _TygojaDict{} - /** - * Executor prepares, executes, or queries a SQL statement. - */ - interface Executor { - [key:string]: any; - /** - * Exec executes a SQL statement - */ - exec(query: string, ...args: { - }[]): sql.Result - /** - * ExecContext executes a SQL statement with the given context - */ - execContext(ctx: context.Context, query: string, ...args: { - }[]): sql.Result - /** - * Query queries a SQL statement - */ - query(query: string, ...args: { - }[]): (sql.Rows | undefined) - /** - * QueryContext queries a SQL statement with the given context - */ - queryContext(ctx: context.Context, query: string, ...args: { - }[]): (sql.Rows | undefined) - /** - * Prepare creates a prepared statement - */ - prepare(query: string): (sql.Stmt | undefined) - } - /** - * Query represents a SQL statement to be executed. - */ - interface Query { - /** - * FieldMapper maps struct field names to DB column names. - */ - fieldMapper: FieldMapFunc - /** - * LastError contains the last error (if any) of the query. - * LastError is cleared by Execute(), Row(), Rows(), One(), and All(). - */ - lastError: Error - /** - * LogFunc is used to log the SQL statement being executed. - */ - logFunc: LogFunc - /** - * PerfFunc is used to log the SQL execution time. It is ignored if nil. - * Deprecated: Please use QueryLogFunc and ExecLogFunc instead. - */ - perfFunc: PerfFunc - /** - * QueryLogFunc is called each time when performing a SQL query that returns data. - */ - queryLogFunc: QueryLogFunc - /** - * ExecLogFunc is called each time when a SQL statement is executed. - */ - execLogFunc: ExecLogFunc - } - interface newQuery { - /** - * NewQuery creates a new Query with the given SQL statement. - */ - (db: DB, executor: Executor, sql: string): (Query | undefined) - } - interface Query { - /** - * SQL returns the original SQL used to create the query. - * The actual SQL (RawSQL) being executed is obtained by replacing the named - * parameter placeholders with anonymous ones. - */ - sql(): string - } - interface Query { - /** - * Context returns the context associated with the query. - */ - context(): context.Context - } - interface Query { - /** - * WithContext associates a context with the query. - */ - withContext(ctx: context.Context): (Query | undefined) - } - interface Query { - /** - * WithExecHook associates the provided exec hook function with the query. - * - * It is called for every Query resolver (Execute(), One(), All(), Row(), Column()), - * allowing you to implement auto fail/retry or any other additional handling. - */ - withExecHook(fn: ExecHookFunc): (Query | undefined) - } - interface Query { - /** - * WithOneHook associates the provided hook function with the query, - * called on q.One(), allowing you to implement custom struct scan based - * on the One() argument and/or result. - */ - withOneHook(fn: OneHookFunc): (Query | undefined) - } - interface Query { - /** - * WithOneHook associates the provided hook function with the query, - * called on q.All(), allowing you to implement custom slice scan based - * on the All() argument and/or result. - */ - withAllHook(fn: AllHookFunc): (Query | undefined) - } - interface Query { - /** - * Params returns the parameters to be bound to the SQL statement represented by this query. - */ - params(): Params - } - interface Query { - /** - * Prepare creates a prepared statement for later queries or executions. - * Close() should be called after finishing all queries. - */ - prepare(): (Query | undefined) - } - interface Query { - /** - * Close closes the underlying prepared statement. - * Close does nothing if the query has not been prepared before. - */ - close(): void - } - interface Query { - /** - * Bind sets the parameters that should be bound to the SQL statement. - * The parameter placeholders in the SQL statement are in the format of "{:ParamName}". - */ - bind(params: Params): (Query | undefined) - } - interface Query { - /** - * Execute executes the SQL statement without retrieving data. - */ - execute(): sql.Result - } - interface Query { - /** - * One executes the SQL statement and populates the first row of the result into a struct or NullStringMap. - * Refer to Rows.ScanStruct() and Rows.ScanMap() for more details on how to specify - * the variable to be populated. - * Note that when the query has no rows in the result set, an sql.ErrNoRows will be returned. - */ - one(a: { - }): void - } - interface Query { - /** - * All executes the SQL statement and populates all the resulting rows into a slice of struct or NullStringMap. - * The slice must be given as a pointer. Each slice element must be either a struct or a NullStringMap. - * Refer to Rows.ScanStruct() and Rows.ScanMap() for more details on how each slice element can be. - * If the query returns no row, the slice will be an empty slice (not nil). - */ - all(slice: { - }): void - } - interface Query { - /** - * Row executes the SQL statement and populates the first row of the result into a list of variables. - * Note that the number of the variables should match to that of the columns in the query result. - * Note that when the query has no rows in the result set, an sql.ErrNoRows will be returned. - */ - row(...a: { - }[]): void - } - interface Query { - /** - * Column executes the SQL statement and populates the first column of the result into a slice. - * Note that the parameter must be a pointer to a slice. - */ - column(a: { - }): void - } - interface Query { - /** - * Rows executes the SQL statement and returns a Rows object to allow retrieving data row by row. - */ - rows(): (Rows | undefined) - } - /** - * QueryBuilder builds different clauses for a SELECT SQL statement. - */ - interface QueryBuilder { - [key:string]: any; - /** - * BuildSelect generates a SELECT clause from the given selected column names. - */ - buildSelect(cols: Array, distinct: boolean, option: string): string - /** - * BuildFrom generates a FROM clause from the given tables. - */ - buildFrom(tables: Array): string - /** - * BuildGroupBy generates a GROUP BY clause from the given group-by columns. - */ - buildGroupBy(cols: Array): string - /** - * BuildJoin generates a JOIN clause from the given join information. - */ - buildJoin(_arg0: Array, _arg1: Params): string - /** - * BuildWhere generates a WHERE clause from the given expression. - */ - buildWhere(_arg0: Expression, _arg1: Params): string - /** - * BuildHaving generates a HAVING clause from the given expression. - */ - buildHaving(_arg0: Expression, _arg1: Params): string - /** - * BuildOrderByAndLimit generates the ORDER BY and LIMIT clauses. - */ - buildOrderByAndLimit(_arg0: string, _arg1: Array, _arg2: number, _arg3: number): string - /** - * BuildUnion generates a UNION clause from the given union information. - */ - buildUnion(_arg0: Array, _arg1: Params): string - } - /** - * BaseQueryBuilder provides a basic implementation of QueryBuilder. - */ - interface BaseQueryBuilder { - } - interface newBaseQueryBuilder { - /** - * NewBaseQueryBuilder creates a new BaseQueryBuilder instance. - */ - (db: DB): (BaseQueryBuilder | undefined) - } - interface BaseQueryBuilder { - /** - * DB returns the DB instance associated with the query builder. - */ - db(): (DB | undefined) - } - interface BaseQueryBuilder { - /** - * BuildSelect generates a SELECT clause from the given selected column names. - */ - buildSelect(cols: Array, distinct: boolean, option: string): string - } - interface BaseQueryBuilder { - /** - * BuildFrom generates a FROM clause from the given tables. - */ - buildFrom(tables: Array): string - } - interface BaseQueryBuilder { - /** - * BuildJoin generates a JOIN clause from the given join information. - */ - buildJoin(joins: Array, params: Params): string - } - interface BaseQueryBuilder { - /** - * BuildWhere generates a WHERE clause from the given expression. - */ - buildWhere(e: Expression, params: Params): string - } - interface BaseQueryBuilder { - /** - * BuildHaving generates a HAVING clause from the given expression. - */ - buildHaving(e: Expression, params: Params): string - } - interface BaseQueryBuilder { - /** - * BuildGroupBy generates a GROUP BY clause from the given group-by columns. - */ - buildGroupBy(cols: Array): string - } - interface BaseQueryBuilder { - /** - * BuildOrderByAndLimit generates the ORDER BY and LIMIT clauses. - */ - buildOrderByAndLimit(sql: string, cols: Array, limit: number, offset: number): string - } - interface BaseQueryBuilder { - /** - * BuildUnion generates a UNION clause from the given union information. - */ - buildUnion(unions: Array, params: Params): string - } - interface BaseQueryBuilder { - /** - * BuildOrderBy generates the ORDER BY clause. - */ - buildOrderBy(cols: Array): string - } - interface BaseQueryBuilder { - /** - * BuildLimit generates the LIMIT clause. - */ - buildLimit(limit: number, offset: number): string - } - /** - * VarTypeError indicates a variable type error when trying to populating a variable with DB result. - */ - interface VarTypeError extends String{} - interface VarTypeError { - /** - * Error returns the error message. - */ - error(): string - } - /** - * NullStringMap is a map of sql.NullString that can be used to hold DB query result. - * The map keys correspond to the DB column names, while the map values are their corresponding column values. - */ - interface NullStringMap extends _TygojaDict{} - /** - * Rows enhances sql.Rows by providing additional data query methods. - * Rows can be obtained by calling Query.Rows(). It is mainly used to populate data row by row. - */ - type _subnrUVn = sql.Rows - interface Rows extends _subnrUVn { - } - interface Rows { - /** - * ScanMap populates the current row of data into a NullStringMap. - * Note that the NullStringMap must not be nil, or it will panic. - * The NullStringMap will be populated using column names as keys and their values as - * the corresponding element values. - */ - scanMap(a: NullStringMap): void - } - interface Rows { - /** - * ScanStruct populates the current row of data into a struct. - * The struct must be given as a pointer. - * - * ScanStruct associates struct fields with DB table columns through a field mapping function. - * It populates a struct field with the data of its associated column. - * Note that only exported struct fields will be populated. - * - * By default, DefaultFieldMapFunc() is used to map struct fields to table columns. - * This function separates each word in a field name with a underscore and turns every letter into lower case. - * For example, "LastName" is mapped to "last_name", "MyID" is mapped to "my_id", and so on. - * To change the default behavior, set DB.FieldMapper with your custom mapping function. - * You may also set Query.FieldMapper to change the behavior for particular queries. - */ - scanStruct(a: { - }): void - } - /** - * BuildHookFunc defines a callback function that is executed on Query creation. - */ - interface BuildHookFunc {(q: Query): void } - /** - * SelectQuery represents a DB-agnostic SELECT query. - * It can be built into a DB-specific query by calling the Build() method. - */ - interface SelectQuery { - /** - * FieldMapper maps struct field names to DB column names. - */ - fieldMapper: FieldMapFunc - /** - * TableMapper maps structs to DB table names. - */ - tableMapper: TableMapFunc - } - /** - * JoinInfo contains the specification for a JOIN clause. - */ - interface JoinInfo { - join: string - table: string - on: Expression - } - /** - * UnionInfo contains the specification for a UNION clause. - */ - interface UnionInfo { - all: boolean - query?: Query - } - interface newSelectQuery { - /** - * NewSelectQuery creates a new SelectQuery instance. - */ - (builder: Builder, db: DB): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * WithBuildHook runs the provided hook function with the query created on Build(). - */ - withBuildHook(fn: BuildHookFunc): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Context returns the context associated with the query. - */ - context(): context.Context - } - interface SelectQuery { - /** - * WithContext associates a context with the query. - */ - withContext(ctx: context.Context): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Select specifies the columns to be selected. - * Column names will be automatically quoted. - */ - select(...cols: string[]): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * AndSelect adds additional columns to be selected. - * Column names will be automatically quoted. - */ - andSelect(...cols: string[]): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Distinct specifies whether to select columns distinctively. - * By default, distinct is false. - */ - distinct(v: boolean): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * SelectOption specifies additional option that should be append to "SELECT". - */ - selectOption(option: string): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * From specifies which tables to select from. - * Table names will be automatically quoted. - */ - from(...tables: string[]): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Where specifies the WHERE condition. - */ - where(e: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * AndWhere concatenates a new WHERE condition with the existing one (if any) using "AND". - */ - andWhere(e: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * OrWhere concatenates a new WHERE condition with the existing one (if any) using "OR". - */ - orWhere(e: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Join specifies a JOIN clause. - * The "typ" parameter specifies the JOIN type (e.g. "INNER JOIN", "LEFT JOIN"). - */ - join(typ: string, table: string, on: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * InnerJoin specifies an INNER JOIN clause. - * This is a shortcut method for Join. - */ - innerJoin(table: string, on: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * LeftJoin specifies a LEFT JOIN clause. - * This is a shortcut method for Join. - */ - leftJoin(table: string, on: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * RightJoin specifies a RIGHT JOIN clause. - * This is a shortcut method for Join. - */ - rightJoin(table: string, on: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * OrderBy specifies the ORDER BY clause. - * Column names will be properly quoted. A column name can contain "ASC" or "DESC" to indicate its ordering direction. - */ - orderBy(...cols: string[]): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * AndOrderBy appends additional columns to the existing ORDER BY clause. - * Column names will be properly quoted. A column name can contain "ASC" or "DESC" to indicate its ordering direction. - */ - andOrderBy(...cols: string[]): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * GroupBy specifies the GROUP BY clause. - * Column names will be properly quoted. - */ - groupBy(...cols: string[]): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * AndGroupBy appends additional columns to the existing GROUP BY clause. - * Column names will be properly quoted. - */ - andGroupBy(...cols: string[]): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Having specifies the HAVING clause. - */ - having(e: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * AndHaving concatenates a new HAVING condition with the existing one (if any) using "AND". - */ - andHaving(e: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * OrHaving concatenates a new HAVING condition with the existing one (if any) using "OR". - */ - orHaving(e: Expression): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Union specifies a UNION clause. - */ - union(q: Query): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * UnionAll specifies a UNION ALL clause. - */ - unionAll(q: Query): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Limit specifies the LIMIT clause. - * A negative limit means no limit. - */ - limit(limit: number): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Offset specifies the OFFSET clause. - * A negative offset means no offset. - */ - offset(offset: number): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Bind specifies the parameter values to be bound to the query. - */ - bind(params: Params): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * AndBind appends additional parameters to be bound to the query. - */ - andBind(params: Params): (SelectQuery | undefined) - } - interface SelectQuery { - /** - * Build builds the SELECT query and returns an executable Query object. - */ - build(): (Query | undefined) - } - interface SelectQuery { - /** - * One executes the SELECT query and populates the first row of the result into the specified variable. - * - * If the query does not specify a "from" clause, the method will try to infer the name of the table - * to be selected from by calling getTableName() which will return either the variable type name - * or the TableName() method if the variable implements the TableModel interface. - * - * Note that when the query has no rows in the result set, an sql.ErrNoRows will be returned. - */ - one(a: { - }): void - } - interface SelectQuery { - /** - * Model selects the row with the specified primary key and populates the model with the row data. - * - * The model variable should be a pointer to a struct. If the query does not specify a "from" clause, - * it will use the model struct to determine which table to select data from. It will also use the model - * to infer the name of the primary key column. Only simple primary key is supported. For composite primary keys, - * please use Where() to specify the filtering condition. - */ - model(pk: { - }): void - } - interface SelectQuery { - /** - * All executes the SELECT query and populates all rows of the result into a slice. - * - * Note that the slice must be passed in as a pointer. - * - * If the query does not specify a "from" clause, the method will try to infer the name of the table - * to be selected from by calling getTableName() which will return either the type name of the slice elements - * or the TableName() method if the slice element implements the TableModel interface. - */ - all(slice: { - }): void - } - interface SelectQuery { - /** - * Rows builds and executes the SELECT query and returns a Rows object for data retrieval purpose. - * This is a shortcut to SelectQuery.Build().Rows() - */ - rows(): (Rows | undefined) - } - interface SelectQuery { - /** - * Row builds and executes the SELECT query and populates the first row of the result into the specified variables. - * This is a shortcut to SelectQuery.Build().Row() - */ - row(...a: { - }[]): void - } - interface SelectQuery { - /** - * Column builds and executes the SELECT statement and populates the first column of the result into a slice. - * Note that the parameter must be a pointer to a slice. - * This is a shortcut to SelectQuery.Build().Column() - */ - column(a: { - }): void - } - /** - * QueryInfo represents a debug/info struct with exported SelectQuery fields. - */ - interface QueryInfo { - builder: Builder - selects: Array - distinct: boolean - selectOption: string - from: Array - where: Expression - join: Array - orderBy: Array - groupBy: Array - having: Expression - union: Array - limit: number - offset: number - params: Params - context: context.Context - buildHook: BuildHookFunc - } - interface SelectQuery { - /** - * Info exports common SelectQuery fields allowing to inspect the - * current select query options. - */ - info(): (QueryInfo | undefined) - } - /** - * FieldMapFunc converts a struct field name into a DB column name. - */ - interface FieldMapFunc {(_arg0: string): string } - /** - * TableMapFunc converts a sample struct into a DB table name. - */ - interface TableMapFunc {(a: { - }): string } - interface structInfo { - } - type _subDJfPK = structInfo - interface structValue extends _subDJfPK { - } - interface fieldInfo { - } - interface structInfoMapKey { - } - /** - * PostScanner is an optional interface used by ScanStruct. - */ - interface PostScanner { - [key:string]: any; - /** - * PostScan executes right after the struct has been populated - * with the DB values, allowing you to further normalize or validate - * the loaded data. - */ - postScan(): void - } - interface defaultFieldMapFunc { - /** - * DefaultFieldMapFunc maps a field name to a DB column name. - * The mapping rule set by this method is that words in a field name will be separated by underscores - * and the name will be turned into lower case. For example, "FirstName" maps to "first_name", and "MyID" becomes "my_id". - * See DB.FieldMapper for more details. - */ - (f: string): string - } - interface getTableName { - /** - * GetTableName implements the default way of determining the table name corresponding to the given model struct - * or slice of structs. To get the actual table name for a model, you should use DB.TableMapFunc() instead. - * Do not call this method in a model's TableName() method because it will cause infinite loop. - */ - (a: { - }): string - } - /** - * Tx enhances sql.Tx with additional querying methods. - */ - type _subpLzUa = Builder - interface Tx extends _subpLzUa { - } - interface Tx { - /** - * Commit commits the transaction. - */ - commit(): void - } - interface Tx { - /** - * Rollback aborts the transaction. - */ - rollback(): void + (name: string, ...arg: string[]): (Cmd) } } @@ -4921,19 +4921,19 @@ namespace filesystem { /** * NewFileFromPath creates a new File instance from the provided local file path. */ - (path: string): (File | undefined) + (path: string): (File) } interface newFileFromBytes { /** * NewFileFromBytes creates a new File instance from the provided byte slice. */ - (b: string|Array, name: string): (File | undefined) + (b: string|Array, name: string): (File) } interface newFileFromMultipart { /** * NewFileFromMultipart creates a new File instace from the provided multipart header. */ - (mh: multipart.FileHeader): (File | undefined) + (mh: multipart.FileHeader): (File) } /** * MultipartReader defines a FileReader from [multipart.FileHeader]. @@ -4971,8 +4971,8 @@ namespace filesystem { */ open(): io.ReadSeekCloser } - type _subRLHUh = bytes.Reader - interface bytesReadSeekCloser extends _subRLHUh { + type _subKAeLY = bytes.Reader + interface bytesReadSeekCloser extends _subKAeLY { } interface bytesReadSeekCloser { /** @@ -4988,7 +4988,7 @@ namespace filesystem { * * NB! Make sure to call `Close()` after you are done working with it. */ - (bucketName: string, region: string, endpoint: string, accessKey: string, secretKey: string, s3ForcePathStyle: boolean): (System | undefined) + (bucketName: string, region: string, endpoint: string, accessKey: string, secretKey: string, s3ForcePathStyle: boolean): (System) } interface newLocal { /** @@ -4996,7 +4996,7 @@ namespace filesystem { * * NB! Make sure to call `Close()` after you are done working with it. */ - (dirPath: string): (System | undefined) + (dirPath: string): (System) } interface System { /** @@ -5020,7 +5020,7 @@ namespace filesystem { /** * Attributes returns the attributes for the file with fileKey path. */ - attributes(fileKey: string): (blob.Attributes | undefined) + attributes(fileKey: string): (blob.Attributes) } interface System { /** @@ -5028,7 +5028,7 @@ namespace filesystem { * * NB! Make sure to call `Close()` after you are done working with it. */ - getFile(fileKey: string): (blob.Reader | undefined) + getFile(fileKey: string): (blob.Reader) } interface System { /** @@ -5199,7 +5199,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp): (AdminLogin | undefined) + (app: CoreApp): (AdminLogin) } interface AdminLogin { /** @@ -5221,7 +5221,7 @@ namespace forms { * You can optionally provide a list of InterceptorFunc to * further modify the form behavior before persisting it. */ - submit(...interceptors: InterceptorFunc[]): (models.Admin | undefined) + submit(...interceptors: InterceptorFunc[]): (models.Admin) } /** * AdminPasswordResetConfirm is an admin password reset confirmation form. @@ -5239,7 +5239,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp): (AdminPasswordResetConfirm | undefined) + (app: CoreApp): (AdminPasswordResetConfirm) } interface AdminPasswordResetConfirm { /** @@ -5264,7 +5264,7 @@ namespace forms { * You can optionally provide a list of InterceptorFunc to further * modify the form behavior before persisting it. */ - submit(...interceptors: InterceptorFunc[]): (models.Admin | undefined) + submit(...interceptors: InterceptorFunc[]): (models.Admin) } /** * AdminPasswordResetRequest is an admin password reset request form. @@ -5280,7 +5280,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp): (AdminPasswordResetRequest | undefined) + (app: CoreApp): (AdminPasswordResetRequest) } interface AdminPasswordResetRequest { /** @@ -5325,7 +5325,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, admin: models.Admin): (AdminUpsert | undefined) + (app: CoreApp, admin: models.Admin): (AdminUpsert) } interface AdminUpsert { /** @@ -5384,7 +5384,7 @@ namespace forms { * NewAppleClientSecretCreate creates a new [AppleClientSecretCreate] form with initializer * config created from the provided [CoreApp] instances. */ - (app: CoreApp): (AppleClientSecretCreate | undefined) + (app: CoreApp): (AppleClientSecretCreate) } interface AppleClientSecretCreate { /** @@ -5408,7 +5408,7 @@ namespace forms { /** * NewBackupCreate creates new BackupCreate request form. */ - (app: CoreApp): (BackupCreate | undefined) + (app: CoreApp): (BackupCreate) } interface BackupCreate { /** @@ -5441,7 +5441,7 @@ namespace forms { /** * NewBackupUpload creates new BackupUpload request form. */ - (app: CoreApp): (BackupUpload | undefined) + (app: CoreApp): (BackupUpload) } interface BackupUpload { /** @@ -5500,7 +5500,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, collection: models.Collection): (CollectionUpsert | undefined) + (app: CoreApp, collection: models.Collection): (CollectionUpsert) } interface CollectionUpsert { /** @@ -5541,7 +5541,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp): (CollectionsImport | undefined) + (app: CoreApp): (CollectionsImport) } interface CollectionsImport { /** @@ -5582,7 +5582,7 @@ namespace forms { /** * NewRealtimeSubscribe creates new RealtimeSubscribe request form. */ - (): (RealtimeSubscribe | undefined) + (): (RealtimeSubscribe) } interface RealtimeSubscribe { /** @@ -5605,7 +5605,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, collection: models.Collection): (RecordEmailChangeConfirm | undefined) + (app: CoreApp, collection: models.Collection): (RecordEmailChangeConfirm) } interface RecordEmailChangeConfirm { /** @@ -5627,7 +5627,7 @@ namespace forms { * You can optionally provide a list of InterceptorFunc to * further modify the form behavior before persisting it. */ - submit(...interceptors: InterceptorFunc[]): (models.Record | undefined) + submit(...interceptors: InterceptorFunc[]): (models.Record) } /** * RecordEmailChangeRequest is an auth record email change request form. @@ -5643,7 +5643,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, record: models.Record): (RecordEmailChangeRequest | undefined) + (app: CoreApp, record: models.Record): (RecordEmailChangeRequest) } interface RecordEmailChangeRequest { /** @@ -5714,7 +5714,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, collection: models.Collection, optAuthRecord: models.Record): (RecordOAuth2Login | undefined) + (app: CoreApp, collection: models.Collection, optAuthRecord: models.Record): (RecordOAuth2Login) } interface RecordOAuth2Login { /** @@ -5747,7 +5747,7 @@ namespace forms { * * On success returns the authorized record model and the fetched provider's data. */ - submit(...interceptors: InterceptorFunc[]): [(models.Record | undefined), (auth.AuthUser | undefined)] + submit(...interceptors: InterceptorFunc[]): [(models.Record), (auth.AuthUser)] } /** * RecordPasswordLogin is record username/email + password login form. @@ -5764,7 +5764,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, collection: models.Collection): (RecordPasswordLogin | undefined) + (app: CoreApp, collection: models.Collection): (RecordPasswordLogin) } interface RecordPasswordLogin { /** @@ -5786,7 +5786,7 @@ namespace forms { * You can optionally provide a list of InterceptorFunc to * further modify the form behavior before persisting it. */ - submit(...interceptors: InterceptorFunc[]): (models.Record | undefined) + submit(...interceptors: InterceptorFunc[]): (models.Record) } /** * RecordPasswordResetConfirm is an auth record password reset confirmation form. @@ -5804,7 +5804,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, collection: models.Collection): (RecordPasswordResetConfirm | undefined) + (app: CoreApp, collection: models.Collection): (RecordPasswordResetConfirm) } interface RecordPasswordResetConfirm { /** @@ -5826,7 +5826,7 @@ namespace forms { * You can optionally provide a list of InterceptorFunc to further * modify the form behavior before persisting it. */ - submit(...interceptors: InterceptorFunc[]): (models.Record | undefined) + submit(...interceptors: InterceptorFunc[]): (models.Record) } /** * RecordPasswordResetRequest is an auth record reset password request form. @@ -5842,7 +5842,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, collection: models.Collection): (RecordPasswordResetRequest | undefined) + (app: CoreApp, collection: models.Collection): (RecordPasswordResetRequest) } interface RecordPasswordResetRequest { /** @@ -5897,7 +5897,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, record: models.Record): (RecordUpsert | undefined) + (app: CoreApp, record: models.Record): (RecordUpsert) } interface RecordUpsert { /** @@ -6027,7 +6027,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, collection: models.Collection): (RecordVerificationConfirm | undefined) + (app: CoreApp, collection: models.Collection): (RecordVerificationConfirm) } interface RecordVerificationConfirm { /** @@ -6049,7 +6049,7 @@ namespace forms { * You can optionally provide a list of InterceptorFunc to further * modify the form behavior before persisting it. */ - submit(...interceptors: InterceptorFunc[]): (models.Record | undefined) + submit(...interceptors: InterceptorFunc[]): (models.Record) } /** * RecordVerificationRequest is an auth record email verification request form. @@ -6065,7 +6065,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp, collection: models.Collection): (RecordVerificationRequest | undefined) + (app: CoreApp, collection: models.Collection): (RecordVerificationRequest) } interface RecordVerificationRequest { /** @@ -6094,8 +6094,8 @@ namespace forms { /** * SettingsUpsert is a [settings.Settings] upsert (create/update) form. */ - type _subWZUCb = settings.Settings - interface SettingsUpsert extends _subWZUCb { + type _subZMjdf = settings.Settings + interface SettingsUpsert extends _subZMjdf { } interface newSettingsUpsert { /** @@ -6105,7 +6105,7 @@ namespace forms { * If you want to submit the form as part of a transaction, * you can change the default Dao via [SetDao()]. */ - (app: CoreApp): (SettingsUpsert | undefined) + (app: CoreApp): (SettingsUpsert) } interface SettingsUpsert { /** @@ -6141,7 +6141,7 @@ namespace forms { /** * NewTestEmailSend creates and initializes new TestEmailSend form. */ - (app: CoreApp): (TestEmailSend | undefined) + (app: CoreApp): (TestEmailSend) } interface TestEmailSend { /** @@ -6168,7 +6168,7 @@ namespace forms { /** * NewTestS3Filesystem creates and initializes new TestS3Filesystem form. */ - (app: CoreApp): (TestS3Filesystem | undefined) + (app: CoreApp): (TestS3Filesystem) } interface TestS3Filesystem { /** @@ -6216,31 +6216,31 @@ namespace apis { /** * NewNotFoundError creates and returns 404 `ApiError`. */ - (message: string, data: any): (ApiError | undefined) + (message: string, data: any): (ApiError) } interface newBadRequestError { /** * NewBadRequestError creates and returns 400 `ApiError`. */ - (message: string, data: any): (ApiError | undefined) + (message: string, data: any): (ApiError) } interface newForbiddenError { /** * NewForbiddenError creates and returns 403 `ApiError`. */ - (message: string, data: any): (ApiError | undefined) + (message: string, data: any): (ApiError) } interface newUnauthorizedError { /** * NewUnauthorizedError creates and returns 401 `ApiError`. */ - (message: string, data: any): (ApiError | undefined) + (message: string, data: any): (ApiError) } interface newApiError { /** * NewApiError creates and returns new normalized `ApiError` instance. */ - (status: number, message: string, data: any): (ApiError | undefined) + (status: number, message: string, data: any): (ApiError) } interface backupApi { } @@ -6249,7 +6249,7 @@ namespace apis { * InitApi creates a configured echo instance with registered * system and app specific routes and middlewares. */ - (app: CoreApp): (echo.Echo | undefined) + (app: CoreApp): (echo.Echo) } interface staticDirectoryHandler { /** @@ -6415,14 +6415,14 @@ namespace apis { /** * Deprecated: Use RequestInfo instead. */ - (c: echo.Context): (models.RequestInfo | undefined) + (c: echo.Context): (models.RequestInfo) } interface requestInfo { /** * RequestInfo exports cached common request data fields * (query, body, logged auth state, etc.) from the provided context. */ - (c: echo.Context): (models.RequestInfo | undefined) + (c: echo.Context): (models.RequestInfo) } interface recordAuthResponse { /** @@ -6499,7 +6499,7 @@ namespace apis { * }) * ``` */ - (app: CoreApp, config: ServeConfig): (http.Server | undefined) + (app: CoreApp, config: ServeConfig): (http.Server) } interface migrationsConnection { db?: dbx.DB @@ -6509,12 +6509,117 @@ namespace apis { } } +/** + * Package template is a thin wrapper around the standard html/template + * and text/template packages that implements a convenient registry to + * load and cache templates on the fly concurrently. + * + * It was created to assist the JSVM plugin HTML rendering, but could be used in other Go code. + * + * Example: + * + * ``` + * registry := template.NewRegistry() + * + * html1, err := registry.LoadFiles( + * // the files set wil be parsed only once and then cached + * "layout.html", + * "content.html", + * ).Render(map[string]any{"name": "John"}) + * + * html2, err := registry.LoadFiles( + * // reuse the already parsed and cached files set + * "layout.html", + * "content.html", + * ).Render(map[string]any{"name": "Jane"}) + * ``` + */ +namespace template { + interface newRegistry { + /** + * NewRegistry creates and initializes a new templates registry with + * some defaults (eg. global "raw" template function for unescaped HTML). + * + * Use the Registry.Load* methods to load templates into the registry. + */ + (): (Registry) + } + /** + * Registry defines a templates registry that is safe to be used by multiple goroutines. + * + * Use the Registry.Load* methods to load templates into the registry. + */ + interface Registry { + } + interface Registry { + /** + * AddFuncs registers new global template functions. + * + * The key of each map entry is the function name that will be used in the templates. + * If a function with the map entry name already exists it will be replaced with the new one. + * + * The value of each map entry is a function that must have either a + * single return value, or two return values of which the second has type error. + * + * Example: + * + * r.AddFuncs(map[string]any{ + * ``` + * "toUpper": func(str string) string { + * return strings.ToUppser(str) + * }, + * ... + * ``` + * }) + */ + addFuncs(funcs: _TygojaDict): (Registry) + } + interface Registry { + /** + * LoadFiles caches (if not already) the specified filenames set as a + * single template and returns a ready to use Renderer instance. + * + * There must be at least 1 filename specified. + */ + loadFiles(...filenames: string[]): (Renderer) + } + interface Registry { + /** + * LoadString caches (if not already) the specified inline string as a + * single template and returns a ready to use Renderer instance. + */ + loadString(text: string): (Renderer) + } + interface Registry { + /** + * LoadFS caches (if not already) the specified fs and globPatterns + * pair as single template and returns a ready to use Renderer instance. + * + * There must be at least 1 file matching the provided globPattern(s) + * (note that most file names serves as glob patterns matching themselves). + */ + loadFS(fsys: fs.FS, ...globPatterns: string[]): (Renderer) + } + /** + * Renderer defines a single parsed template. + */ + interface Renderer { + } + interface Renderer { + /** + * Render executes the template with the specified data as the dot object + * and returns the result as plain string. + */ + render(data: any): string + } +} + namespace pocketbase { /** * appWrapper serves as a private CoreApp instance wrapper. */ - type _subUNtBI = CoreApp - interface appWrapper extends _subUNtBI { + type _subBFZCc = CoreApp + interface appWrapper extends _subBFZCc { } /** * PocketBase defines a PocketBase app launcher. @@ -6522,8 +6627,8 @@ namespace pocketbase { * It implements [CoreApp] via embedding and all of the app interface methods * could be accessed directly through the instance (eg. PocketBase.DataDir()). */ - type _subsKCvp = appWrapper - interface PocketBase extends _subsKCvp { + type _sublPkZd = appWrapper + interface PocketBase extends _sublPkZd { /** * RootCmd is the main console command */ @@ -6562,7 +6667,7 @@ namespace pocketbase { * If you want to initialize the application before calling [Start()], * then you'll have to manually call [Bootstrap()]. */ - (): (PocketBase | undefined) + (): (PocketBase) } interface newWithConfig { /** @@ -6574,7 +6679,7 @@ namespace pocketbase { * If you want to initialize the application before calling [Start()], * then you'll have to manually call [Bootstrap()]. */ - (config: Config): (PocketBase | undefined) + (config: Config): (PocketBase) } interface PocketBase { /** @@ -6596,107 +6701,156 @@ namespace pocketbase { } /** - * Package template is a thin wrapper around the standard html/template - * and text/template packages that implements a convenient registry to - * load and cache templates on the fly concurrently. + * Package io provides basic interfaces to I/O primitives. + * Its primary job is to wrap existing implementations of such primitives, + * such as those in package os, into shared public interfaces that + * abstract the functionality, plus some other related primitives. * - * It was created to assist the JSVM plugin HTML rendering, but could be used in other Go code. - * - * Example: - * - * ``` - * registry := template.NewRegistry() - * - * html1, err := registry.LoadFiles( - * // the files set wil be parsed only once and then cached - * "layout.html", - * "content.html", - * ).Render(map[string]any{"name": "John"}) - * - * html2, err := registry.LoadFiles( - * // reuse the already parsed and cached files set - * "layout.html", - * "content.html", - * ).Render(map[string]any{"name": "Jane"}) - * ``` + * Because these interfaces and primitives wrap lower-level operations with + * various implementations, unless otherwise informed clients should not + * assume they are safe for parallel execution. */ -namespace template { - interface newRegistry { - /** - * NewRegistry creates and initializes a new templates registry with - * some defaults (eg. global "raw" template function for unescaped HTML). - * - * Use the Registry.Load* methods to load templates into the registry. - */ - (): (Registry | undefined) - } +namespace io { /** - * Registry defines a templates registry that is safe to be used by multiple goroutines. + * Reader is the interface that wraps the basic Read method. * - * Use the Registry.Load* methods to load templates into the registry. + * Read reads up to len(p) bytes into p. It returns the number of bytes + * read (0 <= n <= len(p)) and any error encountered. Even if Read + * returns n < len(p), it may use all of p as scratch space during the call. + * If some data is available but not len(p) bytes, Read conventionally + * returns what is available instead of waiting for more. + * + * When Read encounters an error or end-of-file condition after + * successfully reading n > 0 bytes, it returns the number of + * bytes read. It may return the (non-nil) error from the same call + * or return the error (and n == 0) from a subsequent call. + * An instance of this general case is that a Reader returning + * a non-zero number of bytes at the end of the input stream may + * return either err == EOF or err == nil. The next Read should + * return 0, EOF. + * + * Callers should always process the n > 0 bytes returned before + * considering the error err. Doing so correctly handles I/O errors + * that happen after reading some bytes and also both of the + * allowed EOF behaviors. + * + * Implementations of Read are discouraged from returning a + * zero byte count with a nil error, except when len(p) == 0. + * Callers should treat a return of 0 and nil as indicating that + * nothing happened; in particular it does not indicate EOF. + * + * Implementations must not retain p. */ - interface Registry { - } - interface Registry { - /** - * AddFuncs registers new global template functions. - * - * The key of each map entry is the function name that will be used in the templates. - * If a function with the map entry name already exists it will be replaced with the new one. - * - * The value of each map entry is a function that must have either a - * single return value, or two return values of which the second has type error. - * - * Example: - * - * r.AddFuncs(map[string]any{ - * ``` - * "toUpper": func(str string) string { - * return strings.ToUppser(str) - * }, - * ... - * ``` - * }) - */ - addFuncs(funcs: _TygojaDict): (Registry | undefined) - } - interface Registry { - /** - * LoadFiles caches (if not already) the specified filenames set as a - * single template and returns a ready to use Renderer instance. - * - * There must be at least 1 filename specified. - */ - loadFiles(...filenames: string[]): (Renderer | undefined) - } - interface Registry { - /** - * LoadString caches (if not already) the specified inline string as a - * single template and returns a ready to use Renderer instance. - */ - loadString(text: string): (Renderer | undefined) - } - interface Registry { - /** - * LoadFS caches (if not already) the specified fs and globPatterns - * pair as single template and returns a ready to use Renderer instance. - * - * There must be at least 1 file matching the provided globPattern(s) - * (note that most file names serves as glob patterns matching themselves). - */ - loadFS(fsys: fs.FS, ...globPatterns: string[]): (Renderer | undefined) + interface Reader { + [key:string]: any; + read(p: string|Array): number } /** - * Renderer defines a single parsed template. + * Writer is the interface that wraps the basic Write method. + * + * Write writes len(p) bytes from p to the underlying data stream. + * It returns the number of bytes written from p (0 <= n <= len(p)) + * and any error encountered that caused the write to stop early. + * Write must return a non-nil error if it returns n < len(p). + * Write must not modify the slice data, even temporarily. + * + * Implementations must not retain p. */ - interface Renderer { + interface Writer { + [key:string]: any; + write(p: string|Array): number } - interface Renderer { + /** + * ReadSeekCloser is the interface that groups the basic Read, Seek and Close + * methods. + */ + interface ReadSeekCloser { + [key:string]: any; + } +} + +/** + * Package bytes implements functions for the manipulation of byte slices. + * It is analogous to the facilities of the strings package. + */ +namespace bytes { + /** + * A Reader implements the io.Reader, io.ReaderAt, io.WriterTo, io.Seeker, + * io.ByteScanner, and io.RuneScanner interfaces by reading from + * a byte slice. + * Unlike a Buffer, a Reader is read-only and supports seeking. + * The zero value for Reader operates like a Reader of an empty slice. + */ + interface Reader { + } + interface Reader { /** - * Render executes the template with the specified data as the dot object - * and returns the result as plain string. + * Len returns the number of bytes of the unread portion of the + * slice. */ - render(data: any): string + len(): number + } + interface Reader { + /** + * Size returns the original length of the underlying byte slice. + * Size is the number of bytes available for reading via ReadAt. + * The result is unaffected by any method calls except Reset. + */ + size(): number + } + interface Reader { + /** + * Read implements the io.Reader interface. + */ + read(b: string|Array): number + } + interface Reader { + /** + * ReadAt implements the io.ReaderAt interface. + */ + readAt(b: string|Array, off: number): number + } + interface Reader { + /** + * ReadByte implements the io.ByteReader interface. + */ + readByte(): number + } + interface Reader { + /** + * UnreadByte complements ReadByte in implementing the io.ByteScanner interface. + */ + unreadByte(): void + } + interface Reader { + /** + * ReadRune implements the io.RuneReader interface. + */ + readRune(): [number, number] + } + interface Reader { + /** + * UnreadRune complements ReadRune in implementing the io.RuneScanner interface. + */ + unreadRune(): void + } + interface Reader { + /** + * Seek implements the io.Seeker interface. + */ + seek(offset: number, whence: number): number + } + interface Reader { + /** + * WriteTo implements the io.WriterTo interface. + */ + writeTo(w: io.Writer): number + } + interface Reader { + /** + * Reset resets the Reader to be reading from b. + */ + reset(b: string|Array): void } } @@ -7247,7 +7401,7 @@ namespace time { /** * Location returns the time zone information associated with t. */ - location(): (Location | undefined) + location(): (Location) } interface Time { /** @@ -7393,317 +7547,6 @@ namespace time { } } -/** - * Package context defines the Context type, which carries deadlines, - * cancellation signals, and other request-scoped values across API boundaries - * and between processes. - * - * Incoming requests to a server should create a Context, and outgoing - * calls to servers should accept a Context. The chain of function - * calls between them must propagate the Context, optionally replacing - * it with a derived Context created using WithCancel, WithDeadline, - * WithTimeout, or WithValue. When a Context is canceled, all - * Contexts derived from it are also canceled. - * - * The WithCancel, WithDeadline, and WithTimeout functions take a - * Context (the parent) and return a derived Context (the child) and a - * CancelFunc. Calling the CancelFunc cancels the child and its - * children, removes the parent's reference to the child, and stops - * any associated timers. Failing to call the CancelFunc leaks the - * child and its children until the parent is canceled or the timer - * fires. The go vet tool checks that CancelFuncs are used on all - * control-flow paths. - * - * Programs that use Contexts should follow these rules to keep interfaces - * consistent across packages and enable static analysis tools to check context - * propagation: - * - * Do not store Contexts inside a struct type; instead, pass a Context - * explicitly to each function that needs it. The Context should be the first - * parameter, typically named ctx: - * - * ``` - * func DoSomething(ctx context.Context, arg Arg) error { - * // ... use ctx ... - * } - * ``` - * - * Do not pass a nil Context, even if a function permits it. Pass context.TODO - * if you are unsure about which Context to use. - * - * Use context Values only for request-scoped data that transits processes and - * APIs, not for passing optional parameters to functions. - * - * The same Context may be passed to functions running in different goroutines; - * Contexts are safe for simultaneous use by multiple goroutines. - * - * See https://blog.golang.org/context for example code for a server that uses - * Contexts. - */ -namespace context { - /** - * A Context carries a deadline, a cancellation signal, and other values across - * API boundaries. - * - * Context's methods may be called by multiple goroutines simultaneously. - */ - interface Context { - [key:string]: any; - /** - * Deadline returns the time when work done on behalf of this context - * should be canceled. Deadline returns ok==false when no deadline is - * set. Successive calls to Deadline return the same results. - */ - deadline(): [time.Time, boolean] - /** - * Done returns a channel that's closed when work done on behalf of this - * context should be canceled. Done may return nil if this context can - * never be canceled. Successive calls to Done return the same value. - * The close of the Done channel may happen asynchronously, - * after the cancel function returns. - * - * WithCancel arranges for Done to be closed when cancel is called; - * WithDeadline arranges for Done to be closed when the deadline - * expires; WithTimeout arranges for Done to be closed when the timeout - * elapses. - * - * Done is provided for use in select statements: - * - * // Stream generates values with DoSomething and sends them to out - * // until DoSomething returns an error or ctx.Done is closed. - * func Stream(ctx context.Context, out chan<- Value) error { - * for { - * v, err := DoSomething(ctx) - * if err != nil { - * return err - * } - * select { - * case <-ctx.Done(): - * return ctx.Err() - * case out <- v: - * } - * } - * } - * - * See https://blog.golang.org/pipelines for more examples of how to use - * a Done channel for cancellation. - */ - done(): undefined - /** - * If Done is not yet closed, Err returns nil. - * If Done is closed, Err returns a non-nil error explaining why: - * Canceled if the context was canceled - * or DeadlineExceeded if the context's deadline passed. - * After Err returns a non-nil error, successive calls to Err return the same error. - */ - err(): void - /** - * Value returns the value associated with this context for key, or nil - * if no value is associated with key. Successive calls to Value with - * the same key returns the same result. - * - * Use context values only for request-scoped data that transits - * processes and API boundaries, not for passing optional parameters to - * functions. - * - * A key identifies a specific value in a Context. Functions that wish - * to store values in Context typically allocate a key in a global - * variable then use that key as the argument to context.WithValue and - * Context.Value. A key can be any type that supports equality; - * packages should define keys as an unexported type to avoid - * collisions. - * - * Packages that define a Context key should provide type-safe accessors - * for the values stored using that key: - * - * ``` - * // Package user defines a User type that's stored in Contexts. - * package user - * - * import "context" - * - * // User is the type of value stored in the Contexts. - * type User struct {...} - * - * // key is an unexported type for keys defined in this package. - * // This prevents collisions with keys defined in other packages. - * type key int - * - * // userKey is the key for user.User values in Contexts. It is - * // unexported; clients use user.NewContext and user.FromContext - * // instead of using this key directly. - * var userKey key - * - * // NewContext returns a new Context that carries value u. - * func NewContext(ctx context.Context, u *User) context.Context { - * return context.WithValue(ctx, userKey, u) - * } - * - * // FromContext returns the User value stored in ctx, if any. - * func FromContext(ctx context.Context) (*User, bool) { - * u, ok := ctx.Value(userKey).(*User) - * return u, ok - * } - * ``` - */ - value(key: any): any - } -} - -/** - * Package io provides basic interfaces to I/O primitives. - * Its primary job is to wrap existing implementations of such primitives, - * such as those in package os, into shared public interfaces that - * abstract the functionality, plus some other related primitives. - * - * Because these interfaces and primitives wrap lower-level operations with - * various implementations, unless otherwise informed clients should not - * assume they are safe for parallel execution. - */ -namespace io { - /** - * Reader is the interface that wraps the basic Read method. - * - * Read reads up to len(p) bytes into p. It returns the number of bytes - * read (0 <= n <= len(p)) and any error encountered. Even if Read - * returns n < len(p), it may use all of p as scratch space during the call. - * If some data is available but not len(p) bytes, Read conventionally - * returns what is available instead of waiting for more. - * - * When Read encounters an error or end-of-file condition after - * successfully reading n > 0 bytes, it returns the number of - * bytes read. It may return the (non-nil) error from the same call - * or return the error (and n == 0) from a subsequent call. - * An instance of this general case is that a Reader returning - * a non-zero number of bytes at the end of the input stream may - * return either err == EOF or err == nil. The next Read should - * return 0, EOF. - * - * Callers should always process the n > 0 bytes returned before - * considering the error err. Doing so correctly handles I/O errors - * that happen after reading some bytes and also both of the - * allowed EOF behaviors. - * - * Implementations of Read are discouraged from returning a - * zero byte count with a nil error, except when len(p) == 0. - * Callers should treat a return of 0 and nil as indicating that - * nothing happened; in particular it does not indicate EOF. - * - * Implementations must not retain p. - */ - interface Reader { - [key:string]: any; - read(p: string|Array): number - } - /** - * Writer is the interface that wraps the basic Write method. - * - * Write writes len(p) bytes from p to the underlying data stream. - * It returns the number of bytes written from p (0 <= n <= len(p)) - * and any error encountered that caused the write to stop early. - * Write must return a non-nil error if it returns n < len(p). - * Write must not modify the slice data, even temporarily. - * - * Implementations must not retain p. - */ - interface Writer { - [key:string]: any; - write(p: string|Array): number - } - /** - * ReadSeekCloser is the interface that groups the basic Read, Seek and Close - * methods. - */ - interface ReadSeekCloser { - [key:string]: any; - } -} - -/** - * Package bytes implements functions for the manipulation of byte slices. - * It is analogous to the facilities of the strings package. - */ -namespace bytes { - /** - * A Reader implements the io.Reader, io.ReaderAt, io.WriterTo, io.Seeker, - * io.ByteScanner, and io.RuneScanner interfaces by reading from - * a byte slice. - * Unlike a Buffer, a Reader is read-only and supports seeking. - * The zero value for Reader operates like a Reader of an empty slice. - */ - interface Reader { - } - interface Reader { - /** - * Len returns the number of bytes of the unread portion of the - * slice. - */ - len(): number - } - interface Reader { - /** - * Size returns the original length of the underlying byte slice. - * Size is the number of bytes available for reading via ReadAt. - * The result is unaffected by any method calls except Reset. - */ - size(): number - } - interface Reader { - /** - * Read implements the io.Reader interface. - */ - read(b: string|Array): number - } - interface Reader { - /** - * ReadAt implements the io.ReaderAt interface. - */ - readAt(b: string|Array, off: number): number - } - interface Reader { - /** - * ReadByte implements the io.ByteReader interface. - */ - readByte(): number - } - interface Reader { - /** - * UnreadByte complements ReadByte in implementing the io.ByteScanner interface. - */ - unreadByte(): void - } - interface Reader { - /** - * ReadRune implements the io.RuneReader interface. - */ - readRune(): [number, number] - } - interface Reader { - /** - * UnreadRune complements ReadRune in implementing the io.RuneScanner interface. - */ - unreadRune(): void - } - interface Reader { - /** - * Seek implements the io.Seeker interface. - */ - seek(offset: number, whence: number): number - } - interface Reader { - /** - * WriteTo implements the io.WriterTo interface. - */ - writeTo(w: io.Writer): number - } - interface Reader { - /** - * Reset resets the Reader to be reading from b. - */ - reset(b: string|Array): void - } -} - /** * Package fs defines basic interfaces to a file system. * A file system can be provided by the host operating system @@ -7895,6 +7738,163 @@ namespace fs { interface WalkDirFunc {(path: string, d: DirEntry, err: Error): void } } +/** + * Package context defines the Context type, which carries deadlines, + * cancellation signals, and other request-scoped values across API boundaries + * and between processes. + * + * Incoming requests to a server should create a Context, and outgoing + * calls to servers should accept a Context. The chain of function + * calls between them must propagate the Context, optionally replacing + * it with a derived Context created using WithCancel, WithDeadline, + * WithTimeout, or WithValue. When a Context is canceled, all + * Contexts derived from it are also canceled. + * + * The WithCancel, WithDeadline, and WithTimeout functions take a + * Context (the parent) and return a derived Context (the child) and a + * CancelFunc. Calling the CancelFunc cancels the child and its + * children, removes the parent's reference to the child, and stops + * any associated timers. Failing to call the CancelFunc leaks the + * child and its children until the parent is canceled or the timer + * fires. The go vet tool checks that CancelFuncs are used on all + * control-flow paths. + * + * Programs that use Contexts should follow these rules to keep interfaces + * consistent across packages and enable static analysis tools to check context + * propagation: + * + * Do not store Contexts inside a struct type; instead, pass a Context + * explicitly to each function that needs it. The Context should be the first + * parameter, typically named ctx: + * + * ``` + * func DoSomething(ctx context.Context, arg Arg) error { + * // ... use ctx ... + * } + * ``` + * + * Do not pass a nil Context, even if a function permits it. Pass context.TODO + * if you are unsure about which Context to use. + * + * Use context Values only for request-scoped data that transits processes and + * APIs, not for passing optional parameters to functions. + * + * The same Context may be passed to functions running in different goroutines; + * Contexts are safe for simultaneous use by multiple goroutines. + * + * See https://blog.golang.org/context for example code for a server that uses + * Contexts. + */ +namespace context { + /** + * A Context carries a deadline, a cancellation signal, and other values across + * API boundaries. + * + * Context's methods may be called by multiple goroutines simultaneously. + */ + interface Context { + [key:string]: any; + /** + * Deadline returns the time when work done on behalf of this context + * should be canceled. Deadline returns ok==false when no deadline is + * set. Successive calls to Deadline return the same results. + */ + deadline(): [time.Time, boolean] + /** + * Done returns a channel that's closed when work done on behalf of this + * context should be canceled. Done may return nil if this context can + * never be canceled. Successive calls to Done return the same value. + * The close of the Done channel may happen asynchronously, + * after the cancel function returns. + * + * WithCancel arranges for Done to be closed when cancel is called; + * WithDeadline arranges for Done to be closed when the deadline + * expires; WithTimeout arranges for Done to be closed when the timeout + * elapses. + * + * Done is provided for use in select statements: + * + * // Stream generates values with DoSomething and sends them to out + * // until DoSomething returns an error or ctx.Done is closed. + * func Stream(ctx context.Context, out chan<- Value) error { + * for { + * v, err := DoSomething(ctx) + * if err != nil { + * return err + * } + * select { + * case <-ctx.Done(): + * return ctx.Err() + * case out <- v: + * } + * } + * } + * + * See https://blog.golang.org/pipelines for more examples of how to use + * a Done channel for cancellation. + */ + done(): undefined + /** + * If Done is not yet closed, Err returns nil. + * If Done is closed, Err returns a non-nil error explaining why: + * Canceled if the context was canceled + * or DeadlineExceeded if the context's deadline passed. + * After Err returns a non-nil error, successive calls to Err return the same error. + */ + err(): void + /** + * Value returns the value associated with this context for key, or nil + * if no value is associated with key. Successive calls to Value with + * the same key returns the same result. + * + * Use context values only for request-scoped data that transits + * processes and API boundaries, not for passing optional parameters to + * functions. + * + * A key identifies a specific value in a Context. Functions that wish + * to store values in Context typically allocate a key in a global + * variable then use that key as the argument to context.WithValue and + * Context.Value. A key can be any type that supports equality; + * packages should define keys as an unexported type to avoid + * collisions. + * + * Packages that define a Context key should provide type-safe accessors + * for the values stored using that key: + * + * ``` + * // Package user defines a User type that's stored in Contexts. + * package user + * + * import "context" + * + * // User is the type of value stored in the Contexts. + * type User struct {...} + * + * // key is an unexported type for keys defined in this package. + * // This prevents collisions with keys defined in other packages. + * type key int + * + * // userKey is the key for user.User values in Contexts. It is + * // unexported; clients use user.NewContext and user.FromContext + * // instead of using this key directly. + * var userKey key + * + * // NewContext returns a new Context that carries value u. + * func NewContext(ctx context.Context, u *User) context.Context { + * return context.WithValue(ctx, userKey, u) + * } + * + * // FromContext returns the User value stored in ctx, if any. + * func FromContext(ctx context.Context) (*User, bool) { + * u, ok := ctx.Value(userKey).(*User) + * return u, ok + * } + * ``` + */ + value(key: any): any + } +} + /** * Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html * @@ -8394,7 +8394,7 @@ namespace http { * want to modify before sending back out, use Request.Clone. Between * those two uses, it's rare to need WithContext. */ - withContext(ctx: context.Context): (Request | undefined) + withContext(ctx: context.Context): (Request) } interface Request { /** @@ -8405,7 +8405,7 @@ namespace http { * lifetime of a request and its response: obtaining a connection, * sending the request, and reading the response headers and body. */ - clone(ctx: context.Context): (Request | undefined) + clone(ctx: context.Context): (Request) } interface Request { /** @@ -8433,7 +8433,7 @@ namespace http { * If multiple cookies match the given name, only one cookie will * be returned. */ - cookie(name: string): (Cookie | undefined) + cookie(name: string): (Cookie) } interface Request { /** @@ -8466,7 +8466,7 @@ namespace http { * Use this function instead of ParseMultipartForm to * process the request body as a stream. */ - multipartReader(): (multipart.Reader | undefined) + multipartReader(): (multipart.Reader) } interface Request { /** @@ -8587,7 +8587,7 @@ namespace http { * FormFile returns the first file for the provided form key. * FormFile calls ParseMultipartForm and ParseForm if necessary. */ - formFile(key: string): [multipart.File, (multipart.FileHeader | undefined)] + formFile(key: string): [multipart.File, (multipart.FileHeader)] } /** * A ResponseWriter interface is used by an HTTP handler to @@ -8988,7 +8988,7 @@ namespace auth { /** * Client returns an http client using the provided token. */ - client(token: oauth2.Token): (any | undefined) + client(token: oauth2.Token): (any) /** * BuildAuthUrl returns a URL to the provider's consent page * that asks for permissions for the required scopes explicitly. @@ -8997,7 +8997,7 @@ namespace auth { /** * FetchToken converts an authorization code to token. */ - fetchToken(code: string, ...opts: oauth2.AuthCodeOption[]): (oauth2.Token | undefined) + fetchToken(code: string, ...opts: oauth2.AuthCodeOption[]): (oauth2.Token) /** * FetchRawUserData requests and marshalizes into `result` the * the OAuth user api response. @@ -9007,1044 +9007,1226 @@ namespace auth { * FetchAuthUser is similar to FetchRawUserData, but normalizes and * marshalizes the user api response into a standardized AuthUser struct. */ - fetchAuthUser(token: oauth2.Token): (AuthUser | undefined) + fetchAuthUser(token: oauth2.Token): (AuthUser) } } /** - * Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces. - * In addition to providing an interface, Cobra simultaneously provides a controller to organize your application code. + * Package sql provides a generic interface around SQL (or SQL-like) + * databases. + * + * The sql package must be used in conjunction with a database driver. + * See https://golang.org/s/sqldrivers for a list of drivers. + * + * Drivers that do not support context cancellation will not return until + * after the query is completed. + * + * For usage examples, see the wiki page at + * https://golang.org/s/sqlwiki. */ -namespace cobra { - interface Command { +namespace sql { + /** + * TxOptions holds the transaction options to be used in DB.BeginTx. + */ + interface TxOptions { /** - * GenBashCompletion generates bash completion file and writes to the passed writer. + * Isolation is the transaction isolation level. + * If zero, the driver or database's default level is used. */ - genBashCompletion(w: io.Writer): void + isolation: IsolationLevel + readOnly: boolean } - interface Command { - /** - * GenBashCompletionFile generates bash completion file. - */ - genBashCompletionFile(filename: string): void + /** + * DB is a database handle representing a pool of zero or more + * underlying connections. It's safe for concurrent use by multiple + * goroutines. + * + * The sql package creates and frees connections automatically; it + * also maintains a free pool of idle connections. If the database has + * a concept of per-connection state, such state can be reliably observed + * within a transaction (Tx) or connection (Conn). Once DB.Begin is called, the + * returned Tx is bound to a single connection. Once Commit or + * Rollback is called on the transaction, that transaction's + * connection is returned to DB's idle connection pool. The pool size + * can be controlled with SetMaxIdleConns. + */ + interface DB { } - interface Command { + interface DB { /** - * GenBashCompletionFileV2 generates Bash completion version 2. + * PingContext verifies a connection to the database is still alive, + * establishing a connection if necessary. */ - genBashCompletionFileV2(filename: string, includeDesc: boolean): void + pingContext(ctx: context.Context): void } - interface Command { + interface DB { /** - * GenBashCompletionV2 generates Bash completion file version 2 - * and writes it to the passed writer. + * Ping verifies a connection to the database is still alive, + * establishing a connection if necessary. + * + * Ping uses context.Background internally; to specify the context, use + * PingContext. */ - genBashCompletionV2(w: io.Writer, includeDesc: boolean): void + ping(): void + } + interface DB { + /** + * Close closes the database and prevents new queries from starting. + * Close then waits for all queries that have started processing on the server + * to finish. + * + * It is rare to Close a DB, as the DB handle is meant to be + * long-lived and shared between many goroutines. + */ + close(): void + } + interface DB { + /** + * SetMaxIdleConns sets the maximum number of connections in the idle + * connection pool. + * + * If MaxOpenConns is greater than 0 but less than the new MaxIdleConns, + * then the new MaxIdleConns will be reduced to match the MaxOpenConns limit. + * + * If n <= 0, no idle connections are retained. + * + * The default max idle connections is currently 2. This may change in + * a future release. + */ + setMaxIdleConns(n: number): void + } + interface DB { + /** + * SetMaxOpenConns sets the maximum number of open connections to the database. + * + * If MaxIdleConns is greater than 0 and the new MaxOpenConns is less than + * MaxIdleConns, then MaxIdleConns will be reduced to match the new + * MaxOpenConns limit. + * + * If n <= 0, then there is no limit on the number of open connections. + * The default is 0 (unlimited). + */ + setMaxOpenConns(n: number): void + } + interface DB { + /** + * SetConnMaxLifetime sets the maximum amount of time a connection may be reused. + * + * Expired connections may be closed lazily before reuse. + * + * If d <= 0, connections are not closed due to a connection's age. + */ + setConnMaxLifetime(d: time.Duration): void + } + interface DB { + /** + * SetConnMaxIdleTime sets the maximum amount of time a connection may be idle. + * + * Expired connections may be closed lazily before reuse. + * + * If d <= 0, connections are not closed due to a connection's idle time. + */ + setConnMaxIdleTime(d: time.Duration): void + } + interface DB { + /** + * Stats returns database statistics. + */ + stats(): DBStats + } + interface DB { + /** + * PrepareContext creates a prepared statement for later queries or executions. + * Multiple queries or executions may be run concurrently from the + * returned statement. + * The caller must call the statement's Close method + * when the statement is no longer needed. + * + * The provided context is used for the preparation of the statement, not for the + * execution of the statement. + */ + prepareContext(ctx: context.Context, query: string): (Stmt) + } + interface DB { + /** + * Prepare creates a prepared statement for later queries or executions. + * Multiple queries or executions may be run concurrently from the + * returned statement. + * The caller must call the statement's Close method + * when the statement is no longer needed. + * + * Prepare uses context.Background internally; to specify the context, use + * PrepareContext. + */ + prepare(query: string): (Stmt) + } + interface DB { + /** + * ExecContext executes a query without returning any rows. + * The args are for any placeholder parameters in the query. + */ + execContext(ctx: context.Context, query: string, ...args: any[]): Result + } + interface DB { + /** + * Exec executes a query without returning any rows. + * The args are for any placeholder parameters in the query. + * + * Exec uses context.Background internally; to specify the context, use + * ExecContext. + */ + exec(query: string, ...args: any[]): Result + } + interface DB { + /** + * QueryContext executes a query that returns rows, typically a SELECT. + * The args are for any placeholder parameters in the query. + */ + queryContext(ctx: context.Context, query: string, ...args: any[]): (Rows) + } + interface DB { + /** + * Query executes a query that returns rows, typically a SELECT. + * The args are for any placeholder parameters in the query. + * + * Query uses context.Background internally; to specify the context, use + * QueryContext. + */ + query(query: string, ...args: any[]): (Rows) + } + interface DB { + /** + * QueryRowContext executes a query that is expected to return at most one row. + * QueryRowContext always returns a non-nil value. Errors are deferred until + * Row's Scan method is called. + * If the query selects no rows, the *Row's Scan will return ErrNoRows. + * Otherwise, the *Row's Scan scans the first selected row and discards + * the rest. + */ + queryRowContext(ctx: context.Context, query: string, ...args: any[]): (Row) + } + interface DB { + /** + * QueryRow executes a query that is expected to return at most one row. + * QueryRow always returns a non-nil value. Errors are deferred until + * Row's Scan method is called. + * If the query selects no rows, the *Row's Scan will return ErrNoRows. + * Otherwise, the *Row's Scan scans the first selected row and discards + * the rest. + * + * QueryRow uses context.Background internally; to specify the context, use + * QueryRowContext. + */ + queryRow(query: string, ...args: any[]): (Row) + } + interface DB { + /** + * BeginTx starts a transaction. + * + * The provided context is used until the transaction is committed or rolled back. + * If the context is canceled, the sql package will roll back + * the transaction. Tx.Commit will return an error if the context provided to + * BeginTx is canceled. + * + * The provided TxOptions is optional and may be nil if defaults should be used. + * If a non-default isolation level is used that the driver doesn't support, + * an error will be returned. + */ + beginTx(ctx: context.Context, opts: TxOptions): (Tx) + } + interface DB { + /** + * Begin starts a transaction. The default isolation level is dependent on + * the driver. + * + * Begin uses context.Background internally; to specify the context, use + * BeginTx. + */ + begin(): (Tx) + } + interface DB { + /** + * Driver returns the database's underlying driver. + */ + driver(): any + } + interface DB { + /** + * Conn returns a single connection by either opening a new connection + * or returning an existing connection from the connection pool. Conn will + * block until either a connection is returned or ctx is canceled. + * Queries run on the same Conn will be run in the same database session. + * + * Every Conn must be returned to the database pool after use by + * calling Conn.Close. + */ + conn(ctx: context.Context): (Conn) + } + /** + * Tx is an in-progress database transaction. + * + * A transaction must end with a call to Commit or Rollback. + * + * After a call to Commit or Rollback, all operations on the + * transaction fail with ErrTxDone. + * + * The statements prepared for a transaction by calling + * the transaction's Prepare or Stmt methods are closed + * by the call to Commit or Rollback. + */ + interface Tx { + } + interface Tx { + /** + * Commit commits the transaction. + */ + commit(): void + } + interface Tx { + /** + * Rollback aborts the transaction. + */ + rollback(): void + } + interface Tx { + /** + * PrepareContext creates a prepared statement for use within a transaction. + * + * The returned statement operates within the transaction and will be closed + * when the transaction has been committed or rolled back. + * + * To use an existing prepared statement on this transaction, see Tx.Stmt. + * + * The provided context will be used for the preparation of the context, not + * for the execution of the returned statement. The returned statement + * will run in the transaction context. + */ + prepareContext(ctx: context.Context, query: string): (Stmt) + } + interface Tx { + /** + * Prepare creates a prepared statement for use within a transaction. + * + * The returned statement operates within the transaction and will be closed + * when the transaction has been committed or rolled back. + * + * To use an existing prepared statement on this transaction, see Tx.Stmt. + * + * Prepare uses context.Background internally; to specify the context, use + * PrepareContext. + */ + prepare(query: string): (Stmt) + } + interface Tx { + /** + * StmtContext returns a transaction-specific prepared statement from + * an existing statement. + * + * Example: + * + * ``` + * updateMoney, err := db.Prepare("UPDATE balance SET money=money+? WHERE id=?") + * ... + * tx, err := db.Begin() + * ... + * res, err := tx.StmtContext(ctx, updateMoney).Exec(123.45, 98293203) + * ``` + * + * The provided context is used for the preparation of the statement, not for the + * execution of the statement. + * + * The returned statement operates within the transaction and will be closed + * when the transaction has been committed or rolled back. + */ + stmtContext(ctx: context.Context, stmt: Stmt): (Stmt) + } + interface Tx { + /** + * Stmt returns a transaction-specific prepared statement from + * an existing statement. + * + * Example: + * + * ``` + * updateMoney, err := db.Prepare("UPDATE balance SET money=money+? WHERE id=?") + * ... + * tx, err := db.Begin() + * ... + * res, err := tx.Stmt(updateMoney).Exec(123.45, 98293203) + * ``` + * + * The returned statement operates within the transaction and will be closed + * when the transaction has been committed or rolled back. + * + * Stmt uses context.Background internally; to specify the context, use + * StmtContext. + */ + stmt(stmt: Stmt): (Stmt) + } + interface Tx { + /** + * ExecContext executes a query that doesn't return rows. + * For example: an INSERT and UPDATE. + */ + execContext(ctx: context.Context, query: string, ...args: any[]): Result + } + interface Tx { + /** + * Exec executes a query that doesn't return rows. + * For example: an INSERT and UPDATE. + * + * Exec uses context.Background internally; to specify the context, use + * ExecContext. + */ + exec(query: string, ...args: any[]): Result + } + interface Tx { + /** + * QueryContext executes a query that returns rows, typically a SELECT. + */ + queryContext(ctx: context.Context, query: string, ...args: any[]): (Rows) + } + interface Tx { + /** + * Query executes a query that returns rows, typically a SELECT. + * + * Query uses context.Background internally; to specify the context, use + * QueryContext. + */ + query(query: string, ...args: any[]): (Rows) + } + interface Tx { + /** + * QueryRowContext executes a query that is expected to return at most one row. + * QueryRowContext always returns a non-nil value. Errors are deferred until + * Row's Scan method is called. + * If the query selects no rows, the *Row's Scan will return ErrNoRows. + * Otherwise, the *Row's Scan scans the first selected row and discards + * the rest. + */ + queryRowContext(ctx: context.Context, query: string, ...args: any[]): (Row) + } + interface Tx { + /** + * QueryRow executes a query that is expected to return at most one row. + * QueryRow always returns a non-nil value. Errors are deferred until + * Row's Scan method is called. + * If the query selects no rows, the *Row's Scan will return ErrNoRows. + * Otherwise, the *Row's Scan scans the first selected row and discards + * the rest. + * + * QueryRow uses context.Background internally; to specify the context, use + * QueryRowContext. + */ + queryRow(query: string, ...args: any[]): (Row) + } + /** + * Stmt is a prepared statement. + * A Stmt is safe for concurrent use by multiple goroutines. + * + * If a Stmt is prepared on a Tx or Conn, it will be bound to a single + * underlying connection forever. If the Tx or Conn closes, the Stmt will + * become unusable and all operations will return an error. + * If a Stmt is prepared on a DB, it will remain usable for the lifetime of the + * DB. When the Stmt needs to execute on a new underlying connection, it will + * prepare itself on the new connection automatically. + */ + interface Stmt { + } + interface Stmt { + /** + * ExecContext executes a prepared statement with the given arguments and + * returns a Result summarizing the effect of the statement. + */ + execContext(ctx: context.Context, ...args: any[]): Result + } + interface Stmt { + /** + * Exec executes a prepared statement with the given arguments and + * returns a Result summarizing the effect of the statement. + * + * Exec uses context.Background internally; to specify the context, use + * ExecContext. + */ + exec(...args: any[]): Result + } + interface Stmt { + /** + * QueryContext executes a prepared query statement with the given arguments + * and returns the query results as a *Rows. + */ + queryContext(ctx: context.Context, ...args: any[]): (Rows) + } + interface Stmt { + /** + * Query executes a prepared query statement with the given arguments + * and returns the query results as a *Rows. + * + * Query uses context.Background internally; to specify the context, use + * QueryContext. + */ + query(...args: any[]): (Rows) + } + interface Stmt { + /** + * QueryRowContext executes a prepared query statement with the given arguments. + * If an error occurs during the execution of the statement, that error will + * be returned by a call to Scan on the returned *Row, which is always non-nil. + * If the query selects no rows, the *Row's Scan will return ErrNoRows. + * Otherwise, the *Row's Scan scans the first selected row and discards + * the rest. + */ + queryRowContext(ctx: context.Context, ...args: any[]): (Row) + } + interface Stmt { + /** + * QueryRow executes a prepared query statement with the given arguments. + * If an error occurs during the execution of the statement, that error will + * be returned by a call to Scan on the returned *Row, which is always non-nil. + * If the query selects no rows, the *Row's Scan will return ErrNoRows. + * Otherwise, the *Row's Scan scans the first selected row and discards + * the rest. + * + * Example usage: + * + * ``` + * var name string + * err := nameByUseridStmt.QueryRow(id).Scan(&name) + * ``` + * + * QueryRow uses context.Background internally; to specify the context, use + * QueryRowContext. + */ + queryRow(...args: any[]): (Row) + } + interface Stmt { + /** + * Close closes the statement. + */ + close(): void + } + /** + * Rows is the result of a query. Its cursor starts before the first row + * of the result set. Use Next to advance from row to row. + */ + interface Rows { + } + interface Rows { + /** + * Next prepares the next result row for reading with the Scan method. It + * returns true on success, or false if there is no next result row or an error + * happened while preparing it. Err should be consulted to distinguish between + * the two cases. + * + * Every call to Scan, even the first one, must be preceded by a call to Next. + */ + next(): boolean + } + interface Rows { + /** + * NextResultSet prepares the next result set for reading. It reports whether + * there is further result sets, or false if there is no further result set + * or if there is an error advancing to it. The Err method should be consulted + * to distinguish between the two cases. + * + * After calling NextResultSet, the Next method should always be called before + * scanning. If there are further result sets they may not have rows in the result + * set. + */ + nextResultSet(): boolean + } + interface Rows { + /** + * Err returns the error, if any, that was encountered during iteration. + * Err may be called after an explicit or implicit Close. + */ + err(): void + } + interface Rows { + /** + * Columns returns the column names. + * Columns returns an error if the rows are closed. + */ + columns(): Array + } + interface Rows { + /** + * ColumnTypes returns column information such as column type, length, + * and nullable. Some information may not be available from some drivers. + */ + columnTypes(): Array<(ColumnType | undefined)> + } + interface Rows { + /** + * Scan copies the columns in the current row into the values pointed + * at by dest. The number of values in dest must be the same as the + * number of columns in Rows. + * + * Scan converts columns read from the database into the following + * common Go types and special types provided by the sql package: + * + * ``` + * *string + * *[]byte + * *int, *int8, *int16, *int32, *int64 + * *uint, *uint8, *uint16, *uint32, *uint64 + * *bool + * *float32, *float64 + * *interface{} + * *RawBytes + * *Rows (cursor value) + * any type implementing Scanner (see Scanner docs) + * ``` + * + * In the most simple case, if the type of the value from the source + * column is an integer, bool or string type T and dest is of type *T, + * Scan simply assigns the value through the pointer. + * + * Scan also converts between string and numeric types, as long as no + * information would be lost. While Scan stringifies all numbers + * scanned from numeric database columns into *string, scans into + * numeric types are checked for overflow. For example, a float64 with + * value 300 or a string with value "300" can scan into a uint16, but + * not into a uint8, though float64(255) or "255" can scan into a + * uint8. One exception is that scans of some float64 numbers to + * strings may lose information when stringifying. In general, scan + * floating point columns into *float64. + * + * If a dest argument has type *[]byte, Scan saves in that argument a + * copy of the corresponding data. The copy is owned by the caller and + * can be modified and held indefinitely. The copy can be avoided by + * using an argument of type *RawBytes instead; see the documentation + * for RawBytes for restrictions on its use. + * + * If an argument has type *interface{}, Scan copies the value + * provided by the underlying driver without conversion. When scanning + * from a source value of type []byte to *interface{}, a copy of the + * slice is made and the caller owns the result. + * + * Source values of type time.Time may be scanned into values of type + * *time.Time, *interface{}, *string, or *[]byte. When converting to + * the latter two, time.RFC3339Nano is used. + * + * Source values of type bool may be scanned into types *bool, + * *interface{}, *string, *[]byte, or *RawBytes. + * + * For scanning into *bool, the source may be true, false, 1, 0, or + * string inputs parseable by strconv.ParseBool. + * + * Scan can also convert a cursor returned from a query, such as + * "select cursor(select * from my_table) from dual", into a + * *Rows value that can itself be scanned from. The parent + * select query will close any cursor *Rows if the parent *Rows is closed. + * + * If any of the first arguments implementing Scanner returns an error, + * that error will be wrapped in the returned error + */ + scan(...dest: any[]): void + } + interface Rows { + /** + * Close closes the Rows, preventing further enumeration. If Next is called + * and returns false and there are no further result sets, + * the Rows are closed automatically and it will suffice to check the + * result of Err. Close is idempotent and does not affect the result of Err. + */ + close(): void + } + /** + * A Result summarizes an executed SQL command. + */ + interface Result { + [key:string]: any; + /** + * LastInsertId returns the integer generated by the database + * in response to a command. Typically this will be from an + * "auto increment" column when inserting a new row. Not all + * databases support this feature, and the syntax of such + * statements varies. + */ + lastInsertId(): number + /** + * RowsAffected returns the number of rows affected by an + * update, insert, or delete. Not every database or database + * driver may support this. + */ + rowsAffected(): number + } +} + +/** + * Package echo implements high performance, minimalist Go web framework. + * + * Example: + * + * ``` + * package main + * + * import ( + * "github.com/labstack/echo/v5" + * "github.com/labstack/echo/v5/middleware" + * "log" + * "net/http" + * ) + * + * // Handler + * func hello(c echo.Context) error { + * return c.String(http.StatusOK, "Hello, World!") + * } + * + * func main() { + * // Echo instance + * e := echo.New() + * + * // Middleware + * e.Use(middleware.Logger()) + * e.Use(middleware.Recover()) + * + * // Routes + * e.GET("/", hello) + * + * // Start server + * if err := e.Start(":8080"); err != http.ErrServerClosed { + * log.Fatal(err) + * } + * } + * ``` + * + * Learn more at https://echo.labstack.com + */ +namespace echo { + /** + * Context represents the context of the current HTTP request. It holds request and + * response objects, path, path parameters, data and registered handler. + */ + interface Context { + [key:string]: any; + /** + * Request returns `*http.Request`. + */ + request(): (http.Request) + /** + * SetRequest sets `*http.Request`. + */ + setRequest(r: http.Request): void + /** + * SetResponse sets `*Response`. + */ + setResponse(r: Response): void + /** + * Response returns `*Response`. + */ + response(): (Response) + /** + * IsTLS returns true if HTTP connection is TLS otherwise false. + */ + isTLS(): boolean + /** + * IsWebSocket returns true if HTTP connection is WebSocket otherwise false. + */ + isWebSocket(): boolean + /** + * Scheme returns the HTTP protocol scheme, `http` or `https`. + */ + scheme(): string + /** + * RealIP returns the client's network address based on `X-Forwarded-For` + * or `X-Real-IP` request header. + * The behavior can be configured using `Echo#IPExtractor`. + */ + realIP(): string + /** + * RouteInfo returns current request route information. Method, Path, Name and params if they exist for matched route. + * In case of 404 (route not found) and 405 (method not allowed) RouteInfo returns generic struct for these cases. + */ + routeInfo(): RouteInfo + /** + * Path returns the registered path for the handler. + */ + path(): string + /** + * PathParam returns path parameter by name. + */ + pathParam(name: string): string + /** + * PathParamDefault returns the path parameter or default value for the provided name. + * + * Notes for DefaultRouter implementation: + * Path parameter could be empty for cases like that: + * * route `/release-:version/bin` and request URL is `/release-/bin` + * * route `/api/:version/image.jpg` and request URL is `/api//image.jpg` + * but not when path parameter is last part of route path + * * route `/download/file.:ext` will not match request `/download/file.` + */ + pathParamDefault(name: string, defaultValue: string): string + /** + * PathParams returns path parameter values. + */ + pathParams(): PathParams + /** + * SetPathParams sets path parameters for current request. + */ + setPathParams(params: PathParams): void + /** + * QueryParam returns the query param for the provided name. + */ + queryParam(name: string): string + /** + * QueryParamDefault returns the query param or default value for the provided name. + */ + queryParamDefault(name: string): string + /** + * QueryParams returns the query parameters as `url.Values`. + */ + queryParams(): url.Values + /** + * QueryString returns the URL query string. + */ + queryString(): string + /** + * FormValue returns the form field value for the provided name. + */ + formValue(name: string): string + /** + * FormValueDefault returns the form field value or default value for the provided name. + */ + formValueDefault(name: string): string + /** + * FormValues returns the form field values as `url.Values`. + */ + formValues(): url.Values + /** + * FormFile returns the multipart form file for the provided name. + */ + formFile(name: string): (multipart.FileHeader) + /** + * MultipartForm returns the multipart form. + */ + multipartForm(): (multipart.Form) + /** + * Cookie returns the named cookie provided in the request. + */ + cookie(name: string): (http.Cookie) + /** + * SetCookie adds a `Set-Cookie` header in HTTP response. + */ + setCookie(cookie: http.Cookie): void + /** + * Cookies returns the HTTP cookies sent with the request. + */ + cookies(): Array<(http.Cookie | undefined)> + /** + * Get retrieves data from the context. + */ + get(key: string): { + } + /** + * Set saves data in the context. + */ + set(key: string, val: { + }): void + /** + * Bind binds path params, query params and the request body into provided type `i`. The default binder + * binds body based on Content-Type header. + */ + bind(i: { + }): void + /** + * Validate validates provided `i`. It is usually called after `Context#Bind()`. + * Validator must be registered using `Echo#Validator`. + */ + validate(i: { + }): void + /** + * Render renders a template with data and sends a text/html response with status + * code. Renderer must be registered using `Echo.Renderer`. + */ + render(code: number, name: string, data: { + }): void + /** + * HTML sends an HTTP response with status code. + */ + html(code: number, html: string): void + /** + * HTMLBlob sends an HTTP blob response with status code. + */ + htmlBlob(code: number, b: string|Array): void + /** + * String sends a string response with status code. + */ + string(code: number, s: string): void + /** + * JSON sends a JSON response with status code. + */ + json(code: number, i: { + }): void + /** + * JSONPretty sends a pretty-print JSON with status code. + */ + jsonPretty(code: number, i: { + }, indent: string): void + /** + * JSONBlob sends a JSON blob response with status code. + */ + jsonBlob(code: number, b: string|Array): void + /** + * JSONP sends a JSONP response with status code. It uses `callback` to construct + * the JSONP payload. + */ + jsonp(code: number, callback: string, i: { + }): void + /** + * JSONPBlob sends a JSONP blob response with status code. It uses `callback` + * to construct the JSONP payload. + */ + jsonpBlob(code: number, callback: string, b: string|Array): void + /** + * XML sends an XML response with status code. + */ + xml(code: number, i: { + }): void + /** + * XMLPretty sends a pretty-print XML with status code. + */ + xmlPretty(code: number, i: { + }, indent: string): void + /** + * XMLBlob sends an XML blob response with status code. + */ + xmlBlob(code: number, b: string|Array): void + /** + * Blob sends a blob response with status code and content type. + */ + blob(code: number, contentType: string, b: string|Array): void + /** + * Stream sends a streaming response with status code and content type. + */ + stream(code: number, contentType: string, r: io.Reader): void + /** + * File sends a response with the content of the file. + */ + file(file: string): void + /** + * FileFS sends a response with the content of the file from given filesystem. + */ + fileFS(file: string, filesystem: fs.FS): void + /** + * Attachment sends a response as attachment, prompting client to save the + * file. + */ + attachment(file: string, name: string): void + /** + * Inline sends a response as inline, opening the file in the browser. + */ + inline(file: string, name: string): void + /** + * NoContent sends a response with no body and a status code. + */ + noContent(code: number): void + /** + * Redirect redirects the request to a provided URL with status code. + */ + redirect(code: number, url: string): void + /** + * Error invokes the registered global HTTP error handler. Generally used by middleware. + * A side-effect of calling global error handler is that now Response has been committed (sent to the client) and + * middlewares up in chain can not change Response status code or Response body anymore. + * + * Avoid using this method in handlers as no middleware will be able to effectively handle errors after that. + * Instead of calling this method in handler return your error and let it be handled by middlewares or global error handler. + */ + error(err: Error): void + /** + * Echo returns the `Echo` instance. + * + * WARNING: Remember that Echo public fields and methods are coroutine safe ONLY when you are NOT mutating them + * anywhere in your code after Echo server has started. + */ + echo(): (Echo) } // @ts-ignore - import flag = pflag + import stdContext = context /** - * Command is just that, a command for your application. - * E.g. 'go run ...' - 'run' is the command. Cobra requires - * you to define the usage and description as part of your command - * definition to ensure usability. + * Echo is the top-level framework instance. + * + * Goroutine safety: Do not mutate Echo instance fields after server has started. Accessing these + * fields from handlers/middlewares and changing field values at the same time leads to data-races. + * Same rule applies to adding new routes after server has been started - Adding a route is not Goroutine safe action. */ - interface Command { + interface Echo { /** - * Use is the one-line usage message. - * Recommended syntax is as follows: + * NewContextFunc allows using custom context implementations, instead of default *echo.context + */ + newContextFunc: (e: Echo, pathParamAllocSize: number) => ServableContext + debug: boolean + httpErrorHandler: HTTPErrorHandler + binder: Binder + jsonSerializer: JSONSerializer + validator: Validator + renderer: Renderer + logger: Logger + ipExtractor: IPExtractor + /** + * Filesystem is file system used by Static and File handlers to access files. + * Defaults to os.DirFS(".") + * + * When dealing with `embed.FS` use `fs := echo.MustSubFS(fs, "rootDirectory") to create sub fs which uses necessary + * prefix for directory path. This is necessary as `//go:embed assets/images` embeds files with paths + * including `assets/images` as their prefix. + */ + filesystem: fs.FS + /** + * OnAddRoute is called when Echo adds new route to specific host router. Handler is called for every router + * and before route is added to the host router. + */ + onAddRoute: (host: string, route: Routable) => void + } + /** + * HandlerFunc defines a function to serve HTTP requests. + */ + interface HandlerFunc {(c: Context): void } + /** + * MiddlewareFunc defines a function to process middleware. + */ + interface MiddlewareFunc {(next: HandlerFunc): HandlerFunc } + interface Echo { + /** + * NewContext returns a new Context instance. + * + * Note: both request and response can be left to nil as Echo.ServeHTTP will call c.Reset(req,resp) anyway + * these arguments are useful when creating context for tests and cases like that. + */ + newContext(r: http.Request, w: http.ResponseWriter): Context + } + interface Echo { + /** + * Router returns the default router. + */ + router(): Router + } + interface Echo { + /** + * Routers returns the new map of host => router. + */ + routers(): _TygojaDict + } + interface Echo { + /** + * RouterFor returns Router for given host. When host is left empty the default router is returned. + */ + routerFor(host: string): [Router, boolean] + } + interface Echo { + /** + * ResetRouterCreator resets callback for creating new router instances. + * Note: current (default) router is immediately replaced with router created with creator func and vhost routers are cleared. + */ + resetRouterCreator(creator: (e: Echo) => Router): void + } + interface Echo { + /** + * Pre adds middleware to the chain which is run before router tries to find matching route. + * Meaning middleware is executed even for 404 (not found) cases. + */ + pre(...middleware: MiddlewareFunc[]): void + } + interface Echo { + /** + * Use adds middleware to the chain which is run after router has found matching route and before route/request handler method is executed. + */ + use(...middleware: MiddlewareFunc[]): void + } + interface Echo { + /** + * CONNECT registers a new CONNECT route for a path with matching handler in the + * router with optional route-level middleware. Panics on error. + */ + connect(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * DELETE registers a new DELETE route for a path with matching handler in the router + * with optional route-level middleware. Panics on error. + */ + delete(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * GET registers a new GET route for a path with matching handler in the router + * with optional route-level middleware. Panics on error. + */ + get(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * HEAD registers a new HEAD route for a path with matching handler in the + * router with optional route-level middleware. Panics on error. + */ + head(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * OPTIONS registers a new OPTIONS route for a path with matching handler in the + * router with optional route-level middleware. Panics on error. + */ + options(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * PATCH registers a new PATCH route for a path with matching handler in the + * router with optional route-level middleware. Panics on error. + */ + patch(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * POST registers a new POST route for a path with matching handler in the + * router with optional route-level middleware. Panics on error. + */ + post(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * PUT registers a new PUT route for a path with matching handler in the + * router with optional route-level middleware. Panics on error. + */ + put(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * TRACE registers a new TRACE route for a path with matching handler in the + * router with optional route-level middleware. Panics on error. + */ + trace(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * RouteNotFound registers a special-case route which is executed when no other route is found (i.e. HTTP 404 cases) + * for current request URL. + * Path supports static and named/any parameters just like other http method is defined. Generally path is ended with + * wildcard/match-any character (`/*`, `/download/*` etc). + * + * Example: `e.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })` + */ + routeNotFound(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * Any registers a new route for all HTTP methods (supported by Echo) and path with matching handler + * in the router with optional route-level middleware. + * + * Note: this method only adds specific set of supported HTTP methods as handler and is not true + * "catch-any-arbitrary-method" way of matching requests. + */ + any(path: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): Routes + } + interface Echo { + /** + * Match registers a new route for multiple HTTP methods and path with matching + * handler in the router with optional route-level middleware. Panics on error. + */ + match(methods: Array, path: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): Routes + } + interface Echo { + /** + * Static registers a new route with path prefix to serve static files from the provided root directory. + */ + static(pathPrefix: string): RouteInfo + } + interface Echo { + /** + * StaticFS registers a new route with path prefix to serve static files from the provided file system. + * + * When dealing with `embed.FS` use `fs := echo.MustSubFS(fs, "rootDirectory") to create sub fs which uses necessary + * prefix for directory path. This is necessary as `//go:embed assets/images` embeds files with paths + * including `assets/images` as their prefix. + */ + staticFS(pathPrefix: string, filesystem: fs.FS): RouteInfo + } + interface Echo { + /** + * FileFS registers a new route with path to serve file from the provided file system. + */ + fileFS(path: string, filesystem: fs.FS, ...m: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * File registers a new route with path to serve a static file with optional route-level middleware. Panics on error. + */ + file(path: string, ...middleware: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * AddRoute registers a new Route with default host Router + */ + addRoute(route: Routable): RouteInfo + } + interface Echo { + /** + * Add registers a new route for an HTTP method and path with matching handler + * in the router with optional route-level middleware. + */ + add(method: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): RouteInfo + } + interface Echo { + /** + * Host creates a new router group for the provided host and optional host-level middleware. + */ + host(name: string, ...m: MiddlewareFunc[]): (Group) + } + interface Echo { + /** + * Group creates a new router group with prefix and optional group-level middleware. + */ + group(prefix: string, ...m: MiddlewareFunc[]): (Group) + } + interface Echo { + /** + * AcquireContext returns an empty `Context` instance from the pool. + * You must return the context by calling `ReleaseContext()`. + */ + acquireContext(): Context + } + interface Echo { + /** + * ReleaseContext returns the `Context` instance back to the pool. + * You must call it after `AcquireContext()`. + */ + releaseContext(c: Context): void + } + interface Echo { + /** + * ServeHTTP implements `http.Handler` interface, which serves HTTP requests. + */ + serveHTTP(w: http.ResponseWriter, r: http.Request): void + } + interface Echo { + /** + * Start stars HTTP server on given address with Echo as a handler serving requests. The server can be shutdown by + * sending os.Interrupt signal with `ctrl+c`. + * + * Note: this method is created for use in examples/demos and is deliberately simple without providing configuration + * options. + * + * In need of customization use: + * * ``` - * [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required. - * ... indicates that you can specify multiple values for the previous argument. - * | indicates mutually exclusive information. You can use the argument to the left of the separator or the - * argument to the right of the separator. You cannot use both arguments in a single use of the command. - * { } delimits a set of mutually exclusive arguments when one of the arguments is required. If the arguments are - * optional, they are enclosed in brackets ([ ]). + * sc := echo.StartConfig{Address: ":8080"} + * if err := sc.Start(e); err != http.ErrServerClosed { + * log.Fatal(err) + * } * ``` - * Example: add [-F file | -D dir]... [-f format] profile - */ - use: string - /** - * Aliases is an array of aliases that can be used instead of the first word in Use. - */ - aliases: Array - /** - * SuggestFor is an array of command names for which this command will be suggested - - * similar to aliases but only suggests. - */ - suggestFor: Array - /** - * Short is the short description shown in the 'help' output. - */ - short: string - /** - * The group id under which this subcommand is grouped in the 'help' output of its parent. - */ - groupID: string - /** - * Long is the long message shown in the 'help ' output. - */ - long: string - /** - * Example is examples of how to use the command. - */ - example: string - /** - * ValidArgs is list of all valid non-flag arguments that are accepted in shell completions - */ - validArgs: Array - /** - * ValidArgsFunction is an optional function that provides valid non-flag arguments for shell completion. - * It is a dynamic version of using ValidArgs. - * Only one of ValidArgs and ValidArgsFunction can be used for a command. - */ - validArgsFunction: (cmd: Command, args: Array, toComplete: string) => [Array, ShellCompDirective] - /** - * Expected arguments - */ - args: PositionalArgs - /** - * ArgAliases is List of aliases for ValidArgs. - * These are not suggested to the user in the shell completion, - * but accepted if entered manually. - */ - argAliases: Array - /** - * BashCompletionFunction is custom bash functions used by the legacy bash autocompletion generator. - * For portability with other shells, it is recommended to instead use ValidArgsFunction - */ - bashCompletionFunction: string - /** - * Deprecated defines, if this command is deprecated and should print this string when used. - */ - deprecated: string - /** - * Annotations are key/value pairs that can be used by applications to identify or - * group commands. - */ - annotations: _TygojaDict - /** - * Version defines the version for this command. If this value is non-empty and the command does not - * define a "version" flag, a "version" boolean flag will be added to the command and, if specified, - * will print content of the "Version" variable. A shorthand "v" flag will also be added if the - * command does not define one. - */ - version: string - /** - * The *Run functions are executed in the following order: + * + * // or standard library `http.Server` + * * ``` - * * PersistentPreRun() - * * PreRun() - * * Run() - * * PostRun() - * * PersistentPostRun() + * s := http.Server{Addr: ":8080", Handler: e} + * if err := s.ListenAndServe(); err != http.ErrServerClosed { + * log.Fatal(err) + * } * ``` - * All functions get the same args, the arguments after the command name. - * - * PersistentPreRun: children of this command will inherit and execute. */ - persistentPreRun: (cmd: Command, args: Array) => void - /** - * PersistentPreRunE: PersistentPreRun but returns an error. - */ - persistentPreRunE: (cmd: Command, args: Array) => void - /** - * PreRun: children of this command will not inherit. - */ - preRun: (cmd: Command, args: Array) => void - /** - * PreRunE: PreRun but returns an error. - */ - preRunE: (cmd: Command, args: Array) => void - /** - * Run: Typically the actual work function. Most commands will only implement this. - */ - run: (cmd: Command, args: Array) => void - /** - * RunE: Run but returns an error. - */ - runE: (cmd: Command, args: Array) => void - /** - * PostRun: run after the Run command. - */ - postRun: (cmd: Command, args: Array) => void - /** - * PostRunE: PostRun but returns an error. - */ - postRunE: (cmd: Command, args: Array) => void - /** - * PersistentPostRun: children of this command will inherit and execute after PostRun. - */ - persistentPostRun: (cmd: Command, args: Array) => void - /** - * PersistentPostRunE: PersistentPostRun but returns an error. - */ - persistentPostRunE: (cmd: Command, args: Array) => void - /** - * FParseErrWhitelist flag parse errors to be ignored - */ - fParseErrWhitelist: FParseErrWhitelist - /** - * CompletionOptions is a set of options to control the handling of shell completion - */ - completionOptions: CompletionOptions - /** - * TraverseChildren parses flags on all parents before executing child command. - */ - traverseChildren: boolean - /** - * Hidden defines, if this command is hidden and should NOT show up in the list of available commands. - */ - hidden: boolean - /** - * SilenceErrors is an option to quiet errors down stream. - */ - silenceErrors: boolean - /** - * SilenceUsage is an option to silence usage when an error occurs. - */ - silenceUsage: boolean - /** - * DisableFlagParsing disables the flag parsing. - * If this is true all flags will be passed to the command as arguments. - */ - disableFlagParsing: boolean - /** - * DisableAutoGenTag defines, if gen tag ("Auto generated by spf13/cobra...") - * will be printed by generating docs for this command. - */ - disableAutoGenTag: boolean - /** - * DisableFlagsInUseLine will disable the addition of [flags] to the usage - * line of a command when printing help or generating docs - */ - disableFlagsInUseLine: boolean - /** - * DisableSuggestions disables the suggestions based on Levenshtein distance - * that go along with 'unknown command' messages. - */ - disableSuggestions: boolean - /** - * SuggestionsMinimumDistance defines minimum levenshtein distance to display suggestions. - * Must be > 0. - */ - suggestionsMinimumDistance: number - } - interface Command { - /** - * Context returns underlying command context. If command was executed - * with ExecuteContext or the context was set with SetContext, the - * previously set context will be returned. Otherwise, nil is returned. - * - * Notice that a call to Execute and ExecuteC will replace a nil context of - * a command with a context.Background, so a background context will be - * returned by Context after one of these functions has been called. - */ - context(): context.Context - } - interface Command { - /** - * SetContext sets context for the command. This context will be overwritten by - * Command.ExecuteContext or Command.ExecuteContextC. - */ - setContext(ctx: context.Context): void - } - interface Command { - /** - * SetArgs sets arguments for the command. It is set to os.Args[1:] by default, if desired, can be overridden - * particularly useful when testing. - */ - setArgs(a: Array): void - } - interface Command { - /** - * SetOutput sets the destination for usage and error messages. - * If output is nil, os.Stderr is used. - * Deprecated: Use SetOut and/or SetErr instead - */ - setOutput(output: io.Writer): void - } - interface Command { - /** - * SetOut sets the destination for usage messages. - * If newOut is nil, os.Stdout is used. - */ - setOut(newOut: io.Writer): void - } - interface Command { - /** - * SetErr sets the destination for error messages. - * If newErr is nil, os.Stderr is used. - */ - setErr(newErr: io.Writer): void - } - interface Command { - /** - * SetIn sets the source for input data - * If newIn is nil, os.Stdin is used. - */ - setIn(newIn: io.Reader): void - } - interface Command { - /** - * SetUsageFunc sets usage function. Usage can be defined by application. - */ - setUsageFunc(f: (_arg0: Command) => void): void - } - interface Command { - /** - * SetUsageTemplate sets usage template. Can be defined by Application. - */ - setUsageTemplate(s: string): void - } - interface Command { - /** - * SetFlagErrorFunc sets a function to generate an error when flag parsing - * fails. - */ - setFlagErrorFunc(f: (_arg0: Command, _arg1: Error) => void): void - } - interface Command { - /** - * SetHelpFunc sets help function. Can be defined by Application. - */ - setHelpFunc(f: (_arg0: Command, _arg1: Array) => void): void - } - interface Command { - /** - * SetHelpCommand sets help command. - */ - setHelpCommand(cmd: Command): void - } - interface Command { - /** - * SetHelpCommandGroupID sets the group id of the help command. - */ - setHelpCommandGroupID(groupID: string): void - } - interface Command { - /** - * SetCompletionCommandGroupID sets the group id of the completion command. - */ - setCompletionCommandGroupID(groupID: string): void - } - interface Command { - /** - * SetHelpTemplate sets help template to be used. Application can use it to set custom template. - */ - setHelpTemplate(s: string): void - } - interface Command { - /** - * SetVersionTemplate sets version template to be used. Application can use it to set custom template. - */ - setVersionTemplate(s: string): void - } - interface Command { - /** - * SetGlobalNormalizationFunc sets a normalization function to all flag sets and also to child commands. - * The user should not have a cyclic dependency on commands. - */ - setGlobalNormalizationFunc(n: (f: any, name: string) => any): void - } - interface Command { - /** - * OutOrStdout returns output to stdout. - */ - outOrStdout(): io.Writer - } - interface Command { - /** - * OutOrStderr returns output to stderr - */ - outOrStderr(): io.Writer - } - interface Command { - /** - * ErrOrStderr returns output to stderr - */ - errOrStderr(): io.Writer - } - interface Command { - /** - * InOrStdin returns input to stdin - */ - inOrStdin(): io.Reader - } - interface Command { - /** - * UsageFunc returns either the function set by SetUsageFunc for this command - * or a parent, or it returns a default usage function. - */ - usageFunc(): (_arg0: Command) => void - } - interface Command { - /** - * Usage puts out the usage for the command. - * Used when a user provides invalid input. - * Can be defined by user by overriding UsageFunc. - */ - usage(): void - } - interface Command { - /** - * HelpFunc returns either the function set by SetHelpFunc for this command - * or a parent, or it returns a function with default help behavior. - */ - helpFunc(): (_arg0: Command, _arg1: Array) => void - } - interface Command { - /** - * Help puts out the help for the command. - * Used when a user calls help [command]. - * Can be defined by user by overriding HelpFunc. - */ - help(): void - } - interface Command { - /** - * UsageString returns usage string. - */ - usageString(): string - } - interface Command { - /** - * FlagErrorFunc returns either the function set by SetFlagErrorFunc for this - * command or a parent, or it returns a function which returns the original - * error. - */ - flagErrorFunc(): (_arg0: Command, _arg1: Error) => void - } - interface Command { - /** - * UsagePadding return padding for the usage. - */ - usagePadding(): number - } - interface Command { - /** - * CommandPathPadding return padding for the command path. - */ - commandPathPadding(): number - } - interface Command { - /** - * NamePadding returns padding for the name. - */ - namePadding(): number - } - interface Command { - /** - * UsageTemplate returns usage template for the command. - */ - usageTemplate(): string - } - interface Command { - /** - * HelpTemplate return help template for the command. - */ - helpTemplate(): string - } - interface Command { - /** - * VersionTemplate return version template for the command. - */ - versionTemplate(): string - } - interface Command { - /** - * Find the target command given the args and command tree - * Meant to be run on the highest node. Only searches down. - */ - find(args: Array): [(Command | undefined), Array] - } - interface Command { - /** - * Traverse the command tree to find the command, and parse args for - * each parent. - */ - traverse(args: Array): [(Command | undefined), Array] - } - interface Command { - /** - * SuggestionsFor provides suggestions for the typedName. - */ - suggestionsFor(typedName: string): Array - } - interface Command { - /** - * VisitParents visits all parents of the command and invokes fn on each parent. - */ - visitParents(fn: (_arg0: Command) => void): void - } - interface Command { - /** - * Root finds root command. - */ - root(): (Command | undefined) - } - interface Command { - /** - * ArgsLenAtDash will return the length of c.Flags().Args at the moment - * when a -- was found during args parsing. - */ - argsLenAtDash(): number - } - interface Command { - /** - * ExecuteContext is the same as Execute(), but sets the ctx on the command. - * Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs - * functions. - */ - executeContext(ctx: context.Context): void - } - interface Command { - /** - * Execute uses the args (os.Args[1:] by default) - * and run through the command tree finding appropriate matches - * for commands and then corresponding flags. - */ - execute(): void - } - interface Command { - /** - * ExecuteContextC is the same as ExecuteC(), but sets the ctx on the command. - * Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs - * functions. - */ - executeContextC(ctx: context.Context): (Command | undefined) - } - interface Command { - /** - * ExecuteC executes the command. - */ - executeC(): (Command | undefined) - } - interface Command { - validateArgs(args: Array): void - } - interface Command { - /** - * ValidateRequiredFlags validates all required flags are present and returns an error otherwise - */ - validateRequiredFlags(): void - } - interface Command { - /** - * InitDefaultHelpFlag adds default help flag to c. - * It is called automatically by executing the c or by calling help and usage. - * If c already has help flag, it will do nothing. - */ - initDefaultHelpFlag(): void - } - interface Command { - /** - * InitDefaultVersionFlag adds default version flag to c. - * It is called automatically by executing the c. - * If c already has a version flag, it will do nothing. - * If c.Version is empty, it will do nothing. - */ - initDefaultVersionFlag(): void - } - interface Command { - /** - * InitDefaultHelpCmd adds default help command to c. - * It is called automatically by executing the c or by calling help and usage. - * If c already has help command or c has no subcommands, it will do nothing. - */ - initDefaultHelpCmd(): void - } - interface Command { - /** - * ResetCommands delete parent, subcommand and help command from c. - */ - resetCommands(): void - } - interface Command { - /** - * Commands returns a sorted slice of child commands. - */ - commands(): Array<(Command | undefined)> - } - interface Command { - /** - * AddCommand adds one or more commands to this parent command. - */ - addCommand(...cmds: (Command | undefined)[]): void - } - interface Command { - /** - * Groups returns a slice of child command groups. - */ - groups(): Array<(Group | undefined)> - } - interface Command { - /** - * AllChildCommandsHaveGroup returns if all subcommands are assigned to a group - */ - allChildCommandsHaveGroup(): boolean - } - interface Command { - /** - * ContainsGroup return if groupID exists in the list of command groups. - */ - containsGroup(groupID: string): boolean - } - interface Command { - /** - * AddGroup adds one or more command groups to this parent command. - */ - addGroup(...groups: (Group | undefined)[]): void - } - interface Command { - /** - * RemoveCommand removes one or more commands from a parent command. - */ - removeCommand(...cmds: (Command | undefined)[]): void - } - interface Command { - /** - * Print is a convenience method to Print to the defined output, fallback to Stderr if not set. - */ - print(...i: { - }[]): void - } - interface Command { - /** - * Println is a convenience method to Println to the defined output, fallback to Stderr if not set. - */ - println(...i: { - }[]): void - } - interface Command { - /** - * Printf is a convenience method to Printf to the defined output, fallback to Stderr if not set. - */ - printf(format: string, ...i: { - }[]): void - } - interface Command { - /** - * PrintErr is a convenience method to Print to the defined Err output, fallback to Stderr if not set. - */ - printErr(...i: { - }[]): void - } - interface Command { - /** - * PrintErrln is a convenience method to Println to the defined Err output, fallback to Stderr if not set. - */ - printErrln(...i: { - }[]): void - } - interface Command { - /** - * PrintErrf is a convenience method to Printf to the defined Err output, fallback to Stderr if not set. - */ - printErrf(format: string, ...i: { - }[]): void - } - interface Command { - /** - * CommandPath returns the full path to this command. - */ - commandPath(): string - } - interface Command { - /** - * UseLine puts out the full usage for a given command (including parents). - */ - useLine(): string - } - interface Command { - /** - * DebugFlags used to determine which flags have been assigned to which commands - * and which persist. - */ - debugFlags(): void - } - interface Command { - /** - * Name returns the command's name: the first word in the use line. - */ - name(): string - } - interface Command { - /** - * HasAlias determines if a given string is an alias of the command. - */ - hasAlias(s: string): boolean - } - interface Command { - /** - * CalledAs returns the command name or alias that was used to invoke - * this command or an empty string if the command has not been called. - */ - calledAs(): string - } - interface Command { - /** - * NameAndAliases returns a list of the command name and all aliases - */ - nameAndAliases(): string - } - interface Command { - /** - * HasExample determines if the command has example. - */ - hasExample(): boolean - } - interface Command { - /** - * Runnable determines if the command is itself runnable. - */ - runnable(): boolean - } - interface Command { - /** - * HasSubCommands determines if the command has children commands. - */ - hasSubCommands(): boolean - } - interface Command { - /** - * IsAvailableCommand determines if a command is available as a non-help command - * (this includes all non deprecated/hidden commands). - */ - isAvailableCommand(): boolean - } - interface Command { - /** - * IsAdditionalHelpTopicCommand determines if a command is an additional - * help topic command; additional help topic command is determined by the - * fact that it is NOT runnable/hidden/deprecated, and has no sub commands that - * are runnable/hidden/deprecated. - * Concrete example: https://github.com/spf13/cobra/issues/393#issuecomment-282741924. - */ - isAdditionalHelpTopicCommand(): boolean - } - interface Command { - /** - * HasHelpSubCommands determines if a command has any available 'help' sub commands - * that need to be shown in the usage/help default template under 'additional help - * topics'. - */ - hasHelpSubCommands(): boolean - } - interface Command { - /** - * HasAvailableSubCommands determines if a command has available sub commands that - * need to be shown in the usage/help default template under 'available commands'. - */ - hasAvailableSubCommands(): boolean - } - interface Command { - /** - * HasParent determines if the command is a child command. - */ - hasParent(): boolean - } - interface Command { - /** - * GlobalNormalizationFunc returns the global normalization function or nil if it doesn't exist. - */ - globalNormalizationFunc(): (f: any, name: string) => any - } - interface Command { - /** - * Flags returns the complete FlagSet that applies - * to this command (local and persistent declared here and by all parents). - */ - flags(): (any | undefined) - } - interface Command { - /** - * LocalNonPersistentFlags are flags specific to this command which will NOT persist to subcommands. - */ - localNonPersistentFlags(): (any | undefined) - } - interface Command { - /** - * LocalFlags returns the local FlagSet specifically set in the current command. - */ - localFlags(): (any | undefined) - } - interface Command { - /** - * InheritedFlags returns all flags which were inherited from parent commands. - */ - inheritedFlags(): (any | undefined) - } - interface Command { - /** - * NonInheritedFlags returns all flags which were not inherited from parent commands. - */ - nonInheritedFlags(): (any | undefined) - } - interface Command { - /** - * PersistentFlags returns the persistent FlagSet specifically set in the current command. - */ - persistentFlags(): (any | undefined) - } - interface Command { - /** - * ResetFlags deletes all flags from command. - */ - resetFlags(): void - } - interface Command { - /** - * HasFlags checks if the command contains any flags (local plus persistent from the entire structure). - */ - hasFlags(): boolean - } - interface Command { - /** - * HasPersistentFlags checks if the command contains persistent flags. - */ - hasPersistentFlags(): boolean - } - interface Command { - /** - * HasLocalFlags checks if the command has flags specifically declared locally. - */ - hasLocalFlags(): boolean - } - interface Command { - /** - * HasInheritedFlags checks if the command has flags inherited from its parent command. - */ - hasInheritedFlags(): boolean - } - interface Command { - /** - * HasAvailableFlags checks if the command contains any flags (local plus persistent from the entire - * structure) which are not hidden or deprecated. - */ - hasAvailableFlags(): boolean - } - interface Command { - /** - * HasAvailablePersistentFlags checks if the command contains persistent flags which are not hidden or deprecated. - */ - hasAvailablePersistentFlags(): boolean - } - interface Command { - /** - * HasAvailableLocalFlags checks if the command has flags specifically declared locally which are not hidden - * or deprecated. - */ - hasAvailableLocalFlags(): boolean - } - interface Command { - /** - * HasAvailableInheritedFlags checks if the command has flags inherited from its parent command which are - * not hidden or deprecated. - */ - hasAvailableInheritedFlags(): boolean - } - interface Command { - /** - * Flag climbs up the command tree looking for matching flag. - */ - flag(name: string): (any | undefined) - } - interface Command { - /** - * ParseFlags parses persistent flag tree and local flags. - */ - parseFlags(args: Array): void - } - interface Command { - /** - * Parent returns a commands parent command. - */ - parent(): (Command | undefined) - } - interface Command { - /** - * RegisterFlagCompletionFunc should be called to register a function to provide completion for a flag. - */ - registerFlagCompletionFunc(flagName: string, f: (cmd: Command, args: Array, toComplete: string) => [Array, ShellCompDirective]): void - } - interface Command { - /** - * InitDefaultCompletionCmd adds a default 'completion' command to c. - * This function will do nothing if any of the following is true: - * 1- the feature has been explicitly disabled by the program, - * 2- c has no subcommands (to avoid creating one), - * 3- c already has a 'completion' command provided by the program. - */ - initDefaultCompletionCmd(): void - } - interface Command { - /** - * GenFishCompletion generates fish completion file and writes to the passed writer. - */ - genFishCompletion(w: io.Writer, includeDesc: boolean): void - } - interface Command { - /** - * GenFishCompletionFile generates fish completion file. - */ - genFishCompletionFile(filename: string, includeDesc: boolean): void - } - interface Command { - /** - * MarkFlagsRequiredTogether marks the given flags with annotations so that Cobra errors - * if the command is invoked with a subset (but not all) of the given flags. - */ - markFlagsRequiredTogether(...flagNames: string[]): void - } - interface Command { - /** - * MarkFlagsMutuallyExclusive marks the given flags with annotations so that Cobra errors - * if the command is invoked with more than one flag from the given set of flags. - */ - markFlagsMutuallyExclusive(...flagNames: string[]): void - } - interface Command { - /** - * ValidateFlagGroups validates the mutuallyExclusive/requiredAsGroup logic and returns the - * first error encountered. - */ - validateFlagGroups(): void - } - interface Command { - /** - * GenPowerShellCompletionFile generates powershell completion file without descriptions. - */ - genPowerShellCompletionFile(filename: string): void - } - interface Command { - /** - * GenPowerShellCompletion generates powershell completion file without descriptions - * and writes it to the passed writer. - */ - genPowerShellCompletion(w: io.Writer): void - } - interface Command { - /** - * GenPowerShellCompletionFileWithDesc generates powershell completion file with descriptions. - */ - genPowerShellCompletionFileWithDesc(filename: string): void - } - interface Command { - /** - * GenPowerShellCompletionWithDesc generates powershell completion file with descriptions - * and writes it to the passed writer. - */ - genPowerShellCompletionWithDesc(w: io.Writer): void - } - interface Command { - /** - * MarkFlagRequired instructs the various shell completion implementations to - * prioritize the named flag when performing completion, - * and causes your command to report an error if invoked without the flag. - */ - markFlagRequired(name: string): void - } - interface Command { - /** - * MarkPersistentFlagRequired instructs the various shell completion implementations to - * prioritize the named persistent flag when performing completion, - * and causes your command to report an error if invoked without the flag. - */ - markPersistentFlagRequired(name: string): void - } - interface Command { - /** - * MarkFlagFilename instructs the various shell completion implementations to - * limit completions for the named flag to the specified file extensions. - */ - markFlagFilename(name: string, ...extensions: string[]): void - } - interface Command { - /** - * MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. - * The bash completion script will call the bash function f for the flag. - * - * This will only work for bash completion. - * It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows - * to register a Go function which will work across all shells. - */ - markFlagCustom(name: string, f: string): void - } - interface Command { - /** - * MarkPersistentFlagFilename instructs the various shell completion - * implementations to limit completions for the named persistent flag to the - * specified file extensions. - */ - markPersistentFlagFilename(name: string, ...extensions: string[]): void - } - interface Command { - /** - * MarkFlagDirname instructs the various shell completion implementations to - * limit completions for the named flag to directory names. - */ - markFlagDirname(name: string): void - } - interface Command { - /** - * MarkPersistentFlagDirname instructs the various shell completion - * implementations to limit completions for the named persistent flag to - * directory names. - */ - markPersistentFlagDirname(name: string): void - } - interface Command { - /** - * GenZshCompletionFile generates zsh completion file including descriptions. - */ - genZshCompletionFile(filename: string): void - } - interface Command { - /** - * GenZshCompletion generates zsh completion file including descriptions - * and writes it to the passed writer. - */ - genZshCompletion(w: io.Writer): void - } - interface Command { - /** - * GenZshCompletionFileNoDesc generates zsh completion file without descriptions. - */ - genZshCompletionFileNoDesc(filename: string): void - } - interface Command { - /** - * GenZshCompletionNoDesc generates zsh completion file without descriptions - * and writes it to the passed writer. - */ - genZshCompletionNoDesc(w: io.Writer): void - } - interface Command { - /** - * MarkZshCompPositionalArgumentFile only worked for zsh and its behavior was - * not consistent with Bash completion. It has therefore been disabled. - * Instead, when no other completion is specified, file completion is done by - * default for every argument. One can disable file completion on a per-argument - * basis by using ValidArgsFunction and ShellCompDirectiveNoFileComp. - * To achieve file extension filtering, one can use ValidArgsFunction and - * ShellCompDirectiveFilterFileExt. - * - * Deprecated - */ - markZshCompPositionalArgumentFile(argPosition: number, ...patterns: string[]): void - } - interface Command { - /** - * MarkZshCompPositionalArgumentWords only worked for zsh. It has therefore - * been disabled. - * To achieve the same behavior across all shells, one can use - * ValidArgs (for the first argument only) or ValidArgsFunction for - * any argument (can include the first one also). - * - * Deprecated - */ - markZshCompPositionalArgumentWords(argPosition: number, ...words: string[]): void + start(address: string): void } } @@ -10693,7 +10875,7 @@ namespace schema { /** * Clone creates a deep clone of the current schema. */ - clone(): (Schema | undefined) + clone(): (Schema) } interface Schema { /** @@ -10706,13 +10888,13 @@ namespace schema { /** * GetFieldById returns a single field by its id. */ - getFieldById(id: string): (SchemaField | undefined) + getFieldById(id: string): (SchemaField) } interface Schema { /** * GetFieldByName returns a single field by its name. */ - getFieldByName(name: string): (SchemaField | undefined) + getFieldByName(name: string): (SchemaField) } interface Schema { /** @@ -10771,655 +10953,12 @@ namespace schema { } } -/** - * Package sql provides a generic interface around SQL (or SQL-like) - * databases. - * - * The sql package must be used in conjunction with a database driver. - * See https://golang.org/s/sqldrivers for a list of drivers. - * - * Drivers that do not support context cancellation will not return until - * after the query is completed. - * - * For usage examples, see the wiki page at - * https://golang.org/s/sqlwiki. - */ -namespace sql { - /** - * TxOptions holds the transaction options to be used in DB.BeginTx. - */ - interface TxOptions { - /** - * Isolation is the transaction isolation level. - * If zero, the driver or database's default level is used. - */ - isolation: IsolationLevel - readOnly: boolean - } - /** - * DB is a database handle representing a pool of zero or more - * underlying connections. It's safe for concurrent use by multiple - * goroutines. - * - * The sql package creates and frees connections automatically; it - * also maintains a free pool of idle connections. If the database has - * a concept of per-connection state, such state can be reliably observed - * within a transaction (Tx) or connection (Conn). Once DB.Begin is called, the - * returned Tx is bound to a single connection. Once Commit or - * Rollback is called on the transaction, that transaction's - * connection is returned to DB's idle connection pool. The pool size - * can be controlled with SetMaxIdleConns. - */ - interface DB { - } - interface DB { - /** - * PingContext verifies a connection to the database is still alive, - * establishing a connection if necessary. - */ - pingContext(ctx: context.Context): void - } - interface DB { - /** - * Ping verifies a connection to the database is still alive, - * establishing a connection if necessary. - * - * Ping uses context.Background internally; to specify the context, use - * PingContext. - */ - ping(): void - } - interface DB { - /** - * Close closes the database and prevents new queries from starting. - * Close then waits for all queries that have started processing on the server - * to finish. - * - * It is rare to Close a DB, as the DB handle is meant to be - * long-lived and shared between many goroutines. - */ - close(): void - } - interface DB { - /** - * SetMaxIdleConns sets the maximum number of connections in the idle - * connection pool. - * - * If MaxOpenConns is greater than 0 but less than the new MaxIdleConns, - * then the new MaxIdleConns will be reduced to match the MaxOpenConns limit. - * - * If n <= 0, no idle connections are retained. - * - * The default max idle connections is currently 2. This may change in - * a future release. - */ - setMaxIdleConns(n: number): void - } - interface DB { - /** - * SetMaxOpenConns sets the maximum number of open connections to the database. - * - * If MaxIdleConns is greater than 0 and the new MaxOpenConns is less than - * MaxIdleConns, then MaxIdleConns will be reduced to match the new - * MaxOpenConns limit. - * - * If n <= 0, then there is no limit on the number of open connections. - * The default is 0 (unlimited). - */ - setMaxOpenConns(n: number): void - } - interface DB { - /** - * SetConnMaxLifetime sets the maximum amount of time a connection may be reused. - * - * Expired connections may be closed lazily before reuse. - * - * If d <= 0, connections are not closed due to a connection's age. - */ - setConnMaxLifetime(d: time.Duration): void - } - interface DB { - /** - * SetConnMaxIdleTime sets the maximum amount of time a connection may be idle. - * - * Expired connections may be closed lazily before reuse. - * - * If d <= 0, connections are not closed due to a connection's idle time. - */ - setConnMaxIdleTime(d: time.Duration): void - } - interface DB { - /** - * Stats returns database statistics. - */ - stats(): DBStats - } - interface DB { - /** - * PrepareContext creates a prepared statement for later queries or executions. - * Multiple queries or executions may be run concurrently from the - * returned statement. - * The caller must call the statement's Close method - * when the statement is no longer needed. - * - * The provided context is used for the preparation of the statement, not for the - * execution of the statement. - */ - prepareContext(ctx: context.Context, query: string): (Stmt | undefined) - } - interface DB { - /** - * Prepare creates a prepared statement for later queries or executions. - * Multiple queries or executions may be run concurrently from the - * returned statement. - * The caller must call the statement's Close method - * when the statement is no longer needed. - * - * Prepare uses context.Background internally; to specify the context, use - * PrepareContext. - */ - prepare(query: string): (Stmt | undefined) - } - interface DB { - /** - * ExecContext executes a query without returning any rows. - * The args are for any placeholder parameters in the query. - */ - execContext(ctx: context.Context, query: string, ...args: any[]): Result - } - interface DB { - /** - * Exec executes a query without returning any rows. - * The args are for any placeholder parameters in the query. - * - * Exec uses context.Background internally; to specify the context, use - * ExecContext. - */ - exec(query: string, ...args: any[]): Result - } - interface DB { - /** - * QueryContext executes a query that returns rows, typically a SELECT. - * The args are for any placeholder parameters in the query. - */ - queryContext(ctx: context.Context, query: string, ...args: any[]): (Rows | undefined) - } - interface DB { - /** - * Query executes a query that returns rows, typically a SELECT. - * The args are for any placeholder parameters in the query. - * - * Query uses context.Background internally; to specify the context, use - * QueryContext. - */ - query(query: string, ...args: any[]): (Rows | undefined) - } - interface DB { - /** - * QueryRowContext executes a query that is expected to return at most one row. - * QueryRowContext always returns a non-nil value. Errors are deferred until - * Row's Scan method is called. - * If the query selects no rows, the *Row's Scan will return ErrNoRows. - * Otherwise, the *Row's Scan scans the first selected row and discards - * the rest. - */ - queryRowContext(ctx: context.Context, query: string, ...args: any[]): (Row | undefined) - } - interface DB { - /** - * QueryRow executes a query that is expected to return at most one row. - * QueryRow always returns a non-nil value. Errors are deferred until - * Row's Scan method is called. - * If the query selects no rows, the *Row's Scan will return ErrNoRows. - * Otherwise, the *Row's Scan scans the first selected row and discards - * the rest. - * - * QueryRow uses context.Background internally; to specify the context, use - * QueryRowContext. - */ - queryRow(query: string, ...args: any[]): (Row | undefined) - } - interface DB { - /** - * BeginTx starts a transaction. - * - * The provided context is used until the transaction is committed or rolled back. - * If the context is canceled, the sql package will roll back - * the transaction. Tx.Commit will return an error if the context provided to - * BeginTx is canceled. - * - * The provided TxOptions is optional and may be nil if defaults should be used. - * If a non-default isolation level is used that the driver doesn't support, - * an error will be returned. - */ - beginTx(ctx: context.Context, opts: TxOptions): (Tx | undefined) - } - interface DB { - /** - * Begin starts a transaction. The default isolation level is dependent on - * the driver. - * - * Begin uses context.Background internally; to specify the context, use - * BeginTx. - */ - begin(): (Tx | undefined) - } - interface DB { - /** - * Driver returns the database's underlying driver. - */ - driver(): any - } - interface DB { - /** - * Conn returns a single connection by either opening a new connection - * or returning an existing connection from the connection pool. Conn will - * block until either a connection is returned or ctx is canceled. - * Queries run on the same Conn will be run in the same database session. - * - * Every Conn must be returned to the database pool after use by - * calling Conn.Close. - */ - conn(ctx: context.Context): (Conn | undefined) - } - /** - * Tx is an in-progress database transaction. - * - * A transaction must end with a call to Commit or Rollback. - * - * After a call to Commit or Rollback, all operations on the - * transaction fail with ErrTxDone. - * - * The statements prepared for a transaction by calling - * the transaction's Prepare or Stmt methods are closed - * by the call to Commit or Rollback. - */ - interface Tx { - } - interface Tx { - /** - * Commit commits the transaction. - */ - commit(): void - } - interface Tx { - /** - * Rollback aborts the transaction. - */ - rollback(): void - } - interface Tx { - /** - * PrepareContext creates a prepared statement for use within a transaction. - * - * The returned statement operates within the transaction and will be closed - * when the transaction has been committed or rolled back. - * - * To use an existing prepared statement on this transaction, see Tx.Stmt. - * - * The provided context will be used for the preparation of the context, not - * for the execution of the returned statement. The returned statement - * will run in the transaction context. - */ - prepareContext(ctx: context.Context, query: string): (Stmt | undefined) - } - interface Tx { - /** - * Prepare creates a prepared statement for use within a transaction. - * - * The returned statement operates within the transaction and will be closed - * when the transaction has been committed or rolled back. - * - * To use an existing prepared statement on this transaction, see Tx.Stmt. - * - * Prepare uses context.Background internally; to specify the context, use - * PrepareContext. - */ - prepare(query: string): (Stmt | undefined) - } - interface Tx { - /** - * StmtContext returns a transaction-specific prepared statement from - * an existing statement. - * - * Example: - * - * ``` - * updateMoney, err := db.Prepare("UPDATE balance SET money=money+? WHERE id=?") - * ... - * tx, err := db.Begin() - * ... - * res, err := tx.StmtContext(ctx, updateMoney).Exec(123.45, 98293203) - * ``` - * - * The provided context is used for the preparation of the statement, not for the - * execution of the statement. - * - * The returned statement operates within the transaction and will be closed - * when the transaction has been committed or rolled back. - */ - stmtContext(ctx: context.Context, stmt: Stmt): (Stmt | undefined) - } - interface Tx { - /** - * Stmt returns a transaction-specific prepared statement from - * an existing statement. - * - * Example: - * - * ``` - * updateMoney, err := db.Prepare("UPDATE balance SET money=money+? WHERE id=?") - * ... - * tx, err := db.Begin() - * ... - * res, err := tx.Stmt(updateMoney).Exec(123.45, 98293203) - * ``` - * - * The returned statement operates within the transaction and will be closed - * when the transaction has been committed or rolled back. - * - * Stmt uses context.Background internally; to specify the context, use - * StmtContext. - */ - stmt(stmt: Stmt): (Stmt | undefined) - } - interface Tx { - /** - * ExecContext executes a query that doesn't return rows. - * For example: an INSERT and UPDATE. - */ - execContext(ctx: context.Context, query: string, ...args: any[]): Result - } - interface Tx { - /** - * Exec executes a query that doesn't return rows. - * For example: an INSERT and UPDATE. - * - * Exec uses context.Background internally; to specify the context, use - * ExecContext. - */ - exec(query: string, ...args: any[]): Result - } - interface Tx { - /** - * QueryContext executes a query that returns rows, typically a SELECT. - */ - queryContext(ctx: context.Context, query: string, ...args: any[]): (Rows | undefined) - } - interface Tx { - /** - * Query executes a query that returns rows, typically a SELECT. - * - * Query uses context.Background internally; to specify the context, use - * QueryContext. - */ - query(query: string, ...args: any[]): (Rows | undefined) - } - interface Tx { - /** - * QueryRowContext executes a query that is expected to return at most one row. - * QueryRowContext always returns a non-nil value. Errors are deferred until - * Row's Scan method is called. - * If the query selects no rows, the *Row's Scan will return ErrNoRows. - * Otherwise, the *Row's Scan scans the first selected row and discards - * the rest. - */ - queryRowContext(ctx: context.Context, query: string, ...args: any[]): (Row | undefined) - } - interface Tx { - /** - * QueryRow executes a query that is expected to return at most one row. - * QueryRow always returns a non-nil value. Errors are deferred until - * Row's Scan method is called. - * If the query selects no rows, the *Row's Scan will return ErrNoRows. - * Otherwise, the *Row's Scan scans the first selected row and discards - * the rest. - * - * QueryRow uses context.Background internally; to specify the context, use - * QueryRowContext. - */ - queryRow(query: string, ...args: any[]): (Row | undefined) - } - /** - * Stmt is a prepared statement. - * A Stmt is safe for concurrent use by multiple goroutines. - * - * If a Stmt is prepared on a Tx or Conn, it will be bound to a single - * underlying connection forever. If the Tx or Conn closes, the Stmt will - * become unusable and all operations will return an error. - * If a Stmt is prepared on a DB, it will remain usable for the lifetime of the - * DB. When the Stmt needs to execute on a new underlying connection, it will - * prepare itself on the new connection automatically. - */ - interface Stmt { - } - interface Stmt { - /** - * ExecContext executes a prepared statement with the given arguments and - * returns a Result summarizing the effect of the statement. - */ - execContext(ctx: context.Context, ...args: any[]): Result - } - interface Stmt { - /** - * Exec executes a prepared statement with the given arguments and - * returns a Result summarizing the effect of the statement. - * - * Exec uses context.Background internally; to specify the context, use - * ExecContext. - */ - exec(...args: any[]): Result - } - interface Stmt { - /** - * QueryContext executes a prepared query statement with the given arguments - * and returns the query results as a *Rows. - */ - queryContext(ctx: context.Context, ...args: any[]): (Rows | undefined) - } - interface Stmt { - /** - * Query executes a prepared query statement with the given arguments - * and returns the query results as a *Rows. - * - * Query uses context.Background internally; to specify the context, use - * QueryContext. - */ - query(...args: any[]): (Rows | undefined) - } - interface Stmt { - /** - * QueryRowContext executes a prepared query statement with the given arguments. - * If an error occurs during the execution of the statement, that error will - * be returned by a call to Scan on the returned *Row, which is always non-nil. - * If the query selects no rows, the *Row's Scan will return ErrNoRows. - * Otherwise, the *Row's Scan scans the first selected row and discards - * the rest. - */ - queryRowContext(ctx: context.Context, ...args: any[]): (Row | undefined) - } - interface Stmt { - /** - * QueryRow executes a prepared query statement with the given arguments. - * If an error occurs during the execution of the statement, that error will - * be returned by a call to Scan on the returned *Row, which is always non-nil. - * If the query selects no rows, the *Row's Scan will return ErrNoRows. - * Otherwise, the *Row's Scan scans the first selected row and discards - * the rest. - * - * Example usage: - * - * ``` - * var name string - * err := nameByUseridStmt.QueryRow(id).Scan(&name) - * ``` - * - * QueryRow uses context.Background internally; to specify the context, use - * QueryRowContext. - */ - queryRow(...args: any[]): (Row | undefined) - } - interface Stmt { - /** - * Close closes the statement. - */ - close(): void - } - /** - * Rows is the result of a query. Its cursor starts before the first row - * of the result set. Use Next to advance from row to row. - */ - interface Rows { - } - interface Rows { - /** - * Next prepares the next result row for reading with the Scan method. It - * returns true on success, or false if there is no next result row or an error - * happened while preparing it. Err should be consulted to distinguish between - * the two cases. - * - * Every call to Scan, even the first one, must be preceded by a call to Next. - */ - next(): boolean - } - interface Rows { - /** - * NextResultSet prepares the next result set for reading. It reports whether - * there is further result sets, or false if there is no further result set - * or if there is an error advancing to it. The Err method should be consulted - * to distinguish between the two cases. - * - * After calling NextResultSet, the Next method should always be called before - * scanning. If there are further result sets they may not have rows in the result - * set. - */ - nextResultSet(): boolean - } - interface Rows { - /** - * Err returns the error, if any, that was encountered during iteration. - * Err may be called after an explicit or implicit Close. - */ - err(): void - } - interface Rows { - /** - * Columns returns the column names. - * Columns returns an error if the rows are closed. - */ - columns(): Array - } - interface Rows { - /** - * ColumnTypes returns column information such as column type, length, - * and nullable. Some information may not be available from some drivers. - */ - columnTypes(): Array<(ColumnType | undefined)> - } - interface Rows { - /** - * Scan copies the columns in the current row into the values pointed - * at by dest. The number of values in dest must be the same as the - * number of columns in Rows. - * - * Scan converts columns read from the database into the following - * common Go types and special types provided by the sql package: - * - * ``` - * *string - * *[]byte - * *int, *int8, *int16, *int32, *int64 - * *uint, *uint8, *uint16, *uint32, *uint64 - * *bool - * *float32, *float64 - * *interface{} - * *RawBytes - * *Rows (cursor value) - * any type implementing Scanner (see Scanner docs) - * ``` - * - * In the most simple case, if the type of the value from the source - * column is an integer, bool or string type T and dest is of type *T, - * Scan simply assigns the value through the pointer. - * - * Scan also converts between string and numeric types, as long as no - * information would be lost. While Scan stringifies all numbers - * scanned from numeric database columns into *string, scans into - * numeric types are checked for overflow. For example, a float64 with - * value 300 or a string with value "300" can scan into a uint16, but - * not into a uint8, though float64(255) or "255" can scan into a - * uint8. One exception is that scans of some float64 numbers to - * strings may lose information when stringifying. In general, scan - * floating point columns into *float64. - * - * If a dest argument has type *[]byte, Scan saves in that argument a - * copy of the corresponding data. The copy is owned by the caller and - * can be modified and held indefinitely. The copy can be avoided by - * using an argument of type *RawBytes instead; see the documentation - * for RawBytes for restrictions on its use. - * - * If an argument has type *interface{}, Scan copies the value - * provided by the underlying driver without conversion. When scanning - * from a source value of type []byte to *interface{}, a copy of the - * slice is made and the caller owns the result. - * - * Source values of type time.Time may be scanned into values of type - * *time.Time, *interface{}, *string, or *[]byte. When converting to - * the latter two, time.RFC3339Nano is used. - * - * Source values of type bool may be scanned into types *bool, - * *interface{}, *string, *[]byte, or *RawBytes. - * - * For scanning into *bool, the source may be true, false, 1, 0, or - * string inputs parseable by strconv.ParseBool. - * - * Scan can also convert a cursor returned from a query, such as - * "select cursor(select * from my_table) from dual", into a - * *Rows value that can itself be scanned from. The parent - * select query will close any cursor *Rows if the parent *Rows is closed. - * - * If any of the first arguments implementing Scanner returns an error, - * that error will be wrapped in the returned error - */ - scan(...dest: any[]): void - } - interface Rows { - /** - * Close closes the Rows, preventing further enumeration. If Next is called - * and returns false and there are no further result sets, - * the Rows are closed automatically and it will suffice to check the - * result of Err. Close is idempotent and does not affect the result of Err. - */ - close(): void - } - /** - * A Result summarizes an executed SQL command. - */ - interface Result { - [key:string]: any; - /** - * LastInsertId returns the integer generated by the database - * in response to a command. Typically this will be from an - * "auto increment" column when inserting a new row. Not all - * databases support this feature, and the syntax of such - * statements varies. - */ - lastInsertId(): number - /** - * RowsAffected returns the number of rows affected by an - * update, insert, or delete. Not every database or database - * driver may support this. - */ - rowsAffected(): number - } -} - /** * Package models implements all PocketBase DB models and DTOs. */ namespace models { - type _subcKHJe = BaseModel - interface Admin extends _subcKHJe { + type _subVziVV = BaseModel + interface Admin extends _subVziVV { avatar: number email: string tokenKey: string @@ -11454,8 +10993,8 @@ namespace models { } // @ts-ignore import validation = ozzo_validation - type _subiZqYM = BaseModel - interface Collection extends _subiZqYM { + type _subrjVFg = BaseModel + interface Collection extends _subrjVFg { name: string type: string system: boolean @@ -11548,8 +11087,8 @@ namespace models { */ setOptions(typedOptions: any): void } - type _subuWHcx = BaseModel - interface ExternalAuth extends _subuWHcx { + type _subLUwFE = BaseModel + interface ExternalAuth extends _subLUwFE { collectionId: string recordId: string provider: string @@ -11558,8 +11097,8 @@ namespace models { interface ExternalAuth { tableName(): string } - type _subrAgAw = BaseModel - interface Record extends _subrAgAw { + type _subWLLaT = BaseModel + interface Record extends _subWLLaT { } interface Record { /** @@ -11571,7 +11110,7 @@ namespace models { /** * Collection returns the Collection model associated to the current Record model. */ - collection(): (Collection | undefined) + collection(): (Collection) } interface Record { /** @@ -11579,14 +11118,14 @@ namespace models { * with its ORIGINAL data state (aka. the initially loaded) and * everything else reset to the defaults. */ - originalCopy(): (Record | undefined) + originalCopy(): (Record) } interface Record { /** * CleanCopy returns a copy of the current record model populated only * with its LATEST data state and everything else reset to the defaults. */ - cleanCopy(): (Record | undefined) + cleanCopy(): (Record) } interface Record { /** @@ -11705,7 +11244,7 @@ namespace models { * * Returns nil if there is no such expand relation loaded. */ - expandedOne(relField: string): (Record | undefined) + expandedOne(relField: string): (Record) } interface Record { /** @@ -11745,7 +11284,7 @@ namespace models { * FindFileFieldByFile returns the first file type field for which * any of the record's data contains the provided filename. */ - findFileFieldByFile(filename: string): (schema.SchemaField | undefined) + findFileFieldByFile(filename: string): (schema.SchemaField) } interface Record { /** @@ -11957,582 +11496,6 @@ namespace models { } } -/** - * Package echo implements high performance, minimalist Go web framework. - * - * Example: - * - * ``` - * package main - * - * import ( - * "github.com/labstack/echo/v5" - * "github.com/labstack/echo/v5/middleware" - * "log" - * "net/http" - * ) - * - * // Handler - * func hello(c echo.Context) error { - * return c.String(http.StatusOK, "Hello, World!") - * } - * - * func main() { - * // Echo instance - * e := echo.New() - * - * // Middleware - * e.Use(middleware.Logger()) - * e.Use(middleware.Recover()) - * - * // Routes - * e.GET("/", hello) - * - * // Start server - * if err := e.Start(":8080"); err != http.ErrServerClosed { - * log.Fatal(err) - * } - * } - * ``` - * - * Learn more at https://echo.labstack.com - */ -namespace echo { - /** - * Context represents the context of the current HTTP request. It holds request and - * response objects, path, path parameters, data and registered handler. - */ - interface Context { - [key:string]: any; - /** - * Request returns `*http.Request`. - */ - request(): (http.Request | undefined) - /** - * SetRequest sets `*http.Request`. - */ - setRequest(r: http.Request): void - /** - * SetResponse sets `*Response`. - */ - setResponse(r: Response): void - /** - * Response returns `*Response`. - */ - response(): (Response | undefined) - /** - * IsTLS returns true if HTTP connection is TLS otherwise false. - */ - isTLS(): boolean - /** - * IsWebSocket returns true if HTTP connection is WebSocket otherwise false. - */ - isWebSocket(): boolean - /** - * Scheme returns the HTTP protocol scheme, `http` or `https`. - */ - scheme(): string - /** - * RealIP returns the client's network address based on `X-Forwarded-For` - * or `X-Real-IP` request header. - * The behavior can be configured using `Echo#IPExtractor`. - */ - realIP(): string - /** - * RouteInfo returns current request route information. Method, Path, Name and params if they exist for matched route. - * In case of 404 (route not found) and 405 (method not allowed) RouteInfo returns generic struct for these cases. - */ - routeInfo(): RouteInfo - /** - * Path returns the registered path for the handler. - */ - path(): string - /** - * PathParam returns path parameter by name. - */ - pathParam(name: string): string - /** - * PathParamDefault returns the path parameter or default value for the provided name. - * - * Notes for DefaultRouter implementation: - * Path parameter could be empty for cases like that: - * * route `/release-:version/bin` and request URL is `/release-/bin` - * * route `/api/:version/image.jpg` and request URL is `/api//image.jpg` - * but not when path parameter is last part of route path - * * route `/download/file.:ext` will not match request `/download/file.` - */ - pathParamDefault(name: string, defaultValue: string): string - /** - * PathParams returns path parameter values. - */ - pathParams(): PathParams - /** - * SetPathParams sets path parameters for current request. - */ - setPathParams(params: PathParams): void - /** - * QueryParam returns the query param for the provided name. - */ - queryParam(name: string): string - /** - * QueryParamDefault returns the query param or default value for the provided name. - */ - queryParamDefault(name: string): string - /** - * QueryParams returns the query parameters as `url.Values`. - */ - queryParams(): url.Values - /** - * QueryString returns the URL query string. - */ - queryString(): string - /** - * FormValue returns the form field value for the provided name. - */ - formValue(name: string): string - /** - * FormValueDefault returns the form field value or default value for the provided name. - */ - formValueDefault(name: string): string - /** - * FormValues returns the form field values as `url.Values`. - */ - formValues(): url.Values - /** - * FormFile returns the multipart form file for the provided name. - */ - formFile(name: string): (multipart.FileHeader | undefined) - /** - * MultipartForm returns the multipart form. - */ - multipartForm(): (multipart.Form | undefined) - /** - * Cookie returns the named cookie provided in the request. - */ - cookie(name: string): (http.Cookie | undefined) - /** - * SetCookie adds a `Set-Cookie` header in HTTP response. - */ - setCookie(cookie: http.Cookie): void - /** - * Cookies returns the HTTP cookies sent with the request. - */ - cookies(): Array<(http.Cookie | undefined)> - /** - * Get retrieves data from the context. - */ - get(key: string): { - } - /** - * Set saves data in the context. - */ - set(key: string, val: { - }): void - /** - * Bind binds path params, query params and the request body into provided type `i`. The default binder - * binds body based on Content-Type header. - */ - bind(i: { - }): void - /** - * Validate validates provided `i`. It is usually called after `Context#Bind()`. - * Validator must be registered using `Echo#Validator`. - */ - validate(i: { - }): void - /** - * Render renders a template with data and sends a text/html response with status - * code. Renderer must be registered using `Echo.Renderer`. - */ - render(code: number, name: string, data: { - }): void - /** - * HTML sends an HTTP response with status code. - */ - html(code: number, html: string): void - /** - * HTMLBlob sends an HTTP blob response with status code. - */ - htmlBlob(code: number, b: string|Array): void - /** - * String sends a string response with status code. - */ - string(code: number, s: string): void - /** - * JSON sends a JSON response with status code. - */ - json(code: number, i: { - }): void - /** - * JSONPretty sends a pretty-print JSON with status code. - */ - jsonPretty(code: number, i: { - }, indent: string): void - /** - * JSONBlob sends a JSON blob response with status code. - */ - jsonBlob(code: number, b: string|Array): void - /** - * JSONP sends a JSONP response with status code. It uses `callback` to construct - * the JSONP payload. - */ - jsonp(code: number, callback: string, i: { - }): void - /** - * JSONPBlob sends a JSONP blob response with status code. It uses `callback` - * to construct the JSONP payload. - */ - jsonpBlob(code: number, callback: string, b: string|Array): void - /** - * XML sends an XML response with status code. - */ - xml(code: number, i: { - }): void - /** - * XMLPretty sends a pretty-print XML with status code. - */ - xmlPretty(code: number, i: { - }, indent: string): void - /** - * XMLBlob sends an XML blob response with status code. - */ - xmlBlob(code: number, b: string|Array): void - /** - * Blob sends a blob response with status code and content type. - */ - blob(code: number, contentType: string, b: string|Array): void - /** - * Stream sends a streaming response with status code and content type. - */ - stream(code: number, contentType: string, r: io.Reader): void - /** - * File sends a response with the content of the file. - */ - file(file: string): void - /** - * FileFS sends a response with the content of the file from given filesystem. - */ - fileFS(file: string, filesystem: fs.FS): void - /** - * Attachment sends a response as attachment, prompting client to save the - * file. - */ - attachment(file: string, name: string): void - /** - * Inline sends a response as inline, opening the file in the browser. - */ - inline(file: string, name: string): void - /** - * NoContent sends a response with no body and a status code. - */ - noContent(code: number): void - /** - * Redirect redirects the request to a provided URL with status code. - */ - redirect(code: number, url: string): void - /** - * Error invokes the registered global HTTP error handler. Generally used by middleware. - * A side-effect of calling global error handler is that now Response has been committed (sent to the client) and - * middlewares up in chain can not change Response status code or Response body anymore. - * - * Avoid using this method in handlers as no middleware will be able to effectively handle errors after that. - * Instead of calling this method in handler return your error and let it be handled by middlewares or global error handler. - */ - error(err: Error): void - /** - * Echo returns the `Echo` instance. - * - * WARNING: Remember that Echo public fields and methods are coroutine safe ONLY when you are NOT mutating them - * anywhere in your code after Echo server has started. - */ - echo(): (Echo | undefined) - } - // @ts-ignore - import stdContext = context - /** - * Echo is the top-level framework instance. - * - * Goroutine safety: Do not mutate Echo instance fields after server has started. Accessing these - * fields from handlers/middlewares and changing field values at the same time leads to data-races. - * Same rule applies to adding new routes after server has been started - Adding a route is not Goroutine safe action. - */ - interface Echo { - /** - * NewContextFunc allows using custom context implementations, instead of default *echo.context - */ - newContextFunc: (e: Echo, pathParamAllocSize: number) => ServableContext - debug: boolean - httpErrorHandler: HTTPErrorHandler - binder: Binder - jsonSerializer: JSONSerializer - validator: Validator - renderer: Renderer - logger: Logger - ipExtractor: IPExtractor - /** - * Filesystem is file system used by Static and File handlers to access files. - * Defaults to os.DirFS(".") - * - * When dealing with `embed.FS` use `fs := echo.MustSubFS(fs, "rootDirectory") to create sub fs which uses necessary - * prefix for directory path. This is necessary as `//go:embed assets/images` embeds files with paths - * including `assets/images` as their prefix. - */ - filesystem: fs.FS - /** - * OnAddRoute is called when Echo adds new route to specific host router. Handler is called for every router - * and before route is added to the host router. - */ - onAddRoute: (host: string, route: Routable) => void - } - /** - * HandlerFunc defines a function to serve HTTP requests. - */ - interface HandlerFunc {(c: Context): void } - /** - * MiddlewareFunc defines a function to process middleware. - */ - interface MiddlewareFunc {(next: HandlerFunc): HandlerFunc } - interface Echo { - /** - * NewContext returns a new Context instance. - * - * Note: both request and response can be left to nil as Echo.ServeHTTP will call c.Reset(req,resp) anyway - * these arguments are useful when creating context for tests and cases like that. - */ - newContext(r: http.Request, w: http.ResponseWriter): Context - } - interface Echo { - /** - * Router returns the default router. - */ - router(): Router - } - interface Echo { - /** - * Routers returns the new map of host => router. - */ - routers(): _TygojaDict - } - interface Echo { - /** - * RouterFor returns Router for given host. When host is left empty the default router is returned. - */ - routerFor(host: string): [Router, boolean] - } - interface Echo { - /** - * ResetRouterCreator resets callback for creating new router instances. - * Note: current (default) router is immediately replaced with router created with creator func and vhost routers are cleared. - */ - resetRouterCreator(creator: (e: Echo) => Router): void - } - interface Echo { - /** - * Pre adds middleware to the chain which is run before router tries to find matching route. - * Meaning middleware is executed even for 404 (not found) cases. - */ - pre(...middleware: MiddlewareFunc[]): void - } - interface Echo { - /** - * Use adds middleware to the chain which is run after router has found matching route and before route/request handler method is executed. - */ - use(...middleware: MiddlewareFunc[]): void - } - interface Echo { - /** - * CONNECT registers a new CONNECT route for a path with matching handler in the - * router with optional route-level middleware. Panics on error. - */ - connect(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * DELETE registers a new DELETE route for a path with matching handler in the router - * with optional route-level middleware. Panics on error. - */ - delete(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * GET registers a new GET route for a path with matching handler in the router - * with optional route-level middleware. Panics on error. - */ - get(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * HEAD registers a new HEAD route for a path with matching handler in the - * router with optional route-level middleware. Panics on error. - */ - head(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * OPTIONS registers a new OPTIONS route for a path with matching handler in the - * router with optional route-level middleware. Panics on error. - */ - options(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * PATCH registers a new PATCH route for a path with matching handler in the - * router with optional route-level middleware. Panics on error. - */ - patch(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * POST registers a new POST route for a path with matching handler in the - * router with optional route-level middleware. Panics on error. - */ - post(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * PUT registers a new PUT route for a path with matching handler in the - * router with optional route-level middleware. Panics on error. - */ - put(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * TRACE registers a new TRACE route for a path with matching handler in the - * router with optional route-level middleware. Panics on error. - */ - trace(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * RouteNotFound registers a special-case route which is executed when no other route is found (i.e. HTTP 404 cases) - * for current request URL. - * Path supports static and named/any parameters just like other http method is defined. Generally path is ended with - * wildcard/match-any character (`/*`, `/download/*` etc). - * - * Example: `e.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })` - */ - routeNotFound(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * Any registers a new route for all HTTP methods (supported by Echo) and path with matching handler - * in the router with optional route-level middleware. - * - * Note: this method only adds specific set of supported HTTP methods as handler and is not true - * "catch-any-arbitrary-method" way of matching requests. - */ - any(path: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): Routes - } - interface Echo { - /** - * Match registers a new route for multiple HTTP methods and path with matching - * handler in the router with optional route-level middleware. Panics on error. - */ - match(methods: Array, path: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): Routes - } - interface Echo { - /** - * Static registers a new route with path prefix to serve static files from the provided root directory. - */ - static(pathPrefix: string): RouteInfo - } - interface Echo { - /** - * StaticFS registers a new route with path prefix to serve static files from the provided file system. - * - * When dealing with `embed.FS` use `fs := echo.MustSubFS(fs, "rootDirectory") to create sub fs which uses necessary - * prefix for directory path. This is necessary as `//go:embed assets/images` embeds files with paths - * including `assets/images` as their prefix. - */ - staticFS(pathPrefix: string, filesystem: fs.FS): RouteInfo - } - interface Echo { - /** - * FileFS registers a new route with path to serve file from the provided file system. - */ - fileFS(path: string, filesystem: fs.FS, ...m: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * File registers a new route with path to serve a static file with optional route-level middleware. Panics on error. - */ - file(path: string, ...middleware: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * AddRoute registers a new Route with default host Router - */ - addRoute(route: Routable): RouteInfo - } - interface Echo { - /** - * Add registers a new route for an HTTP method and path with matching handler - * in the router with optional route-level middleware. - */ - add(method: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): RouteInfo - } - interface Echo { - /** - * Host creates a new router group for the provided host and optional host-level middleware. - */ - host(name: string, ...m: MiddlewareFunc[]): (Group | undefined) - } - interface Echo { - /** - * Group creates a new router group with prefix and optional group-level middleware. - */ - group(prefix: string, ...m: MiddlewareFunc[]): (Group | undefined) - } - interface Echo { - /** - * AcquireContext returns an empty `Context` instance from the pool. - * You must return the context by calling `ReleaseContext()`. - */ - acquireContext(): Context - } - interface Echo { - /** - * ReleaseContext returns the `Context` instance back to the pool. - * You must call it after `AcquireContext()`. - */ - releaseContext(c: Context): void - } - interface Echo { - /** - * ServeHTTP implements `http.Handler` interface, which serves HTTP requests. - */ - serveHTTP(w: http.ResponseWriter, r: http.Request): void - } - interface Echo { - /** - * Start stars HTTP server on given address with Echo as a handler serving requests. The server can be shutdown by - * sending os.Interrupt signal with `ctrl+c`. - * - * Note: this method is created for use in examples/demos and is deliberately simple without providing configuration - * options. - * - * In need of customization use: - * - * ``` - * sc := echo.StartConfig{Address: ":8080"} - * if err := sc.Start(e); err != http.ErrServerClosed { - * log.Fatal(err) - * } - * ``` - * - * // or standard library `http.Server` - * - * ``` - * s := http.Server{Addr: ":8080", Handler: e} - * if err := s.ListenAndServe(); err != http.ErrServerClosed { - * log.Fatal(err) - * } - * ``` - */ - start(address: string): void - } -} - namespace settings { // @ts-ignore import validation = ozzo_validation @@ -12597,14 +11560,14 @@ namespace settings { /** * Clone creates a new deep copy of the current settings. */ - clone(): (Settings | undefined) + clone(): (Settings) } interface Settings { /** * RedactClone creates a new deep copy of the current settings, * while replacing the secret values with `******`. */ - redactClone(): (Settings | undefined) + redactClone(): (Settings) } interface Settings { /** @@ -12625,19 +11588,19 @@ namespace daos { /** * AdminQuery returns a new Admin select query. */ - adminQuery(): (dbx.SelectQuery | undefined) + adminQuery(): (dbx.SelectQuery) } interface Dao { /** * FindAdminById finds the admin with the provided id. */ - findAdminById(id: string): (models.Admin | undefined) + findAdminById(id: string): (models.Admin) } interface Dao { /** * FindAdminByEmail finds the admin with the provided email address. */ - findAdminByEmail(email: string): (models.Admin | undefined) + findAdminByEmail(email: string): (models.Admin) } interface Dao { /** @@ -12645,7 +11608,7 @@ namespace daos { * * Returns an error if the JWT token is invalid or expired. */ - findAdminByToken(token: string, baseTokenKey: string): (models.Admin | undefined) + findAdminByToken(token: string, baseTokenKey: string): (models.Admin) } interface Dao { /** @@ -12730,21 +11693,21 @@ namespace daos { /** * Clone returns a new Dao with the same configuration options as the current one. */ - clone(): (Dao | undefined) + clone(): (Dao) } interface Dao { /** * WithoutHooks returns a new Dao with the same configuration options * as the current one, but without create/update/delete hooks. */ - withoutHooks(): (Dao | undefined) + withoutHooks(): (Dao) } interface Dao { /** * ModelQuery creates a new preconfigured select query with preset * SELECT, FROM and other common fields based on the provided model. */ - modelQuery(m: models.Model): (dbx.SelectQuery | undefined) + modelQuery(m: models.Model): (dbx.SelectQuery) } interface Dao { /** @@ -12780,7 +11743,7 @@ namespace daos { /** * CollectionQuery returns a new Collection select query. */ - collectionQuery(): (dbx.SelectQuery | undefined) + collectionQuery(): (dbx.SelectQuery) } interface Dao { /** @@ -12792,7 +11755,7 @@ namespace daos { /** * FindCollectionByNameOrId finds a single collection by its name (case insensitive) or id. */ - findCollectionByNameOrId(nameOrId: string): (models.Collection | undefined) + findCollectionByNameOrId(nameOrId: string): (models.Collection) } interface Dao { /** @@ -12851,7 +11814,7 @@ namespace daos { /** * ExternalAuthQuery returns a new ExternalAuth select query. */ - externalAuthQuery(): (dbx.SelectQuery | undefined) + externalAuthQuery(): (dbx.SelectQuery) } interface Dao { /** @@ -12865,14 +11828,14 @@ namespace daos { * FindExternalAuthByProvider returns the first available * ExternalAuth model for the specified provider and providerId. */ - findExternalAuthByProvider(provider: string): (models.ExternalAuth | undefined) + findExternalAuthByProvider(provider: string): (models.ExternalAuth) } interface Dao { /** * FindExternalAuthByRecordAndProvider returns the first available * ExternalAuth model for the specified record data and provider. */ - findExternalAuthByRecordAndProvider(authRecord: models.Record, provider: string): (models.ExternalAuth | undefined) + findExternalAuthByRecordAndProvider(authRecord: models.Record, provider: string): (models.ExternalAuth) } interface Dao { /** @@ -12890,13 +11853,13 @@ namespace daos { /** * ParamQuery returns a new Param select query. */ - paramQuery(): (dbx.SelectQuery | undefined) + paramQuery(): (dbx.SelectQuery) } interface Dao { /** * FindParamByKey finds the first Param model with the provided key. */ - findParamByKey(key: string): (models.Param | undefined) + findParamByKey(key: string): (models.Param) } interface Dao { /** @@ -12921,13 +11884,13 @@ namespace daos { * actually exists, the generated query will be created with a cancelled context * and will fail once an executor (Row(), One(), All(), etc.) is called. */ - recordQuery(collectionModelOrIdentifier: any): (dbx.SelectQuery | undefined) + recordQuery(collectionModelOrIdentifier: any): (dbx.SelectQuery) } interface Dao { /** * FindRecordById finds the Record model by its id. */ - findRecordById(collectionNameOrId: string, recordId: string, ...optFilters: ((q: dbx.SelectQuery) => void)[]): (models.Record | undefined) + findRecordById(collectionNameOrId: string, recordId: string, ...optFilters: ((q: dbx.SelectQuery) => void)[]): (models.Record) } interface Dao { /** @@ -12961,7 +11924,7 @@ namespace daos { * FindFirstRecordByData returns the first found record matching * the provided key-value pair. */ - findFirstRecordByData(collectionNameOrId: string, key: string, value: any): (models.Record | undefined) + findFirstRecordByData(collectionNameOrId: string, key: string, value: any): (models.Record) } interface Dao { /** @@ -13003,7 +11966,7 @@ namespace daos { * dao.FindFirstRecordByFilter("posts", "slug={:slug} && status='public'", dbx.Params{"slug": "test"}) * ``` */ - findFirstRecordByFilter(collectionNameOrId: string, filter: string, ...params: dbx.Params[]): (models.Record | undefined) + findFirstRecordByFilter(collectionNameOrId: string, filter: string, ...params: dbx.Params[]): (models.Record) } interface Dao { /** @@ -13025,7 +11988,7 @@ namespace daos { * * Returns an error if the JWT token is invalid, expired or not associated to an auth collection record. */ - findAuthRecordByToken(token: string, baseTokenKey: string): (models.Record | undefined) + findAuthRecordByToken(token: string, baseTokenKey: string): (models.Record) } interface Dao { /** @@ -13033,7 +11996,7 @@ namespace daos { * * Returns an error if it is not an auth collection or the record is not found. */ - findAuthRecordByEmail(collectionNameOrId: string, email: string): (models.Record | undefined) + findAuthRecordByEmail(collectionNameOrId: string, email: string): (models.Record) } interface Dao { /** @@ -13041,7 +12004,7 @@ namespace daos { * * Returns an error if it is not an auth collection or the record is not found. */ - findAuthRecordByUsername(collectionNameOrId: string, username: string): (models.Record | undefined) + findAuthRecordByUsername(collectionNameOrId: string, username: string): (models.Record) } interface Dao { /** @@ -13136,13 +12099,13 @@ namespace daos { /** * RequestQuery returns a new Request logs select query. */ - requestQuery(): (dbx.SelectQuery | undefined) + requestQuery(): (dbx.SelectQuery) } interface Dao { /** * FindRequestById finds a single Request log by its id. */ - findRequestById(id: string): (models.Request | undefined) + findRequestById(id: string): (models.Request) } interface Dao { /** @@ -13172,7 +12135,7 @@ namespace daos { * * Returns an error if it fails to decode the stored serialized param value. */ - findSettings(...optEncryptionKey: string[]): (settings.Settings | undefined) + findSettings(...optEncryptionKey: string[]): (settings.Settings) } interface Dao { /** @@ -13261,7 +12224,7 @@ namespace daos { * FindRecordByViewFile returns the original models.Record of the * provided view collection file. */ - findRecordByViewFile(viewCollectionNameOrId: string, fileFieldName: string, filename: string): (models.Record | undefined) + findRecordByViewFile(viewCollectionNameOrId: string, fileFieldName: string, filename: string): (models.Record) } } @@ -13284,7 +12247,7 @@ namespace core { * * DB returns the default app database instance. */ - db(): (dbx.DB | undefined) + db(): (dbx.DB) /** * Dao returns the default app Dao instance. * @@ -13292,7 +12255,7 @@ namespace core { * associated with the default app database. For example, * trying to access the request logs table will result in error. */ - dao(): (daos.Dao | undefined) + dao(): (daos.Dao) /** * Deprecated: * This method may get removed in the near future. @@ -13301,7 +12264,7 @@ namespace core { * * LogsDB returns the app logs database instance. */ - logsDB(): (dbx.DB | undefined) + logsDB(): (dbx.DB) /** * LogsDao returns the app logs Dao instance. * @@ -13309,7 +12272,7 @@ namespace core { * associated with the logs database. For example, trying to access * the users table from LogsDao will result in error. */ - logsDao(): (daos.Dao | undefined) + logsDao(): (daos.Dao) /** * DataDir returns the app data directory path. */ @@ -13327,15 +12290,15 @@ namespace core { /** * Settings returns the loaded app settings. */ - settings(): (settings.Settings | undefined) + settings(): (settings.Settings) /** * Cache returns the app internal cache store. */ - cache(): (store.Store | undefined) + cache(): (store.Store) /** * SubscriptionsBroker returns the app realtime subscriptions broker instance. */ - subscriptionsBroker(): (subscriptions.Broker | undefined) + subscriptionsBroker(): (subscriptions.Broker) /** * NewMailClient creates and returns a configured app mail client. */ @@ -13347,7 +12310,7 @@ namespace core { * NB! Make sure to call Close() on the returned result * after you are done working with it. */ - newFilesystem(): (filesystem.System | undefined) + newFilesystem(): (filesystem.System) /** * NewBackupsFilesystem creates and returns a configured filesystem.System instance * for managing app backups. @@ -13355,7 +12318,7 @@ namespace core { * NB! Make sure to call Close() on the returned result * after you are done working with it. */ - newBackupsFilesystem(): (filesystem.System | undefined) + newBackupsFilesystem(): (filesystem.System) /** * RefreshSettings reinitializes and reloads the stored application settings. */ @@ -13409,34 +12372,34 @@ namespace core { * OnBeforeBootstrap hook is triggered before initializing the main * application resources (eg. before db open and initial settings load). */ - onBeforeBootstrap(): (hook.Hook | undefined) + onBeforeBootstrap(): (hook.Hook) /** * OnAfterBootstrap hook is triggered after initializing the main * application resources (eg. after db open and initial settings load). */ - onAfterBootstrap(): (hook.Hook | undefined) + onAfterBootstrap(): (hook.Hook) /** * OnBeforeServe hook is triggered before serving the internal router (echo), * allowing you to adjust its options and attach new routes or middlewares. */ - onBeforeServe(): (hook.Hook | undefined) + onBeforeServe(): (hook.Hook) /** * OnBeforeApiError hook is triggered right before sending an error API * response to the client, allowing you to further modify the error data * or to return a completely different API response. */ - onBeforeApiError(): (hook.Hook | undefined) + onBeforeApiError(): (hook.Hook) /** * OnAfterApiError hook is triggered right after sending an error API * response to the client. * It could be used to log the final API error in external services. */ - onAfterApiError(): (hook.Hook | undefined) + onAfterApiError(): (hook.Hook) /** * OnTerminate hook is triggered when the app is in the process * of being terminated (eg. on SIGTERM signal). */ - onTerminate(): (hook.Hook | undefined) + onTerminate(): (hook.Hook) /** * OnModelBeforeCreate hook is triggered before inserting a new * model in the DB, allowing you to modify or validate the stored data. @@ -13445,7 +12408,7 @@ namespace core { * is specified, then all event handlers registered via the created hook * will be triggered and called only if their event data origin matches the tags. */ - onModelBeforeCreate(...tags: string[]): (hook.TaggedHook | undefined) + onModelBeforeCreate(...tags: string[]): (hook.TaggedHook) /** * OnModelAfterCreate hook is triggered after successfully * inserting a new model in the DB. @@ -13454,7 +12417,7 @@ namespace core { * is specified, then all event handlers registered via the created hook * will be triggered and called only if their event data origin matches the tags. */ - onModelAfterCreate(...tags: string[]): (hook.TaggedHook | undefined) + onModelAfterCreate(...tags: string[]): (hook.TaggedHook) /** * OnModelBeforeUpdate hook is triggered before updating existing * model in the DB, allowing you to modify or validate the stored data. @@ -13463,7 +12426,7 @@ namespace core { * is specified, then all event handlers registered via the created hook * will be triggered and called only if their event data origin matches the tags. */ - onModelBeforeUpdate(...tags: string[]): (hook.TaggedHook | undefined) + onModelBeforeUpdate(...tags: string[]): (hook.TaggedHook) /** * OnModelAfterUpdate hook is triggered after successfully updating * existing model in the DB. @@ -13472,7 +12435,7 @@ namespace core { * is specified, then all event handlers registered via the created hook * will be triggered and called only if their event data origin matches the tags. */ - onModelAfterUpdate(...tags: string[]): (hook.TaggedHook | undefined) + onModelAfterUpdate(...tags: string[]): (hook.TaggedHook) /** * OnModelBeforeDelete hook is triggered before deleting an * existing model from the DB. @@ -13481,7 +12444,7 @@ namespace core { * is specified, then all event handlers registered via the created hook * will be triggered and called only if their event data origin matches the tags. */ - onModelBeforeDelete(...tags: string[]): (hook.TaggedHook | undefined) + onModelBeforeDelete(...tags: string[]): (hook.TaggedHook) /** * OnModelAfterDelete hook is triggered after successfully deleting an * existing model from the DB. @@ -13490,18 +12453,18 @@ namespace core { * is specified, then all event handlers registered via the created hook * will be triggered and called only if their event data origin matches the tags. */ - onModelAfterDelete(...tags: string[]): (hook.TaggedHook | undefined) + onModelAfterDelete(...tags: string[]): (hook.TaggedHook) /** * OnMailerBeforeAdminResetPasswordSend hook is triggered right * before sending a password reset email to an admin, allowing you * to inspect and customize the email message that is being sent. */ - onMailerBeforeAdminResetPasswordSend(): (hook.Hook | undefined) + onMailerBeforeAdminResetPasswordSend(): (hook.Hook) /** * OnMailerAfterAdminResetPasswordSend hook is triggered after * admin password reset email was successfully sent. */ - onMailerAfterAdminResetPasswordSend(): (hook.Hook | undefined) + onMailerAfterAdminResetPasswordSend(): (hook.Hook) /** * OnMailerBeforeRecordResetPasswordSend hook is triggered right * before sending a password reset email to an auth record, allowing @@ -13511,7 +12474,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onMailerBeforeRecordResetPasswordSend(...tags: string[]): (hook.TaggedHook | undefined) + onMailerBeforeRecordResetPasswordSend(...tags: string[]): (hook.TaggedHook) /** * OnMailerAfterRecordResetPasswordSend hook is triggered after * an auth record password reset email was successfully sent. @@ -13520,7 +12483,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onMailerAfterRecordResetPasswordSend(...tags: string[]): (hook.TaggedHook | undefined) + onMailerAfterRecordResetPasswordSend(...tags: string[]): (hook.TaggedHook) /** * OnMailerBeforeRecordVerificationSend hook is triggered right * before sending a verification email to an auth record, allowing @@ -13530,7 +12493,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onMailerBeforeRecordVerificationSend(...tags: string[]): (hook.TaggedHook | undefined) + onMailerBeforeRecordVerificationSend(...tags: string[]): (hook.TaggedHook) /** * OnMailerAfterRecordVerificationSend hook is triggered after a * verification email was successfully sent to an auth record. @@ -13539,7 +12502,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onMailerAfterRecordVerificationSend(...tags: string[]): (hook.TaggedHook | undefined) + onMailerAfterRecordVerificationSend(...tags: string[]): (hook.TaggedHook) /** * OnMailerBeforeRecordChangeEmailSend hook is triggered right before * sending a confirmation new address email to an auth record, allowing @@ -13549,7 +12512,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onMailerBeforeRecordChangeEmailSend(...tags: string[]): (hook.TaggedHook | undefined) + onMailerBeforeRecordChangeEmailSend(...tags: string[]): (hook.TaggedHook) /** * OnMailerAfterRecordChangeEmailSend hook is triggered after a * verification email was successfully sent to an auth record. @@ -13558,17 +12521,17 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onMailerAfterRecordChangeEmailSend(...tags: string[]): (hook.TaggedHook | undefined) + onMailerAfterRecordChangeEmailSend(...tags: string[]): (hook.TaggedHook) /** * OnRealtimeConnectRequest hook is triggered right before establishing * the SSE client connection. */ - onRealtimeConnectRequest(): (hook.Hook | undefined) + onRealtimeConnectRequest(): (hook.Hook) /** * OnRealtimeDisconnectRequest hook is triggered on disconnected/interrupted * SSE client connection. */ - onRealtimeDisconnectRequest(): (hook.Hook | undefined) + onRealtimeDisconnectRequest(): (hook.Hook) /** * OnRealtimeBeforeMessage hook is triggered right before sending * an SSE message to a client. @@ -13576,23 +12539,23 @@ namespace core { * Returning [hook.StopPropagation] will prevent sending the message. * Returning any other non-nil error will close the realtime connection. */ - onRealtimeBeforeMessageSend(): (hook.Hook | undefined) + onRealtimeBeforeMessageSend(): (hook.Hook) /** * OnRealtimeBeforeMessage hook is triggered right after sending * an SSE message to a client. */ - onRealtimeAfterMessageSend(): (hook.Hook | undefined) + onRealtimeAfterMessageSend(): (hook.Hook) /** * OnRealtimeBeforeSubscribeRequest hook is triggered before changing * the client subscriptions, allowing you to further validate and * modify the submitted change. */ - onRealtimeBeforeSubscribeRequest(): (hook.Hook | undefined) + onRealtimeBeforeSubscribeRequest(): (hook.Hook) /** * OnRealtimeAfterSubscribeRequest hook is triggered after the client * subscriptions were successfully changed. */ - onRealtimeAfterSubscribeRequest(): (hook.Hook | undefined) + onRealtimeAfterSubscribeRequest(): (hook.Hook) /** * OnSettingsListRequest hook is triggered on each successful * API Settings list request. @@ -13600,7 +12563,7 @@ namespace core { * Could be used to validate or modify the response before * returning it to the client. */ - onSettingsListRequest(): (hook.Hook | undefined) + onSettingsListRequest(): (hook.Hook) /** * OnSettingsBeforeUpdateRequest hook is triggered before each API * Settings update request (after request data load and before settings persistence). @@ -13608,19 +12571,19 @@ namespace core { * Could be used to additionally validate the request data or * implement completely different persistence behavior. */ - onSettingsBeforeUpdateRequest(): (hook.Hook | undefined) + onSettingsBeforeUpdateRequest(): (hook.Hook) /** * OnSettingsAfterUpdateRequest hook is triggered after each * successful API Settings update request. */ - onSettingsAfterUpdateRequest(): (hook.Hook | undefined) + onSettingsAfterUpdateRequest(): (hook.Hook) /** * OnFileDownloadRequest hook is triggered before each API File download request. * * Could be used to validate or modify the file response before * returning it to the client. */ - onFileDownloadRequest(...tags: string[]): (hook.TaggedHook | undefined) + onFileDownloadRequest(...tags: string[]): (hook.TaggedHook) /** * OnFileBeforeTokenRequest hook is triggered before each file * token API request. @@ -13632,7 +12595,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onFileBeforeTokenRequest(...tags: string[]): (hook.TaggedHook | undefined) + onFileBeforeTokenRequest(...tags: string[]): (hook.TaggedHook) /** * OnFileAfterTokenRequest hook is triggered after each * successful file token API request. @@ -13641,19 +12604,19 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onFileAfterTokenRequest(...tags: string[]): (hook.TaggedHook | undefined) + onFileAfterTokenRequest(...tags: string[]): (hook.TaggedHook) /** * OnAdminsListRequest hook is triggered on each API Admins list request. * * Could be used to validate or modify the response before returning it to the client. */ - onAdminsListRequest(): (hook.Hook | undefined) + onAdminsListRequest(): (hook.Hook) /** * OnAdminViewRequest hook is triggered on each API Admin view request. * * Could be used to validate or modify the response before returning it to the client. */ - onAdminViewRequest(): (hook.Hook | undefined) + onAdminViewRequest(): (hook.Hook) /** * OnAdminBeforeCreateRequest hook is triggered before each API * Admin create request (after request data load and before model persistence). @@ -13661,12 +12624,12 @@ namespace core { * Could be used to additionally validate the request data or implement * completely different persistence behavior. */ - onAdminBeforeCreateRequest(): (hook.Hook | undefined) + onAdminBeforeCreateRequest(): (hook.Hook) /** * OnAdminAfterCreateRequest hook is triggered after each * successful API Admin create request. */ - onAdminAfterCreateRequest(): (hook.Hook | undefined) + onAdminAfterCreateRequest(): (hook.Hook) /** * OnAdminBeforeUpdateRequest hook is triggered before each API * Admin update request (after request data load and before model persistence). @@ -13674,12 +12637,12 @@ namespace core { * Could be used to additionally validate the request data or implement * completely different persistence behavior. */ - onAdminBeforeUpdateRequest(): (hook.Hook | undefined) + onAdminBeforeUpdateRequest(): (hook.Hook) /** * OnAdminAfterUpdateRequest hook is triggered after each * successful API Admin update request. */ - onAdminAfterUpdateRequest(): (hook.Hook | undefined) + onAdminAfterUpdateRequest(): (hook.Hook) /** * OnAdminBeforeDeleteRequest hook is triggered before each API * Admin delete request (after model load and before actual deletion). @@ -13687,12 +12650,12 @@ namespace core { * Could be used to additionally validate the request data or implement * completely different delete behavior. */ - onAdminBeforeDeleteRequest(): (hook.Hook | undefined) + onAdminBeforeDeleteRequest(): (hook.Hook) /** * OnAdminAfterDeleteRequest hook is triggered after each * successful API Admin delete request. */ - onAdminAfterDeleteRequest(): (hook.Hook | undefined) + onAdminAfterDeleteRequest(): (hook.Hook) /** * OnAdminAuthRequest hook is triggered on each successful API Admin * authentication request (sign-in, token refresh, etc.). @@ -13700,7 +12663,7 @@ namespace core { * Could be used to additionally validate or modify the * authenticated admin data and token. */ - onAdminAuthRequest(): (hook.Hook | undefined) + onAdminAuthRequest(): (hook.Hook) /** * OnAdminBeforeAuthWithPasswordRequest hook is triggered before each Admin * auth with password API request (after request data load and before password validation). @@ -13708,12 +12671,12 @@ namespace core { * Could be used to implement for example a custom password validation * or to locate a different Admin identity (by assigning [AdminAuthWithPasswordEvent.Admin]). */ - onAdminBeforeAuthWithPasswordRequest(): (hook.Hook | undefined) + onAdminBeforeAuthWithPasswordRequest(): (hook.Hook) /** * OnAdminAfterAuthWithPasswordRequest hook is triggered after each * successful Admin auth with password API request. */ - onAdminAfterAuthWithPasswordRequest(): (hook.Hook | undefined) + onAdminAfterAuthWithPasswordRequest(): (hook.Hook) /** * OnAdminBeforeAuthRefreshRequest hook is triggered before each Admin * auth refresh API request (right before generating a new auth token). @@ -13721,12 +12684,12 @@ namespace core { * Could be used to additionally validate the request data or implement * completely different auth refresh behavior. */ - onAdminBeforeAuthRefreshRequest(): (hook.Hook | undefined) + onAdminBeforeAuthRefreshRequest(): (hook.Hook) /** * OnAdminAfterAuthRefreshRequest hook is triggered after each * successful auth refresh API request (right after generating a new auth token). */ - onAdminAfterAuthRefreshRequest(): (hook.Hook | undefined) + onAdminAfterAuthRefreshRequest(): (hook.Hook) /** * OnAdminBeforeRequestPasswordResetRequest hook is triggered before each Admin * request password reset API request (after request data load and before sending the reset email). @@ -13734,12 +12697,12 @@ namespace core { * Could be used to additionally validate the request data or implement * completely different password reset behavior. */ - onAdminBeforeRequestPasswordResetRequest(): (hook.Hook | undefined) + onAdminBeforeRequestPasswordResetRequest(): (hook.Hook) /** * OnAdminAfterRequestPasswordResetRequest hook is triggered after each * successful request password reset API request. */ - onAdminAfterRequestPasswordResetRequest(): (hook.Hook | undefined) + onAdminAfterRequestPasswordResetRequest(): (hook.Hook) /** * OnAdminBeforeConfirmPasswordResetRequest hook is triggered before each Admin * confirm password reset API request (after request data load and before persistence). @@ -13747,12 +12710,12 @@ namespace core { * Could be used to additionally validate the request data or implement * completely different persistence behavior. */ - onAdminBeforeConfirmPasswordResetRequest(): (hook.Hook | undefined) + onAdminBeforeConfirmPasswordResetRequest(): (hook.Hook) /** * OnAdminAfterConfirmPasswordResetRequest hook is triggered after each * successful confirm password reset API request. */ - onAdminAfterConfirmPasswordResetRequest(): (hook.Hook | undefined) + onAdminAfterConfirmPasswordResetRequest(): (hook.Hook) /** * OnRecordAuthRequest hook is triggered on each successful API * record authentication request (sign-in, token refresh, etc.). @@ -13764,7 +12727,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAuthRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAuthRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeAuthWithPasswordRequest hook is triggered before each Record * auth with password API request (after request data load and before password validation). @@ -13776,7 +12739,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeAuthWithPasswordRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeAuthWithPasswordRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterAuthWithPasswordRequest hook is triggered after each * successful Record auth with password API request. @@ -13785,7 +12748,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterAuthWithPasswordRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterAuthWithPasswordRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeAuthWithOAuth2Request hook is triggered before each Record * OAuth2 sign-in/sign-up API request (after token exchange and before external provider linking). @@ -13800,7 +12763,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeAuthWithOAuth2Request(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeAuthWithOAuth2Request(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterAuthWithOAuth2Request hook is triggered after each * successful Record OAuth2 API request. @@ -13809,7 +12772,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterAuthWithOAuth2Request(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterAuthWithOAuth2Request(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeAuthRefreshRequest hook is triggered before each Record * auth refresh API request (right before generating a new auth token). @@ -13821,7 +12784,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeAuthRefreshRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeAuthRefreshRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterAuthRefreshRequest hook is triggered after each * successful auth refresh API request (right after generating a new auth token). @@ -13830,7 +12793,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterAuthRefreshRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterAuthRefreshRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordListExternalAuthsRequest hook is triggered on each API record external auths list request. * @@ -13840,7 +12803,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordListExternalAuthsRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordListExternalAuthsRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeUnlinkExternalAuthRequest hook is triggered before each API record * external auth unlink request (after models load and before the actual relation deletion). @@ -13852,7 +12815,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeUnlinkExternalAuthRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeUnlinkExternalAuthRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterUnlinkExternalAuthRequest hook is triggered after each * successful API record external auth unlink request. @@ -13861,7 +12824,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterUnlinkExternalAuthRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterUnlinkExternalAuthRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeRequestPasswordResetRequest hook is triggered before each Record * request password reset API request (after request data load and before sending the reset email). @@ -13873,7 +12836,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeRequestPasswordResetRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeRequestPasswordResetRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterRequestPasswordResetRequest hook is triggered after each * successful request password reset API request. @@ -13882,7 +12845,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterRequestPasswordResetRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterRequestPasswordResetRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeConfirmPasswordResetRequest hook is triggered before each Record * confirm password reset API request (after request data load and before persistence). @@ -13894,7 +12857,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeConfirmPasswordResetRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeConfirmPasswordResetRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterConfirmPasswordResetRequest hook is triggered after each * successful confirm password reset API request. @@ -13903,7 +12866,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterConfirmPasswordResetRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterConfirmPasswordResetRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeRequestVerificationRequest hook is triggered before each Record * request verification API request (after request data load and before sending the verification email). @@ -13915,7 +12878,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeRequestVerificationRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeRequestVerificationRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterRequestVerificationRequest hook is triggered after each * successful request verification API request. @@ -13924,7 +12887,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterRequestVerificationRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterRequestVerificationRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeConfirmVerificationRequest hook is triggered before each Record * confirm verification API request (after request data load and before persistence). @@ -13936,7 +12899,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeConfirmVerificationRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeConfirmVerificationRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterConfirmVerificationRequest hook is triggered after each * successful confirm verification API request. @@ -13945,7 +12908,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterConfirmVerificationRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterConfirmVerificationRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeRequestEmailChangeRequest hook is triggered before each Record request email change API request * (after request data load and before sending the email link to confirm the change). @@ -13957,7 +12920,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeRequestEmailChangeRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeRequestEmailChangeRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterRequestEmailChangeRequest hook is triggered after each * successful request email change API request. @@ -13966,7 +12929,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterRequestEmailChangeRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterRequestEmailChangeRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeConfirmEmailChangeRequest hook is triggered before each Record * confirm email change API request (after request data load and before persistence). @@ -13978,7 +12941,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeConfirmEmailChangeRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeConfirmEmailChangeRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterConfirmEmailChangeRequest hook is triggered after each * successful confirm email change API request. @@ -13987,7 +12950,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterConfirmEmailChangeRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterConfirmEmailChangeRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordsListRequest hook is triggered on each API Records list request. * @@ -13997,7 +12960,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordsListRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordsListRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordViewRequest hook is triggered on each API Record view request. * @@ -14007,7 +12970,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordViewRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordViewRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeCreateRequest hook is triggered before each API Record * create request (after request data load and before model persistence). @@ -14019,7 +12982,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeCreateRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeCreateRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterCreateRequest hook is triggered after each * successful API Record create request. @@ -14028,7 +12991,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterCreateRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterCreateRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeUpdateRequest hook is triggered before each API Record * update request (after request data load and before model persistence). @@ -14040,7 +13003,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeUpdateRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeUpdateRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterUpdateRequest hook is triggered after each * successful API Record update request. @@ -14049,7 +13012,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterUpdateRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterUpdateRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordBeforeDeleteRequest hook is triggered before each API Record * delete request (after model load and before actual deletion). @@ -14061,7 +13024,7 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordBeforeDeleteRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordBeforeDeleteRequest(...tags: string[]): (hook.TaggedHook) /** * OnRecordAfterDeleteRequest hook is triggered after each * successful API Record delete request. @@ -14070,19 +13033,19 @@ namespace core { * then all event handlers registered via the created hook will be * triggered and called only if their event data origin matches the tags. */ - onRecordAfterDeleteRequest(...tags: string[]): (hook.TaggedHook | undefined) + onRecordAfterDeleteRequest(...tags: string[]): (hook.TaggedHook) /** * OnCollectionsListRequest hook is triggered on each API Collections list request. * * Could be used to validate or modify the response before returning it to the client. */ - onCollectionsListRequest(): (hook.Hook | undefined) + onCollectionsListRequest(): (hook.Hook) /** * OnCollectionViewRequest hook is triggered on each API Collection view request. * * Could be used to validate or modify the response before returning it to the client. */ - onCollectionViewRequest(): (hook.Hook | undefined) + onCollectionViewRequest(): (hook.Hook) /** * OnCollectionBeforeCreateRequest hook is triggered before each API Collection * create request (after request data load and before model persistence). @@ -14090,12 +13053,12 @@ namespace core { * Could be used to additionally validate the request data or implement * completely different persistence behavior. */ - onCollectionBeforeCreateRequest(): (hook.Hook | undefined) + onCollectionBeforeCreateRequest(): (hook.Hook) /** * OnCollectionAfterCreateRequest hook is triggered after each * successful API Collection create request. */ - onCollectionAfterCreateRequest(): (hook.Hook | undefined) + onCollectionAfterCreateRequest(): (hook.Hook) /** * OnCollectionBeforeUpdateRequest hook is triggered before each API Collection * update request (after request data load and before model persistence). @@ -14103,12 +13066,12 @@ namespace core { * Could be used to additionally validate the request data or implement * completely different persistence behavior. */ - onCollectionBeforeUpdateRequest(): (hook.Hook | undefined) + onCollectionBeforeUpdateRequest(): (hook.Hook) /** * OnCollectionAfterUpdateRequest hook is triggered after each * successful API Collection update request. */ - onCollectionAfterUpdateRequest(): (hook.Hook | undefined) + onCollectionAfterUpdateRequest(): (hook.Hook) /** * OnCollectionBeforeDeleteRequest hook is triggered before each API * Collection delete request (after model load and before actual deletion). @@ -14116,12 +13079,12 @@ namespace core { * Could be used to additionally validate the request data or implement * completely different delete behavior. */ - onCollectionBeforeDeleteRequest(): (hook.Hook | undefined) + onCollectionBeforeDeleteRequest(): (hook.Hook) /** * OnCollectionAfterDeleteRequest hook is triggered after each * successful API Collection delete request. */ - onCollectionAfterDeleteRequest(): (hook.Hook | undefined) + onCollectionAfterDeleteRequest(): (hook.Hook) /** * OnCollectionsBeforeImportRequest hook is triggered before each API * collections import request (after request data load and before the actual import). @@ -14129,12 +13092,1049 @@ namespace core { * Could be used to additionally validate the imported collections or * to implement completely different import behavior. */ - onCollectionsBeforeImportRequest(): (hook.Hook | undefined) + onCollectionsBeforeImportRequest(): (hook.Hook) /** * OnCollectionsAfterImportRequest hook is triggered after each * successful API collections import request. */ - onCollectionsAfterImportRequest(): (hook.Hook | undefined) + onCollectionsAfterImportRequest(): (hook.Hook) + } +} + +/** + * Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces. + * In addition to providing an interface, Cobra simultaneously provides a controller to organize your application code. + */ +namespace cobra { + interface Command { + /** + * GenBashCompletion generates bash completion file and writes to the passed writer. + */ + genBashCompletion(w: io.Writer): void + } + interface Command { + /** + * GenBashCompletionFile generates bash completion file. + */ + genBashCompletionFile(filename: string): void + } + interface Command { + /** + * GenBashCompletionFileV2 generates Bash completion version 2. + */ + genBashCompletionFileV2(filename: string, includeDesc: boolean): void + } + interface Command { + /** + * GenBashCompletionV2 generates Bash completion file version 2 + * and writes it to the passed writer. + */ + genBashCompletionV2(w: io.Writer, includeDesc: boolean): void + } + // @ts-ignore + import flag = pflag + /** + * Command is just that, a command for your application. + * E.g. 'go run ...' - 'run' is the command. Cobra requires + * you to define the usage and description as part of your command + * definition to ensure usability. + */ + interface Command { + /** + * Use is the one-line usage message. + * Recommended syntax is as follows: + * ``` + * [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required. + * ... indicates that you can specify multiple values for the previous argument. + * | indicates mutually exclusive information. You can use the argument to the left of the separator or the + * argument to the right of the separator. You cannot use both arguments in a single use of the command. + * { } delimits a set of mutually exclusive arguments when one of the arguments is required. If the arguments are + * optional, they are enclosed in brackets ([ ]). + * ``` + * Example: add [-F file | -D dir]... [-f format] profile + */ + use: string + /** + * Aliases is an array of aliases that can be used instead of the first word in Use. + */ + aliases: Array + /** + * SuggestFor is an array of command names for which this command will be suggested - + * similar to aliases but only suggests. + */ + suggestFor: Array + /** + * Short is the short description shown in the 'help' output. + */ + short: string + /** + * The group id under which this subcommand is grouped in the 'help' output of its parent. + */ + groupID: string + /** + * Long is the long message shown in the 'help ' output. + */ + long: string + /** + * Example is examples of how to use the command. + */ + example: string + /** + * ValidArgs is list of all valid non-flag arguments that are accepted in shell completions + */ + validArgs: Array + /** + * ValidArgsFunction is an optional function that provides valid non-flag arguments for shell completion. + * It is a dynamic version of using ValidArgs. + * Only one of ValidArgs and ValidArgsFunction can be used for a command. + */ + validArgsFunction: (cmd: Command, args: Array, toComplete: string) => [Array, ShellCompDirective] + /** + * Expected arguments + */ + args: PositionalArgs + /** + * ArgAliases is List of aliases for ValidArgs. + * These are not suggested to the user in the shell completion, + * but accepted if entered manually. + */ + argAliases: Array + /** + * BashCompletionFunction is custom bash functions used by the legacy bash autocompletion generator. + * For portability with other shells, it is recommended to instead use ValidArgsFunction + */ + bashCompletionFunction: string + /** + * Deprecated defines, if this command is deprecated and should print this string when used. + */ + deprecated: string + /** + * Annotations are key/value pairs that can be used by applications to identify or + * group commands. + */ + annotations: _TygojaDict + /** + * Version defines the version for this command. If this value is non-empty and the command does not + * define a "version" flag, a "version" boolean flag will be added to the command and, if specified, + * will print content of the "Version" variable. A shorthand "v" flag will also be added if the + * command does not define one. + */ + version: string + /** + * The *Run functions are executed in the following order: + * ``` + * * PersistentPreRun() + * * PreRun() + * * Run() + * * PostRun() + * * PersistentPostRun() + * ``` + * All functions get the same args, the arguments after the command name. + * + * PersistentPreRun: children of this command will inherit and execute. + */ + persistentPreRun: (cmd: Command, args: Array) => void + /** + * PersistentPreRunE: PersistentPreRun but returns an error. + */ + persistentPreRunE: (cmd: Command, args: Array) => void + /** + * PreRun: children of this command will not inherit. + */ + preRun: (cmd: Command, args: Array) => void + /** + * PreRunE: PreRun but returns an error. + */ + preRunE: (cmd: Command, args: Array) => void + /** + * Run: Typically the actual work function. Most commands will only implement this. + */ + run: (cmd: Command, args: Array) => void + /** + * RunE: Run but returns an error. + */ + runE: (cmd: Command, args: Array) => void + /** + * PostRun: run after the Run command. + */ + postRun: (cmd: Command, args: Array) => void + /** + * PostRunE: PostRun but returns an error. + */ + postRunE: (cmd: Command, args: Array) => void + /** + * PersistentPostRun: children of this command will inherit and execute after PostRun. + */ + persistentPostRun: (cmd: Command, args: Array) => void + /** + * PersistentPostRunE: PersistentPostRun but returns an error. + */ + persistentPostRunE: (cmd: Command, args: Array) => void + /** + * FParseErrWhitelist flag parse errors to be ignored + */ + fParseErrWhitelist: FParseErrWhitelist + /** + * CompletionOptions is a set of options to control the handling of shell completion + */ + completionOptions: CompletionOptions + /** + * TraverseChildren parses flags on all parents before executing child command. + */ + traverseChildren: boolean + /** + * Hidden defines, if this command is hidden and should NOT show up in the list of available commands. + */ + hidden: boolean + /** + * SilenceErrors is an option to quiet errors down stream. + */ + silenceErrors: boolean + /** + * SilenceUsage is an option to silence usage when an error occurs. + */ + silenceUsage: boolean + /** + * DisableFlagParsing disables the flag parsing. + * If this is true all flags will be passed to the command as arguments. + */ + disableFlagParsing: boolean + /** + * DisableAutoGenTag defines, if gen tag ("Auto generated by spf13/cobra...") + * will be printed by generating docs for this command. + */ + disableAutoGenTag: boolean + /** + * DisableFlagsInUseLine will disable the addition of [flags] to the usage + * line of a command when printing help or generating docs + */ + disableFlagsInUseLine: boolean + /** + * DisableSuggestions disables the suggestions based on Levenshtein distance + * that go along with 'unknown command' messages. + */ + disableSuggestions: boolean + /** + * SuggestionsMinimumDistance defines minimum levenshtein distance to display suggestions. + * Must be > 0. + */ + suggestionsMinimumDistance: number + } + interface Command { + /** + * Context returns underlying command context. If command was executed + * with ExecuteContext or the context was set with SetContext, the + * previously set context will be returned. Otherwise, nil is returned. + * + * Notice that a call to Execute and ExecuteC will replace a nil context of + * a command with a context.Background, so a background context will be + * returned by Context after one of these functions has been called. + */ + context(): context.Context + } + interface Command { + /** + * SetContext sets context for the command. This context will be overwritten by + * Command.ExecuteContext or Command.ExecuteContextC. + */ + setContext(ctx: context.Context): void + } + interface Command { + /** + * SetArgs sets arguments for the command. It is set to os.Args[1:] by default, if desired, can be overridden + * particularly useful when testing. + */ + setArgs(a: Array): void + } + interface Command { + /** + * SetOutput sets the destination for usage and error messages. + * If output is nil, os.Stderr is used. + * Deprecated: Use SetOut and/or SetErr instead + */ + setOutput(output: io.Writer): void + } + interface Command { + /** + * SetOut sets the destination for usage messages. + * If newOut is nil, os.Stdout is used. + */ + setOut(newOut: io.Writer): void + } + interface Command { + /** + * SetErr sets the destination for error messages. + * If newErr is nil, os.Stderr is used. + */ + setErr(newErr: io.Writer): void + } + interface Command { + /** + * SetIn sets the source for input data + * If newIn is nil, os.Stdin is used. + */ + setIn(newIn: io.Reader): void + } + interface Command { + /** + * SetUsageFunc sets usage function. Usage can be defined by application. + */ + setUsageFunc(f: (_arg0: Command) => void): void + } + interface Command { + /** + * SetUsageTemplate sets usage template. Can be defined by Application. + */ + setUsageTemplate(s: string): void + } + interface Command { + /** + * SetFlagErrorFunc sets a function to generate an error when flag parsing + * fails. + */ + setFlagErrorFunc(f: (_arg0: Command, _arg1: Error) => void): void + } + interface Command { + /** + * SetHelpFunc sets help function. Can be defined by Application. + */ + setHelpFunc(f: (_arg0: Command, _arg1: Array) => void): void + } + interface Command { + /** + * SetHelpCommand sets help command. + */ + setHelpCommand(cmd: Command): void + } + interface Command { + /** + * SetHelpCommandGroupID sets the group id of the help command. + */ + setHelpCommandGroupID(groupID: string): void + } + interface Command { + /** + * SetCompletionCommandGroupID sets the group id of the completion command. + */ + setCompletionCommandGroupID(groupID: string): void + } + interface Command { + /** + * SetHelpTemplate sets help template to be used. Application can use it to set custom template. + */ + setHelpTemplate(s: string): void + } + interface Command { + /** + * SetVersionTemplate sets version template to be used. Application can use it to set custom template. + */ + setVersionTemplate(s: string): void + } + interface Command { + /** + * SetGlobalNormalizationFunc sets a normalization function to all flag sets and also to child commands. + * The user should not have a cyclic dependency on commands. + */ + setGlobalNormalizationFunc(n: (f: any, name: string) => any): void + } + interface Command { + /** + * OutOrStdout returns output to stdout. + */ + outOrStdout(): io.Writer + } + interface Command { + /** + * OutOrStderr returns output to stderr + */ + outOrStderr(): io.Writer + } + interface Command { + /** + * ErrOrStderr returns output to stderr + */ + errOrStderr(): io.Writer + } + interface Command { + /** + * InOrStdin returns input to stdin + */ + inOrStdin(): io.Reader + } + interface Command { + /** + * UsageFunc returns either the function set by SetUsageFunc for this command + * or a parent, or it returns a default usage function. + */ + usageFunc(): (_arg0: Command) => void + } + interface Command { + /** + * Usage puts out the usage for the command. + * Used when a user provides invalid input. + * Can be defined by user by overriding UsageFunc. + */ + usage(): void + } + interface Command { + /** + * HelpFunc returns either the function set by SetHelpFunc for this command + * or a parent, or it returns a function with default help behavior. + */ + helpFunc(): (_arg0: Command, _arg1: Array) => void + } + interface Command { + /** + * Help puts out the help for the command. + * Used when a user calls help [command]. + * Can be defined by user by overriding HelpFunc. + */ + help(): void + } + interface Command { + /** + * UsageString returns usage string. + */ + usageString(): string + } + interface Command { + /** + * FlagErrorFunc returns either the function set by SetFlagErrorFunc for this + * command or a parent, or it returns a function which returns the original + * error. + */ + flagErrorFunc(): (_arg0: Command, _arg1: Error) => void + } + interface Command { + /** + * UsagePadding return padding for the usage. + */ + usagePadding(): number + } + interface Command { + /** + * CommandPathPadding return padding for the command path. + */ + commandPathPadding(): number + } + interface Command { + /** + * NamePadding returns padding for the name. + */ + namePadding(): number + } + interface Command { + /** + * UsageTemplate returns usage template for the command. + */ + usageTemplate(): string + } + interface Command { + /** + * HelpTemplate return help template for the command. + */ + helpTemplate(): string + } + interface Command { + /** + * VersionTemplate return version template for the command. + */ + versionTemplate(): string + } + interface Command { + /** + * Find the target command given the args and command tree + * Meant to be run on the highest node. Only searches down. + */ + find(args: Array): [(Command), Array] + } + interface Command { + /** + * Traverse the command tree to find the command, and parse args for + * each parent. + */ + traverse(args: Array): [(Command), Array] + } + interface Command { + /** + * SuggestionsFor provides suggestions for the typedName. + */ + suggestionsFor(typedName: string): Array + } + interface Command { + /** + * VisitParents visits all parents of the command and invokes fn on each parent. + */ + visitParents(fn: (_arg0: Command) => void): void + } + interface Command { + /** + * Root finds root command. + */ + root(): (Command) + } + interface Command { + /** + * ArgsLenAtDash will return the length of c.Flags().Args at the moment + * when a -- was found during args parsing. + */ + argsLenAtDash(): number + } + interface Command { + /** + * ExecuteContext is the same as Execute(), but sets the ctx on the command. + * Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs + * functions. + */ + executeContext(ctx: context.Context): void + } + interface Command { + /** + * Execute uses the args (os.Args[1:] by default) + * and run through the command tree finding appropriate matches + * for commands and then corresponding flags. + */ + execute(): void + } + interface Command { + /** + * ExecuteContextC is the same as ExecuteC(), but sets the ctx on the command. + * Retrieve ctx by calling cmd.Context() inside your *Run lifecycle or ValidArgs + * functions. + */ + executeContextC(ctx: context.Context): (Command) + } + interface Command { + /** + * ExecuteC executes the command. + */ + executeC(): (Command) + } + interface Command { + validateArgs(args: Array): void + } + interface Command { + /** + * ValidateRequiredFlags validates all required flags are present and returns an error otherwise + */ + validateRequiredFlags(): void + } + interface Command { + /** + * InitDefaultHelpFlag adds default help flag to c. + * It is called automatically by executing the c or by calling help and usage. + * If c already has help flag, it will do nothing. + */ + initDefaultHelpFlag(): void + } + interface Command { + /** + * InitDefaultVersionFlag adds default version flag to c. + * It is called automatically by executing the c. + * If c already has a version flag, it will do nothing. + * If c.Version is empty, it will do nothing. + */ + initDefaultVersionFlag(): void + } + interface Command { + /** + * InitDefaultHelpCmd adds default help command to c. + * It is called automatically by executing the c or by calling help and usage. + * If c already has help command or c has no subcommands, it will do nothing. + */ + initDefaultHelpCmd(): void + } + interface Command { + /** + * ResetCommands delete parent, subcommand and help command from c. + */ + resetCommands(): void + } + interface Command { + /** + * Commands returns a sorted slice of child commands. + */ + commands(): Array<(Command | undefined)> + } + interface Command { + /** + * AddCommand adds one or more commands to this parent command. + */ + addCommand(...cmds: (Command | undefined)[]): void + } + interface Command { + /** + * Groups returns a slice of child command groups. + */ + groups(): Array<(Group | undefined)> + } + interface Command { + /** + * AllChildCommandsHaveGroup returns if all subcommands are assigned to a group + */ + allChildCommandsHaveGroup(): boolean + } + interface Command { + /** + * ContainsGroup return if groupID exists in the list of command groups. + */ + containsGroup(groupID: string): boolean + } + interface Command { + /** + * AddGroup adds one or more command groups to this parent command. + */ + addGroup(...groups: (Group | undefined)[]): void + } + interface Command { + /** + * RemoveCommand removes one or more commands from a parent command. + */ + removeCommand(...cmds: (Command | undefined)[]): void + } + interface Command { + /** + * Print is a convenience method to Print to the defined output, fallback to Stderr if not set. + */ + print(...i: { + }[]): void + } + interface Command { + /** + * Println is a convenience method to Println to the defined output, fallback to Stderr if not set. + */ + println(...i: { + }[]): void + } + interface Command { + /** + * Printf is a convenience method to Printf to the defined output, fallback to Stderr if not set. + */ + printf(format: string, ...i: { + }[]): void + } + interface Command { + /** + * PrintErr is a convenience method to Print to the defined Err output, fallback to Stderr if not set. + */ + printErr(...i: { + }[]): void + } + interface Command { + /** + * PrintErrln is a convenience method to Println to the defined Err output, fallback to Stderr if not set. + */ + printErrln(...i: { + }[]): void + } + interface Command { + /** + * PrintErrf is a convenience method to Printf to the defined Err output, fallback to Stderr if not set. + */ + printErrf(format: string, ...i: { + }[]): void + } + interface Command { + /** + * CommandPath returns the full path to this command. + */ + commandPath(): string + } + interface Command { + /** + * UseLine puts out the full usage for a given command (including parents). + */ + useLine(): string + } + interface Command { + /** + * DebugFlags used to determine which flags have been assigned to which commands + * and which persist. + */ + debugFlags(): void + } + interface Command { + /** + * Name returns the command's name: the first word in the use line. + */ + name(): string + } + interface Command { + /** + * HasAlias determines if a given string is an alias of the command. + */ + hasAlias(s: string): boolean + } + interface Command { + /** + * CalledAs returns the command name or alias that was used to invoke + * this command or an empty string if the command has not been called. + */ + calledAs(): string + } + interface Command { + /** + * NameAndAliases returns a list of the command name and all aliases + */ + nameAndAliases(): string + } + interface Command { + /** + * HasExample determines if the command has example. + */ + hasExample(): boolean + } + interface Command { + /** + * Runnable determines if the command is itself runnable. + */ + runnable(): boolean + } + interface Command { + /** + * HasSubCommands determines if the command has children commands. + */ + hasSubCommands(): boolean + } + interface Command { + /** + * IsAvailableCommand determines if a command is available as a non-help command + * (this includes all non deprecated/hidden commands). + */ + isAvailableCommand(): boolean + } + interface Command { + /** + * IsAdditionalHelpTopicCommand determines if a command is an additional + * help topic command; additional help topic command is determined by the + * fact that it is NOT runnable/hidden/deprecated, and has no sub commands that + * are runnable/hidden/deprecated. + * Concrete example: https://github.com/spf13/cobra/issues/393#issuecomment-282741924. + */ + isAdditionalHelpTopicCommand(): boolean + } + interface Command { + /** + * HasHelpSubCommands determines if a command has any available 'help' sub commands + * that need to be shown in the usage/help default template under 'additional help + * topics'. + */ + hasHelpSubCommands(): boolean + } + interface Command { + /** + * HasAvailableSubCommands determines if a command has available sub commands that + * need to be shown in the usage/help default template under 'available commands'. + */ + hasAvailableSubCommands(): boolean + } + interface Command { + /** + * HasParent determines if the command is a child command. + */ + hasParent(): boolean + } + interface Command { + /** + * GlobalNormalizationFunc returns the global normalization function or nil if it doesn't exist. + */ + globalNormalizationFunc(): (f: any, name: string) => any + } + interface Command { + /** + * Flags returns the complete FlagSet that applies + * to this command (local and persistent declared here and by all parents). + */ + flags(): (any) + } + interface Command { + /** + * LocalNonPersistentFlags are flags specific to this command which will NOT persist to subcommands. + */ + localNonPersistentFlags(): (any) + } + interface Command { + /** + * LocalFlags returns the local FlagSet specifically set in the current command. + */ + localFlags(): (any) + } + interface Command { + /** + * InheritedFlags returns all flags which were inherited from parent commands. + */ + inheritedFlags(): (any) + } + interface Command { + /** + * NonInheritedFlags returns all flags which were not inherited from parent commands. + */ + nonInheritedFlags(): (any) + } + interface Command { + /** + * PersistentFlags returns the persistent FlagSet specifically set in the current command. + */ + persistentFlags(): (any) + } + interface Command { + /** + * ResetFlags deletes all flags from command. + */ + resetFlags(): void + } + interface Command { + /** + * HasFlags checks if the command contains any flags (local plus persistent from the entire structure). + */ + hasFlags(): boolean + } + interface Command { + /** + * HasPersistentFlags checks if the command contains persistent flags. + */ + hasPersistentFlags(): boolean + } + interface Command { + /** + * HasLocalFlags checks if the command has flags specifically declared locally. + */ + hasLocalFlags(): boolean + } + interface Command { + /** + * HasInheritedFlags checks if the command has flags inherited from its parent command. + */ + hasInheritedFlags(): boolean + } + interface Command { + /** + * HasAvailableFlags checks if the command contains any flags (local plus persistent from the entire + * structure) which are not hidden or deprecated. + */ + hasAvailableFlags(): boolean + } + interface Command { + /** + * HasAvailablePersistentFlags checks if the command contains persistent flags which are not hidden or deprecated. + */ + hasAvailablePersistentFlags(): boolean + } + interface Command { + /** + * HasAvailableLocalFlags checks if the command has flags specifically declared locally which are not hidden + * or deprecated. + */ + hasAvailableLocalFlags(): boolean + } + interface Command { + /** + * HasAvailableInheritedFlags checks if the command has flags inherited from its parent command which are + * not hidden or deprecated. + */ + hasAvailableInheritedFlags(): boolean + } + interface Command { + /** + * Flag climbs up the command tree looking for matching flag. + */ + flag(name: string): (any) + } + interface Command { + /** + * ParseFlags parses persistent flag tree and local flags. + */ + parseFlags(args: Array): void + } + interface Command { + /** + * Parent returns a commands parent command. + */ + parent(): (Command) + } + interface Command { + /** + * RegisterFlagCompletionFunc should be called to register a function to provide completion for a flag. + */ + registerFlagCompletionFunc(flagName: string, f: (cmd: Command, args: Array, toComplete: string) => [Array, ShellCompDirective]): void + } + interface Command { + /** + * InitDefaultCompletionCmd adds a default 'completion' command to c. + * This function will do nothing if any of the following is true: + * 1- the feature has been explicitly disabled by the program, + * 2- c has no subcommands (to avoid creating one), + * 3- c already has a 'completion' command provided by the program. + */ + initDefaultCompletionCmd(): void + } + interface Command { + /** + * GenFishCompletion generates fish completion file and writes to the passed writer. + */ + genFishCompletion(w: io.Writer, includeDesc: boolean): void + } + interface Command { + /** + * GenFishCompletionFile generates fish completion file. + */ + genFishCompletionFile(filename: string, includeDesc: boolean): void + } + interface Command { + /** + * MarkFlagsRequiredTogether marks the given flags with annotations so that Cobra errors + * if the command is invoked with a subset (but not all) of the given flags. + */ + markFlagsRequiredTogether(...flagNames: string[]): void + } + interface Command { + /** + * MarkFlagsMutuallyExclusive marks the given flags with annotations so that Cobra errors + * if the command is invoked with more than one flag from the given set of flags. + */ + markFlagsMutuallyExclusive(...flagNames: string[]): void + } + interface Command { + /** + * ValidateFlagGroups validates the mutuallyExclusive/requiredAsGroup logic and returns the + * first error encountered. + */ + validateFlagGroups(): void + } + interface Command { + /** + * GenPowerShellCompletionFile generates powershell completion file without descriptions. + */ + genPowerShellCompletionFile(filename: string): void + } + interface Command { + /** + * GenPowerShellCompletion generates powershell completion file without descriptions + * and writes it to the passed writer. + */ + genPowerShellCompletion(w: io.Writer): void + } + interface Command { + /** + * GenPowerShellCompletionFileWithDesc generates powershell completion file with descriptions. + */ + genPowerShellCompletionFileWithDesc(filename: string): void + } + interface Command { + /** + * GenPowerShellCompletionWithDesc generates powershell completion file with descriptions + * and writes it to the passed writer. + */ + genPowerShellCompletionWithDesc(w: io.Writer): void + } + interface Command { + /** + * MarkFlagRequired instructs the various shell completion implementations to + * prioritize the named flag when performing completion, + * and causes your command to report an error if invoked without the flag. + */ + markFlagRequired(name: string): void + } + interface Command { + /** + * MarkPersistentFlagRequired instructs the various shell completion implementations to + * prioritize the named persistent flag when performing completion, + * and causes your command to report an error if invoked without the flag. + */ + markPersistentFlagRequired(name: string): void + } + interface Command { + /** + * MarkFlagFilename instructs the various shell completion implementations to + * limit completions for the named flag to the specified file extensions. + */ + markFlagFilename(name: string, ...extensions: string[]): void + } + interface Command { + /** + * MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. + * The bash completion script will call the bash function f for the flag. + * + * This will only work for bash completion. + * It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows + * to register a Go function which will work across all shells. + */ + markFlagCustom(name: string, f: string): void + } + interface Command { + /** + * MarkPersistentFlagFilename instructs the various shell completion + * implementations to limit completions for the named persistent flag to the + * specified file extensions. + */ + markPersistentFlagFilename(name: string, ...extensions: string[]): void + } + interface Command { + /** + * MarkFlagDirname instructs the various shell completion implementations to + * limit completions for the named flag to directory names. + */ + markFlagDirname(name: string): void + } + interface Command { + /** + * MarkPersistentFlagDirname instructs the various shell completion + * implementations to limit completions for the named persistent flag to + * directory names. + */ + markPersistentFlagDirname(name: string): void + } + interface Command { + /** + * GenZshCompletionFile generates zsh completion file including descriptions. + */ + genZshCompletionFile(filename: string): void + } + interface Command { + /** + * GenZshCompletion generates zsh completion file including descriptions + * and writes it to the passed writer. + */ + genZshCompletion(w: io.Writer): void + } + interface Command { + /** + * GenZshCompletionFileNoDesc generates zsh completion file without descriptions. + */ + genZshCompletionFileNoDesc(filename: string): void + } + interface Command { + /** + * GenZshCompletionNoDesc generates zsh completion file without descriptions + * and writes it to the passed writer. + */ + genZshCompletionNoDesc(w: io.Writer): void + } + interface Command { + /** + * MarkZshCompPositionalArgumentFile only worked for zsh and its behavior was + * not consistent with Bash completion. It has therefore been disabled. + * Instead, when no other completion is specified, file completion is done by + * default for every argument. One can disable file completion on a per-argument + * basis by using ValidArgsFunction and ShellCompDirectiveNoFileComp. + * To achieve file extension filtering, one can use ValidArgsFunction and + * ShellCompDirectiveFilterFileExt. + * + * Deprecated + */ + markZshCompPositionalArgumentFile(argPosition: number, ...patterns: string[]): void + } + interface Command { + /** + * MarkZshCompPositionalArgumentWords only worked for zsh. It has therefore + * been disabled. + * To achieve the same behavior across all shells, one can use + * ValidArgs (for the first argument only) or ValidArgsFunction for + * any argument (can include the first one also). + * + * Deprecated + */ + markZshCompPositionalArgumentWords(argPosition: number, ...words: string[]): void } } @@ -14148,7 +14148,7 @@ namespace migrate { /** * Item returns a single migration from the list by its index. */ - item(index: number): (Migration | undefined) + item(index: number): (Migration) } interface MigrationsList { /** @@ -14168,31 +14168,6 @@ namespace migrate { } } -/** - * Package io provides basic interfaces to I/O primitives. - * Its primary job is to wrap existing implementations of such primitives, - * such as those in package os, into shared public interfaces that - * abstract the functionality, plus some other related primitives. - * - * Because these interfaces and primitives wrap lower-level operations with - * various implementations, unless otherwise informed clients should not - * assume they are safe for parallel execution. - */ -namespace io { - /** - * ReadCloser is the interface that groups the basic Read and Close methods. - */ - interface ReadCloser { - [key:string]: any; - } - /** - * WriteCloser is the interface that groups the basic Write and Close methods. - */ - interface WriteCloser { - [key:string]: any; - } -} - /** * Package syscall contains an interface to the low-level operating system * primitives. The details vary depending on the underlying system, and @@ -14367,6 +14342,31 @@ namespace time { } } +/** + * Package io provides basic interfaces to I/O primitives. + * Its primary job is to wrap existing implementations of such primitives, + * such as those in package os, into shared public interfaces that + * abstract the functionality, plus some other related primitives. + * + * Because these interfaces and primitives wrap lower-level operations with + * various implementations, unless otherwise informed clients should not + * assume they are safe for parallel execution. + */ +namespace io { + /** + * ReadCloser is the interface that groups the basic Read and Close methods. + */ + interface ReadCloser { + [key:string]: any; + } + /** + * WriteCloser is the interface that groups the basic Write and Close methods. + */ + interface WriteCloser { + [key:string]: any; + } +} + /** * Package context defines the Context type, which carries deadlines, * cancellation signals, and other request-scoped values across API boundaries @@ -14425,6 +14425,450 @@ namespace context { namespace fs { } +/** + * Package sql provides a generic interface around SQL (or SQL-like) + * databases. + * + * The sql package must be used in conjunction with a database driver. + * See https://golang.org/s/sqldrivers for a list of drivers. + * + * Drivers that do not support context cancellation will not return until + * after the query is completed. + * + * For usage examples, see the wiki page at + * https://golang.org/s/sqlwiki. + */ +namespace sql { + /** + * IsolationLevel is the transaction isolation level used in TxOptions. + */ + interface IsolationLevel extends Number{} + interface IsolationLevel { + /** + * String returns the name of the transaction isolation level. + */ + string(): string + } + /** + * DBStats contains database statistics. + */ + interface DBStats { + maxOpenConnections: number // Maximum number of open connections to the database. + /** + * Pool Status + */ + openConnections: number // The number of established connections both in use and idle. + inUse: number // The number of connections currently in use. + idle: number // The number of idle connections. + /** + * Counters + */ + waitCount: number // The total number of connections waited for. + waitDuration: time.Duration // The total time blocked waiting for a new connection. + maxIdleClosed: number // The total number of connections closed due to SetMaxIdleConns. + maxIdleTimeClosed: number // The total number of connections closed due to SetConnMaxIdleTime. + maxLifetimeClosed: number // The total number of connections closed due to SetConnMaxLifetime. + } + /** + * Conn represents a single database connection rather than a pool of database + * connections. Prefer running queries from DB unless there is a specific + * need for a continuous single database connection. + * + * A Conn must call Close to return the connection to the database pool + * and may do so concurrently with a running query. + * + * After a call to Close, all operations on the + * connection fail with ErrConnDone. + */ + interface Conn { + } + interface Conn { + /** + * PingContext verifies the connection to the database is still alive. + */ + pingContext(ctx: context.Context): void + } + interface Conn { + /** + * ExecContext executes a query without returning any rows. + * The args are for any placeholder parameters in the query. + */ + execContext(ctx: context.Context, query: string, ...args: any[]): Result + } + interface Conn { + /** + * QueryContext executes a query that returns rows, typically a SELECT. + * The args are for any placeholder parameters in the query. + */ + queryContext(ctx: context.Context, query: string, ...args: any[]): (Rows) + } + interface Conn { + /** + * QueryRowContext executes a query that is expected to return at most one row. + * QueryRowContext always returns a non-nil value. Errors are deferred until + * Row's Scan method is called. + * If the query selects no rows, the *Row's Scan will return ErrNoRows. + * Otherwise, the *Row's Scan scans the first selected row and discards + * the rest. + */ + queryRowContext(ctx: context.Context, query: string, ...args: any[]): (Row) + } + interface Conn { + /** + * PrepareContext creates a prepared statement for later queries or executions. + * Multiple queries or executions may be run concurrently from the + * returned statement. + * The caller must call the statement's Close method + * when the statement is no longer needed. + * + * The provided context is used for the preparation of the statement, not for the + * execution of the statement. + */ + prepareContext(ctx: context.Context, query: string): (Stmt) + } + interface Conn { + /** + * Raw executes f exposing the underlying driver connection for the + * duration of f. The driverConn must not be used outside of f. + * + * Once f returns and err is not driver.ErrBadConn, the Conn will continue to be usable + * until Conn.Close is called. + */ + raw(f: (driverConn: any) => void): void + } + interface Conn { + /** + * BeginTx starts a transaction. + * + * The provided context is used until the transaction is committed or rolled back. + * If the context is canceled, the sql package will roll back + * the transaction. Tx.Commit will return an error if the context provided to + * BeginTx is canceled. + * + * The provided TxOptions is optional and may be nil if defaults should be used. + * If a non-default isolation level is used that the driver doesn't support, + * an error will be returned. + */ + beginTx(ctx: context.Context, opts: TxOptions): (Tx) + } + interface Conn { + /** + * Close returns the connection to the connection pool. + * All operations after a Close will return with ErrConnDone. + * Close is safe to call concurrently with other operations and will + * block until all other operations finish. It may be useful to first + * cancel any used context and then call close directly after. + */ + close(): void + } + /** + * ColumnType contains the name and type of a column. + */ + interface ColumnType { + } + interface ColumnType { + /** + * Name returns the name or alias of the column. + */ + name(): string + } + interface ColumnType { + /** + * Length returns the column type length for variable length column types such + * as text and binary field types. If the type length is unbounded the value will + * be math.MaxInt64 (any database limits will still apply). + * If the column type is not variable length, such as an int, or if not supported + * by the driver ok is false. + */ + length(): [number, boolean] + } + interface ColumnType { + /** + * DecimalSize returns the scale and precision of a decimal type. + * If not applicable or if not supported ok is false. + */ + decimalSize(): [number, boolean] + } + interface ColumnType { + /** + * ScanType returns a Go type suitable for scanning into using Rows.Scan. + * If a driver does not support this property ScanType will return + * the type of an empty interface. + */ + scanType(): any + } + interface ColumnType { + /** + * Nullable reports whether the column may be null. + * If a driver does not support this property ok will be false. + */ + nullable(): boolean + } + interface ColumnType { + /** + * DatabaseTypeName returns the database system name of the column type. If an empty + * string is returned, then the driver type name is not supported. + * Consult your driver documentation for a list of driver data types. Length specifiers + * are not included. + * Common type names include "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL", + * "INT", and "BIGINT". + */ + databaseTypeName(): string + } + /** + * Row is the result of calling QueryRow to select a single row. + */ + interface Row { + } + interface Row { + /** + * Scan copies the columns from the matched row into the values + * pointed at by dest. See the documentation on Rows.Scan for details. + * If more than one row matches the query, + * Scan uses the first row and discards the rest. If no row matches + * the query, Scan returns ErrNoRows. + */ + scan(...dest: any[]): void + } + interface Row { + /** + * Err provides a way for wrapping packages to check for + * query errors without calling Scan. + * Err returns the error, if any, that was encountered while running the query. + * If this error is not nil, this error will also be returned from Scan. + */ + err(): void + } +} + +/** + * Package url parses URLs and implements query escaping. + */ +namespace url { + /** + * A URL represents a parsed URL (technically, a URI reference). + * + * The general form represented is: + * + * ``` + * [scheme:][//[userinfo@]host][/]path[?query][#fragment] + * ``` + * + * URLs that do not start with a slash after the scheme are interpreted as: + * + * ``` + * scheme:opaque[?query][#fragment] + * ``` + * + * Note that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/. + * A consequence is that it is impossible to tell which slashes in the Path were + * slashes in the raw URL and which were %2f. This distinction is rarely important, + * but when it is, the code should use RawPath, an optional field which only gets + * set if the default encoding is different from Path. + * + * URL's String method uses the EscapedPath method to obtain the path. See the + * EscapedPath method for more details. + */ + interface URL { + scheme: string + opaque: string // encoded opaque data + user?: Userinfo // username and password information + host: string // host or host:port + path: string // path (relative paths may omit leading slash) + rawPath: string // encoded path hint (see EscapedPath method) + omitHost: boolean // do not emit empty host (authority) + forceQuery: boolean // append a query ('?') even if RawQuery is empty + rawQuery: string // encoded query values, without '?' + fragment: string // fragment for references, without '#' + rawFragment: string // encoded fragment hint (see EscapedFragment method) + } + interface URL { + /** + * EscapedPath returns the escaped form of u.Path. + * In general there are multiple possible escaped forms of any path. + * EscapedPath returns u.RawPath when it is a valid escaping of u.Path. + * Otherwise EscapedPath ignores u.RawPath and computes an escaped + * form on its own. + * The String and RequestURI methods use EscapedPath to construct + * their results. + * In general, code should call EscapedPath instead of + * reading u.RawPath directly. + */ + escapedPath(): string + } + interface URL { + /** + * EscapedFragment returns the escaped form of u.Fragment. + * In general there are multiple possible escaped forms of any fragment. + * EscapedFragment returns u.RawFragment when it is a valid escaping of u.Fragment. + * Otherwise EscapedFragment ignores u.RawFragment and computes an escaped + * form on its own. + * The String method uses EscapedFragment to construct its result. + * In general, code should call EscapedFragment instead of + * reading u.RawFragment directly. + */ + escapedFragment(): string + } + interface URL { + /** + * String reassembles the URL into a valid URL string. + * The general form of the result is one of: + * + * ``` + * scheme:opaque?query#fragment + * scheme://userinfo@host/path?query#fragment + * ``` + * + * If u.Opaque is non-empty, String uses the first form; + * otherwise it uses the second form. + * Any non-ASCII characters in host are escaped. + * To obtain the path, String uses u.EscapedPath(). + * + * In the second form, the following rules apply: + * ``` + * - if u.Scheme is empty, scheme: is omitted. + * - if u.User is nil, userinfo@ is omitted. + * - if u.Host is empty, host/ is omitted. + * - if u.Scheme and u.Host are empty and u.User is nil, + * the entire scheme://userinfo@host/ is omitted. + * - if u.Host is non-empty and u.Path begins with a /, + * the form host/path does not add its own /. + * - if u.RawQuery is empty, ?query is omitted. + * - if u.Fragment is empty, #fragment is omitted. + * ``` + */ + string(): string + } + interface URL { + /** + * Redacted is like String but replaces any password with "xxxxx". + * Only the password in u.URL is redacted. + */ + redacted(): string + } + /** + * Values maps a string key to a list of values. + * It is typically used for query parameters and form values. + * Unlike in the http.Header map, the keys in a Values map + * are case-sensitive. + */ + interface Values extends _TygojaDict{} + interface Values { + /** + * Get gets the first value associated with the given key. + * If there are no values associated with the key, Get returns + * the empty string. To access multiple values, use the map + * directly. + */ + get(key: string): string + } + interface Values { + /** + * Set sets the key to value. It replaces any existing + * values. + */ + set(key: string): void + } + interface Values { + /** + * Add adds the value to key. It appends to any existing + * values associated with key. + */ + add(key: string): void + } + interface Values { + /** + * Del deletes the values associated with key. + */ + del(key: string): void + } + interface Values { + /** + * Has checks whether a given key is set. + */ + has(key: string): boolean + } + interface Values { + /** + * Encode encodes the values into “URL encoded” form + * ("bar=baz&foo=quux") sorted by key. + */ + encode(): string + } + interface URL { + /** + * IsAbs reports whether the URL is absolute. + * Absolute means that it has a non-empty scheme. + */ + isAbs(): boolean + } + interface URL { + /** + * Parse parses a URL in the context of the receiver. The provided URL + * may be relative or absolute. Parse returns nil, err on parse + * failure, otherwise its return value is the same as ResolveReference. + */ + parse(ref: string): (URL) + } + interface URL { + /** + * ResolveReference resolves a URI reference to an absolute URI from + * an absolute base URI u, per RFC 3986 Section 5.2. The URI reference + * may be relative or absolute. ResolveReference always returns a new + * URL instance, even if the returned URL is identical to either the + * base or reference. If ref is an absolute URL, then ResolveReference + * ignores base and returns a copy of ref. + */ + resolveReference(ref: URL): (URL) + } + interface URL { + /** + * Query parses RawQuery and returns the corresponding values. + * It silently discards malformed value pairs. + * To check errors use ParseQuery. + */ + query(): Values + } + interface URL { + /** + * RequestURI returns the encoded path?query or opaque?query + * string that would be used in an HTTP request for u. + */ + requestURI(): string + } + interface URL { + /** + * Hostname returns u.Host, stripping any valid port number if present. + * + * If the result is enclosed in square brackets, as literal IPv6 addresses are, + * the square brackets are removed from the result. + */ + hostname(): string + } + interface URL { + /** + * Port returns the port part of u.Host, without the leading colon. + * + * If u.Host doesn't contain a valid numeric port, Port returns an empty string. + */ + port(): string + } + interface URL { + marshalBinary(): string|Array + } + interface URL { + unmarshalBinary(text: string|Array): void + } + interface URL { + /** + * JoinPath returns a new URL with the provided path elements joined to + * any existing path and the resulting path cleaned of any ./ or ../ elements. + * Any sequences of multiple / characters will be reduced to a single /. + */ + joinPath(...elem: string[]): (URL) + } +} + /** * Package net provides a portable interface for network I/O, including * TCP/IP, UDP, domain name resolution, and Unix domain sockets. @@ -14600,234 +15044,6 @@ namespace net { } } -/** - * Package url parses URLs and implements query escaping. - */ -namespace url { - /** - * A URL represents a parsed URL (technically, a URI reference). - * - * The general form represented is: - * - * ``` - * [scheme:][//[userinfo@]host][/]path[?query][#fragment] - * ``` - * - * URLs that do not start with a slash after the scheme are interpreted as: - * - * ``` - * scheme:opaque[?query][#fragment] - * ``` - * - * Note that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/. - * A consequence is that it is impossible to tell which slashes in the Path were - * slashes in the raw URL and which were %2f. This distinction is rarely important, - * but when it is, the code should use RawPath, an optional field which only gets - * set if the default encoding is different from Path. - * - * URL's String method uses the EscapedPath method to obtain the path. See the - * EscapedPath method for more details. - */ - interface URL { - scheme: string - opaque: string // encoded opaque data - user?: Userinfo // username and password information - host: string // host or host:port - path: string // path (relative paths may omit leading slash) - rawPath: string // encoded path hint (see EscapedPath method) - omitHost: boolean // do not emit empty host (authority) - forceQuery: boolean // append a query ('?') even if RawQuery is empty - rawQuery: string // encoded query values, without '?' - fragment: string // fragment for references, without '#' - rawFragment: string // encoded fragment hint (see EscapedFragment method) - } - interface URL { - /** - * EscapedPath returns the escaped form of u.Path. - * In general there are multiple possible escaped forms of any path. - * EscapedPath returns u.RawPath when it is a valid escaping of u.Path. - * Otherwise EscapedPath ignores u.RawPath and computes an escaped - * form on its own. - * The String and RequestURI methods use EscapedPath to construct - * their results. - * In general, code should call EscapedPath instead of - * reading u.RawPath directly. - */ - escapedPath(): string - } - interface URL { - /** - * EscapedFragment returns the escaped form of u.Fragment. - * In general there are multiple possible escaped forms of any fragment. - * EscapedFragment returns u.RawFragment when it is a valid escaping of u.Fragment. - * Otherwise EscapedFragment ignores u.RawFragment and computes an escaped - * form on its own. - * The String method uses EscapedFragment to construct its result. - * In general, code should call EscapedFragment instead of - * reading u.RawFragment directly. - */ - escapedFragment(): string - } - interface URL { - /** - * String reassembles the URL into a valid URL string. - * The general form of the result is one of: - * - * ``` - * scheme:opaque?query#fragment - * scheme://userinfo@host/path?query#fragment - * ``` - * - * If u.Opaque is non-empty, String uses the first form; - * otherwise it uses the second form. - * Any non-ASCII characters in host are escaped. - * To obtain the path, String uses u.EscapedPath(). - * - * In the second form, the following rules apply: - * ``` - * - if u.Scheme is empty, scheme: is omitted. - * - if u.User is nil, userinfo@ is omitted. - * - if u.Host is empty, host/ is omitted. - * - if u.Scheme and u.Host are empty and u.User is nil, - * the entire scheme://userinfo@host/ is omitted. - * - if u.Host is non-empty and u.Path begins with a /, - * the form host/path does not add its own /. - * - if u.RawQuery is empty, ?query is omitted. - * - if u.Fragment is empty, #fragment is omitted. - * ``` - */ - string(): string - } - interface URL { - /** - * Redacted is like String but replaces any password with "xxxxx". - * Only the password in u.URL is redacted. - */ - redacted(): string - } - /** - * Values maps a string key to a list of values. - * It is typically used for query parameters and form values. - * Unlike in the http.Header map, the keys in a Values map - * are case-sensitive. - */ - interface Values extends _TygojaDict{} - interface Values { - /** - * Get gets the first value associated with the given key. - * If there are no values associated with the key, Get returns - * the empty string. To access multiple values, use the map - * directly. - */ - get(key: string): string - } - interface Values { - /** - * Set sets the key to value. It replaces any existing - * values. - */ - set(key: string): void - } - interface Values { - /** - * Add adds the value to key. It appends to any existing - * values associated with key. - */ - add(key: string): void - } - interface Values { - /** - * Del deletes the values associated with key. - */ - del(key: string): void - } - interface Values { - /** - * Has checks whether a given key is set. - */ - has(key: string): boolean - } - interface Values { - /** - * Encode encodes the values into “URL encoded” form - * ("bar=baz&foo=quux") sorted by key. - */ - encode(): string - } - interface URL { - /** - * IsAbs reports whether the URL is absolute. - * Absolute means that it has a non-empty scheme. - */ - isAbs(): boolean - } - interface URL { - /** - * Parse parses a URL in the context of the receiver. The provided URL - * may be relative or absolute. Parse returns nil, err on parse - * failure, otherwise its return value is the same as ResolveReference. - */ - parse(ref: string): (URL | undefined) - } - interface URL { - /** - * ResolveReference resolves a URI reference to an absolute URI from - * an absolute base URI u, per RFC 3986 Section 5.2. The URI reference - * may be relative or absolute. ResolveReference always returns a new - * URL instance, even if the returned URL is identical to either the - * base or reference. If ref is an absolute URL, then ResolveReference - * ignores base and returns a copy of ref. - */ - resolveReference(ref: URL): (URL | undefined) - } - interface URL { - /** - * Query parses RawQuery and returns the corresponding values. - * It silently discards malformed value pairs. - * To check errors use ParseQuery. - */ - query(): Values - } - interface URL { - /** - * RequestURI returns the encoded path?query or opaque?query - * string that would be used in an HTTP request for u. - */ - requestURI(): string - } - interface URL { - /** - * Hostname returns u.Host, stripping any valid port number if present. - * - * If the result is enclosed in square brackets, as literal IPv6 addresses are, - * the square brackets are removed from the result. - */ - hostname(): string - } - interface URL { - /** - * Port returns the port part of u.Host, without the leading colon. - * - * If u.Host doesn't contain a valid numeric port, Port returns an empty string. - */ - port(): string - } - interface URL { - marshalBinary(): string|Array - } - interface URL { - unmarshalBinary(text: string|Array): void - } - interface URL { - /** - * JoinPath returns a new URL with the provided path elements joined to - * any existing path and the resulting path cleaned of any ./ or ../ elements. - * Any sequences of multiple / characters will be reduced to a single /. - */ - joinPath(...elem: string[]): (URL | undefined) - } -} - /** * Package textproto implements generic support for text-based request/response * protocols in the style of HTTP, NNTP, and SMTP. @@ -14937,7 +15153,7 @@ namespace multipart { * It returns ErrMessageTooLarge if all non-file parts can't be stored in * memory. */ - readForm(maxMemory: number): (Form | undefined) + readForm(maxMemory: number): (Form) } /** * Form is a parsed multipart form. @@ -14980,7 +15196,7 @@ namespace multipart { * has a value of "quoted-printable", that header is instead * hidden and the body is transparently decoded during Read calls. */ - nextPart(): (Part | undefined) + nextPart(): (Part) } interface Reader { /** @@ -14990,7 +15206,7 @@ namespace multipart { * Unlike NextPart, it does not have special handling for * "Content-Transfer-Encoding: quoted-printable". */ - nextRawPart(): (Part | undefined) + nextRawPart(): (Part) } } @@ -15346,7 +15562,7 @@ namespace http { * the Response's Request. ErrNoLocation is returned if no * Location header is present. */ - location(): (url.URL | undefined) + location(): (url.URL) } interface Response { /** @@ -15418,462 +15634,6 @@ namespace http { } } -/** - * Package echo implements high performance, minimalist Go web framework. - * - * Example: - * - * ``` - * package main - * - * import ( - * "github.com/labstack/echo/v5" - * "github.com/labstack/echo/v5/middleware" - * "log" - * "net/http" - * ) - * - * // Handler - * func hello(c echo.Context) error { - * return c.String(http.StatusOK, "Hello, World!") - * } - * - * func main() { - * // Echo instance - * e := echo.New() - * - * // Middleware - * e.Use(middleware.Logger()) - * e.Use(middleware.Recover()) - * - * // Routes - * e.GET("/", hello) - * - * // Start server - * if err := e.Start(":8080"); err != http.ErrServerClosed { - * log.Fatal(err) - * } - * } - * ``` - * - * Learn more at https://echo.labstack.com - */ -namespace echo { - /** - * Binder is the interface that wraps the Bind method. - */ - interface Binder { - [key:string]: any; - bind(c: Context, i: { - }): void - } - /** - * ServableContext is interface that Echo context implementation must implement to be usable in middleware/handlers and - * be able to be routed by Router. - */ - interface ServableContext { - [key:string]: any; - /** - * Reset resets the context after request completes. It must be called along - * with `Echo#AcquireContext()` and `Echo#ReleaseContext()`. - * See `Echo#ServeHTTP()` - */ - reset(r: http.Request, w: http.ResponseWriter): void - } - // @ts-ignore - import stdContext = context - /** - * JSONSerializer is the interface that encodes and decodes JSON to and from interfaces. - */ - interface JSONSerializer { - [key:string]: any; - serialize(c: Context, i: { - }, indent: string): void - deserialize(c: Context, i: { - }): void - } - /** - * HTTPErrorHandler is a centralized HTTP error handler. - */ - interface HTTPErrorHandler {(c: Context, err: Error): void } - /** - * Validator is the interface that wraps the Validate function. - */ - interface Validator { - [key:string]: any; - validate(i: { - }): void - } - /** - * Renderer is the interface that wraps the Render function. - */ - interface Renderer { - [key:string]: any; - render(_arg0: io.Writer, _arg1: string, _arg2: { - }, _arg3: Context): void - } - /** - * Group is a set of sub-routes for a specified route. It can be used for inner - * routes that share a common middleware or functionality that should be separate - * from the parent echo instance while still inheriting from it. - */ - interface Group { - } - interface Group { - /** - * Use implements `Echo#Use()` for sub-routes within the Group. - * Group middlewares are not executed on request when there is no matching route found. - */ - use(...middleware: MiddlewareFunc[]): void - } - interface Group { - /** - * CONNECT implements `Echo#CONNECT()` for sub-routes within the Group. Panics on error. - */ - connect(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * DELETE implements `Echo#DELETE()` for sub-routes within the Group. Panics on error. - */ - delete(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * GET implements `Echo#GET()` for sub-routes within the Group. Panics on error. - */ - get(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * HEAD implements `Echo#HEAD()` for sub-routes within the Group. Panics on error. - */ - head(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * OPTIONS implements `Echo#OPTIONS()` for sub-routes within the Group. Panics on error. - */ - options(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * PATCH implements `Echo#PATCH()` for sub-routes within the Group. Panics on error. - */ - patch(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * POST implements `Echo#POST()` for sub-routes within the Group. Panics on error. - */ - post(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * PUT implements `Echo#PUT()` for sub-routes within the Group. Panics on error. - */ - put(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * TRACE implements `Echo#TRACE()` for sub-routes within the Group. Panics on error. - */ - trace(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * Any implements `Echo#Any()` for sub-routes within the Group. Panics on error. - */ - any(path: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): Routes - } - interface Group { - /** - * Match implements `Echo#Match()` for sub-routes within the Group. Panics on error. - */ - match(methods: Array, path: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): Routes - } - interface Group { - /** - * Group creates a new sub-group with prefix and optional sub-group-level middleware. - * Important! Group middlewares are only executed in case there was exact route match and not - * for 404 (not found) or 405 (method not allowed) cases. If this kind of behaviour is needed then add - * a catch-all route `/*` for the group which handler returns always 404 - */ - group(prefix: string, ...middleware: MiddlewareFunc[]): (Group | undefined) - } - interface Group { - /** - * Static implements `Echo#Static()` for sub-routes within the Group. - */ - static(pathPrefix: string): RouteInfo - } - interface Group { - /** - * StaticFS implements `Echo#StaticFS()` for sub-routes within the Group. - * - * When dealing with `embed.FS` use `fs := echo.MustSubFS(fs, "rootDirectory") to create sub fs which uses necessary - * prefix for directory path. This is necessary as `//go:embed assets/images` embeds files with paths - * including `assets/images` as their prefix. - */ - staticFS(pathPrefix: string, filesystem: fs.FS): RouteInfo - } - interface Group { - /** - * FileFS implements `Echo#FileFS()` for sub-routes within the Group. - */ - fileFS(path: string, filesystem: fs.FS, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * File implements `Echo#File()` for sub-routes within the Group. Panics on error. - */ - file(path: string, ...middleware: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * RouteNotFound implements `Echo#RouteNotFound()` for sub-routes within the Group. - * - * Example: `g.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })` - */ - routeNotFound(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * Add implements `Echo#Add()` for sub-routes within the Group. Panics on error. - */ - add(method: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): RouteInfo - } - interface Group { - /** - * AddRoute registers a new Routable with Router - */ - addRoute(route: Routable): RouteInfo - } - /** - * IPExtractor is a function to extract IP addr from http.Request. - * Set appropriate one to Echo#IPExtractor. - * See https://echo.labstack.com/guide/ip-address for more details. - */ - interface IPExtractor {(_arg0: http.Request): string } - /** - * Logger defines the logging interface that Echo uses internally in few places. - * For logging in handlers use your own logger instance (dependency injected or package/public variable) from logging framework of your choice. - */ - interface Logger { - [key:string]: any; - /** - * Write provides writer interface for http.Server `ErrorLog` and for logging startup messages. - * `http.Server.ErrorLog` logs errors from accepting connections, unexpected behavior from handlers, - * and underlying FileSystem errors. - * `logger` middleware will use this method to write its JSON payload. - */ - write(p: string|Array): number - /** - * Error logs the error - */ - error(err: Error): void - } - /** - * Response wraps an http.ResponseWriter and implements its interface to be used - * by an HTTP handler to construct an HTTP response. - * See: https://golang.org/pkg/net/http/#ResponseWriter - */ - interface Response { - writer: http.ResponseWriter - status: number - size: number - committed: boolean - } - interface Response { - /** - * Header returns the header map for the writer that will be sent by - * WriteHeader. Changing the header after a call to WriteHeader (or Write) has - * no effect unless the modified headers were declared as trailers by setting - * the "Trailer" header before the call to WriteHeader (see example) - * To suppress implicit response headers, set their value to nil. - * Example: https://golang.org/pkg/net/http/#example_ResponseWriter_trailers - */ - header(): http.Header - } - interface Response { - /** - * Before registers a function which is called just before the response is written. - */ - before(fn: () => void): void - } - interface Response { - /** - * After registers a function which is called just after the response is written. - * If the `Content-Length` is unknown, none of the after function is executed. - */ - after(fn: () => void): void - } - interface Response { - /** - * WriteHeader sends an HTTP response header with status code. If WriteHeader is - * not called explicitly, the first call to Write will trigger an implicit - * WriteHeader(http.StatusOK). Thus explicit calls to WriteHeader are mainly - * used to send error codes. - */ - writeHeader(code: number): void - } - interface Response { - /** - * Write writes the data to the connection as part of an HTTP reply. - */ - write(b: string|Array): number - } - interface Response { - /** - * Flush implements the http.Flusher interface to allow an HTTP handler to flush - * buffered data to the client. - * See [http.Flusher](https://golang.org/pkg/net/http/#Flusher) - */ - flush(): void - } - interface Response { - /** - * Hijack implements the http.Hijacker interface to allow an HTTP handler to - * take over the connection. - * See [http.Hijacker](https://golang.org/pkg/net/http/#Hijacker) - */ - hijack(): [net.Conn, (bufio.ReadWriter | undefined)] - } - interface Response { - /** - * Unwrap returns the original http.ResponseWriter. - * ResponseController can be used to access the original http.ResponseWriter. - * See [https://go.dev/blog/go1.20] - */ - unwrap(): http.ResponseWriter - } - interface Routes { - /** - * Reverse reverses route to URL string by replacing path parameters with given params values. - */ - reverse(name: string, ...params: { - }[]): string - } - interface Routes { - /** - * FindByMethodPath searched for matching route info by method and path - */ - findByMethodPath(method: string, path: string): RouteInfo - } - interface Routes { - /** - * FilterByMethod searched for matching route info by method - */ - filterByMethod(method: string): Routes - } - interface Routes { - /** - * FilterByPath searched for matching route info by path - */ - filterByPath(path: string): Routes - } - interface Routes { - /** - * FilterByName searched for matching route info by name - */ - filterByName(name: string): Routes - } - /** - * Router is interface for routing request contexts to registered routes. - * - * Contract between Echo/Context instance and the router: - * ``` - * - all routes must be added through methods on echo.Echo instance. - * Reason: Echo instance uses RouteInfo.Params() length to allocate slice for paths parameters (see `Echo.contextPathParamAllocSize`). - * - Router must populate Context during Router.Route call with: - * - RoutableContext.SetPath - * - RoutableContext.SetRawPathParams (IMPORTANT! with same slice pointer that c.RawPathParams() returns) - * - RoutableContext.SetRouteInfo - * And optionally can set additional information to Context with RoutableContext.Set - * ``` - */ - interface Router { - [key:string]: any; - /** - * Add registers Routable with the Router and returns registered RouteInfo - */ - add(routable: Routable): RouteInfo - /** - * Remove removes route from the Router - */ - remove(method: string, path: string): void - /** - * Routes returns information about all registered routes - */ - routes(): Routes - /** - * Route searches Router for matching route and applies it to the given context. In case when no matching method - * was not found (405) or no matching route exists for path (404), router will return its implementation of 405/404 - * handler function. - */ - route(c: RoutableContext): HandlerFunc - } - /** - * Routable is interface for registering Route with Router. During route registration process the Router will - * convert Routable to RouteInfo with ToRouteInfo method. By creating custom implementation of Routable additional - * information about registered route can be stored in Routes (i.e. privileges used with route etc.) - */ - interface Routable { - [key:string]: any; - /** - * ToRouteInfo converts Routable to RouteInfo - * - * This method is meant to be used by Router after it parses url for path parameters, to store information about - * route just added. - */ - toRouteInfo(params: Array): RouteInfo - /** - * ToRoute converts Routable to Route which Router uses to register the method handler for path. - * - * This method is meant to be used by Router to get fields (including handler and middleware functions) needed to - * add Route to Router. - */ - toRoute(): Route - /** - * ForGroup recreates routable with added group prefix and group middlewares it is grouped to. - * - * Is necessary for Echo.Group to be able to add/register Routable with Router and having group prefix and group - * middlewares included in actually registered Route. - */ - forGroup(pathPrefix: string, middlewares: Array): Routable - } - /** - * Routes is collection of RouteInfo instances with various helper methods. - */ - interface Routes extends Array{} - /** - * RouteInfo describes registered route base fields. - * Method+Path pair uniquely identifies the Route. Name can have duplicates. - */ - interface RouteInfo { - [key:string]: any; - method(): string - path(): string - name(): string - params(): Array - /** - * Reverse reverses route to URL string by replacing path parameters with given params values. - */ - reverse(...params: { - }[]): string - } - /** - * PathParams is collections of PathParam instances with various helper methods - */ - interface PathParams extends Array{} - interface PathParams { - /** - * Get returns path parameter value for given name or default value. - */ - get(name: string, defaultValue: string): string - } -} - namespace store { /** * Store defines a concurrent safe in memory key-value data store. @@ -15945,222 +15705,6 @@ namespace store { } } -/** - * Package sql provides a generic interface around SQL (or SQL-like) - * databases. - * - * The sql package must be used in conjunction with a database driver. - * See https://golang.org/s/sqldrivers for a list of drivers. - * - * Drivers that do not support context cancellation will not return until - * after the query is completed. - * - * For usage examples, see the wiki page at - * https://golang.org/s/sqlwiki. - */ -namespace sql { - /** - * IsolationLevel is the transaction isolation level used in TxOptions. - */ - interface IsolationLevel extends Number{} - interface IsolationLevel { - /** - * String returns the name of the transaction isolation level. - */ - string(): string - } - /** - * DBStats contains database statistics. - */ - interface DBStats { - maxOpenConnections: number // Maximum number of open connections to the database. - /** - * Pool Status - */ - openConnections: number // The number of established connections both in use and idle. - inUse: number // The number of connections currently in use. - idle: number // The number of idle connections. - /** - * Counters - */ - waitCount: number // The total number of connections waited for. - waitDuration: time.Duration // The total time blocked waiting for a new connection. - maxIdleClosed: number // The total number of connections closed due to SetMaxIdleConns. - maxIdleTimeClosed: number // The total number of connections closed due to SetConnMaxIdleTime. - maxLifetimeClosed: number // The total number of connections closed due to SetConnMaxLifetime. - } - /** - * Conn represents a single database connection rather than a pool of database - * connections. Prefer running queries from DB unless there is a specific - * need for a continuous single database connection. - * - * A Conn must call Close to return the connection to the database pool - * and may do so concurrently with a running query. - * - * After a call to Close, all operations on the - * connection fail with ErrConnDone. - */ - interface Conn { - } - interface Conn { - /** - * PingContext verifies the connection to the database is still alive. - */ - pingContext(ctx: context.Context): void - } - interface Conn { - /** - * ExecContext executes a query without returning any rows. - * The args are for any placeholder parameters in the query. - */ - execContext(ctx: context.Context, query: string, ...args: any[]): Result - } - interface Conn { - /** - * QueryContext executes a query that returns rows, typically a SELECT. - * The args are for any placeholder parameters in the query. - */ - queryContext(ctx: context.Context, query: string, ...args: any[]): (Rows | undefined) - } - interface Conn { - /** - * QueryRowContext executes a query that is expected to return at most one row. - * QueryRowContext always returns a non-nil value. Errors are deferred until - * Row's Scan method is called. - * If the query selects no rows, the *Row's Scan will return ErrNoRows. - * Otherwise, the *Row's Scan scans the first selected row and discards - * the rest. - */ - queryRowContext(ctx: context.Context, query: string, ...args: any[]): (Row | undefined) - } - interface Conn { - /** - * PrepareContext creates a prepared statement for later queries or executions. - * Multiple queries or executions may be run concurrently from the - * returned statement. - * The caller must call the statement's Close method - * when the statement is no longer needed. - * - * The provided context is used for the preparation of the statement, not for the - * execution of the statement. - */ - prepareContext(ctx: context.Context, query: string): (Stmt | undefined) - } - interface Conn { - /** - * Raw executes f exposing the underlying driver connection for the - * duration of f. The driverConn must not be used outside of f. - * - * Once f returns and err is not driver.ErrBadConn, the Conn will continue to be usable - * until Conn.Close is called. - */ - raw(f: (driverConn: any) => void): void - } - interface Conn { - /** - * BeginTx starts a transaction. - * - * The provided context is used until the transaction is committed or rolled back. - * If the context is canceled, the sql package will roll back - * the transaction. Tx.Commit will return an error if the context provided to - * BeginTx is canceled. - * - * The provided TxOptions is optional and may be nil if defaults should be used. - * If a non-default isolation level is used that the driver doesn't support, - * an error will be returned. - */ - beginTx(ctx: context.Context, opts: TxOptions): (Tx | undefined) - } - interface Conn { - /** - * Close returns the connection to the connection pool. - * All operations after a Close will return with ErrConnDone. - * Close is safe to call concurrently with other operations and will - * block until all other operations finish. It may be useful to first - * cancel any used context and then call close directly after. - */ - close(): void - } - /** - * ColumnType contains the name and type of a column. - */ - interface ColumnType { - } - interface ColumnType { - /** - * Name returns the name or alias of the column. - */ - name(): string - } - interface ColumnType { - /** - * Length returns the column type length for variable length column types such - * as text and binary field types. If the type length is unbounded the value will - * be math.MaxInt64 (any database limits will still apply). - * If the column type is not variable length, such as an int, or if not supported - * by the driver ok is false. - */ - length(): [number, boolean] - } - interface ColumnType { - /** - * DecimalSize returns the scale and precision of a decimal type. - * If not applicable or if not supported ok is false. - */ - decimalSize(): [number, boolean] - } - interface ColumnType { - /** - * ScanType returns a Go type suitable for scanning into using Rows.Scan. - * If a driver does not support this property ScanType will return - * the type of an empty interface. - */ - scanType(): any - } - interface ColumnType { - /** - * Nullable reports whether the column may be null. - * If a driver does not support this property ok will be false. - */ - nullable(): boolean - } - interface ColumnType { - /** - * DatabaseTypeName returns the database system name of the column type. If an empty - * string is returned, then the driver type name is not supported. - * Consult your driver documentation for a list of driver data types. Length specifiers - * are not included. - * Common type names include "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL", - * "INT", and "BIGINT". - */ - databaseTypeName(): string - } - /** - * Row is the result of calling QueryRow to select a single row. - */ - interface Row { - } - interface Row { - /** - * Scan copies the columns from the matched row into the values - * pointed at by dest. See the documentation on Rows.Scan for details. - * If more than one row matches the query, - * Scan uses the first row and discards the rest. If no row matches - * the query, Scan returns ErrNoRows. - */ - scan(...dest: any[]): void - } - interface Row { - /** - * Err provides a way for wrapping packages to check for - * query errors without calling Scan. - * Err returns the error, if any, that was encountered while running the query. - * If this error is not nil, this error will also be returned from Scan. - */ - err(): void - } -} - /** * Package types implements some commonly used db serializable types * like datetime, json, etc. @@ -16454,16 +15998,16 @@ namespace models { */ validate(): void } - type _subvfWAz = BaseModel - interface Param extends _subvfWAz { + type _subvHuvT = BaseModel + interface Param extends _subvHuvT { key: string value: types.JsonRaw } interface Param { tableName(): string } - type _subjmMDV = BaseModel - interface Request extends _subjmMDV { + type _subLkuaZ = BaseModel + interface Request extends _subLkuaZ { url: string method: string status: number @@ -16567,7 +16111,7 @@ namespace oauth2 { * implementing derivative OAuth2 flows. */ withExtra(extra: { - }): (Token | undefined) + }): (Token) } interface Token { /** @@ -16599,6 +16143,462 @@ namespace mailer { } } +/** + * Package echo implements high performance, minimalist Go web framework. + * + * Example: + * + * ``` + * package main + * + * import ( + * "github.com/labstack/echo/v5" + * "github.com/labstack/echo/v5/middleware" + * "log" + * "net/http" + * ) + * + * // Handler + * func hello(c echo.Context) error { + * return c.String(http.StatusOK, "Hello, World!") + * } + * + * func main() { + * // Echo instance + * e := echo.New() + * + * // Middleware + * e.Use(middleware.Logger()) + * e.Use(middleware.Recover()) + * + * // Routes + * e.GET("/", hello) + * + * // Start server + * if err := e.Start(":8080"); err != http.ErrServerClosed { + * log.Fatal(err) + * } + * } + * ``` + * + * Learn more at https://echo.labstack.com + */ +namespace echo { + /** + * Binder is the interface that wraps the Bind method. + */ + interface Binder { + [key:string]: any; + bind(c: Context, i: { + }): void + } + /** + * ServableContext is interface that Echo context implementation must implement to be usable in middleware/handlers and + * be able to be routed by Router. + */ + interface ServableContext { + [key:string]: any; + /** + * Reset resets the context after request completes. It must be called along + * with `Echo#AcquireContext()` and `Echo#ReleaseContext()`. + * See `Echo#ServeHTTP()` + */ + reset(r: http.Request, w: http.ResponseWriter): void + } + // @ts-ignore + import stdContext = context + /** + * JSONSerializer is the interface that encodes and decodes JSON to and from interfaces. + */ + interface JSONSerializer { + [key:string]: any; + serialize(c: Context, i: { + }, indent: string): void + deserialize(c: Context, i: { + }): void + } + /** + * HTTPErrorHandler is a centralized HTTP error handler. + */ + interface HTTPErrorHandler {(c: Context, err: Error): void } + /** + * Validator is the interface that wraps the Validate function. + */ + interface Validator { + [key:string]: any; + validate(i: { + }): void + } + /** + * Renderer is the interface that wraps the Render function. + */ + interface Renderer { + [key:string]: any; + render(_arg0: io.Writer, _arg1: string, _arg2: { + }, _arg3: Context): void + } + /** + * Group is a set of sub-routes for a specified route. It can be used for inner + * routes that share a common middleware or functionality that should be separate + * from the parent echo instance while still inheriting from it. + */ + interface Group { + } + interface Group { + /** + * Use implements `Echo#Use()` for sub-routes within the Group. + * Group middlewares are not executed on request when there is no matching route found. + */ + use(...middleware: MiddlewareFunc[]): void + } + interface Group { + /** + * CONNECT implements `Echo#CONNECT()` for sub-routes within the Group. Panics on error. + */ + connect(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * DELETE implements `Echo#DELETE()` for sub-routes within the Group. Panics on error. + */ + delete(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * GET implements `Echo#GET()` for sub-routes within the Group. Panics on error. + */ + get(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * HEAD implements `Echo#HEAD()` for sub-routes within the Group. Panics on error. + */ + head(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * OPTIONS implements `Echo#OPTIONS()` for sub-routes within the Group. Panics on error. + */ + options(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * PATCH implements `Echo#PATCH()` for sub-routes within the Group. Panics on error. + */ + patch(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * POST implements `Echo#POST()` for sub-routes within the Group. Panics on error. + */ + post(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * PUT implements `Echo#PUT()` for sub-routes within the Group. Panics on error. + */ + put(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * TRACE implements `Echo#TRACE()` for sub-routes within the Group. Panics on error. + */ + trace(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * Any implements `Echo#Any()` for sub-routes within the Group. Panics on error. + */ + any(path: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): Routes + } + interface Group { + /** + * Match implements `Echo#Match()` for sub-routes within the Group. Panics on error. + */ + match(methods: Array, path: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): Routes + } + interface Group { + /** + * Group creates a new sub-group with prefix and optional sub-group-level middleware. + * Important! Group middlewares are only executed in case there was exact route match and not + * for 404 (not found) or 405 (method not allowed) cases. If this kind of behaviour is needed then add + * a catch-all route `/*` for the group which handler returns always 404 + */ + group(prefix: string, ...middleware: MiddlewareFunc[]): (Group) + } + interface Group { + /** + * Static implements `Echo#Static()` for sub-routes within the Group. + */ + static(pathPrefix: string): RouteInfo + } + interface Group { + /** + * StaticFS implements `Echo#StaticFS()` for sub-routes within the Group. + * + * When dealing with `embed.FS` use `fs := echo.MustSubFS(fs, "rootDirectory") to create sub fs which uses necessary + * prefix for directory path. This is necessary as `//go:embed assets/images` embeds files with paths + * including `assets/images` as their prefix. + */ + staticFS(pathPrefix: string, filesystem: fs.FS): RouteInfo + } + interface Group { + /** + * FileFS implements `Echo#FileFS()` for sub-routes within the Group. + */ + fileFS(path: string, filesystem: fs.FS, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * File implements `Echo#File()` for sub-routes within the Group. Panics on error. + */ + file(path: string, ...middleware: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * RouteNotFound implements `Echo#RouteNotFound()` for sub-routes within the Group. + * + * Example: `g.RouteNotFound("/*", func(c echo.Context) error { return c.NoContent(http.StatusNotFound) })` + */ + routeNotFound(path: string, h: HandlerFunc, ...m: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * Add implements `Echo#Add()` for sub-routes within the Group. Panics on error. + */ + add(method: string, handler: HandlerFunc, ...middleware: MiddlewareFunc[]): RouteInfo + } + interface Group { + /** + * AddRoute registers a new Routable with Router + */ + addRoute(route: Routable): RouteInfo + } + /** + * IPExtractor is a function to extract IP addr from http.Request. + * Set appropriate one to Echo#IPExtractor. + * See https://echo.labstack.com/guide/ip-address for more details. + */ + interface IPExtractor {(_arg0: http.Request): string } + /** + * Logger defines the logging interface that Echo uses internally in few places. + * For logging in handlers use your own logger instance (dependency injected or package/public variable) from logging framework of your choice. + */ + interface Logger { + [key:string]: any; + /** + * Write provides writer interface for http.Server `ErrorLog` and for logging startup messages. + * `http.Server.ErrorLog` logs errors from accepting connections, unexpected behavior from handlers, + * and underlying FileSystem errors. + * `logger` middleware will use this method to write its JSON payload. + */ + write(p: string|Array): number + /** + * Error logs the error + */ + error(err: Error): void + } + /** + * Response wraps an http.ResponseWriter and implements its interface to be used + * by an HTTP handler to construct an HTTP response. + * See: https://golang.org/pkg/net/http/#ResponseWriter + */ + interface Response { + writer: http.ResponseWriter + status: number + size: number + committed: boolean + } + interface Response { + /** + * Header returns the header map for the writer that will be sent by + * WriteHeader. Changing the header after a call to WriteHeader (or Write) has + * no effect unless the modified headers were declared as trailers by setting + * the "Trailer" header before the call to WriteHeader (see example) + * To suppress implicit response headers, set their value to nil. + * Example: https://golang.org/pkg/net/http/#example_ResponseWriter_trailers + */ + header(): http.Header + } + interface Response { + /** + * Before registers a function which is called just before the response is written. + */ + before(fn: () => void): void + } + interface Response { + /** + * After registers a function which is called just after the response is written. + * If the `Content-Length` is unknown, none of the after function is executed. + */ + after(fn: () => void): void + } + interface Response { + /** + * WriteHeader sends an HTTP response header with status code. If WriteHeader is + * not called explicitly, the first call to Write will trigger an implicit + * WriteHeader(http.StatusOK). Thus explicit calls to WriteHeader are mainly + * used to send error codes. + */ + writeHeader(code: number): void + } + interface Response { + /** + * Write writes the data to the connection as part of an HTTP reply. + */ + write(b: string|Array): number + } + interface Response { + /** + * Flush implements the http.Flusher interface to allow an HTTP handler to flush + * buffered data to the client. + * See [http.Flusher](https://golang.org/pkg/net/http/#Flusher) + */ + flush(): void + } + interface Response { + /** + * Hijack implements the http.Hijacker interface to allow an HTTP handler to + * take over the connection. + * See [http.Hijacker](https://golang.org/pkg/net/http/#Hijacker) + */ + hijack(): [net.Conn, (bufio.ReadWriter)] + } + interface Response { + /** + * Unwrap returns the original http.ResponseWriter. + * ResponseController can be used to access the original http.ResponseWriter. + * See [https://go.dev/blog/go1.20] + */ + unwrap(): http.ResponseWriter + } + interface Routes { + /** + * Reverse reverses route to URL string by replacing path parameters with given params values. + */ + reverse(name: string, ...params: { + }[]): string + } + interface Routes { + /** + * FindByMethodPath searched for matching route info by method and path + */ + findByMethodPath(method: string, path: string): RouteInfo + } + interface Routes { + /** + * FilterByMethod searched for matching route info by method + */ + filterByMethod(method: string): Routes + } + interface Routes { + /** + * FilterByPath searched for matching route info by path + */ + filterByPath(path: string): Routes + } + interface Routes { + /** + * FilterByName searched for matching route info by name + */ + filterByName(name: string): Routes + } + /** + * Router is interface for routing request contexts to registered routes. + * + * Contract between Echo/Context instance and the router: + * ``` + * - all routes must be added through methods on echo.Echo instance. + * Reason: Echo instance uses RouteInfo.Params() length to allocate slice for paths parameters (see `Echo.contextPathParamAllocSize`). + * - Router must populate Context during Router.Route call with: + * - RoutableContext.SetPath + * - RoutableContext.SetRawPathParams (IMPORTANT! with same slice pointer that c.RawPathParams() returns) + * - RoutableContext.SetRouteInfo + * And optionally can set additional information to Context with RoutableContext.Set + * ``` + */ + interface Router { + [key:string]: any; + /** + * Add registers Routable with the Router and returns registered RouteInfo + */ + add(routable: Routable): RouteInfo + /** + * Remove removes route from the Router + */ + remove(method: string, path: string): void + /** + * Routes returns information about all registered routes + */ + routes(): Routes + /** + * Route searches Router for matching route and applies it to the given context. In case when no matching method + * was not found (405) or no matching route exists for path (404), router will return its implementation of 405/404 + * handler function. + */ + route(c: RoutableContext): HandlerFunc + } + /** + * Routable is interface for registering Route with Router. During route registration process the Router will + * convert Routable to RouteInfo with ToRouteInfo method. By creating custom implementation of Routable additional + * information about registered route can be stored in Routes (i.e. privileges used with route etc.) + */ + interface Routable { + [key:string]: any; + /** + * ToRouteInfo converts Routable to RouteInfo + * + * This method is meant to be used by Router after it parses url for path parameters, to store information about + * route just added. + */ + toRouteInfo(params: Array): RouteInfo + /** + * ToRoute converts Routable to Route which Router uses to register the method handler for path. + * + * This method is meant to be used by Router to get fields (including handler and middleware functions) needed to + * add Route to Router. + */ + toRoute(): Route + /** + * ForGroup recreates routable with added group prefix and group middlewares it is grouped to. + * + * Is necessary for Echo.Group to be able to add/register Routable with Router and having group prefix and group + * middlewares included in actually registered Route. + */ + forGroup(pathPrefix: string, middlewares: Array): Routable + } + /** + * Routes is collection of RouteInfo instances with various helper methods. + */ + interface Routes extends Array{} + /** + * RouteInfo describes registered route base fields. + * Method+Path pair uniquely identifies the Route. Name can have duplicates. + */ + interface RouteInfo { + [key:string]: any; + method(): string + path(): string + name(): string + params(): Array + /** + * Reverse reverses route to URL string by replacing path parameters with given params values. + */ + reverse(...params: { + }[]): string + } + /** + * PathParams is collections of PathParam instances with various helper methods + */ + interface PathParams extends Array{} + interface PathParams { + /** + * Get returns path parameter value for given name or default value. + */ + get(name: string, defaultValue: string): string + } +} + namespace settings { // @ts-ignore import validation = ozzo_validation @@ -16763,87 +16763,6 @@ namespace daos { } } -namespace hook { - /** - * Hook defines a concurrent safe structure for handling event hooks - * (aka. callbacks propagation). - */ - interface Hook { - } - interface Hook { - /** - * PreAdd registers a new handler to the hook by prepending it to the existing queue. - * - * Returns an autogenerated hook id that could be used later to remove the hook with Hook.Remove(id). - */ - preAdd(fn: Handler): string - } - interface Hook { - /** - * Add registers a new handler to the hook by appending it to the existing queue. - * - * Returns an autogenerated hook id that could be used later to remove the hook with Hook.Remove(id). - */ - add(fn: Handler): string - } - interface Hook { - /** - * Remove removes a single hook handler by its id. - */ - remove(id: string): void - } - interface Hook { - /** - * RemoveAll removes all registered handlers. - */ - removeAll(): void - } - interface Hook { - /** - * Trigger executes all registered hook handlers one by one - * with the specified `data` as an argument. - * - * Optionally, this method allows also to register additional one off - * handlers that will be temporary appended to the handlers queue. - * - * The execution stops when: - * - hook.StopPropagation is returned in one of the handlers - * - any non-nil error is returned in one of the handlers - */ - trigger(data: T, ...oneOffHandlers: Handler[]): void - } - /** - * TaggedHook defines a proxy hook which register handlers that are triggered only - * if the TaggedHook.tags are empty or includes at least one of the event data tag(s). - */ - type _subbcOFI = mainHook - interface TaggedHook extends _subbcOFI { - } - interface TaggedHook { - /** - * CanTriggerOn checks if the current TaggedHook can be triggered with - * the provided event data tags. - */ - canTriggerOn(tags: Array): boolean - } - interface TaggedHook { - /** - * PreAdd registers a new handler to the hook by prepending it to the existing queue. - * - * The fn handler will be called only if the event data tags satisfy h.CanTriggerOn. - */ - preAdd(fn: Handler): string - } - interface TaggedHook { - /** - * Add registers a new handler to the hook by appending it to the existing queue. - * - * The fn handler will be called only if the event data tags satisfy h.CanTriggerOn. - */ - add(fn: Handler): string - } -} - namespace subscriptions { /** * Broker defines a struct for managing subscriptions clients. @@ -16881,255 +16800,6 @@ namespace subscriptions { } } -/** - * Package core is the backbone of PocketBase. - * - * It defines the main PocketBase App interface and its base implementation. - */ -namespace core { - interface BootstrapEvent { - app: App - } - interface TerminateEvent { - app: App - } - interface ServeEvent { - app: App - router?: echo.Echo - server?: http.Server - certManager?: any - } - interface ApiErrorEvent { - httpContext: echo.Context - error: Error - } - type _subpbEfV = BaseModelEvent - interface ModelEvent extends _subpbEfV { - dao?: daos.Dao - } - type _subEafFQ = BaseCollectionEvent - interface MailerRecordEvent extends _subEafFQ { - mailClient: mailer.Mailer - message?: mailer.Message - record?: models.Record - meta: _TygojaDict - } - interface MailerAdminEvent { - mailClient: mailer.Mailer - message?: mailer.Message - admin?: models.Admin - meta: _TygojaDict - } - interface RealtimeConnectEvent { - httpContext: echo.Context - client: subscriptions.Client - idleTimeout: time.Duration - } - interface RealtimeDisconnectEvent { - httpContext: echo.Context - client: subscriptions.Client - } - interface RealtimeMessageEvent { - httpContext: echo.Context - client: subscriptions.Client - message?: subscriptions.Message - } - interface RealtimeSubscribeEvent { - httpContext: echo.Context - client: subscriptions.Client - subscriptions: Array - } - interface SettingsListEvent { - httpContext: echo.Context - redactedSettings?: settings.Settings - } - interface SettingsUpdateEvent { - httpContext: echo.Context - oldSettings?: settings.Settings - newSettings?: settings.Settings - } - type _subifMgp = BaseCollectionEvent - interface RecordsListEvent extends _subifMgp { - httpContext: echo.Context - records: Array<(models.Record | undefined)> - result?: search.Result - } - type _subNyFcY = BaseCollectionEvent - interface RecordViewEvent extends _subNyFcY { - httpContext: echo.Context - record?: models.Record - } - type _subcNrKW = BaseCollectionEvent - interface RecordCreateEvent extends _subcNrKW { - httpContext: echo.Context - record?: models.Record - uploadedFiles: _TygojaDict - } - type _subYjujD = BaseCollectionEvent - interface RecordUpdateEvent extends _subYjujD { - httpContext: echo.Context - record?: models.Record - uploadedFiles: _TygojaDict - } - type _subFsmmE = BaseCollectionEvent - interface RecordDeleteEvent extends _subFsmmE { - httpContext: echo.Context - record?: models.Record - } - type _subAeRyM = BaseCollectionEvent - interface RecordAuthEvent extends _subAeRyM { - httpContext: echo.Context - record?: models.Record - token: string - meta: any - } - type _subNpqIR = BaseCollectionEvent - interface RecordAuthWithPasswordEvent extends _subNpqIR { - httpContext: echo.Context - record?: models.Record - identity: string - password: string - } - type _subYfsIQ = BaseCollectionEvent - interface RecordAuthWithOAuth2Event extends _subYfsIQ { - httpContext: echo.Context - providerName: string - providerClient: auth.Provider - record?: models.Record - oAuth2User?: auth.AuthUser - isNewRecord: boolean - } - type _subKfoJt = BaseCollectionEvent - interface RecordAuthRefreshEvent extends _subKfoJt { - httpContext: echo.Context - record?: models.Record - } - type _subEEVmJ = BaseCollectionEvent - interface RecordRequestPasswordResetEvent extends _subEEVmJ { - httpContext: echo.Context - record?: models.Record - } - type _subiCcBf = BaseCollectionEvent - interface RecordConfirmPasswordResetEvent extends _subiCcBf { - httpContext: echo.Context - record?: models.Record - } - type _subnVMbh = BaseCollectionEvent - interface RecordRequestVerificationEvent extends _subnVMbh { - httpContext: echo.Context - record?: models.Record - } - type _suboFSBZ = BaseCollectionEvent - interface RecordConfirmVerificationEvent extends _suboFSBZ { - httpContext: echo.Context - record?: models.Record - } - type _subeDIwd = BaseCollectionEvent - interface RecordRequestEmailChangeEvent extends _subeDIwd { - httpContext: echo.Context - record?: models.Record - } - type _subSBYkb = BaseCollectionEvent - interface RecordConfirmEmailChangeEvent extends _subSBYkb { - httpContext: echo.Context - record?: models.Record - } - type _subNqYsz = BaseCollectionEvent - interface RecordListExternalAuthsEvent extends _subNqYsz { - httpContext: echo.Context - record?: models.Record - externalAuths: Array<(models.ExternalAuth | undefined)> - } - type _subBVzIt = BaseCollectionEvent - interface RecordUnlinkExternalAuthEvent extends _subBVzIt { - httpContext: echo.Context - record?: models.Record - externalAuth?: models.ExternalAuth - } - interface AdminsListEvent { - httpContext: echo.Context - admins: Array<(models.Admin | undefined)> - result?: search.Result - } - interface AdminViewEvent { - httpContext: echo.Context - admin?: models.Admin - } - interface AdminCreateEvent { - httpContext: echo.Context - admin?: models.Admin - } - interface AdminUpdateEvent { - httpContext: echo.Context - admin?: models.Admin - } - interface AdminDeleteEvent { - httpContext: echo.Context - admin?: models.Admin - } - interface AdminAuthEvent { - httpContext: echo.Context - admin?: models.Admin - token: string - } - interface AdminAuthWithPasswordEvent { - httpContext: echo.Context - admin?: models.Admin - identity: string - password: string - } - interface AdminAuthRefreshEvent { - httpContext: echo.Context - admin?: models.Admin - } - interface AdminRequestPasswordResetEvent { - httpContext: echo.Context - admin?: models.Admin - } - interface AdminConfirmPasswordResetEvent { - httpContext: echo.Context - admin?: models.Admin - } - interface CollectionsListEvent { - httpContext: echo.Context - collections: Array<(models.Collection | undefined)> - result?: search.Result - } - type _subniGxF = BaseCollectionEvent - interface CollectionViewEvent extends _subniGxF { - httpContext: echo.Context - } - type _subwzCfB = BaseCollectionEvent - interface CollectionCreateEvent extends _subwzCfB { - httpContext: echo.Context - } - type _subDAJid = BaseCollectionEvent - interface CollectionUpdateEvent extends _subDAJid { - httpContext: echo.Context - } - type _subqHOaA = BaseCollectionEvent - interface CollectionDeleteEvent extends _subqHOaA { - httpContext: echo.Context - } - interface CollectionsImportEvent { - httpContext: echo.Context - collections: Array<(models.Collection | undefined)> - } - type _subYQhCH = BaseModelEvent - interface FileTokenEvent extends _subYQhCH { - httpContext: echo.Context - token: string - } - type _subicdlk = BaseCollectionEvent - interface FileDownloadEvent extends _subicdlk { - httpContext: echo.Context - record?: models.Record - fileField?: schema.SchemaField - servedPath: string - servedName: string - } -} - /** * Package cobra is a commander providing a simple interface to create powerful modern CLI interfaces. * In addition to providing an interface, Cobra simultaneously provides a controller to organize your application code. @@ -17187,78 +16857,333 @@ namespace migrate { } } -/** - * Package url parses URLs and implements query escaping. - */ -namespace url { +namespace hook { /** - * The Userinfo type is an immutable encapsulation of username and - * password details for a URL. An existing Userinfo value is guaranteed - * to have a username set (potentially empty, as allowed by RFC 2396), - * and optionally a password. + * Hook defines a concurrent safe structure for handling event hooks + * (aka. callbacks propagation). */ - interface Userinfo { + interface Hook { } - interface Userinfo { + interface Hook { /** - * Username returns the username. + * PreAdd registers a new handler to the hook by prepending it to the existing queue. + * + * Returns an autogenerated hook id that could be used later to remove the hook with Hook.Remove(id). */ - username(): string + preAdd(fn: Handler): string } - interface Userinfo { + interface Hook { /** - * Password returns the password in case it is set, and whether it is set. + * Add registers a new handler to the hook by appending it to the existing queue. + * + * Returns an autogenerated hook id that could be used later to remove the hook with Hook.Remove(id). */ - password(): [string, boolean] + add(fn: Handler): string } - interface Userinfo { + interface Hook { /** - * String returns the encoded userinfo information in the standard form - * of "username[:password]". + * Remove removes a single hook handler by its id. */ - string(): string + remove(id: string): void + } + interface Hook { + /** + * RemoveAll removes all registered handlers. + */ + removeAll(): void + } + interface Hook { + /** + * Trigger executes all registered hook handlers one by one + * with the specified `data` as an argument. + * + * Optionally, this method allows also to register additional one off + * handlers that will be temporary appended to the handlers queue. + * + * The execution stops when: + * - hook.StopPropagation is returned in one of the handlers + * - any non-nil error is returned in one of the handlers + */ + trigger(data: T, ...oneOffHandlers: Handler[]): void + } + /** + * TaggedHook defines a proxy hook which register handlers that are triggered only + * if the TaggedHook.tags are empty or includes at least one of the event data tag(s). + */ + type _sublDMXz = mainHook + interface TaggedHook extends _sublDMXz { + } + interface TaggedHook { + /** + * CanTriggerOn checks if the current TaggedHook can be triggered with + * the provided event data tags. + */ + canTriggerOn(tags: Array): boolean + } + interface TaggedHook { + /** + * PreAdd registers a new handler to the hook by prepending it to the existing queue. + * + * The fn handler will be called only if the event data tags satisfy h.CanTriggerOn. + */ + preAdd(fn: Handler): string + } + interface TaggedHook { + /** + * Add registers a new handler to the hook by appending it to the existing queue. + * + * The fn handler will be called only if the event data tags satisfy h.CanTriggerOn. + */ + add(fn: Handler): string } } /** - * Package types implements some commonly used db serializable types - * like datetime, json, etc. + * Package core is the backbone of PocketBase. + * + * It defines the main PocketBase App interface and its base implementation. */ -namespace types { - /** - * JsonRaw defines a json value type that is safe for db read/write. - */ - interface JsonRaw extends Array{} - interface JsonRaw { - /** - * String returns the current JsonRaw instance as a json encoded string. - */ - string(): string +namespace core { + interface BootstrapEvent { + app: App } - interface JsonRaw { - /** - * MarshalJSON implements the [json.Marshaler] interface. - */ - marshalJSON(): string|Array + interface TerminateEvent { + app: App } - interface JsonRaw { - /** - * UnmarshalJSON implements the [json.Unmarshaler] interface. - */ - unmarshalJSON(b: string|Array): void + interface ServeEvent { + app: App + router?: echo.Echo + server?: http.Server + certManager?: any } - interface JsonRaw { - /** - * Value implements the [driver.Valuer] interface. - */ - value(): any + interface ApiErrorEvent { + httpContext: echo.Context + error: Error } - interface JsonRaw { - /** - * Scan implements [sql.Scanner] interface to scan the provided value - * into the current JsonRaw instance. - */ - scan(value: any): void + type _subkMeAn = BaseModelEvent + interface ModelEvent extends _subkMeAn { + dao?: daos.Dao + } + type _subJKgBy = BaseCollectionEvent + interface MailerRecordEvent extends _subJKgBy { + mailClient: mailer.Mailer + message?: mailer.Message + record?: models.Record + meta: _TygojaDict + } + interface MailerAdminEvent { + mailClient: mailer.Mailer + message?: mailer.Message + admin?: models.Admin + meta: _TygojaDict + } + interface RealtimeConnectEvent { + httpContext: echo.Context + client: subscriptions.Client + idleTimeout: time.Duration + } + interface RealtimeDisconnectEvent { + httpContext: echo.Context + client: subscriptions.Client + } + interface RealtimeMessageEvent { + httpContext: echo.Context + client: subscriptions.Client + message?: subscriptions.Message + } + interface RealtimeSubscribeEvent { + httpContext: echo.Context + client: subscriptions.Client + subscriptions: Array + } + interface SettingsListEvent { + httpContext: echo.Context + redactedSettings?: settings.Settings + } + interface SettingsUpdateEvent { + httpContext: echo.Context + oldSettings?: settings.Settings + newSettings?: settings.Settings + } + type _sublIYdm = BaseCollectionEvent + interface RecordsListEvent extends _sublIYdm { + httpContext: echo.Context + records: Array<(models.Record | undefined)> + result?: search.Result + } + type _subsgIXQ = BaseCollectionEvent + interface RecordViewEvent extends _subsgIXQ { + httpContext: echo.Context + record?: models.Record + } + type _subDcliy = BaseCollectionEvent + interface RecordCreateEvent extends _subDcliy { + httpContext: echo.Context + record?: models.Record + uploadedFiles: _TygojaDict + } + type _subtrdqA = BaseCollectionEvent + interface RecordUpdateEvent extends _subtrdqA { + httpContext: echo.Context + record?: models.Record + uploadedFiles: _TygojaDict + } + type _subtBDBs = BaseCollectionEvent + interface RecordDeleteEvent extends _subtBDBs { + httpContext: echo.Context + record?: models.Record + } + type _subIUhMk = BaseCollectionEvent + interface RecordAuthEvent extends _subIUhMk { + httpContext: echo.Context + record?: models.Record + token: string + meta: any + } + type _subrFbse = BaseCollectionEvent + interface RecordAuthWithPasswordEvent extends _subrFbse { + httpContext: echo.Context + record?: models.Record + identity: string + password: string + } + type _subfMyzZ = BaseCollectionEvent + interface RecordAuthWithOAuth2Event extends _subfMyzZ { + httpContext: echo.Context + providerName: string + providerClient: auth.Provider + record?: models.Record + oAuth2User?: auth.AuthUser + isNewRecord: boolean + } + type _subQduzB = BaseCollectionEvent + interface RecordAuthRefreshEvent extends _subQduzB { + httpContext: echo.Context + record?: models.Record + } + type _subOQkjX = BaseCollectionEvent + interface RecordRequestPasswordResetEvent extends _subOQkjX { + httpContext: echo.Context + record?: models.Record + } + type _subNmsGn = BaseCollectionEvent + interface RecordConfirmPasswordResetEvent extends _subNmsGn { + httpContext: echo.Context + record?: models.Record + } + type _subJfgBc = BaseCollectionEvent + interface RecordRequestVerificationEvent extends _subJfgBc { + httpContext: echo.Context + record?: models.Record + } + type _subZUzkX = BaseCollectionEvent + interface RecordConfirmVerificationEvent extends _subZUzkX { + httpContext: echo.Context + record?: models.Record + } + type _subpAFPH = BaseCollectionEvent + interface RecordRequestEmailChangeEvent extends _subpAFPH { + httpContext: echo.Context + record?: models.Record + } + type _subRChOL = BaseCollectionEvent + interface RecordConfirmEmailChangeEvent extends _subRChOL { + httpContext: echo.Context + record?: models.Record + } + type _subaJUXR = BaseCollectionEvent + interface RecordListExternalAuthsEvent extends _subaJUXR { + httpContext: echo.Context + record?: models.Record + externalAuths: Array<(models.ExternalAuth | undefined)> + } + type _subooFWL = BaseCollectionEvent + interface RecordUnlinkExternalAuthEvent extends _subooFWL { + httpContext: echo.Context + record?: models.Record + externalAuth?: models.ExternalAuth + } + interface AdminsListEvent { + httpContext: echo.Context + admins: Array<(models.Admin | undefined)> + result?: search.Result + } + interface AdminViewEvent { + httpContext: echo.Context + admin?: models.Admin + } + interface AdminCreateEvent { + httpContext: echo.Context + admin?: models.Admin + } + interface AdminUpdateEvent { + httpContext: echo.Context + admin?: models.Admin + } + interface AdminDeleteEvent { + httpContext: echo.Context + admin?: models.Admin + } + interface AdminAuthEvent { + httpContext: echo.Context + admin?: models.Admin + token: string + } + interface AdminAuthWithPasswordEvent { + httpContext: echo.Context + admin?: models.Admin + identity: string + password: string + } + interface AdminAuthRefreshEvent { + httpContext: echo.Context + admin?: models.Admin + } + interface AdminRequestPasswordResetEvent { + httpContext: echo.Context + admin?: models.Admin + } + interface AdminConfirmPasswordResetEvent { + httpContext: echo.Context + admin?: models.Admin + } + interface CollectionsListEvent { + httpContext: echo.Context + collections: Array<(models.Collection | undefined)> + result?: search.Result + } + type _subkyuBA = BaseCollectionEvent + interface CollectionViewEvent extends _subkyuBA { + httpContext: echo.Context + } + type _subsXpWx = BaseCollectionEvent + interface CollectionCreateEvent extends _subsXpWx { + httpContext: echo.Context + } + type _subtLtpO = BaseCollectionEvent + interface CollectionUpdateEvent extends _subtLtpO { + httpContext: echo.Context + } + type _subnNAsf = BaseCollectionEvent + interface CollectionDeleteEvent extends _subnNAsf { + httpContext: echo.Context + } + interface CollectionsImportEvent { + httpContext: echo.Context + collections: Array<(models.Collection | undefined)> + } + type _subhJTbu = BaseModelEvent + interface FileTokenEvent extends _subhJTbu { + httpContext: echo.Context + token: string + } + type _subqJPey = BaseCollectionEvent + interface FileDownloadEvent extends _subqJPey { + httpContext: echo.Context + record?: models.Record + fileField?: schema.SchemaField + servedPath: string + servedName: string } } @@ -17272,8 +17197,8 @@ namespace bufio { * ReadWriter stores pointers to a Reader and a Writer. * It implements io.ReadWriter. */ - type _subKnsKR = Reader&Writer - interface ReadWriter extends _subKnsKR { + type _subFMonm = Reader&Writer + interface ReadWriter extends _subFMonm { } } @@ -17372,6 +17297,39 @@ namespace net { } } +/** + * Package url parses URLs and implements query escaping. + */ +namespace url { + /** + * The Userinfo type is an immutable encapsulation of username and + * password details for a URL. An existing Userinfo value is guaranteed + * to have a username set (potentially empty, as allowed by RFC 2396), + * and optionally a password. + */ + interface Userinfo { + } + interface Userinfo { + /** + * Username returns the username. + */ + username(): string + } + interface Userinfo { + /** + * Password returns the password in case it is set, and whether it is set. + */ + password(): [string, boolean] + } + interface Userinfo { + /** + * String returns the encoded userinfo information in the standard form + * of "username[:password]". + */ + string(): string + } +} + /** * Package multipart implements MIME multipart parsing, as defined in RFC * 2046. @@ -17569,107 +17527,6 @@ namespace http { import urlpkg = url } -namespace store { -} - -namespace mailer { - /** - * Message defines a generic email message struct. - */ - interface Message { - from: mail.Address - to: Array - bcc: Array - cc: Array - subject: string - html: string - text: string - headers: _TygojaDict - attachments: _TygojaDict - } -} - -namespace subscriptions { - /** - * Message defines a client's channel data. - */ - interface Message { - name: string - data: string|Array - } - /** - * Client is an interface for a generic subscription client. - */ - interface Client { - [key:string]: any; - /** - * Id Returns the unique id of the client. - */ - id(): string - /** - * Channel returns the client's communication channel. - */ - channel(): undefined - /** - * Subscriptions returns all subscriptions to which the client has subscribed to. - */ - subscriptions(): _TygojaDict - /** - * Subscribe subscribes the client to the provided subscriptions list. - */ - subscribe(...subs: string[]): void - /** - * Unsubscribe unsubscribes the client from the provided subscriptions list. - */ - unsubscribe(...subs: string[]): void - /** - * HasSubscription checks if the client is subscribed to `sub`. - */ - hasSubscription(sub: string): boolean - /** - * Set stores any value to the client's context. - */ - set(key: string, value: any): void - /** - * Unset removes a single value from the client's context. - */ - unset(key: string): void - /** - * Get retrieves the key value from the client's context. - */ - get(key: string): any - /** - * Discard marks the client as "discarded", meaning that it - * shouldn't be used anymore for sending new messages. - * - * It is safe to call Discard() multiple times. - */ - discard(): void - /** - * IsDiscarded indicates whether the client has been "discarded" - * and should no longer be used. - */ - isDiscarded(): boolean - /** - * Send sends the specified message to the client's channel (if not discarded). - */ - send(m: Message): void - } -} - -namespace search { - /** - * Result defines the returned search result structure. - */ - interface Result { - page: number - perPage: number - totalItems: number - totalPages: number - items: any - } -} - /** * Package echo implements high performance, minimalist Go web framework. * @@ -17751,11 +17608,11 @@ namespace echo { /** * Request returns `*http.Request`. */ - request(): (http.Request | undefined) + request(): (http.Request) /** * RawPathParams returns raw path pathParams value. Allocation of PathParams is handled by Context. */ - rawPathParams(): (PathParams | undefined) + rawPathParams(): (PathParams) /** * SetRawPathParams replaces any existing param values with new values for this context lifetime (request). * Do not set any other value than what you got from RawPathParams as allocation of PathParams is handled by Context. @@ -17785,6 +17642,81 @@ namespace echo { } } +namespace store { +} + +/** + * Package types implements some commonly used db serializable types + * like datetime, json, etc. + */ +namespace types { + /** + * JsonRaw defines a json value type that is safe for db read/write. + */ + interface JsonRaw extends Array{} + interface JsonRaw { + /** + * String returns the current JsonRaw instance as a json encoded string. + */ + string(): string + } + interface JsonRaw { + /** + * MarshalJSON implements the [json.Marshaler] interface. + */ + marshalJSON(): string|Array + } + interface JsonRaw { + /** + * UnmarshalJSON implements the [json.Unmarshaler] interface. + */ + unmarshalJSON(b: string|Array): void + } + interface JsonRaw { + /** + * Value implements the [driver.Valuer] interface. + */ + value(): any + } + interface JsonRaw { + /** + * Scan implements [sql.Scanner] interface to scan the provided value + * into the current JsonRaw instance. + */ + scan(value: any): void + } +} + +namespace search { + /** + * Result defines the returned search result structure. + */ + interface Result { + page: number + perPage: number + totalItems: number + totalPages: number + items: any + } +} + +namespace mailer { + /** + * Message defines a generic email message struct. + */ + interface Message { + from: mail.Address + to: Array + bcc: Array + cc: Array + subject: string + html: string + text: string + headers: _TygojaDict + attachments: _TygojaDict + } +} + namespace settings { // @ts-ignore import validation = ozzo_validation @@ -17808,6 +17740,74 @@ namespace settings { } } +namespace subscriptions { + /** + * Message defines a client's channel data. + */ + interface Message { + name: string + data: string|Array + } + /** + * Client is an interface for a generic subscription client. + */ + interface Client { + [key:string]: any; + /** + * Id Returns the unique id of the client. + */ + id(): string + /** + * Channel returns the client's communication channel. + */ + channel(): undefined + /** + * Subscriptions returns all subscriptions to which the client has subscribed to. + */ + subscriptions(): _TygojaDict + /** + * Subscribe subscribes the client to the provided subscriptions list. + */ + subscribe(...subs: string[]): void + /** + * Unsubscribe unsubscribes the client from the provided subscriptions list. + */ + unsubscribe(...subs: string[]): void + /** + * HasSubscription checks if the client is subscribed to `sub`. + */ + hasSubscription(sub: string): boolean + /** + * Set stores any value to the client's context. + */ + set(key: string, value: any): void + /** + * Unset removes a single value from the client's context. + */ + unset(key: string): void + /** + * Get retrieves the key value from the client's context. + */ + get(key: string): any + /** + * Discard marks the client as "discarded", meaning that it + * shouldn't be used anymore for sending new messages. + * + * It is safe to call Discard() multiple times. + */ + discard(): void + /** + * IsDiscarded indicates whether the client has been "discarded" + * and should no longer be used. + */ + isDiscarded(): boolean + /** + * Send sends the specified message to the client's channel (if not discarded). + */ + send(m: Message): void + } +} + namespace hook { /** * Handler defines a hook handler function. @@ -17816,8 +17816,8 @@ namespace hook { /** * wrapped local Hook embedded struct to limit the public API surface. */ - type _subsSwxu = Hook - interface mainHook extends _subsSwxu { + type _subiYKnb = Hook + interface mainHook extends _subiYKnb { } } @@ -17841,9 +17841,6 @@ namespace core { } } -namespace subscriptions { -} - /** * Package bufio implements buffered I/O. It wraps an io.Reader or io.Writer * object, creating another object (Reader or Writer) that also implements @@ -18107,16 +18104,6 @@ namespace bufio { } } -/** - * Package types implements some commonly used db serializable types - * like datetime, json, etc. - */ -namespace types { -} - -namespace search { -} - /** * Package mail implements parsing of mail messages. * @@ -18151,3 +18138,16 @@ namespace mail { string(): string } } + +namespace subscriptions { +} + +/** + * Package types implements some commonly used db serializable types + * like datetime, json, etc. + */ +namespace types { +} + +namespace search { +} diff --git a/ui/.env b/ui/.env index 192bf00b..8cf51260 100644 --- a/ui/.env +++ b/ui/.env @@ -9,4 +9,4 @@ PB_DOCS_URL = "https://pocketbase.io/docs/" PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk" PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk" PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases" -PB_VERSION = "v0.20.0-rc2" +PB_VERSION = "v0.20.0-rc3" diff --git a/ui/dist/assets/AuthMethodsDocs-2487f0b0.js b/ui/dist/assets/AuthMethodsDocs-33f5e9f2.js similarity index 97% rename from ui/dist/assets/AuthMethodsDocs-2487f0b0.js rename to ui/dist/assets/AuthMethodsDocs-33f5e9f2.js index 92d25a2e..f9fb7908 100644 --- a/ui/dist/assets/AuthMethodsDocs-2487f0b0.js +++ b/ui/dist/assets/AuthMethodsDocs-33f5e9f2.js @@ -1,4 +1,4 @@ -import{S as Se,i as ye,s as Te,O as G,e as c,w,b as k,c as se,f as p,g as d,h as a,m as ae,x as U,P as ve,Q as je,k as Ae,R as Be,n as Oe,t as W,a as V,o as u,d as ne,C as Fe,p as Qe,r as L,u as Ne,N as He}from"./index-e4747107.js";import{S as Ke}from"./SdkTabs-2f78bf19.js";import{F as qe}from"./FieldsQueryParam-d60af536.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l,o){const s=n.slice();return s[5]=l[o],s}function $e(n,l){let o,s=l[5].code+"",_,f,i,h;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),f=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,f),i||(h=Ne(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&U(_,s),C&6&&L(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,h()}}}function Me(n,l){let o,s,_,f;return s=new He({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),se(s.$$.fragment),_=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(i,h){d(i,o,h),ae(s,o,null),a(o,_),f=!0},p(i,h){l=i;const m={};h&4&&(m.content=l[5].body),s.$set(m),(!f||h&6)&&L(o,"active",l[1]===l[5].code)},i(i){f||(W(s.$$.fragment,i),f=!0)},o(i){V(s.$$.fragment,i),f=!1},d(i){i&&u(o),ne(s)}}}function ze(n){var be,ke;let l,o,s=n[0].name+"",_,f,i,h,m,v,C,H=n[0].name+"",E,ie,I,P,J,j,Y,$,K,ce,q,A,re,R,z=n[0].name+"",X,de,Z,B,x,M,ee,ue,te,T,le,O,oe,S,F,g=[],he=new Map,me,Q,b=[],fe=new Map,y;P=new Ke({props:{js:` +import{S as Se,i as ye,s as Te,O as G,e as c,w,b as k,c as se,f as p,g as d,h as a,m as ae,x as U,P as ve,Q as je,k as Ae,R as Be,n as Oe,t as W,a as V,o as u,d as ne,C as Fe,p as Qe,r as L,u as Ne,N as He}from"./index-7d33ef4c.js";import{S as Ke}from"./SdkTabs-f0532e58.js";import{F as qe}from"./FieldsQueryParam-f6b769d1.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l,o){const s=n.slice();return s[5]=l[o],s}function $e(n,l){let o,s=l[5].code+"",_,f,i,h;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),f=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,f),i||(h=Ne(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&U(_,s),C&6&&L(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,h()}}}function Me(n,l){let o,s,_,f;return s=new He({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),se(s.$$.fragment),_=k(),p(o,"class","tab-item"),L(o,"active",l[1]===l[5].code),this.first=o},m(i,h){d(i,o,h),ae(s,o,null),a(o,_),f=!0},p(i,h){l=i;const m={};h&4&&(m.content=l[5].body),s.$set(m),(!f||h&6)&&L(o,"active",l[1]===l[5].code)},i(i){f||(W(s.$$.fragment,i),f=!0)},o(i){V(s.$$.fragment,i),f=!1},d(i){i&&u(o),ne(s)}}}function ze(n){var be,ke;let l,o,s=n[0].name+"",_,f,i,h,m,v,C,H=n[0].name+"",E,ie,I,P,J,j,Y,$,K,ce,q,A,re,R,z=n[0].name+"",X,de,Z,B,x,M,ee,ue,te,T,le,O,oe,S,F,g=[],he=new Map,me,Q,b=[],fe=new Map,y;P=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/AuthRefreshDocs-8e47b2e1.js b/ui/dist/assets/AuthRefreshDocs-335aea06.js similarity index 97% rename from ui/dist/assets/AuthRefreshDocs-8e47b2e1.js rename to ui/dist/assets/AuthRefreshDocs-335aea06.js index 47845a1f..485247e7 100644 --- a/ui/dist/assets/AuthRefreshDocs-8e47b2e1.js +++ b/ui/dist/assets/AuthRefreshDocs-335aea06.js @@ -1,4 +1,4 @@ -import{S as je,i as xe,s as Je,N as Ue,O as J,e as s,w as k,b as p,c as K,f as b,g as d,h as o,m as I,x as de,P as Ee,Q as Ke,k as Ie,R as We,n as Ge,t as N,a as V,o as u,d as W,C as Le,p as Xe,r as G,u as Ye}from"./index-e4747107.js";import{S as Ze}from"./SdkTabs-2f78bf19.js";import{F as et}from"./FieldsQueryParam-d60af536.js";function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l,a){const n=r.slice();return n[5]=l[a],n}function ze(r,l){let a,n=l[5].code+"",m,_,i,h;function g(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(v,w){d(v,a,w),o(a,m),o(a,_),i||(h=Ye(a,"click",g),i=!0)},p(v,w){l=v,w&4&&n!==(n=l[5].code+"")&&de(m,n),w&6&&G(a,"active",l[1]===l[5].code)},d(v){v&&u(a),i=!1,h()}}}function Qe(r,l){let a,n,m,_;return n=new Ue({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),K(n.$$.fragment),m=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(i,h){d(i,a,h),I(n,a,null),o(a,m),_=!0},p(i,h){l=i;const g={};h&4&&(g.content=l[5].body),n.$set(g),(!_||h&6)&&G(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),W(n)}}}function tt(r){var De,Fe;let l,a,n=r[0].name+"",m,_,i,h,g,v,w,M,X,S,z,ue,Q,q,pe,Y,U=r[0].name+"",Z,he,fe,j,ee,D,te,T,oe,be,F,C,le,me,ae,_e,f,ke,R,ge,ve,$e,se,ye,ne,Se,we,Te,re,Ce,Pe,A,ie,O,ce,P,H,y=[],Re=new Map,Ae,E,$=[],Be=new Map,B;v=new Ze({props:{js:` +import{S as je,i as xe,s as Je,N as Ue,O as J,e as s,w as k,b as p,c as K,f as b,g as d,h as o,m as I,x as de,P as Ee,Q as Ke,k as Ie,R as We,n as Ge,t as N,a as V,o as u,d as W,C as Le,p as Xe,r as G,u as Ye}from"./index-7d33ef4c.js";import{S as Ze}from"./SdkTabs-f0532e58.js";import{F as et}from"./FieldsQueryParam-f6b769d1.js";function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l,a){const n=r.slice();return n[5]=l[a],n}function ze(r,l){let a,n=l[5].code+"",m,_,i,h;function g(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(v,w){d(v,a,w),o(a,m),o(a,_),i||(h=Ye(a,"click",g),i=!0)},p(v,w){l=v,w&4&&n!==(n=l[5].code+"")&&de(m,n),w&6&&G(a,"active",l[1]===l[5].code)},d(v){v&&u(a),i=!1,h()}}}function Qe(r,l){let a,n,m,_;return n=new Ue({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),K(n.$$.fragment),m=p(),b(a,"class","tab-item"),G(a,"active",l[1]===l[5].code),this.first=a},m(i,h){d(i,a,h),I(n,a,null),o(a,m),_=!0},p(i,h){l=i;const g={};h&4&&(g.content=l[5].body),n.$set(g),(!_||h&6)&&G(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),W(n)}}}function tt(r){var De,Fe;let l,a,n=r[0].name+"",m,_,i,h,g,v,w,M,X,S,z,ue,Q,q,pe,Y,U=r[0].name+"",Z,he,fe,j,ee,D,te,T,oe,be,F,C,le,me,ae,_e,f,ke,R,ge,ve,$e,se,ye,ne,Se,we,Te,re,Ce,Pe,A,ie,O,ce,P,H,y=[],Re=new Map,Ae,E,$=[],Be=new Map,B;v=new Ze({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs-bfb13a0d.js b/ui/dist/assets/AuthWithOAuth2Docs-a6296efb.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs-bfb13a0d.js rename to ui/dist/assets/AuthWithOAuth2Docs-a6296efb.js index 144073ea..aa4d4859 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs-bfb13a0d.js +++ b/ui/dist/assets/AuthWithOAuth2Docs-a6296efb.js @@ -1,4 +1,4 @@ -import{S as Ee,i as Je,s as Ne,N as Le,O as z,e as o,w as k,b as h,c as I,f as p,g as r,h as a,m as K,x as pe,P as Ue,Q as Qe,k as xe,R as ze,n as Ie,t as L,a as E,o as c,d as G,C as Be,p as Ke,r as X,u as Ge}from"./index-e4747107.js";import{S as Xe}from"./SdkTabs-2f78bf19.js";import{F as Ye}from"./FieldsQueryParam-d60af536.js";function Fe(s,l,n){const i=s.slice();return i[5]=l[n],i}function He(s,l,n){const i=s.slice();return i[5]=l[n],i}function je(s,l){let n,i=l[5].code+"",f,g,d,b;function _(){return l[4](l[5])}return{key:s,first:null,c(){n=o("button"),f=k(i),g=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(v,O){r(v,n,O),a(n,f),a(n,g),d||(b=Ge(n,"click",_),d=!0)},p(v,O){l=v,O&4&&i!==(i=l[5].code+"")&&pe(f,i),O&6&&X(n,"active",l[1]===l[5].code)},d(v){v&&c(n),d=!1,b()}}}function Ve(s,l){let n,i,f,g;return i=new Le({props:{content:l[5].body}}),{key:s,first:null,c(){n=o("div"),I(i.$$.fragment),f=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(d,b){r(d,n,b),K(i,n,null),a(n,f),g=!0},p(d,b){l=d;const _={};b&4&&(_.content=l[5].body),i.$set(_),(!g||b&6)&&X(n,"active",l[1]===l[5].code)},i(d){g||(L(i.$$.fragment,d),g=!0)},o(d){E(i.$$.fragment,d),g=!1},d(d){d&&c(n),G(i)}}}function Ze(s){let l,n,i=s[0].name+"",f,g,d,b,_,v,O,P,Y,A,J,be,N,R,me,Z,Q=s[0].name+"",ee,fe,te,M,ae,W,le,U,ne,S,oe,ge,B,y,se,ke,ie,_e,m,ve,C,we,$e,Oe,re,Ae,ce,Se,ye,Te,de,Ce,qe,q,ue,F,he,T,H,$=[],De=new Map,Pe,j,w=[],Re=new Map,D;v=new Xe({props:{js:` +import{S as Ee,i as Je,s as Ne,N as Le,O as z,e as o,w as k,b as h,c as I,f as p,g as r,h as a,m as K,x as pe,P as Ue,Q as Qe,k as xe,R as ze,n as Ie,t as L,a as E,o as c,d as G,C as Be,p as Ke,r as X,u as Ge}from"./index-7d33ef4c.js";import{S as Xe}from"./SdkTabs-f0532e58.js";import{F as Ye}from"./FieldsQueryParam-f6b769d1.js";function Fe(s,l,n){const i=s.slice();return i[5]=l[n],i}function He(s,l,n){const i=s.slice();return i[5]=l[n],i}function je(s,l){let n,i=l[5].code+"",f,g,d,b;function _(){return l[4](l[5])}return{key:s,first:null,c(){n=o("button"),f=k(i),g=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(v,O){r(v,n,O),a(n,f),a(n,g),d||(b=Ge(n,"click",_),d=!0)},p(v,O){l=v,O&4&&i!==(i=l[5].code+"")&&pe(f,i),O&6&&X(n,"active",l[1]===l[5].code)},d(v){v&&c(n),d=!1,b()}}}function Ve(s,l){let n,i,f,g;return i=new Le({props:{content:l[5].body}}),{key:s,first:null,c(){n=o("div"),I(i.$$.fragment),f=h(),p(n,"class","tab-item"),X(n,"active",l[1]===l[5].code),this.first=n},m(d,b){r(d,n,b),K(i,n,null),a(n,f),g=!0},p(d,b){l=d;const _={};b&4&&(_.content=l[5].body),i.$set(_),(!g||b&6)&&X(n,"active",l[1]===l[5].code)},i(d){g||(L(i.$$.fragment,d),g=!0)},o(d){E(i.$$.fragment,d),g=!1},d(d){d&&c(n),G(i)}}}function Ze(s){let l,n,i=s[0].name+"",f,g,d,b,_,v,O,P,Y,A,J,be,N,R,me,Z,Q=s[0].name+"",ee,fe,te,M,ae,W,le,U,ne,S,oe,ge,B,y,se,ke,ie,_e,m,ve,C,we,$e,Oe,re,Ae,ce,Se,ye,Te,de,Ce,qe,q,ue,F,he,T,H,$=[],De=new Map,Pe,j,w=[],Re=new Map,D;v=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${s[3]}'); diff --git a/ui/dist/assets/AuthWithPasswordDocs-84a31170.js b/ui/dist/assets/AuthWithPasswordDocs-107160ee.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs-84a31170.js rename to ui/dist/assets/AuthWithPasswordDocs-107160ee.js index ff952cf7..3d720289 100644 --- a/ui/dist/assets/AuthWithPasswordDocs-84a31170.js +++ b/ui/dist/assets/AuthWithPasswordDocs-107160ee.js @@ -1,4 +1,4 @@ -import{S as we,i as ye,s as $e,N as ve,O as ot,e as n,w as p,b as d,c as nt,f as m,g as r,h as e,m as st,x as Dt,P as pe,Q as Pe,k as Re,R as Ce,n as Oe,t as Z,a as x,o as c,d as it,C as fe,p as Ae,r as rt,u as Te}from"./index-e4747107.js";import{S as Ue}from"./SdkTabs-2f78bf19.js";import{F as Me}from"./FieldsQueryParam-d60af536.js";function he(s,l,a){const i=s.slice();return i[8]=l[a],i}function be(s,l,a){const i=s.slice();return i[8]=l[a],i}function De(s){let l;return{c(){l=p("email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function Ee(s){let l;return{c(){l=p("username")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function We(s){let l;return{c(){l=p("username/email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function me(s){let l;return{c(){l=n("strong"),l.textContent="username"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function _e(s){let l;return{c(){l=p("or")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ke(s){let l;return{c(){l=n("strong"),l.textContent="email"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ge(s,l){let a,i=l[8].code+"",g,b,f,u;function _(){return l[7](l[8])}return{key:s,first:null,c(){a=n("button"),g=p(i),b=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(R,C){r(R,a,C),e(a,g),e(a,b),f||(u=Te(a,"click",_),f=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Dt(g,i),C&24&&rt(a,"active",l[3]===l[8].code)},d(R){R&&c(a),f=!1,u()}}}function Se(s,l){let a,i,g,b;return i=new ve({props:{content:l[8].body}}),{key:s,first:null,c(){a=n("div"),nt(i.$$.fragment),g=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(f,u){r(f,a,u),st(i,a,null),e(a,g),b=!0},p(f,u){l=f;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!b||u&24)&&rt(a,"active",l[3]===l[8].code)},i(f){b||(Z(i.$$.fragment,f),b=!0)},o(f){x(i.$$.fragment,f),b=!1},d(f){f&&c(a),it(i)}}}function Le(s){var re,ce;let l,a,i=s[0].name+"",g,b,f,u,_,R,C,O,B,Et,ct,T,dt,N,ut,U,tt,Wt,et,I,Lt,pt,lt=s[0].name+"",ft,Bt,ht,V,bt,M,mt,qt,Q,D,_t,Ft,kt,Ht,$,Yt,gt,St,vt,Nt,wt,yt,j,$t,E,Pt,It,J,W,Rt,Vt,Ct,Qt,k,jt,q,Jt,Kt,zt,Ot,Gt,At,Xt,Zt,xt,Tt,te,ee,F,Ut,K,Mt,L,z,A=[],le=new Map,ae,G,S=[],oe=new Map,H;function ne(t,o){if(t[1]&&t[2])return We;if(t[1])return Ee;if(t[2])return De}let Y=ne(s),P=Y&&Y(s);T=new Ue({props:{js:` +import{S as we,i as ye,s as $e,N as ve,O as ot,e as n,w as p,b as d,c as nt,f as m,g as r,h as e,m as st,x as Dt,P as pe,Q as Pe,k as Re,R as Ce,n as Oe,t as Z,a as x,o as c,d as it,C as fe,p as Ae,r as rt,u as Te}from"./index-7d33ef4c.js";import{S as Ue}from"./SdkTabs-f0532e58.js";import{F as Me}from"./FieldsQueryParam-f6b769d1.js";function he(s,l,a){const i=s.slice();return i[8]=l[a],i}function be(s,l,a){const i=s.slice();return i[8]=l[a],i}function De(s){let l;return{c(){l=p("email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function Ee(s){let l;return{c(){l=p("username")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function We(s){let l;return{c(){l=p("username/email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function me(s){let l;return{c(){l=n("strong"),l.textContent="username"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function _e(s){let l;return{c(){l=p("or")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ke(s){let l;return{c(){l=n("strong"),l.textContent="email"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ge(s,l){let a,i=l[8].code+"",g,b,f,u;function _(){return l[7](l[8])}return{key:s,first:null,c(){a=n("button"),g=p(i),b=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(R,C){r(R,a,C),e(a,g),e(a,b),f||(u=Te(a,"click",_),f=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Dt(g,i),C&24&&rt(a,"active",l[3]===l[8].code)},d(R){R&&c(a),f=!1,u()}}}function Se(s,l){let a,i,g,b;return i=new ve({props:{content:l[8].body}}),{key:s,first:null,c(){a=n("div"),nt(i.$$.fragment),g=d(),m(a,"class","tab-item"),rt(a,"active",l[3]===l[8].code),this.first=a},m(f,u){r(f,a,u),st(i,a,null),e(a,g),b=!0},p(f,u){l=f;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!b||u&24)&&rt(a,"active",l[3]===l[8].code)},i(f){b||(Z(i.$$.fragment,f),b=!0)},o(f){x(i.$$.fragment,f),b=!1},d(f){f&&c(a),it(i)}}}function Le(s){var re,ce;let l,a,i=s[0].name+"",g,b,f,u,_,R,C,O,B,Et,ct,T,dt,N,ut,U,tt,Wt,et,I,Lt,pt,lt=s[0].name+"",ft,Bt,ht,V,bt,M,mt,qt,Q,D,_t,Ft,kt,Ht,$,Yt,gt,St,vt,Nt,wt,yt,j,$t,E,Pt,It,J,W,Rt,Vt,Ct,Qt,k,jt,q,Jt,Kt,zt,Ot,Gt,At,Xt,Zt,xt,Tt,te,ee,F,Ut,K,Mt,L,z,A=[],le=new Map,ae,G,S=[],oe=new Map,H;function ne(t,o){if(t[1]&&t[2])return We;if(t[1])return Ee;if(t[2])return De}let Y=ne(s),P=Y&&Y(s);T=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${s[6]}'); diff --git a/ui/dist/assets/CodeEditor-c7cce7e3.js b/ui/dist/assets/CodeEditor-c648ece6.js similarity index 99% rename from ui/dist/assets/CodeEditor-c7cce7e3.js rename to ui/dist/assets/CodeEditor-c648ece6.js index 88d3f227..fa875484 100644 --- a/ui/dist/assets/CodeEditor-c7cce7e3.js +++ b/ui/dist/assets/CodeEditor-c648ece6.js @@ -1,4 +1,4 @@ -import{S as ft,i as gt,s as mt,e as Pt,f as Zt,U as K,g as bt,y as ze,o as Xt,J as xt,K as Yt,L as yt,I as kt,C as wt,M as vt}from"./index-e4747107.js";import{P as Tt,N as _t,u as Wt,D as Ut,v as we,T as ee,I as ve,w as D,x as n,y as Ct,L as J,z as L,A as C,B as F,F as Te,G as M,H as j,J as bO,K as XO,M as xO,E as U,O as YO,Q as P,R as Rt,U as qt,V as yO,W as Vt,X as jt,a as z,h as zt,b as Gt,c as Et,d as At,e as It,s as Nt,t as Bt,f as Dt,g as Jt,r as Lt,i as Ft,k as Mt,j as Kt,l as Ht,m as ea,n as Oa,o as ta,p as aa,q as Ge,C as H}from"./index-30dee195.js";class re{constructor(e,a,t,r,s,i,l,o,Q,d=0,c){this.p=e,this.stack=a,this.state=t,this.reducePos=r,this.pos=s,this.score=i,this.buffer=l,this.bufferBase=o,this.curContext=Q,this.lookAhead=d,this.parent=c}toString(){return`[${this.stack.filter((e,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,a,t=0){let r=e.parser.context;return new re(e,[],a,t,t,0,[],0,r?new Ee(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var a;let t=e>>19,r=e&65535,{parser:s}=this.p,i=s.dynamicPrecedence(r);if(i&&(this.score+=i),t==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((a=this.p.parser.nodeSet.types[r])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(r,o)}storeNode(e,a,t,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&i.buffer[l-4]==0&&i.buffer[l-1]>-1){if(a==t)return;if(i.buffer[l-2]>=a){i.buffer[l-2]=t;return}}}if(!s||this.pos==t)this.buffer.push(e,a,t,r);else{let i=this.buffer.length;if(i>0&&this.buffer[i-4]!=0)for(;i>0&&this.buffer[i-2]>t;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4);this.buffer[i]=e,this.buffer[i+1]=a,this.buffer[i+2]=t,this.buffer[i+3]=r}}shift(e,a,t,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(a,t),a<=this.p.parser.maxNode&&this.buffer.push(a,t,r,4);else{let s=e,{parser:i}=this.p;(r>this.pos||a<=i.maxNode)&&(this.pos=r,i.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,t),this.shiftContext(a,t),a<=i.maxNode&&this.buffer.push(a,t,r,4)}}apply(e,a,t,r){e&65536?this.reduce(e):this.shift(e,a,t,r)}useNode(e,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=e)&&(this.p.reused.push(e),t++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(a,r),this.buffer.push(t,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,a=e.buffer.length;for(;a>0&&e.buffer[a-2]>e.reducePos;)a-=4;let t=e.buffer.slice(a),r=e.bufferBase+a;for(;e&&r==e.bufferBase;)e=e.parent;return new re(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,a){let t=e<=this.p.parser.maxNode;t&&this.storeNode(e,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(e){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,e);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(e){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>8||this.stack.length>=120){let r=[];for(let s=0,i;so&1&&l==i)||r.push(a[s],i)}a=r}let t=[];for(let r=0;r>19,r=a&65535,s=this.stack.length-t*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let i=this.findForcedReduction();if(i==null)return!1;a=i}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(a),!0}findForcedReduction(){let{parser:e}=this.p,a=[],t=(r,s)=>{if(!a.includes(r))return a.push(r),e.allActions(r,i=>{if(!(i&393216))if(i&65536){let l=(i>>19)-s;if(l>1){let o=i&65535,Q=this.stack.length-l*3;if(Q>=0&&e.getGoto(this.stack[Q],o,!1)>=0)return l<<19|65536|o}}else{let l=t(i,s+1);if(l!=null)return l}})};return t(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ee{constructor(e,a){this.tracker=e,this.context=a,this.hash=e.strict?e.hash(a):0}}class ra{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let a=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=r}}class ie{constructor(e,a,t){this.stack=e,this.pos=a,this.index=t,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,a=e.bufferBase+e.buffer.length){return new ie(e,a,a-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new ie(this.stack,this.pos,this.index)}}function I(O,e=Uint16Array){if(typeof O!="string")return O;let a=null;for(let t=0,r=0;t=92&&i--,i>=34&&i--;let o=i-32;if(o>=46&&(o-=46,l=!0),s+=o,l)break;s*=46}a?a[r++]=s:a=new e(s)}return a}class Oe{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ae=new Oe;class ia{constructor(e,a){this.input=e,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ae,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(e,a){let t=this.range,r=this.rangeIndex,s=this.pos+e;for(;st.to:s>=t.to;){if(r==this.ranges.length-1)return null;let i=this.ranges[++r];s+=i.from-t.to,t=i}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,a.from);return this.end}peek(e){let a=this.chunkOff+e,t,r;if(a>=0&&a=this.chunk2Pos&&tl.to&&(this.chunk2=this.chunk2.slice(0,l.to-t)),r=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),r}acceptToken(e,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,a){if(a?(this.token=a,a.start=e,a.lookAhead=e+1,a.value=a.extended=-1):this.token=Ae,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,a-this.chunkPos);if(e>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,a-this.chunk2Pos);if(e>=this.range.from&&a<=this.range.to)return this.input.read(e,a);let t="";for(let r of this.ranges){if(r.from>=a)break;r.to>e&&(t+=this.input.read(Math.max(r.from,e),Math.min(r.to,a)))}return t}}class R{constructor(e,a){this.data=e,this.id=a}token(e,a){let{parser:t}=a.p;kO(this.data,e,a,this.id,t.data,t.tokenPrecTable)}}R.prototype.contextual=R.prototype.fallback=R.prototype.extend=!1;class se{constructor(e,a,t){this.precTable=a,this.elseToken=t,this.data=typeof e=="string"?I(e):e}token(e,a){let t=e.pos,r=0;for(;;){let s=e.next<0,i=e.resolveOffset(1,1);if(kO(this.data,e,a,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(t,e.token),e.acceptToken(this.elseToken,r))}}se.prototype.contextual=R.prototype.fallback=R.prototype.extend=!1;class x{constructor(e,a={}){this.token=e,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function kO(O,e,a,t,r,s){let i=0,l=1<0){let u=O[p];if(o.allows(u)&&(e.token.value==-1||e.token.value==u||sa(u,e.token.value,r,s))){e.acceptToken(u);break}}let d=e.next,c=0,S=O[i+2];if(e.next<0&&S>c&&O[Q+S*3-3]==65535&&O[Q+S*3-3]==65535){i=O[Q+S*3-1];continue e}for(;c>1,u=Q+p+(p<<1),f=O[u],g=O[u+1]||65536;if(d=g)c=p+1;else{i=O[u+2],e.advance();continue e}}break}}function Ie(O,e,a){for(let t=e,r;(r=O[t])!=65535;t++)if(r==a)return t-e;return-1}function sa(O,e,a,t){let r=Ie(a,t,e);return r<0||Ie(a,t,O)e)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,e-25)):Math.min(O.length,Math.max(t.from+1,e+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:O.length}}class la{constructor(e,a){this.fragments=e,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ne(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ne(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=i,null;if(s instanceof ee){if(i==e){if(i=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(i),this.index.push(0))}else this.index[a]++,this.nextStart=i+s.length}}}class na{constructor(e,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(t=>new Oe)}getActions(e){let a=0,t=null,{parser:r}=e.p,{tokenizers:s}=r,i=r.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let S=a;if(c.extended>-1&&(a=this.addActions(e,c.extended,c.end,a)),a=this.addActions(e,c.value,c.end,a),!d.extend&&(t=c,a>S))break}}for(;this.actions.length>a;)this.actions.pop();return o&&e.setLookAhead(o),!t&&e.pos==this.stream.end&&(t=new Oe,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,a=this.addActions(e,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let a=new Oe,{pos:t,p:r}=e;return a.start=t,a.end=Math.min(t+1,r.stream.end),a.value=t==r.stream.end?r.parser.eofTerm:0,a}updateCachedToken(e,a,t){let r=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(r,e),t),e.value>-1){let{parser:s}=t.p;for(let i=0;i=0&&t.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,a,t,r){for(let s=0;se.bufferLength*4?new la(t,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,a=this.minStackPos,t=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[i]=e;for(;i.forceReduce()&&i.stack.length&&i.stack[i.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;ia)t.push(l);else{if(this.advanceStack(l,t,e))continue;{r||(r=[],s=[]),r.push(l);let o=this.tokens.getMainToken(l);s.push(o.value,o.end)}}break}}if(!t.length){let i=r&&Qa(r);if(i)return Z&&console.log("Finish with "+this.stackID(i)),this.stackToTree(i);if(this.parser.strict)throw Z&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&r){let i=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,t);if(i)return Z&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let i=this.recovering==1?1:this.recovering*3;if(t.length>i)for(t.sort((l,o)=>o.score-l.score);t.length>i;)t.pop();t.some(l=>l.reducePos>a)&&this.recovering--}else if(t.length>1){e:for(let i=0;i500&&Q.buffer.length>500)if((l.score-Q.score||l.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(i--,1);continue e}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let i=1;i ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let Q=e.curContext&&e.curContext.tracker.strict,d=Q?e.curContext.hash:0;for(let c=this.fragments.nodeAt(r);c;){let S=this.parser.nodeSet.types[c.type.id]==c.type?s.getGoto(e.state,c.type.id):-1;if(S>-1&&c.length&&(!Q||(c.prop(we.contextHash)||0)==d))return e.useNode(c,S),Z&&console.log(i+this.stackID(e)+` (via reuse of ${s.getName(c.type.id)})`),!0;if(!(c instanceof ee)||c.children.length==0||c.positions[0]>0)break;let p=c.children[0];if(p instanceof ee&&c.positions[0]==0)c=p;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),Z&&console.log(i+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=9e3)for(;e.stack.length>6e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let Q=0;Qr?a.push(u):t.push(u)}return!1}advanceFully(e,a){let t=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>t)return Be(e,a),!0}}runRecovery(e,a,t){let r=null,s=!1;for(let i=0;i ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Z&&console.log(d+this.stackID(l)+" (restarted)"),this.advanceFully(l,t))))continue;let c=l.split(),S=d;for(let p=0;c.forceReduce()&&p<10&&(Z&&console.log(S+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));p++)Z&&(S=this.stackID(c)+" -> ");for(let p of l.recoverByInsert(o))Z&&console.log(d+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,t);this.stream.end>l.pos?(Q==l.pos&&(Q++,o=0),l.recoverByDelete(o,Q),Z&&console.log(d+this.stackID(l)+` (via recover-delete ${this.parser.getName(o)})`),Be(l,t)):(!r||r.scoreO;class wO{constructor(e){this.start=e.start,this.shift=e.shift||he,this.reduce=e.reduce||he,this.reuse=e.reuse||he,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class T extends Tt{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let a=e.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let l=0;le.topRules[l][1]),r=[];for(let l=0;l=0)s(d,o,l[Q++]);else{let c=l[Q+-d];for(let S=-d;S>0;S--)s(l[Q++],o,c);Q++}}}this.nodeSet=new _t(a.map((l,o)=>Wt.define({name:o>=this.minRepeatTerm?void 0:l,id:o,props:r[o],top:t.indexOf(o)>-1,error:o==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Ut;let i=I(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new R(i,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,a,t){let r=new oa(this,e,a,t);for(let s of this.wrappers)r=s(r,e,a,t);return r}getGoto(e,a,t=!1){let r=this.goto;if(a>=r[0])return-1;for(let s=r[a+1];;){let i=r[s++],l=i&1,o=r[s++];if(l&&t)return o;for(let Q=s+(i>>1);s0}validAction(e,a){return!!this.allActions(e,t=>t==a?!0:null)}allActions(e,a){let t=this.stateSlot(e,4),r=t?a(t):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;r=a(k(this.data,s+1))}return r}nextStates(e){let a=[];for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let r=this.data[t+1];a.some((s,i)=>i&1&&s==r)||a.push(this.data[t],r)}}return a}configure(e){let a=Object.assign(Object.create(T.prototype),this);if(e.props&&(a.nodeSet=this.nodeSet.extend(...e.props)),e.top){let t=this.topRules[e.top];if(!t)throw new RangeError(`Invalid top rule name ${e.top}`);a.top=t}return e.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let r=e.tokenizers.find(s=>s.from==t);return r?r.to:t})),e.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,r)=>{let s=e.specializers.find(l=>l.from==t.external);if(!s)return t;let i=Object.assign(Object.assign({},t),{external:s.to});return a.specializers[r]=De(i),i})),e.contextTracker&&(a.context=e.contextTracker),e.dialect&&(a.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(a.strict=e.strict),e.wrap&&(a.wrappers=a.wrappers.concat(e.wrap)),e.bufferLength!=null&&(a.bufferLength=e.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let a=this.dynamicPrecedences;return a==null?0:a[e]||0}parseDialect(e){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(e)for(let s of e.split(" ")){let i=a.indexOf(s);i>=0&&(t[i]=!0)}let r=null;for(let s=0;st)&&a.p.parser.stateFlag(a.state,2)&&(!e||e.scoreO.external(a,t)<<1|e}return O.get}const pa=54,da=1,ha=55,ua=2,Sa=56,$a=3,Je=4,fa=5,le=6,vO=7,TO=8,_O=9,WO=10,ga=11,ma=12,Pa=13,ue=57,Za=14,Le=58,UO=20,ba=22,CO=23,Xa=24,Xe=26,RO=27,xa=28,Ya=31,ya=34,ka=36,wa=37,va=0,Ta=1,_a={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Wa={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Fe={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Ua(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function qO(O){return O==9||O==10||O==13||O==32}let Me=null,Ke=null,He=0;function xe(O,e){let a=O.pos+e;if(He==a&&Ke==O)return Me;let t=O.peek(e);for(;qO(t);)t=O.peek(++e);let r="";for(;Ua(t);)r+=String.fromCharCode(t),t=O.peek(++e);return Ke=O,He=a,Me=r?r.toLowerCase():t==Ca||t==Ra?void 0:null}const VO=60,ne=62,_e=47,Ca=63,Ra=33,qa=45;function eO(O,e){this.name=O,this.parent=e,this.hash=e?e.hash:0;for(let a=0;a-1?new eO(xe(t,1)||"",O):O},reduce(O,e){return e==UO&&O?O.parent:O},reuse(O,e,a,t){let r=e.type.id;return r==le||r==ka?new eO(xe(t,1)||"",O):O},hash(O){return O?O.hash:0},strict:!1}),za=new x((O,e)=>{if(O.next!=VO){O.next<0&&e.context&&O.acceptToken(ue);return}O.advance();let a=O.next==_e;a&&O.advance();let t=xe(O,0);if(t===void 0)return;if(!t)return O.acceptToken(a?Za:le);let r=e.context?e.context.name:null;if(a){if(t==r)return O.acceptToken(ga);if(r&&Wa[r])return O.acceptToken(ue,-2);if(e.dialectEnabled(va))return O.acceptToken(ma);for(let s=e.context;s;s=s.parent)if(s.name==t)return;O.acceptToken(Pa)}else{if(t=="script")return O.acceptToken(vO);if(t=="style")return O.acceptToken(TO);if(t=="textarea")return O.acceptToken(_O);if(_a.hasOwnProperty(t))return O.acceptToken(WO);r&&Fe[r]&&Fe[r][t]?O.acceptToken(ue,-1):O.acceptToken(le)}},{contextual:!0}),Ga=new x(O=>{for(let e=0,a=0;;a++){if(O.next<0){a&&O.acceptToken(Le);break}if(O.next==qa)e++;else if(O.next==ne&&e>=2){a>3&&O.acceptToken(Le,-2);break}else e=0;O.advance()}});function Ea(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}const Aa=new x((O,e)=>{if(O.next==_e&&O.peek(1)==ne){let a=e.dialectEnabled(Ta)||Ea(e.context);O.acceptToken(a?fa:Je,2)}else O.next==ne&&O.acceptToken(Je,1)});function We(O,e,a){let t=2+O.length;return new x(r=>{for(let s=0,i=0,l=0;;l++){if(r.next<0){l&&r.acceptToken(e);break}if(s==0&&r.next==VO||s==1&&r.next==_e||s>=2&&si?r.acceptToken(e,-i):r.acceptToken(a,-(i-2));break}else if((r.next==10||r.next==13)&&l){r.acceptToken(e,1);break}else s=i=0;r.advance()}})}const Ia=We("script",pa,da),Na=We("style",ha,ua),Ba=We("textarea",Sa,$a),Da=D({"Text RawText":n.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":n.angleBracket,TagName:n.tagName,"MismatchedCloseTag/TagName":[n.tagName,n.invalid],AttributeName:n.attributeName,"AttributeValue UnquotedAttributeValue":n.attributeValue,Is:n.definitionOperator,"EntityReference CharacterReference":n.character,Comment:n.blockComment,ProcessingInst:n.processingInstruction,DoctypeDecl:n.documentMeta}),Ja=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQV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^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,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<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let Q=l.type.id;if(Q==xa)return Se(l,o,a);if(Q==Ya)return Se(l,o,t);if(Q==ya)return Se(l,o,r);if(Q==UO&&s.length){let d=l.node,c=d.firstChild,S=c&&OO(c,o),p;if(S){for(let u of s)if(u.tag==S&&(!u.attrs||u.attrs(p||(p=jO(d,o))))){let f=d.lastChild;return{parser:u.parser,overlay:[{from:c.to,to:f.type.id==wa?f.from:d.to}]}}}}if(i&&Q==CO){let d=l.node,c;if(c=d.firstChild){let S=i[o.read(c.from,c.to)];if(S)for(let p of S){if(p.tagName&&p.tagName!=OO(d.parent,o))continue;let u=d.lastChild;if(u.type.id==Xe){let f=u.from+1,g=u.lastChild,X=u.to-(g&&g.isError?0:1);if(X>f)return{parser:p.parser,overlay:[{from:f,to:X}]}}else if(u.type.id==RO)return{parser:p.parser,overlay:[{from:u.from,to:u.to}]}}}}return null})}const La=96,tO=1,Fa=97,Ma=98,aO=2,GO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ka=58,Ha=40,EO=95,er=91,te=45,Or=46,tr=35,ar=37;function oe(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function rr(O){return O>=48&&O<=57}const ir=new x((O,e)=>{for(let a=!1,t=0,r=0;;r++){let{next:s}=O;if(oe(s)||s==te||s==EO||a&&rr(s))!a&&(s!=te||r>0)&&(a=!0),t===r&&s==te&&t++,O.advance();else{a&&O.acceptToken(s==Ha?Fa:t==2&&e.canShift(aO)?aO:Ma);break}}}),sr=new x(O=>{if(GO.includes(O.peek(-1))){let{next:e}=O;(oe(e)||e==EO||e==tr||e==Or||e==er||e==Ka||e==te)&&O.acceptToken(La)}}),lr=new x(O=>{if(!GO.includes(O.peek(-1))){let{next:e}=O;if(e==ar&&(O.advance(),O.acceptToken(tO)),oe(e)){do O.advance();while(oe(O.next));O.acceptToken(tO)}}}),nr=D({"AtKeyword import charset namespace keyframes media supports":n.definitionKeyword,"from to selector":n.keyword,NamespaceName:n.namespace,KeyframeName:n.labelName,KeyframeRangeName:n.operatorKeyword,TagName:n.tagName,ClassName:n.className,PseudoClassName:n.constant(n.className),IdName:n.labelName,"FeatureName PropertyName":n.propertyName,AttributeName:n.attributeName,NumberLiteral:n.number,KeywordQuery:n.keyword,UnaryQueryOp:n.operatorKeyword,"CallTag ValueName":n.atom,VariableName:n.variableName,Callee:n.operatorKeyword,Unit:n.unit,"UniversalSelector NestingSelector":n.definitionOperator,MatchOp:n.compareOperator,"ChildOp SiblingOp, LogicOp":n.logicOperator,BinOp:n.arithmeticOperator,Important:n.modifier,Comment:n.blockComment,ColorLiteral:n.color,"ParenthesizedContent StringLiteral":n.string,":":n.punctuation,"PseudoOp #":n.derefOperator,"; ,":n.separator,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace}),or={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},cr={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},Qr={__proto__:null,not:128,only:128},pr=T.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O)QQ[O,59SO$qQ[O,59kO$vQ[O,59oO(^Q[O,59sO(^Q[O,59uO(^Q[O,59vO)]Q[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)dQWO,59SO)iQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)nQ`O,59oOOQS'#Cp'#CpO${QdO'#CqO)vQvO'#CsO+TQtO,5:POOQO'#Cx'#CxO)iQWO'#CwO+iQWO'#CyOOQS'#Em'#EmOOQO'#Dh'#DhO+nQ[O'#DoO+|QWO'#EqO&]Q[O'#DmO,[QWO'#DpOOQO'#Er'#ErO({QWO,5:^O,aQpO,5:`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iUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[sr,lr,ir,1,2,3,4,new se("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:O=>or[O]||-1},{term:56,get:O=>cr[O]||-1},{term:98,get:O=>Qr[O]||-1}],tokenPrec:1169});let $e=null;function fe(){if(!$e&&typeof document=="object"&&document.body){let{style:O}=document.body,e=[],a=new Set;for(let t in O)t!="cssText"&&t!="cssFloat"&&typeof O[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),a.has(t)||(e.push(t),a.add(t)));$e=e.sort().map(t=>({type:"property",label:t}))}return $e||[]}const rO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(O=>({type:"class",label:O})),iO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(O=>({type:"keyword",label:O})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(O=>({type:"constant",label:O}))),dr=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(O=>({type:"type",label:O})),v=/^(\w[\w-]*|-\w[\w-]*|)$/,hr=/^-(-[\w-]*)?$/;function ur(O,e){var a;if((O.name=="("||O.type.isError)&&(O=O.parent||O),O.name!="ArgList")return!1;let t=(a=O.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:e.sliceString(t.from,t.to)=="var"}const sO=new bO,Sr=["Declaration"];function $r(O){for(let e=O;;){if(e.type.isTop)return e;if(!(e=e.parent))return O}}function AO(O,e,a){if(e.to-e.from>4096){let t=sO.get(e);if(t)return t;let r=[],s=new Set,i=e.cursor(ve.IncludeAnonymous);if(i.firstChild())do for(let l of AO(O,i.node,a))s.has(l.label)||(s.add(l.label),r.push(l));while(i.nextSibling());return sO.set(e,r),r}else{let t=[],r=new Set;return e.cursor().iterate(s=>{var i;if(a(s)&&s.matchContext(Sr)&&((i=s.node.nextSibling)===null||i===void 0?void 0:i.name)==":"){let l=O.sliceString(s.from,s.to);r.has(l)||(r.add(l),t.push({label:l,type:"variable"}))}}),t}}const fr=O=>e=>{let{state:a,pos:t}=e,r=j(a).resolveInner(t,-1),s=r.type.isError&&r.from==r.to-1&&a.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:fe(),validFor:v};if(r.name=="ValueName")return{from:r.from,options:iO,validFor:v};if(r.name=="PseudoClassName")return{from:r.from,options:rO,validFor:v};if(O(r)||(e.explicit||s)&&ur(r,a.doc))return{from:O(r)||s?r.from:t,options:AO(a.doc,$r(r),O),validFor:hr};if(r.name=="TagName"){for(let{parent:o}=r;o;o=o.parent)if(o.name=="Block")return{from:r.from,options:fe(),validFor:v};return{from:r.from,options:dr,validFor:v}}if(!e.explicit)return null;let i=r.resolve(t),l=i.childBefore(t);return l&&l.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:rO,validFor:v}:l&&l.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:iO,validFor:v}:i.name=="Block"||i.name=="Styles"?{from:t,options:fe(),validFor:v}:null},gr=fr(O=>O.name=="VariableName"),ce=J.define({name:"css",parser:pr.configure({props:[L.add({Declaration:C()}),F.add({"Block KeyframeList":Te})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function mr(){return new M(ce,ce.data.of({autocomplete:gr}))}const Pr=304,lO=1,Zr=2,br=305,Xr=307,xr=308,Yr=3,yr=4,kr=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],IO=125,wr=59,nO=47,vr=42,Tr=43,_r=45,Wr=new wO({start:!1,shift(O,e){return e==Yr||e==yr||e==Xr?O:e==xr},strict:!1}),Ur=new x((O,e)=>{let{next:a}=O;(a==IO||a==-1||e.context)&&O.acceptToken(br)},{contextual:!0,fallback:!0}),Cr=new x((O,e)=>{let{next:a}=O,t;kr.indexOf(a)>-1||a==nO&&((t=O.peek(1))==nO||t==vr)||a!=IO&&a!=wr&&a!=-1&&!e.context&&O.acceptToken(Pr)},{contextual:!0}),Rr=new x((O,e)=>{let{next:a}=O;if((a==Tr||a==_r)&&(O.advance(),a==O.next)){O.advance();let t=!e.context&&e.canShift(lO);O.acceptToken(t?lO:Zr)}},{contextual:!0}),qr=D({"get set async static":n.modifier,"for while do if else switch try catch finally return throw break continue default case":n.controlKeyword,"in of await yield void typeof delete instanceof":n.operatorKeyword,"let var const using function class extends":n.definitionKeyword,"import export from":n.moduleKeyword,"with debugger as new":n.keyword,TemplateString:n.special(n.string),super:n.atom,BooleanLiteral:n.bool,this:n.self,null:n.null,Star:n.modifier,VariableName:n.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":n.function(n.variableName),VariableDefinition:n.definition(n.variableName),Label:n.labelName,PropertyName:n.propertyName,PrivatePropertyName:n.special(n.propertyName),"CallExpression/MemberExpression/PropertyName":n.function(n.propertyName),"FunctionDeclaration/VariableDefinition":n.function(n.definition(n.variableName)),"ClassDeclaration/VariableDefinition":n.definition(n.className),PropertyDefinition:n.definition(n.propertyName),PrivatePropertyDefinition:n.definition(n.special(n.propertyName)),UpdateOp:n.updateOperator,"LineComment Hashbang":n.lineComment,BlockComment:n.blockComment,Number:n.number,String:n.string,Escape:n.escape,ArithOp:n.arithmeticOperator,LogicOp:n.logicOperator,BitOp:n.bitwiseOperator,CompareOp:n.compareOperator,RegExp:n.regexp,Equals:n.definitionOperator,Arrow:n.function(n.punctuation),": Spread":n.punctuation,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace,"InterpolationStart InterpolationEnd":n.special(n.brace),".":n.derefOperator,", ;":n.separator,"@":n.meta,TypeName:n.typeName,TypeDefinition:n.definition(n.typeName),"type enum interface implements namespace module declare":n.definitionKeyword,"abstract global Privacy readonly override":n.modifier,"is keyof unique infer":n.operatorKeyword,JSXAttributeValue:n.attributeValue,JSXText:n.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":n.angleBracket,"JSXIdentifier JSXNameSpacedName":n.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":n.attributeName,"JSXBuiltin/JSXIdentifier":n.standard(n.tagName)}),Vr={__proto__:null,export:16,as:21,from:29,default:32,async:37,function:38,extends:48,this:52,true:60,false:60,null:72,void:76,typeof:80,super:98,new:132,delete:148,yield:157,await:161,class:166,public:223,private:223,protected:223,readonly:225,instanceof:244,satisfies:247,in:248,const:250,import:282,keyof:337,unique:341,infer:347,is:383,abstract:403,implements:405,type:407,let:410,var:412,using:415,interface:421,enum:425,namespace:431,module:433,declare:437,global:441,for:460,of:469,while:472,with:476,do:480,if:484,else:486,switch:490,case:496,try:502,catch:506,finally:510,return:514,throw:518,break:522,continue:526,debugger:530},jr={__proto__:null,async:119,get:121,set:123,declare:183,public:185,private:185,protected:185,static:187,abstract:189,override:191,readonly:197,accessor:199,new:387},zr={__proto__:null,"<":139},Gr=T.deserialize({version:14,states:"$6zO%TQUOOO%[QUOOO'_QWOOP(lOSOOO*zQ(CjO'#CgO+ROpO'#ChO+aO!bO'#ChO+oO07`O'#D[O.QQUO'#DbO.bQUO'#DmO%[QUO'#DwO0fQUO'#EPOOQ(CY'#EX'#EXO1PQSO'#EUOOQO'#Ej'#EjOOQO'#Id'#IdO1XQSO'#GlO1dQSO'#EiO1iQSO'#EiO3kQ(CjO'#JeO6[Q(CjO'#JfO6xQSO'#FXO6}Q#tO'#FpOOQ(CY'#Fa'#FaO7YO&jO'#FaO7hQ,UO'#FwO9OQSO'#FvOOQ(CY'#Jf'#JfOOQ(CW'#Je'#JeO9TQSO'#GpOOQQ'#KQ'#KQO9`QSO'#IQO9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Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:367,context:Wr,nodeProps:[["group",-26,7,15,17,63,200,204,208,209,211,214,217,227,229,235,237,239,241,244,250,256,258,260,262,264,266,267,"Statement",-32,11,12,26,29,30,36,46,49,50,52,57,65,73,77,79,81,82,104,105,114,115,132,135,137,138,139,140,142,143,163,164,166,"Expression",-23,25,27,31,35,37,39,167,169,171,172,174,175,176,178,179,180,182,183,184,194,196,198,199,"Type",-3,85,97,103,"ClassItem"],["openedBy",32,"InterpolationStart",51,"[",55,"{",70,"(",144,"JSXStartTag",156,"JSXStartTag JSXStartCloseTag"],["closedBy",34,"InterpolationEnd",45,"]",56,"}",71,")",145,"JSXSelfCloseEndTag JSXEndTag",161,"JSXEndTag"]],propSources:[qr],skippedNodes:[0,3,4,270],repeatNodeCount:33,tokenData:"$Fl(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Nu!`!a$#a!a!b$(n!b!c$,m!c!}Er!}#O$-w#O#P$/R#P#Q$4j#Q#R$5t#R#SEr#S#T$7R#T#o$8]#o#p$s#r#s$@P#s$f%Z$f$g+g$g#BYEr#BY#BZ$AZ#BZ$ISEr$IS$I_$AZ$I_$I|Er$I|$I}$Df$I}$JO$Df$JO$JTEr$JT$JU$AZ$JU$KVEr$KV$KW$AZ$KW&FUEr&FU&FV$AZ&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU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!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#b%Z#b#c#Vr[O]||-1},{term:330,get:O=>jr[O]||-1},{term:68,get:O=>zr[O]||-1}],tokenPrec:12827}),NO=[P("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),P("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),P("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),P("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),P("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),P(`try { +import{S as ft,i as gt,s as mt,e as Pt,f as Zt,U as K,g as bt,y as ze,o as Xt,J as xt,K as Yt,L as yt,I as kt,C as wt,M as vt}from"./index-7d33ef4c.js";import{P as Tt,N as _t,u as Wt,D as Ut,v as we,T as ee,I as ve,w as D,x as n,y as Ct,L as J,z as L,A as C,B as F,F as Te,G as M,H as j,J as bO,K as XO,M as xO,E as U,O as YO,Q as P,R as Rt,U as qt,V as yO,W as Vt,X as jt,a as z,h as zt,b as Gt,c as Et,d as At,e as It,s as Nt,t as Bt,f as Dt,g as Jt,r as Lt,i as Ft,k as Mt,j as Kt,l as Ht,m as ea,n as Oa,o as ta,p as aa,q as Ge,C as H}from"./index-30dee195.js";class re{constructor(e,a,t,r,s,i,l,o,Q,d=0,c){this.p=e,this.stack=a,this.state=t,this.reducePos=r,this.pos=s,this.score=i,this.buffer=l,this.bufferBase=o,this.curContext=Q,this.lookAhead=d,this.parent=c}toString(){return`[${this.stack.filter((e,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,a,t=0){let r=e.parser.context;return new re(e,[],a,t,t,0,[],0,r?new Ee(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var a;let t=e>>19,r=e&65535,{parser:s}=this.p,i=s.dynamicPrecedence(r);if(i&&(this.score+=i),t==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(!((a=this.p.parser.nodeSet.types[r])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(r,o)}storeNode(e,a,t,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&i.buffer[l-4]==0&&i.buffer[l-1]>-1){if(a==t)return;if(i.buffer[l-2]>=a){i.buffer[l-2]=t;return}}}if(!s||this.pos==t)this.buffer.push(e,a,t,r);else{let i=this.buffer.length;if(i>0&&this.buffer[i-4]!=0)for(;i>0&&this.buffer[i-2]>t;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4);this.buffer[i]=e,this.buffer[i+1]=a,this.buffer[i+2]=t,this.buffer[i+3]=r}}shift(e,a,t,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(a,t),a<=this.p.parser.maxNode&&this.buffer.push(a,t,r,4);else{let s=e,{parser:i}=this.p;(r>this.pos||a<=i.maxNode)&&(this.pos=r,i.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,t),this.shiftContext(a,t),a<=i.maxNode&&this.buffer.push(a,t,r,4)}}apply(e,a,t,r){e&65536?this.reduce(e):this.shift(e,a,t,r)}useNode(e,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=e)&&(this.p.reused.push(e),t++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(a,r),this.buffer.push(t,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,a=e.buffer.length;for(;a>0&&e.buffer[a-2]>e.reducePos;)a-=4;let t=e.buffer.slice(a),r=e.bufferBase+a;for(;e&&r==e.bufferBase;)e=e.parent;return new re(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,a){let t=e<=this.p.parser.maxNode;t&&this.storeNode(e,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(e){for(let a=new ra(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,e);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(e){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>8||this.stack.length>=120){let r=[];for(let s=0,i;so&1&&l==i)||r.push(a[s],i)}a=r}let t=[];for(let r=0;r>19,r=a&65535,s=this.stack.length-t*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let i=this.findForcedReduction();if(i==null)return!1;a=i}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(a),!0}findForcedReduction(){let{parser:e}=this.p,a=[],t=(r,s)=>{if(!a.includes(r))return a.push(r),e.allActions(r,i=>{if(!(i&393216))if(i&65536){let l=(i>>19)-s;if(l>1){let o=i&65535,Q=this.stack.length-l*3;if(Q>=0&&e.getGoto(this.stack[Q],o,!1)>=0)return l<<19|65536|o}}else{let l=t(i,s+1);if(l!=null)return l}})};return t(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ee{constructor(e,a){this.tracker=e,this.context=a,this.hash=e.strict?e.hash(a):0}}class ra{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let a=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=r}}class ie{constructor(e,a,t){this.stack=e,this.pos=a,this.index=t,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,a=e.bufferBase+e.buffer.length){return new ie(e,a,a-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new ie(this.stack,this.pos,this.index)}}function I(O,e=Uint16Array){if(typeof O!="string")return O;let a=null;for(let t=0,r=0;t=92&&i--,i>=34&&i--;let o=i-32;if(o>=46&&(o-=46,l=!0),s+=o,l)break;s*=46}a?a[r++]=s:a=new e(s)}return a}class Oe{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ae=new Oe;class ia{constructor(e,a){this.input=e,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ae,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(e,a){let t=this.range,r=this.rangeIndex,s=this.pos+e;for(;st.to:s>=t.to;){if(r==this.ranges.length-1)return null;let i=this.ranges[++r];s+=i.from-t.to,t=i}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,a.from);return this.end}peek(e){let a=this.chunkOff+e,t,r;if(a>=0&&a=this.chunk2Pos&&tl.to&&(this.chunk2=this.chunk2.slice(0,l.to-t)),r=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),r}acceptToken(e,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,a){if(a?(this.token=a,a.start=e,a.lookAhead=e+1,a.value=a.extended=-1):this.token=Ae,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,a-this.chunkPos);if(e>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,a-this.chunk2Pos);if(e>=this.range.from&&a<=this.range.to)return this.input.read(e,a);let t="";for(let r of this.ranges){if(r.from>=a)break;r.to>e&&(t+=this.input.read(Math.max(r.from,e),Math.min(r.to,a)))}return t}}class R{constructor(e,a){this.data=e,this.id=a}token(e,a){let{parser:t}=a.p;kO(this.data,e,a,this.id,t.data,t.tokenPrecTable)}}R.prototype.contextual=R.prototype.fallback=R.prototype.extend=!1;class se{constructor(e,a,t){this.precTable=a,this.elseToken=t,this.data=typeof e=="string"?I(e):e}token(e,a){let t=e.pos,r=0;for(;;){let s=e.next<0,i=e.resolveOffset(1,1);if(kO(this.data,e,a,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(t,e.token),e.acceptToken(this.elseToken,r))}}se.prototype.contextual=R.prototype.fallback=R.prototype.extend=!1;class x{constructor(e,a={}){this.token=e,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function kO(O,e,a,t,r,s){let i=0,l=1<0){let u=O[p];if(o.allows(u)&&(e.token.value==-1||e.token.value==u||sa(u,e.token.value,r,s))){e.acceptToken(u);break}}let d=e.next,c=0,S=O[i+2];if(e.next<0&&S>c&&O[Q+S*3-3]==65535&&O[Q+S*3-3]==65535){i=O[Q+S*3-1];continue e}for(;c>1,u=Q+p+(p<<1),f=O[u],g=O[u+1]||65536;if(d=g)c=p+1;else{i=O[u+2],e.advance();continue e}}break}}function Ie(O,e,a){for(let t=e,r;(r=O[t])!=65535;t++)if(r==a)return t-e;return-1}function sa(O,e,a,t){let r=Ie(a,t,e);return r<0||Ie(a,t,O)e)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,e-25)):Math.min(O.length,Math.max(t.from+1,e+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:O.length}}class la{constructor(e,a){this.fragments=e,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ne(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ne(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=i,null;if(s instanceof ee){if(i==e){if(i=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(i),this.index.push(0))}else this.index[a]++,this.nextStart=i+s.length}}}class na{constructor(e,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(t=>new Oe)}getActions(e){let a=0,t=null,{parser:r}=e.p,{tokenizers:s}=r,i=r.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let S=a;if(c.extended>-1&&(a=this.addActions(e,c.extended,c.end,a)),a=this.addActions(e,c.value,c.end,a),!d.extend&&(t=c,a>S))break}}for(;this.actions.length>a;)this.actions.pop();return o&&e.setLookAhead(o),!t&&e.pos==this.stream.end&&(t=new Oe,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,a=this.addActions(e,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let a=new Oe,{pos:t,p:r}=e;return a.start=t,a.end=Math.min(t+1,r.stream.end),a.value=t==r.stream.end?r.parser.eofTerm:0,a}updateCachedToken(e,a,t){let r=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(r,e),t),e.value>-1){let{parser:s}=t.p;for(let i=0;i=0&&t.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,a,t,r){for(let s=0;se.bufferLength*4?new la(t,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,a=this.minStackPos,t=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[i]=e;for(;i.forceReduce()&&i.stack.length&&i.stack[i.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;ia)t.push(l);else{if(this.advanceStack(l,t,e))continue;{r||(r=[],s=[]),r.push(l);let o=this.tokens.getMainToken(l);s.push(o.value,o.end)}}break}}if(!t.length){let i=r&&Qa(r);if(i)return Z&&console.log("Finish with "+this.stackID(i)),this.stackToTree(i);if(this.parser.strict)throw Z&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&r){let i=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,t);if(i)return Z&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let i=this.recovering==1?1:this.recovering*3;if(t.length>i)for(t.sort((l,o)=>o.score-l.score);t.length>i;)t.pop();t.some(l=>l.reducePos>a)&&this.recovering--}else if(t.length>1){e:for(let i=0;i500&&Q.buffer.length>500)if((l.score-Q.score||l.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(i--,1);continue e}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let i=1;i ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let Q=e.curContext&&e.curContext.tracker.strict,d=Q?e.curContext.hash:0;for(let c=this.fragments.nodeAt(r);c;){let S=this.parser.nodeSet.types[c.type.id]==c.type?s.getGoto(e.state,c.type.id):-1;if(S>-1&&c.length&&(!Q||(c.prop(we.contextHash)||0)==d))return e.useNode(c,S),Z&&console.log(i+this.stackID(e)+` (via reuse of ${s.getName(c.type.id)})`),!0;if(!(c instanceof ee)||c.children.length==0||c.positions[0]>0)break;let p=c.children[0];if(p instanceof ee&&c.positions[0]==0)c=p;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),Z&&console.log(i+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=9e3)for(;e.stack.length>6e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let Q=0;Qr?a.push(u):t.push(u)}return!1}advanceFully(e,a){let t=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>t)return Be(e,a),!0}}runRecovery(e,a,t){let r=null,s=!1;for(let i=0;i ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Z&&console.log(d+this.stackID(l)+" (restarted)"),this.advanceFully(l,t))))continue;let c=l.split(),S=d;for(let p=0;c.forceReduce()&&p<10&&(Z&&console.log(S+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));p++)Z&&(S=this.stackID(c)+" -> ");for(let p of l.recoverByInsert(o))Z&&console.log(d+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,t);this.stream.end>l.pos?(Q==l.pos&&(Q++,o=0),l.recoverByDelete(o,Q),Z&&console.log(d+this.stackID(l)+` (via recover-delete ${this.parser.getName(o)})`),Be(l,t)):(!r||r.scoreO;class wO{constructor(e){this.start=e.start,this.shift=e.shift||he,this.reduce=e.reduce||he,this.reuse=e.reuse||he,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class T extends Tt{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let a=e.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let l=0;le.topRules[l][1]),r=[];for(let l=0;l=0)s(d,o,l[Q++]);else{let c=l[Q+-d];for(let S=-d;S>0;S--)s(l[Q++],o,c);Q++}}}this.nodeSet=new _t(a.map((l,o)=>Wt.define({name:o>=this.minRepeatTerm?void 0:l,id:o,props:r[o],top:t.indexOf(o)>-1,error:o==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Ut;let i=I(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new R(i,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,a,t){let r=new oa(this,e,a,t);for(let s of this.wrappers)r=s(r,e,a,t);return r}getGoto(e,a,t=!1){let r=this.goto;if(a>=r[0])return-1;for(let s=r[a+1];;){let i=r[s++],l=i&1,o=r[s++];if(l&&t)return o;for(let Q=s+(i>>1);s0}validAction(e,a){return!!this.allActions(e,t=>t==a?!0:null)}allActions(e,a){let t=this.stateSlot(e,4),r=t?a(t):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;r=a(k(this.data,s+1))}return r}nextStates(e){let a=[];for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let r=this.data[t+1];a.some((s,i)=>i&1&&s==r)||a.push(this.data[t],r)}}return a}configure(e){let a=Object.assign(Object.create(T.prototype),this);if(e.props&&(a.nodeSet=this.nodeSet.extend(...e.props)),e.top){let t=this.topRules[e.top];if(!t)throw new RangeError(`Invalid top rule name ${e.top}`);a.top=t}return e.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let r=e.tokenizers.find(s=>s.from==t);return r?r.to:t})),e.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,r)=>{let s=e.specializers.find(l=>l.from==t.external);if(!s)return t;let i=Object.assign(Object.assign({},t),{external:s.to});return a.specializers[r]=De(i),i})),e.contextTracker&&(a.context=e.contextTracker),e.dialect&&(a.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(a.strict=e.strict),e.wrap&&(a.wrappers=a.wrappers.concat(e.wrap)),e.bufferLength!=null&&(a.bufferLength=e.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let a=this.dynamicPrecedences;return a==null?0:a[e]||0}parseDialect(e){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(e)for(let s of e.split(" ")){let i=a.indexOf(s);i>=0&&(t[i]=!0)}let r=null;for(let s=0;st)&&a.p.parser.stateFlag(a.state,2)&&(!e||e.scoreO.external(a,t)<<1|e}return O.get}const pa=54,da=1,ha=55,ua=2,Sa=56,$a=3,Je=4,fa=5,le=6,vO=7,TO=8,_O=9,WO=10,ga=11,ma=12,Pa=13,ue=57,Za=14,Le=58,UO=20,ba=22,CO=23,Xa=24,Xe=26,RO=27,xa=28,Ya=31,ya=34,ka=36,wa=37,va=0,Ta=1,_a={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Wa={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Fe={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Ua(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function qO(O){return O==9||O==10||O==13||O==32}let Me=null,Ke=null,He=0;function xe(O,e){let a=O.pos+e;if(He==a&&Ke==O)return Me;let t=O.peek(e);for(;qO(t);)t=O.peek(++e);let r="";for(;Ua(t);)r+=String.fromCharCode(t),t=O.peek(++e);return Ke=O,He=a,Me=r?r.toLowerCase():t==Ca||t==Ra?void 0:null}const VO=60,ne=62,_e=47,Ca=63,Ra=33,qa=45;function eO(O,e){this.name=O,this.parent=e,this.hash=e?e.hash:0;for(let a=0;a-1?new eO(xe(t,1)||"",O):O},reduce(O,e){return e==UO&&O?O.parent:O},reuse(O,e,a,t){let r=e.type.id;return r==le||r==ka?new eO(xe(t,1)||"",O):O},hash(O){return O?O.hash:0},strict:!1}),za=new x((O,e)=>{if(O.next!=VO){O.next<0&&e.context&&O.acceptToken(ue);return}O.advance();let a=O.next==_e;a&&O.advance();let t=xe(O,0);if(t===void 0)return;if(!t)return O.acceptToken(a?Za:le);let r=e.context?e.context.name:null;if(a){if(t==r)return O.acceptToken(ga);if(r&&Wa[r])return O.acceptToken(ue,-2);if(e.dialectEnabled(va))return O.acceptToken(ma);for(let s=e.context;s;s=s.parent)if(s.name==t)return;O.acceptToken(Pa)}else{if(t=="script")return O.acceptToken(vO);if(t=="style")return O.acceptToken(TO);if(t=="textarea")return O.acceptToken(_O);if(_a.hasOwnProperty(t))return O.acceptToken(WO);r&&Fe[r]&&Fe[r][t]?O.acceptToken(ue,-1):O.acceptToken(le)}},{contextual:!0}),Ga=new x(O=>{for(let e=0,a=0;;a++){if(O.next<0){a&&O.acceptToken(Le);break}if(O.next==qa)e++;else if(O.next==ne&&e>=2){a>3&&O.acceptToken(Le,-2);break}else e=0;O.advance()}});function Ea(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}const Aa=new x((O,e)=>{if(O.next==_e&&O.peek(1)==ne){let a=e.dialectEnabled(Ta)||Ea(e.context);O.acceptToken(a?fa:Je,2)}else O.next==ne&&O.acceptToken(Je,1)});function We(O,e,a){let t=2+O.length;return new x(r=>{for(let s=0,i=0,l=0;;l++){if(r.next<0){l&&r.acceptToken(e);break}if(s==0&&r.next==VO||s==1&&r.next==_e||s>=2&&si?r.acceptToken(e,-i):r.acceptToken(a,-(i-2));break}else if((r.next==10||r.next==13)&&l){r.acceptToken(e,1);break}else s=i=0;r.advance()}})}const Ia=We("script",pa,da),Na=We("style",ha,ua),Ba=We("textarea",Sa,$a),Da=D({"Text RawText":n.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":n.angleBracket,TagName:n.tagName,"MismatchedCloseTag/TagName":[n.tagName,n.invalid],AttributeName:n.attributeName,"AttributeValue UnquotedAttributeValue":n.attributeValue,Is:n.definitionOperator,"EntityReference CharacterReference":n.character,Comment:n.blockComment,ProcessingInst:n.processingInstruction,DoctypeDecl:n.documentMeta}),Ja=T.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/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wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Da],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5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'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let Q=l.type.id;if(Q==xa)return Se(l,o,a);if(Q==Ya)return Se(l,o,t);if(Q==ya)return Se(l,o,r);if(Q==UO&&s.length){let d=l.node,c=d.firstChild,S=c&&OO(c,o),p;if(S){for(let u of s)if(u.tag==S&&(!u.attrs||u.attrs(p||(p=jO(d,o))))){let f=d.lastChild;return{parser:u.parser,overlay:[{from:c.to,to:f.type.id==wa?f.from:d.to}]}}}}if(i&&Q==CO){let d=l.node,c;if(c=d.firstChild){let S=i[o.read(c.from,c.to)];if(S)for(let p of S){if(p.tagName&&p.tagName!=OO(d.parent,o))continue;let u=d.lastChild;if(u.type.id==Xe){let f=u.from+1,g=u.lastChild,X=u.to-(g&&g.isError?0:1);if(X>f)return{parser:p.parser,overlay:[{from:f,to:X}]}}else if(u.type.id==RO)return{parser:p.parser,overlay:[{from:u.from,to:u.to}]}}}}return null})}const La=96,tO=1,Fa=97,Ma=98,aO=2,GO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ka=58,Ha=40,EO=95,er=91,te=45,Or=46,tr=35,ar=37;function oe(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function rr(O){return O>=48&&O<=57}const ir=new x((O,e)=>{for(let a=!1,t=0,r=0;;r++){let{next:s}=O;if(oe(s)||s==te||s==EO||a&&rr(s))!a&&(s!=te||r>0)&&(a=!0),t===r&&s==te&&t++,O.advance();else{a&&O.acceptToken(s==Ha?Fa:t==2&&e.canShift(aO)?aO:Ma);break}}}),sr=new x(O=>{if(GO.includes(O.peek(-1))){let{next:e}=O;(oe(e)||e==EO||e==tr||e==Or||e==er||e==Ka||e==te)&&O.acceptToken(La)}}),lr=new x(O=>{if(!GO.includes(O.peek(-1))){let{next:e}=O;if(e==ar&&(O.advance(),O.acceptToken(tO)),oe(e)){do O.advance();while(oe(O.next));O.acceptToken(tO)}}}),nr=D({"AtKeyword import charset namespace keyframes media supports":n.definitionKeyword,"from to selector":n.keyword,NamespaceName:n.namespace,KeyframeName:n.labelName,KeyframeRangeName:n.operatorKeyword,TagName:n.tagName,ClassName:n.className,PseudoClassName:n.constant(n.className),IdName:n.labelName,"FeatureName PropertyName":n.propertyName,AttributeName:n.attributeName,NumberLiteral:n.number,KeywordQuery:n.keyword,UnaryQueryOp:n.operatorKeyword,"CallTag ValueName":n.atom,VariableName:n.variableName,Callee:n.operatorKeyword,Unit:n.unit,"UniversalSelector NestingSelector":n.definitionOperator,MatchOp:n.compareOperator,"ChildOp SiblingOp, LogicOp":n.logicOperator,BinOp:n.arithmeticOperator,Important:n.modifier,Comment:n.blockComment,ColorLiteral:n.color,"ParenthesizedContent StringLiteral":n.string,":":n.punctuation,"PseudoOp #":n.derefOperator,"; ,":n.separator,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace}),or={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},cr={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},Qr={__proto__:null,not:128,only:128},pr=T.deserialize({version:14,states:"9bQYQ[OOO#_Q[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eof document=="object"&&document.body){let{style:O}=document.body,e=[],a=new Set;for(let t in O)t!="cssText"&&t!="cssFloat"&&typeof O[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),a.has(t)||(e.push(t),a.add(t)));$e=e.sort().map(t=>({type:"property",label:t}))}return $e||[]}const rO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(O=>({type:"class",label:O})),iO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(O=>({type:"keyword",label:O})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(O=>({type:"constant",label:O}))),dr=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(O=>({type:"type",label:O})),v=/^(\w[\w-]*|-\w[\w-]*|)$/,hr=/^-(-[\w-]*)?$/;function ur(O,e){var a;if((O.name=="("||O.type.isError)&&(O=O.parent||O),O.name!="ArgList")return!1;let t=(a=O.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:e.sliceString(t.from,t.to)=="var"}const sO=new bO,Sr=["Declaration"];function $r(O){for(let e=O;;){if(e.type.isTop)return e;if(!(e=e.parent))return O}}function AO(O,e,a){if(e.to-e.from>4096){let t=sO.get(e);if(t)return t;let r=[],s=new Set,i=e.cursor(ve.IncludeAnonymous);if(i.firstChild())do for(let l of AO(O,i.node,a))s.has(l.label)||(s.add(l.label),r.push(l));while(i.nextSibling());return sO.set(e,r),r}else{let t=[],r=new Set;return e.cursor().iterate(s=>{var i;if(a(s)&&s.matchContext(Sr)&&((i=s.node.nextSibling)===null||i===void 0?void 0:i.name)==":"){let l=O.sliceString(s.from,s.to);r.has(l)||(r.add(l),t.push({label:l,type:"variable"}))}}),t}}const fr=O=>e=>{let{state:a,pos:t}=e,r=j(a).resolveInner(t,-1),s=r.type.isError&&r.from==r.to-1&&a.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:fe(),validFor:v};if(r.name=="ValueName")return{from:r.from,options:iO,validFor:v};if(r.name=="PseudoClassName")return{from:r.from,options:rO,validFor:v};if(O(r)||(e.explicit||s)&&ur(r,a.doc))return{from:O(r)||s?r.from:t,options:AO(a.doc,$r(r),O),validFor:hr};if(r.name=="TagName"){for(let{parent:o}=r;o;o=o.parent)if(o.name=="Block")return{from:r.from,options:fe(),validFor:v};return{from:r.from,options:dr,validFor:v}}if(!e.explicit)return null;let i=r.resolve(t),l=i.childBefore(t);return l&&l.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:rO,validFor:v}:l&&l.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:iO,validFor:v}:i.name=="Block"||i.name=="Styles"?{from:t,options:fe(),validFor:v}:null},gr=fr(O=>O.name=="VariableName"),ce=J.define({name:"css",parser:pr.configure({props:[L.add({Declaration:C()}),F.add({"Block KeyframeList":Te})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function mr(){return new M(ce,ce.data.of({autocomplete:gr}))}const Pr=304,lO=1,Zr=2,br=305,Xr=307,xr=308,Yr=3,yr=4,kr=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],IO=125,wr=59,nO=47,vr=42,Tr=43,_r=45,Wr=new wO({start:!1,shift(O,e){return e==Yr||e==yr||e==Xr?O:e==xr},strict:!1}),Ur=new x((O,e)=>{let{next:a}=O;(a==IO||a==-1||e.context)&&O.acceptToken(br)},{contextual:!0,fallback:!0}),Cr=new x((O,e)=>{let{next:a}=O,t;kr.indexOf(a)>-1||a==nO&&((t=O.peek(1))==nO||t==vr)||a!=IO&&a!=wr&&a!=-1&&!e.context&&O.acceptToken(Pr)},{contextual:!0}),Rr=new x((O,e)=>{let{next:a}=O;if((a==Tr||a==_r)&&(O.advance(),a==O.next)){O.advance();let t=!e.context&&e.canShift(lO);O.acceptToken(t?lO:Zr)}},{contextual:!0}),qr=D({"get set async static":n.modifier,"for while do if else switch try catch finally return throw break continue default case":n.controlKeyword,"in of await yield void typeof delete instanceof":n.operatorKeyword,"let var const using function class extends":n.definitionKeyword,"import export from":n.moduleKeyword,"with debugger as new":n.keyword,TemplateString:n.special(n.string),super:n.atom,BooleanLiteral:n.bool,this:n.self,null:n.null,Star:n.modifier,VariableName:n.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":n.function(n.variableName),VariableDefinition:n.definition(n.variableName),Label:n.labelName,PropertyName:n.propertyName,PrivatePropertyName:n.special(n.propertyName),"CallExpression/MemberExpression/PropertyName":n.function(n.propertyName),"FunctionDeclaration/VariableDefinition":n.function(n.definition(n.variableName)),"ClassDeclaration/VariableDefinition":n.definition(n.className),PropertyDefinition:n.definition(n.propertyName),PrivatePropertyDefinition:n.definition(n.special(n.propertyName)),UpdateOp:n.updateOperator,"LineComment Hashbang":n.lineComment,BlockComment:n.blockComment,Number:n.number,String:n.string,Escape:n.escape,ArithOp:n.arithmeticOperator,LogicOp:n.logicOperator,BitOp:n.bitwiseOperator,CompareOp:n.compareOperator,RegExp:n.regexp,Equals:n.definitionOperator,Arrow:n.function(n.punctuation),": Spread":n.punctuation,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace,"InterpolationStart InterpolationEnd":n.special(n.brace),".":n.derefOperator,", ;":n.separator,"@":n.meta,TypeName:n.typeName,TypeDefinition:n.definition(n.typeName),"type enum interface implements namespace module declare":n.definitionKeyword,"abstract global Privacy readonly override":n.modifier,"is keyof unique infer":n.operatorKeyword,JSXAttributeValue:n.attributeValue,JSXText:n.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":n.angleBracket,"JSXIdentifier JSXNameSpacedName":n.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":n.attributeName,"JSXBuiltin/JSXIdentifier":n.standard(n.tagName)}),Vr={__proto__:null,export:16,as:21,from:29,default:32,async:37,function:38,extends:48,this:52,true:60,false:60,null:72,void:76,typeof:80,super:98,new:132,delete:148,yield:157,await:161,class:166,public:223,private:223,protected:223,readonly:225,instanceof:244,satisfies:247,in:248,const:250,import:282,keyof:337,unique:341,infer:347,is:383,abstract:403,implements:405,type:407,let:410,var:412,using:415,interface:421,enum:425,namespace:431,module:433,declare:437,global:441,for:460,of:469,while:472,with:476,do:480,if:484,else:486,switch:490,case:496,try:502,catch:506,finally:510,return:514,throw:518,break:522,continue:526,debugger:530},jr={__proto__:null,async:119,get:121,set:123,declare:183,public:185,private:185,protected:185,static:187,abstract:189,override:191,readonly:197,accessor:199,new:387},zr={__proto__:null,"<":139},Gr=T.deserialize({version:14,states:"$6zO%TQUOOO%[QUOOO'_QWOOP(lOSOOO*zQ(CjO'#CgO+ROpO'#ChO+aO!bO'#ChO+oO07`O'#D[O.QQUO'#DbO.bQUO'#DmO%[QUO'#DwO0fQUO'#EPOOQ(CY'#EX'#EXO1PQSO'#EUOOQO'#Ej'#EjOOQO'#Id'#IdO1XQSO'#GlO1dQSO'#EiO1iQSO'#EiO3kQ(CjO'#JeO6[Q(CjO'#JfO6xQSO'#FXO6}Q#tO'#FpOOQ(CY'#Fa'#FaO7YO&jO'#FaO7hQ,UO'#FwO9OQSO'#FvOOQ(CY'#Jf'#JfOOQ(CW'#Je'#JeO9TQSO'#GpOOQQ'#KQ'#KQO9`QSO'#IQO9eQ(C[O'#IROOQQ'#JR'#JROOQQ'#IV'#IVQ`QUOOO`QUOOO%[QUO'#DoO9mQUO'#D{O9tQUO'#D}O9ZQSO'#GlO9{Q,UO'#CmO:ZQSO'#EhO:fQSO'#EsO:kQ,UO'#F`O;YQSO'#GlOOQO'#KR'#KRO;_QSO'#KRO;mQSO'#GtO;mQSO'#GuO;mQSO'#GwO9ZQSO'#GzO]QSO'#HZO>eQSO'#HaO>eQSO'#HcO`QUO'#HeO>eQSO'#HgO>eQSO'#HjO>jQSO'#HpO>oQ(C]O'#HvO%[QUO'#HxO>zQ(C]O'#HzO?VQ(C]O'#H|O9eQ(C[O'#IOO?bQ(CjO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Q7s5lQ7w5uQ8Q:pQ8U:uQ8V:vQ8{7yQ9Z8hQ9b8yQ9s#RR;V;cR#ZWR'Q!eY!tQ'V-S0z4uS&|!e,zQ'b!rS'l!u!xS'n!y4wS,w&}'US-c'c'dQ-e'eQ2Q-QR2`-dR(p#wR(s#xQ!fQT-R'V-S]!qQ!r'V-S0z4uQ#o]R'`9rT#jZ%^S#iZ%^S%dm,^U(]#g#h#kS-w(^(_Q-{(`Q0R*}Q2e-xU2f-y-z-|S5{2g2hR7z5|`#]W#V#Y%a'y(S*z-rr#fZm#g#h#k%^(^(_(`*}-x-y-z-|2g2h5|Q1a,^Q1w,tQ5j1oQ7r5kT:}'O*{T#`W%aS#_W%aS'z#V(SS(P#Y*zS,y'O*{T-m'y-rT'T!e%bQ$kfR)o$pT)d$k)eR3`.pT*T$x*VR*]${Q0V+VQ2j.TQ4x0|Q6Q2nQ7^4{Q7}6PQ8j7]Q8|7|Q9]8lQ9e9OQ9j9^R9m9fnqOXst!Z#c%f&i&k&l&n,b,g1g1jQ&c!VR,V&`tmOXst!U!V!Z#c%f&`&i&k&l&n,b,g1g1jR,^&fT%em,^R0v+vR,U&^Q%||R+n%}R+d%wT&g!W&jT&h!W&jT1i,g1j",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:367,context:Wr,nodeProps:[["group",-26,7,15,17,63,200,204,208,209,211,214,217,227,229,235,237,239,241,244,250,256,258,260,262,264,266,267,"Statement",-32,11,12,26,29,30,36,46,49,50,52,57,65,73,77,79,81,82,104,105,114,115,132,135,137,138,139,140,142,143,163,164,166,"Expression",-23,25,27,31,35,37,39,167,169,171,172,174,175,176,178,179,180,182,183,184,194,196,198,199,"Type",-3,85,97,103,"ClassItem"],["openedBy",32,"InterpolationStart",51,"[",55,"{",70,"(",144,"JSXStartTag",156,"JSXStartTag JSXStartCloseTag"],["closedBy",34,"InterpolationEnd",45,"]",56,"}",71,")",145,"JSXSelfCloseEndTag JSXEndTag",161,"JSXEndTag"]],propSources:[qr],skippedNodes:[0,3,4,270],repeatNodeCount:33,tokenData:"$Fl(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#8g!R![#:v![!]#Gv!]!^#IS!^!_#J^!_!`#Nu!`!a$#a!a!b$(n!b!c$,m!c!}Er!}#O$-w#O#P$/R#P#Q$4j#Q#R$5t#R#SEr#S#T$7R#T#o$8]#o#p$s#r#s$@P#s$f%Z$f$g+g$g#BYEr#BY#BZ$AZ#BZ$ISEr$IS$I_$AZ$I_$I|Er$I|$I}$Df$I}$JO$Df$JO$JTEr$JT$JU$AZ$JU$KVEr$KV$KW$AZ$KW&FUEr&FU&FV$AZ&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$AZ?HUOEr(n%d_$e&j'yp'|!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$e&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$e&j'|!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'|!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$e&j'ypOY(rYZ&cZr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n!Eb#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!f!GaZ'|!b!SSOY!GYZw!GYwx!@Yx!P!GY!P!Q!HS!Q!}!GY!}#O!Ic#O#P!Bb#P;'S!GY;'S;=`!JZ<%lO!GY!f!HZb'|!b!SSOY'}Zw'}x#O'}#P#Z'}#Z#[!HS#[#]'}#]#^!HS#^#a'}#a#b!HS#b#g'}#g#h!HS#h#i'}#i#j!HS#j#m'}#m#n!HS#n;'S'};'S;=`(f<%lO'}!f!IhX'|!bOY!IcZw!Icwx!Acx#O!Ic#O#P!A{#P#Q!GY#Q;'S!Ic;'S;=`!JT<%lO!Ic!f!JWP;=`<%l!Ic!f!J^P;=`<%l!GY(Q!Jh^$e&j'|!bOY!JaYZ&cZw!Jawx!Bwx!^!Ja!^!_!Ic!_#O!Ja#O#P!Cr#P#Q!Q#V#X%Z#X#Y!4|#Y#b%Z#b#c#Zd$e&j'yp'|!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#?tf$e&j'yp'|!bm$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#b%Z#b#c#Vr[O]||-1},{term:330,get:O=>jr[O]||-1},{term:68,get:O=>zr[O]||-1}],tokenPrec:12827}),NO=[P("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),P("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),P("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),P("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),P("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),P(`try { \${} } catch (\${error}) { \${} diff --git a/ui/dist/assets/ConfirmEmailChangeDocs-a76d5ec3.js b/ui/dist/assets/ConfirmEmailChangeDocs-0dc32323.js similarity index 97% rename from ui/dist/assets/ConfirmEmailChangeDocs-a76d5ec3.js rename to ui/dist/assets/ConfirmEmailChangeDocs-0dc32323.js index b8c6ed3f..55403b9b 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs-a76d5ec3.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs-0dc32323.js @@ -1,4 +1,4 @@ -import{S as $e,i as Pe,s as Se,O as Y,e as r,w as v,b as k,c as ge,f as b,g as d,h as o,m as ve,x as j,P as ue,Q as we,k as Oe,R as Re,n as Te,t as x,a as ee,o as m,d as Ce,C as ye,p as Ee,r as H,u as Be,N as qe}from"./index-e4747107.js";import{S as Ae}from"./SdkTabs-2f78bf19.js";function be(n,l,s){const a=n.slice();return a[5]=l[s],a}function _e(n,l,s){const a=n.slice();return a[5]=l[s],a}function he(n,l){let s,a=l[5].code+"",_,u,i,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){s=r("button"),_=v(a),u=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(C,$){d(C,s,$),o(s,_),o(s,u),i||(p=Be(s,"click",f),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&j(_,a),$&6&&H(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,p()}}}function ke(n,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:n,first:null,c(){s=r("div"),ge(a.$$.fragment),_=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(i,p){d(i,s,p),ve(a,s,null),o(s,_),u=!0},p(i,p){l=i;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(i){u||(x(a.$$.fragment,i),u=!0)},o(i){ee(a.$$.fragment,i),u=!1},d(i){i&&m(s),Ce(a)}}}function Ue(n){var de,me;let l,s,a=n[0].name+"",_,u,i,p,f,C,$,D=n[0].name+"",F,te,I,P,L,R,Q,S,N,le,K,T,se,z,M=n[0].name+"",G,ae,J,y,V,E,X,B,Z,w,q,g=[],ne=new Map,oe,A,h=[],ie=new Map,O;P=new Ae({props:{js:` +import{S as $e,i as Pe,s as Se,O as Y,e as r,w as v,b as k,c as ge,f as b,g as d,h as o,m as ve,x as j,P as ue,Q as we,k as Oe,R as Re,n as Te,t as x,a as ee,o as m,d as Ce,C as ye,p as Ee,r as H,u as Be,N as qe}from"./index-7d33ef4c.js";import{S as Ae}from"./SdkTabs-f0532e58.js";function be(n,l,s){const a=n.slice();return a[5]=l[s],a}function _e(n,l,s){const a=n.slice();return a[5]=l[s],a}function he(n,l){let s,a=l[5].code+"",_,u,i,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){s=r("button"),_=v(a),u=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(C,$){d(C,s,$),o(s,_),o(s,u),i||(p=Be(s,"click",f),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&j(_,a),$&6&&H(s,"active",l[1]===l[5].code)},d(C){C&&m(s),i=!1,p()}}}function ke(n,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:n,first:null,c(){s=r("div"),ge(a.$$.fragment),_=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(i,p){d(i,s,p),ve(a,s,null),o(s,_),u=!0},p(i,p){l=i;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(i){u||(x(a.$$.fragment,i),u=!0)},o(i){ee(a.$$.fragment,i),u=!1},d(i){i&&m(s),Ce(a)}}}function Ue(n){var de,me;let l,s,a=n[0].name+"",_,u,i,p,f,C,$,D=n[0].name+"",F,te,I,P,L,R,Q,S,N,le,K,T,se,z,M=n[0].name+"",G,ae,J,y,V,E,X,B,Z,w,q,g=[],ne=new Map,oe,A,h=[],ie=new Map,O;P=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/ConfirmPasswordResetDocs-7cd4e484.js b/ui/dist/assets/ConfirmPasswordResetDocs-ea85ce68.js similarity index 98% rename from ui/dist/assets/ConfirmPasswordResetDocs-7cd4e484.js rename to ui/dist/assets/ConfirmPasswordResetDocs-ea85ce68.js index 80c601ca..20da16e3 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs-7cd4e484.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs-ea85ce68.js @@ -1,4 +1,4 @@ -import{S as Re,i as Oe,s as Ce,O as K,e as r,w,b as h,c as ge,f as b,g as d,h as n,m as Pe,x as U,P as _e,Q as Ne,k as We,R as $e,n as Ee,t as ee,a as te,o as p,d as Se,C as ye,p as Ae,r as j,u as Te,N as De}from"./index-e4747107.js";import{S as qe}from"./SdkTabs-2f78bf19.js";function ke(o,s,l){const a=o.slice();return a[5]=s[l],a}function he(o,s,l){const a=o.slice();return a[5]=s[l],a}function ve(o,s){let l,a=s[5].code+"",_,u,i,f;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=w(a),u=h(),b(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(g,P){d(g,l,P),n(l,_),n(l,u),i||(f=Te(l,"click",m),i=!0)},p(g,P){s=g,P&4&&a!==(a=s[5].code+"")&&U(_,a),P&6&&j(l,"active",s[1]===s[5].code)},d(g){g&&p(l),i=!1,f()}}}function we(o,s){let l,a,_,u;return a=new De({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ge(a.$$.fragment),_=h(),b(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(i,f){d(i,l,f),Pe(a,l,null),n(l,_),u=!0},p(i,f){s=i;const m={};f&4&&(m.content=s[5].body),a.$set(m),(!u||f&6)&&j(l,"active",s[1]===s[5].code)},i(i){u||(ee(a.$$.fragment,i),u=!0)},o(i){te(a.$$.fragment,i),u=!1},d(i){i&&p(l),Se(a)}}}function Be(o){var fe,me;let s,l,a=o[0].name+"",_,u,i,f,m,g,P,q=o[0].name+"",H,se,le,L,Q,S,z,N,G,R,B,ae,M,W,ne,J,F=o[0].name+"",V,oe,X,$,Y,E,Z,y,x,O,A,v=[],ie=new Map,ce,T,k=[],re=new Map,C;S=new qe({props:{js:` +import{S as Re,i as Oe,s as Ce,O as K,e as r,w,b as h,c as ge,f as b,g as d,h as n,m as Pe,x as U,P as _e,Q as Ne,k as We,R as $e,n as Ee,t as ee,a as te,o as p,d as Se,C as ye,p as Ae,r as j,u as Te,N as De}from"./index-7d33ef4c.js";import{S as qe}from"./SdkTabs-f0532e58.js";function ke(o,s,l){const a=o.slice();return a[5]=s[l],a}function he(o,s,l){const a=o.slice();return a[5]=s[l],a}function ve(o,s){let l,a=s[5].code+"",_,u,i,f;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=w(a),u=h(),b(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(g,P){d(g,l,P),n(l,_),n(l,u),i||(f=Te(l,"click",m),i=!0)},p(g,P){s=g,P&4&&a!==(a=s[5].code+"")&&U(_,a),P&6&&j(l,"active",s[1]===s[5].code)},d(g){g&&p(l),i=!1,f()}}}function we(o,s){let l,a,_,u;return a=new De({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ge(a.$$.fragment),_=h(),b(l,"class","tab-item"),j(l,"active",s[1]===s[5].code),this.first=l},m(i,f){d(i,l,f),Pe(a,l,null),n(l,_),u=!0},p(i,f){s=i;const m={};f&4&&(m.content=s[5].body),a.$set(m),(!u||f&6)&&j(l,"active",s[1]===s[5].code)},i(i){u||(ee(a.$$.fragment,i),u=!0)},o(i){te(a.$$.fragment,i),u=!1},d(i){i&&p(l),Se(a)}}}function Be(o){var fe,me;let s,l,a=o[0].name+"",_,u,i,f,m,g,P,q=o[0].name+"",H,se,le,L,Q,S,z,N,G,R,B,ae,M,W,ne,J,F=o[0].name+"",V,oe,X,$,Y,E,Z,y,x,O,A,v=[],ie=new Map,ce,T,k=[],re=new Map,C;S=new qe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmVerificationDocs-a322811f.js b/ui/dist/assets/ConfirmVerificationDocs-a6b36296.js similarity index 97% rename from ui/dist/assets/ConfirmVerificationDocs-a322811f.js rename to ui/dist/assets/ConfirmVerificationDocs-a6b36296.js index f51fa5b5..d3d069f6 100644 --- a/ui/dist/assets/ConfirmVerificationDocs-a322811f.js +++ b/ui/dist/assets/ConfirmVerificationDocs-a6b36296.js @@ -1,4 +1,4 @@ -import{S as Se,i as Te,s as Be,O as D,e as r,w as g,b as k,c as ye,f as h,g as f,h as n,m as Ce,x as H,P as ke,Q as Re,k as qe,R as Oe,n as Ee,t as x,a as ee,o as d,d as Pe,C as Ne,p as Ve,r as F,u as Ke,N as Me}from"./index-e4747107.js";import{S as Ae}from"./SdkTabs-2f78bf19.js";function ve(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function we(o,l){let s,a=l[5].code+"",b,m,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),b=g(a),m=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(w,$){f(w,s,$),n(s,b),n(s,m),i||(p=Ke(s,"click",u),i=!0)},p(w,$){l=w,$&4&&a!==(a=l[5].code+"")&&H(b,a),$&6&&F(s,"active",l[1]===l[5].code)},d(w){w&&d(s),i=!1,p()}}}function $e(o,l){let s,a,b,m;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ye(a.$$.fragment),b=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(i,p){f(i,s,p),Ce(a,s,null),n(s,b),m=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!m||p&6)&&F(s,"active",l[1]===l[5].code)},i(i){m||(x(a.$$.fragment,i),m=!0)},o(i){ee(a.$$.fragment,i),m=!1},d(i){i&&d(s),Pe(a)}}}function Ue(o){var fe,de,pe,ue;let l,s,a=o[0].name+"",b,m,i,p,u,w,$,K=o[0].name+"",I,te,L,y,Q,T,z,C,M,le,A,B,se,G,U=o[0].name+"",J,ae,W,R,X,q,Y,O,Z,P,E,v=[],oe=new Map,ne,N,_=[],ie=new Map,S;y=new Ae({props:{js:` +import{S as Se,i as Te,s as Be,O as D,e as r,w as g,b as k,c as ye,f as h,g as f,h as n,m as Ce,x as H,P as ke,Q as Re,k as qe,R as Oe,n as Ee,t as x,a as ee,o as d,d as Pe,C as Ne,p as Ve,r as F,u as Ke,N as Me}from"./index-7d33ef4c.js";import{S as Ae}from"./SdkTabs-f0532e58.js";function ve(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function we(o,l){let s,a=l[5].code+"",b,m,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),b=g(a),m=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(w,$){f(w,s,$),n(s,b),n(s,m),i||(p=Ke(s,"click",u),i=!0)},p(w,$){l=w,$&4&&a!==(a=l[5].code+"")&&H(b,a),$&6&&F(s,"active",l[1]===l[5].code)},d(w){w&&d(s),i=!1,p()}}}function $e(o,l){let s,a,b,m;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ye(a.$$.fragment),b=k(),h(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(i,p){f(i,s,p),Ce(a,s,null),n(s,b),m=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!m||p&6)&&F(s,"active",l[1]===l[5].code)},i(i){m||(x(a.$$.fragment,i),m=!0)},o(i){ee(a.$$.fragment,i),m=!1},d(i){i&&d(s),Pe(a)}}}function Ue(o){var fe,de,pe,ue;let l,s,a=o[0].name+"",b,m,i,p,u,w,$,K=o[0].name+"",I,te,L,y,Q,T,z,C,M,le,A,B,se,G,U=o[0].name+"",J,ae,W,R,X,q,Y,O,Z,P,E,v=[],oe=new Map,ne,N,_=[],ie=new Map,S;y=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/CreateApiDocs-746c5ba6.js b/ui/dist/assets/CreateApiDocs-0d934784.js similarity index 98% rename from ui/dist/assets/CreateApiDocs-746c5ba6.js rename to ui/dist/assets/CreateApiDocs-0d934784.js index f82bce96..0c0b22dd 100644 --- a/ui/dist/assets/CreateApiDocs-746c5ba6.js +++ b/ui/dist/assets/CreateApiDocs-0d934784.js @@ -1,4 +1,4 @@ -import{S as qt,i as Ot,s as Mt,C as Q,O as ne,N as Tt,e as i,w as _,b as u,c as _e,f as v,g as r,h as n,m as he,x,P as Be,Q as ht,k as Ht,R as Lt,n as Pt,t as ue,a as fe,o as d,d as ke,p as Ft,r as ye,u as Rt,y as ae}from"./index-e4747107.js";import{S as At}from"./SdkTabs-2f78bf19.js";import{F as Bt}from"./FieldsQueryParam-d60af536.js";function kt(o,e,t){const a=o.slice();return a[8]=e[t],a}function yt(o,e,t){const a=o.slice();return a[8]=e[t],a}function vt(o,e,t){const a=o.slice();return a[13]=e[t],a}function gt(o){let e;return{c(){e=i("p"),e.innerHTML="Requires admin Authorization:TOKEN header",v(e,"class","txt-hint txt-sm txt-right")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function wt(o){let e,t,a,f,m,c,p,y,S,T,w,H,D,E,P,I,j,B,$,N,q,g,b;function O(h,C){var ee,K;return(K=(ee=h[0])==null?void 0:ee.options)!=null&&K.requireEmail?Dt:jt}let z=O(o),F=z(o);return{c(){e=i("tr"),e.innerHTML='Auth fields',t=u(),a=i("tr"),a.innerHTML=`
Optional username
String The username of the auth record. +import{S as qt,i as Ot,s as Mt,C as Q,O as ne,N as Tt,e as i,w as _,b as u,c as _e,f as v,g as r,h as n,m as he,x,P as Be,Q as ht,k as Ht,R as Lt,n as Pt,t as ue,a as fe,o as d,d as ke,p as Ft,r as ye,u as Rt,y as ae}from"./index-7d33ef4c.js";import{S as At}from"./SdkTabs-f0532e58.js";import{F as Bt}from"./FieldsQueryParam-f6b769d1.js";function kt(o,e,t){const a=o.slice();return a[8]=e[t],a}function yt(o,e,t){const a=o.slice();return a[8]=e[t],a}function vt(o,e,t){const a=o.slice();return a[13]=e[t],a}function gt(o){let e;return{c(){e=i("p"),e.innerHTML="Requires admin Authorization:TOKEN header",v(e,"class","txt-hint txt-sm txt-right")},m(t,a){r(t,e,a)},d(t){t&&d(e)}}}function wt(o){let e,t,a,f,m,c,p,y,S,T,w,H,D,E,P,I,j,B,$,N,q,g,b;function O(h,C){var ee,K;return(K=(ee=h[0])==null?void 0:ee.options)!=null&&K.requireEmail?Dt:jt}let z=O(o),F=z(o);return{c(){e=i("tr"),e.innerHTML='Auth fields',t=u(),a=i("tr"),a.innerHTML=`
Optional username
String The username of the auth record.
If not set, it will be auto generated.`,f=u(),m=i("tr"),c=i("td"),p=i("div"),F.c(),y=u(),S=i("span"),S.textContent="email",T=u(),w=i("td"),w.innerHTML='String',H=u(),D=i("td"),D.textContent="Auth record email address.",E=u(),P=i("tr"),P.innerHTML='
Optional emailVisibility
Boolean Whether to show/hide the auth record email when fetching the record data.',I=u(),j=i("tr"),j.innerHTML='
Required password
String Auth record password.',B=u(),$=i("tr"),$.innerHTML='
Required passwordConfirm
String Auth record password confirmation.',N=u(),q=i("tr"),q.innerHTML=`
Optional verified
Boolean Indicates whether the auth record is verified or not.
diff --git a/ui/dist/assets/DeleteApiDocs-3ab8e763.js b/ui/dist/assets/DeleteApiDocs-fd29a801.js similarity index 97% rename from ui/dist/assets/DeleteApiDocs-3ab8e763.js rename to ui/dist/assets/DeleteApiDocs-fd29a801.js index a2b0d54e..7334dc1c 100644 --- a/ui/dist/assets/DeleteApiDocs-3ab8e763.js +++ b/ui/dist/assets/DeleteApiDocs-fd29a801.js @@ -1,4 +1,4 @@ -import{S as Re,i as Pe,s as Ee,O as j,e as c,w as y,b as k,c as De,f as m,g as p,h as i,m as Ce,x as ee,P as he,Q as Oe,k as Te,R as Be,n as Ie,t as te,a as le,o as u,d as we,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-e4747107.js";import{S as He}from"./SdkTabs-2f78bf19.js";function ke(a,l,s){const o=a.slice();return o[6]=l[s],o}function ge(a,l,s){const o=a.slice();return o[6]=l[s],o}function ve(a){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,o){p(s,l,o)},d(s){s&&u(l)}}}function ye(a,l){let s,o,h;function d(){return l[5](l[6])}return{key:a,first:null,c(){s=c("button"),s.textContent=`${l[6].code} `,m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),o||(h=Se(s,"click",d),o=!0)},p(n,r){l=n,r&20&&N(s,"active",l[2]===l[6].code)},d(n){n&&u(s),o=!1,h()}}}function $e(a,l){let s,o,h,d;return o=new qe({props:{content:l[6].body}}),{key:a,first:null,c(){s=c("div"),De(o.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),Ce(o,s,null),i(s,h),d=!0},p(n,r){l=n,(!d||r&20)&&N(s,"active",l[2]===l[6].code)},i(n){d||(te(o.$$.fragment,n),d=!0)},o(n){le(o.$$.fragment,n),d=!1},d(n){n&&u(s),we(o)}}}function Le(a){var ue,me;let l,s,o=a[0].name+"",h,d,n,r,$,D,z,S=a[0].name+"",F,se,K,C,Q,E,G,g,q,ae,H,P,oe,J,L=a[0].name+"",V,ne,W,ie,X,O,Y,T,Z,B,x,w,I,v=[],ce=new Map,de,A,b=[],re=new Map,R;C=new He({props:{js:` +import{S as Re,i as Pe,s as Ee,O as j,e as c,w as y,b as k,c as De,f as m,g as p,h as i,m as Ce,x as ee,P as he,Q as Oe,k as Te,R as Be,n as Ie,t as te,a as le,o as u,d as we,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index-7d33ef4c.js";import{S as He}from"./SdkTabs-f0532e58.js";function ke(a,l,s){const o=a.slice();return o[6]=l[s],o}function ge(a,l,s){const o=a.slice();return o[6]=l[s],o}function ve(a){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,o){p(s,l,o)},d(s){s&&u(l)}}}function ye(a,l){let s,o,h;function d(){return l[5](l[6])}return{key:a,first:null,c(){s=c("button"),s.textContent=`${l[6].code} `,m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),o||(h=Se(s,"click",d),o=!0)},p(n,r){l=n,r&20&&N(s,"active",l[2]===l[6].code)},d(n){n&&u(s),o=!1,h()}}}function $e(a,l){let s,o,h,d;return o=new qe({props:{content:l[6].body}}),{key:a,first:null,c(){s=c("div"),De(o.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(n,r){p(n,s,r),Ce(o,s,null),i(s,h),d=!0},p(n,r){l=n,(!d||r&20)&&N(s,"active",l[2]===l[6].code)},i(n){d||(te(o.$$.fragment,n),d=!0)},o(n){le(o.$$.fragment,n),d=!1},d(n){n&&u(s),we(o)}}}function Le(a){var ue,me;let l,s,o=a[0].name+"",h,d,n,r,$,D,z,S=a[0].name+"",F,se,K,C,Q,E,G,g,q,ae,H,P,oe,J,L=a[0].name+"",V,ne,W,ie,X,O,Y,T,Z,B,x,w,I,v=[],ce=new Map,de,A,b=[],re=new Map,R;C=new He({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/FieldsQueryParam-d60af536.js b/ui/dist/assets/FieldsQueryParam-f6b769d1.js similarity index 95% rename from ui/dist/assets/FieldsQueryParam-d60af536.js rename to ui/dist/assets/FieldsQueryParam-f6b769d1.js index 1644001f..babdc6b1 100644 --- a/ui/dist/assets/FieldsQueryParam-d60af536.js +++ b/ui/dist/assets/FieldsQueryParam-f6b769d1.js @@ -1,4 +1,4 @@ -import{S as L,i as S,s as k,N as E,e as s,b as o,w as $,c as F,f as H,g as M,h as e,m as T,y as q,t as N,a as B,o as I,d as J}from"./index-e4747107.js";function O(v){let t,i,x,p,g,n,a,h,c,_,r,b,f,y,u,C,m,d;return r=new E({props:{content:` +import{S as L,i as S,s as k,N as E,e as s,b as o,w as $,c as F,f as H,g as M,h as e,m as T,y as q,t as N,a as B,o as I,d as J}from"./index-7d33ef4c.js";function O(v){let t,i,x,p,g,n,a,h,c,_,r,b,f,y,u,C,m,d;return r=new E({props:{content:` ?fields=*,expand.relField.name `}}),{c(){t=s("tr"),i=s("td"),i.textContent="fields",x=o(),p=s("td"),p.innerHTML='String',g=o(),n=s("td"),a=s("p"),h=$(`Comma separated string of the fields to return in the JSON response `),c=s("em"),c.textContent="(by default returns all fields)",_=$(`. Ex.: diff --git a/ui/dist/assets/FilterAutocompleteInput-f3198726.js b/ui/dist/assets/FilterAutocompleteInput-288f3849.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput-f3198726.js rename to ui/dist/assets/FilterAutocompleteInput-288f3849.js index e4a7fdcf..2bf17dcf 100644 --- a/ui/dist/assets/FilterAutocompleteInput-f3198726.js +++ b/ui/dist/assets/FilterAutocompleteInput-288f3849.js @@ -1 +1 @@ -import{S as se,i as ae,s as le,e as ue,f as ce,g as de,y as M,o as fe,J as he,K as ge,L as pe,I as ye,C as f,M as ke}from"./index-e4747107.js";import{E as K,a as C,h as xe,b as me,c as be,d as we,e as Ee,s as Se,f as Ke,g as Ce,r as qe,i as Re,k as Le,j as Ie,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as L,S as Me,t as De}from"./index-30dee195.js";function He(e){Z(e,"start");var r={},n=e.languageData||{},p=!1;for(var y in e)if(y!=n&&e.hasOwnProperty(y))for(var h=r[y]=[],s=e[y],i=0;i2&&s.token&&typeof s.token!="string"){n.pending=[];for(var a=2;a-1)return null;var y=n.indent.length-1,h=e[n.state];e:for(;;){for(var s=0;sn(21,p=t));const y=pe();let{id:h=""}=r,{value:s=""}=r,{disabled:i=!1}=r,{placeholder:l=""}=r,{baseCollection:a=null}=r,{singleLine:m=!1}=r,{extraAutocompleteKeys:I=[]}=r,{disableRequestKeys:w=!1}=r,{disableIndirectCollectionsKeys:E=!1}=r,d,b,A=i,D=new L,H=new L,F=new L,T=new L,q=[],U=[],W=[],N=[],R="",B="";function O(){d==null||d.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{q=$(p),N=ee(),U=w?[]:te(),W=E?[]:ne()},300)}function $(t){let o=t.slice();return a&&f.pushOrReplaceByKey(o,a,"id"),o}function J(){b==null||b.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0}))}function P(){if(!h)return;const t=document.querySelectorAll('[for="'+h+'"]');for(let o of t)o.removeEventListener("click",O)}function V(){if(!h)return;P();const t=document.querySelectorAll('[for="'+h+'"]');for(let o of t)o.addEventListener("click",O)}function S(t,o="",c=0){var x,z,Q;let g=q.find(k=>k.name==t||k.id==t);if(!g||c>=4)return[];let u=f.getAllCollectionIdentifiers(g,o);for(const k of(g==null?void 0:g.schema)||[]){const v=o+k.name;if(k.type==="relation"&&((x=k.options)!=null&&x.collectionId)){const X=S(k.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}k.type==="select"&&((z=k.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=k.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(k.type)&&u.push(v+":length")}return u}function ee(){return S(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.headers."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const o=q.filter(g=>g.type==="auth");for(const g of o){const u=S(g.id,"@request.auth.");for(const x of u)f.pushUnique(t,x)}const c=["created","updated"];if(a!=null&&a.id){const g=S(a.name,"@request.data.");for(const u of g){t.push(u);const x=u.split(".");x.length===3&&x[2].indexOf(":")===-1&&!c.includes(x[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const o of q){const c="@collection."+o.name+".",g=S(o.name,c);for(const u of g)t.push(u)}return t}function re(t=!0,o=!0){let c=[].concat(I);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),o&&(c=c.concat(W||[])),c.sort(function(g,u){return u.length-g.length}),c}function ie(t){let o=t.matchBefore(/[\'\"\@\w\.]*/);if(o&&o.from==o.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"},{label:"@second"},{label:"@minute"},{label:"@hour"},{label:"@year"},{label:"@day"},{label:"@month"},{label:"@weekday"},{label:"@todayStart"},{label:"@todayEnd"},{label:"@monthStart"},{label:"@monthEnd"},{label:"@yearStart"},{label:"@yearEnd"}];E||c.push({label:"@collection.*",apply:"@collection."});const g=re(!w,!w&&o.text.startsWith("@c"));for(const u of g)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:o.from,options:c}}function G(){return Me.define(He({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:f.escapeRegExp("@now"),token:"keyword"},{regex:f.escapeRegExp("@second"),token:"keyword"},{regex:f.escapeRegExp("@minute"),token:"keyword"},{regex:f.escapeRegExp("@hour"),token:"keyword"},{regex:f.escapeRegExp("@year"),token:"keyword"},{regex:f.escapeRegExp("@day"),token:"keyword"},{regex:f.escapeRegExp("@month"),token:"keyword"},{regex:f.escapeRegExp("@weekday"),token:"keyword"},{regex:f.escapeRegExp("@todayStart"),token:"keyword"},{regex:f.escapeRegExp("@todayEnd"),token:"keyword"},{regex:f.escapeRegExp("@monthStart"),token:"keyword"},{regex:f.escapeRegExp("@monthEnd"),token:"keyword"},{regex:f.escapeRegExp("@yearStart"),token:"keyword"},{regex:f.escapeRegExp("@yearEnd"),token:"keyword"},{regex:f.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:o=>{m&&y("submit",s)}};return V(),n(11,d=new K({parent:b,state:C.create({doc:s,extensions:[xe(),me(),be(),we(),Ee(),C.allowMultipleSelections.of(!0),Se(De,{fallback:!0}),Ke(),Ce(),qe(),Re(),Le.of([t,...Ie,...Ae,Be.find(o=>o.key==="Mod-d"),...Oe,..._e]),K.lineWrapping,ve({override:[ie],icons:!1}),T.of(Y(l)),H.of(K.editable.of(!i)),F.of(C.readOnly.of(i)),D.of(G()),C.transactionFilter.of(o=>m&&o.newDoc.lines>1?[]:o),K.updateListener.of(o=>{!o.docChanged||i||(n(1,s=o.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),d==null||d.destroy()}});function oe(t){ke[t?"unshift":"push"](()=>{b=t,n(0,b)})}return e.$$set=t=>{"id"in t&&n(2,h=t.id),"value"in t&&n(1,s=t.value),"disabled"in t&&n(3,i=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,m=t.singleLine),"extraAutocompleteKeys"in t&&n(7,I=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,w=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,E=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,R=Pe(a)),e.$$.dirty[0]&25352&&!i&&(B!=R||w!==-1||E!==-1)&&(n(14,B=R),j()),e.$$.dirty[0]&4&&h&&V(),e.$$.dirty[0]&2080&&d&&a!=null&&a.schema&&d.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&d&&A!=i&&(d.dispatch({effects:[H.reconfigure(K.editable.of(!i)),F.reconfigure(C.readOnly.of(i))]}),n(12,A=i),J()),e.$$.dirty[0]&2050&&d&&s!=d.state.doc.toString()&&d.dispatch({changes:{from:0,to:d.state.doc.length,insert:s}}),e.$$.dirty[0]&2064&&d&&typeof l<"u"&&d.dispatch({effects:[T.reconfigure(Y(l))]})},[b,s,h,i,l,a,m,I,w,E,O,d,A,R,B,oe]}class Qe extends se{constructor(r){super(),ae(this,r,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; +import{S as se,i as ae,s as le,e as ue,f as ce,g as de,y as M,o as fe,J as he,K as ge,L as pe,I as ye,C as f,M as ke}from"./index-7d33ef4c.js";import{E as K,a as C,h as xe,b as me,c as be,d as we,e as Ee,s as Se,f as Ke,g as Ce,r as qe,i as Re,k as Le,j as Ie,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as L,S as Me,t as De}from"./index-30dee195.js";function He(e){Z(e,"start");var r={},n=e.languageData||{},p=!1;for(var y in e)if(y!=n&&e.hasOwnProperty(y))for(var h=r[y]=[],s=e[y],i=0;i2&&s.token&&typeof s.token!="string"){n.pending=[];for(var a=2;a-1)return null;var y=n.indent.length-1,h=e[n.state];e:for(;;){for(var s=0;sn(21,p=t));const y=pe();let{id:h=""}=r,{value:s=""}=r,{disabled:i=!1}=r,{placeholder:l=""}=r,{baseCollection:a=null}=r,{singleLine:m=!1}=r,{extraAutocompleteKeys:I=[]}=r,{disableRequestKeys:w=!1}=r,{disableIndirectCollectionsKeys:E=!1}=r,d,b,A=i,D=new L,H=new L,F=new L,T=new L,q=[],U=[],W=[],N=[],R="",B="";function O(){d==null||d.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{q=$(p),N=ee(),U=w?[]:te(),W=E?[]:ne()},300)}function $(t){let o=t.slice();return a&&f.pushOrReplaceByKey(o,a,"id"),o}function J(){b==null||b.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0}))}function P(){if(!h)return;const t=document.querySelectorAll('[for="'+h+'"]');for(let o of t)o.removeEventListener("click",O)}function V(){if(!h)return;P();const t=document.querySelectorAll('[for="'+h+'"]');for(let o of t)o.addEventListener("click",O)}function S(t,o="",c=0){var x,z,Q;let g=q.find(k=>k.name==t||k.id==t);if(!g||c>=4)return[];let u=f.getAllCollectionIdentifiers(g,o);for(const k of(g==null?void 0:g.schema)||[]){const v=o+k.name;if(k.type==="relation"&&((x=k.options)!=null&&x.collectionId)){const X=S(k.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}k.type==="select"&&((z=k.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=k.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(k.type)&&u.push(v+":length")}return u}function ee(){return S(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.headers."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const o=q.filter(g=>g.type==="auth");for(const g of o){const u=S(g.id,"@request.auth.");for(const x of u)f.pushUnique(t,x)}const c=["created","updated"];if(a!=null&&a.id){const g=S(a.name,"@request.data.");for(const u of g){t.push(u);const x=u.split(".");x.length===3&&x[2].indexOf(":")===-1&&!c.includes(x[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const o of q){const c="@collection."+o.name+".",g=S(o.name,c);for(const u of g)t.push(u)}return t}function re(t=!0,o=!0){let c=[].concat(I);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),o&&(c=c.concat(W||[])),c.sort(function(g,u){return u.length-g.length}),c}function ie(t){let o=t.matchBefore(/[\'\"\@\w\.]*/);if(o&&o.from==o.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"},{label:"@second"},{label:"@minute"},{label:"@hour"},{label:"@year"},{label:"@day"},{label:"@month"},{label:"@weekday"},{label:"@todayStart"},{label:"@todayEnd"},{label:"@monthStart"},{label:"@monthEnd"},{label:"@yearStart"},{label:"@yearEnd"}];E||c.push({label:"@collection.*",apply:"@collection."});const g=re(!w,!w&&o.text.startsWith("@c"));for(const u of g)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:o.from,options:c}}function G(){return Me.define(He({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:f.escapeRegExp("@now"),token:"keyword"},{regex:f.escapeRegExp("@second"),token:"keyword"},{regex:f.escapeRegExp("@minute"),token:"keyword"},{regex:f.escapeRegExp("@hour"),token:"keyword"},{regex:f.escapeRegExp("@year"),token:"keyword"},{regex:f.escapeRegExp("@day"),token:"keyword"},{regex:f.escapeRegExp("@month"),token:"keyword"},{regex:f.escapeRegExp("@weekday"),token:"keyword"},{regex:f.escapeRegExp("@todayStart"),token:"keyword"},{regex:f.escapeRegExp("@todayEnd"),token:"keyword"},{regex:f.escapeRegExp("@monthStart"),token:"keyword"},{regex:f.escapeRegExp("@monthEnd"),token:"keyword"},{regex:f.escapeRegExp("@yearStart"),token:"keyword"},{regex:f.escapeRegExp("@yearEnd"),token:"keyword"},{regex:f.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:o=>{m&&y("submit",s)}};return V(),n(11,d=new K({parent:b,state:C.create({doc:s,extensions:[xe(),me(),be(),we(),Ee(),C.allowMultipleSelections.of(!0),Se(De,{fallback:!0}),Ke(),Ce(),qe(),Re(),Le.of([t,...Ie,...Ae,Be.find(o=>o.key==="Mod-d"),...Oe,..._e]),K.lineWrapping,ve({override:[ie],icons:!1}),T.of(Y(l)),H.of(K.editable.of(!i)),F.of(C.readOnly.of(i)),D.of(G()),C.transactionFilter.of(o=>m&&o.newDoc.lines>1?[]:o),K.updateListener.of(o=>{!o.docChanged||i||(n(1,s=o.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),d==null||d.destroy()}});function oe(t){ke[t?"unshift":"push"](()=>{b=t,n(0,b)})}return e.$$set=t=>{"id"in t&&n(2,h=t.id),"value"in t&&n(1,s=t.value),"disabled"in t&&n(3,i=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,m=t.singleLine),"extraAutocompleteKeys"in t&&n(7,I=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,w=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,E=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,R=Pe(a)),e.$$.dirty[0]&25352&&!i&&(B!=R||w!==-1||E!==-1)&&(n(14,B=R),j()),e.$$.dirty[0]&4&&h&&V(),e.$$.dirty[0]&2080&&d&&a!=null&&a.schema&&d.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&d&&A!=i&&(d.dispatch({effects:[H.reconfigure(K.editable.of(!i)),F.reconfigure(C.readOnly.of(i))]}),n(12,A=i),J()),e.$$.dirty[0]&2050&&d&&s!=d.state.doc.toString()&&d.dispatch({changes:{from:0,to:d.state.doc.length,insert:s}}),e.$$.dirty[0]&2064&&d&&typeof l<"u"&&d.dispatch({effects:[T.reconfigure(Y(l))]})},[b,s,h,i,l,a,m,I,w,E,O,d,A,R,B,oe]}class Qe extends se{constructor(r){super(),ae(this,r,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; diff --git a/ui/dist/assets/ListApiDocs-d3bbf1bc.js b/ui/dist/assets/ListApiDocs-3cd045c1.js similarity index 99% rename from ui/dist/assets/ListApiDocs-d3bbf1bc.js rename to ui/dist/assets/ListApiDocs-3cd045c1.js index 3d62c40a..2886f113 100644 --- a/ui/dist/assets/ListApiDocs-d3bbf1bc.js +++ b/ui/dist/assets/ListApiDocs-3cd045c1.js @@ -1,4 +1,4 @@ -import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,u as ll,y as Qe,o as m,w as _,h as t,N as Fe,O as se,c as Qt,m as Ut,x as ke,P as Ue,Q as nl,k as ol,R as al,n as il,t as $t,a as Ct,d as jt,T as rl,C as ve,p as cl,r as Le}from"./index-e4747107.js";import{S as dl}from"./SdkTabs-2f78bf19.js";import{F as pl}from"./FieldsQueryParam-d60af536.js";function fl(d){let n,o,i;return{c(){n=e("span"),n.textContent="Show details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-down-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function ul(d){let n,o,i;return{c(){n=e("span"),n.textContent="Hide details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-up-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function je(d){let n,o,i,f,h,r,b,$,C,g,p,tt,kt,zt,E,Kt,H,rt,R,et,ne,Q,U,oe,ct,yt,lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,St,O,mt,ce,z,Et,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,S,Bt,$e,Z,v,Gt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format +import{S as Ze,i as tl,s as el,e,b as s,E as sl,f as a,g as u,u as ll,y as Qe,o as m,w as _,h as t,N as Fe,O as se,c as Qt,m as Ut,x as ke,P as Ue,Q as nl,k as ol,R as al,n as il,t as $t,a as Ct,d as jt,T as rl,C as ve,p as cl,r as Le}from"./index-7d33ef4c.js";import{S as dl}from"./SdkTabs-f0532e58.js";import{F as pl}from"./FieldsQueryParam-f6b769d1.js";function fl(d){let n,o,i;return{c(){n=e("span"),n.textContent="Show details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-down-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function ul(d){let n,o,i;return{c(){n=e("span"),n.textContent="Hide details",o=s(),i=e("i"),a(n,"class","txt"),a(i,"class","ri-arrow-up-s-line")},m(f,h){u(f,n,h),u(f,o,h),u(f,i,h)},d(f){f&&(m(n),m(o),m(i))}}}function je(d){let n,o,i,f,h,r,b,$,C,g,p,tt,kt,zt,E,Kt,H,rt,R,et,ne,Q,U,oe,ct,yt,lt,vt,ae,dt,pt,st,N,Jt,Ft,y,nt,Lt,Vt,At,j,ot,Tt,Wt,Pt,F,ft,Rt,ie,ut,re,M,Ot,at,St,O,mt,ce,z,Et,Xt,Nt,de,q,Yt,K,ht,pe,I,fe,B,ue,P,qt,J,bt,me,gt,he,x,Dt,it,Ht,be,Mt,Zt,V,_t,ge,It,_e,wt,we,W,G,xe,xt,te,X,ee,L,Y,S,Bt,$e,Z,v,Gt;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,o=s(),i=e("ul"),f=e("li"),f.innerHTML=`OPERAND - could be any of the above field literal, string (single or double quoted), number, null, true, false`,h=s(),r=e("li"),b=e("code"),b.textContent="OPERATOR",$=_(` - is one of: `),C=e("br"),g=s(),p=e("ul"),tt=e("li"),kt=e("code"),kt.textContent="=",zt=s(),E=e("span"),E.textContent="Equal",Kt=s(),H=e("li"),rt=e("code"),rt.textContent="!=",R=s(),et=e("span"),et.textContent="NOT equal",ne=s(),Q=e("li"),U=e("code"),U.textContent=">",oe=s(),ct=e("span"),ct.textContent="Greater than",yt=s(),lt=e("li"),vt=e("code"),vt.textContent=">=",ae=s(),dt=e("span"),dt.textContent="Greater than or equal",pt=s(),st=e("li"),N=e("code"),N.textContent="<",Jt=s(),Ft=e("span"),Ft.textContent="Less than",y=s(),nt=e("li"),Lt=e("code"),Lt.textContent="<=",Vt=s(),At=e("span"),At.textContent="Less than or equal",j=s(),ot=e("li"),Tt=e("code"),Tt.textContent="~",Wt=s(),Pt=e("span"),Pt.textContent=`Like/Contains (if not specified auto wraps the right string OPERAND in a "%" for diff --git a/ui/dist/assets/ListExternalAuthsDocs-0d778e72.js b/ui/dist/assets/ListExternalAuthsDocs-2258a5ea.js similarity index 97% rename from ui/dist/assets/ListExternalAuthsDocs-0d778e72.js rename to ui/dist/assets/ListExternalAuthsDocs-2258a5ea.js index 1ee0ed13..6e21ba96 100644 --- a/ui/dist/assets/ListExternalAuthsDocs-0d778e72.js +++ b/ui/dist/assets/ListExternalAuthsDocs-2258a5ea.js @@ -1,4 +1,4 @@ -import{S as ze,i as Qe,s as Ue,O as F,e as i,w as v,b as m,c as pe,f as b,g as c,h as a,m as ue,x as N,P as Oe,Q as je,k as Fe,R as Ne,n as Ge,t as G,a as K,o as d,d as me,C as Ke,p as Je,r as J,u as Ve,N as Xe}from"./index-e4747107.js";import{S as Ye}from"./SdkTabs-2f78bf19.js";import{F as Ze}from"./FieldsQueryParam-d60af536.js";function De(o,l,s){const n=o.slice();return n[5]=l[s],n}function He(o,l,s){const n=o.slice();return n[5]=l[s],n}function Re(o,l){let s,n=l[5].code+"",f,_,r,u;function h(){return l[4](l[5])}return{key:o,first:null,c(){s=i("button"),f=v(n),_=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(w,y){c(w,s,y),a(s,f),a(s,_),r||(u=Ve(s,"click",h),r=!0)},p(w,y){l=w,y&4&&n!==(n=l[5].code+"")&&N(f,n),y&6&&J(s,"active",l[1]===l[5].code)},d(w){w&&d(s),r=!1,u()}}}function We(o,l){let s,n,f,_;return n=new Xe({props:{content:l[5].body}}),{key:o,first:null,c(){s=i("div"),pe(n.$$.fragment),f=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(r,u){c(r,s,u),ue(n,s,null),a(s,f),_=!0},p(r,u){l=r;const h={};u&4&&(h.content=l[5].body),n.$set(h),(!_||u&6)&&J(s,"active",l[1]===l[5].code)},i(r){_||(G(n.$$.fragment,r),_=!0)},o(r){K(n.$$.fragment,r),_=!1},d(r){r&&d(s),me(n)}}}function xe(o){var Ce,Se,Ee,Ie;let l,s,n=o[0].name+"",f,_,r,u,h,w,y,R=o[0].name+"",V,be,fe,X,Y,P,Z,I,x,$,W,he,z,T,_e,ee,Q=o[0].name+"",te,ke,le,ve,ge,U,se,B,ae,q,oe,L,ne,A,ie,$e,ce,E,de,M,re,C,O,g=[],we=new Map,ye,D,k=[],Pe=new Map,S;P=new Ye({props:{js:` +import{S as ze,i as Qe,s as Ue,O as F,e as i,w as v,b as m,c as pe,f as b,g as c,h as a,m as ue,x as N,P as Oe,Q as je,k as Fe,R as Ne,n as Ge,t as G,a as K,o as d,d as me,C as Ke,p as Je,r as J,u as Ve,N as Xe}from"./index-7d33ef4c.js";import{S as Ye}from"./SdkTabs-f0532e58.js";import{F as Ze}from"./FieldsQueryParam-f6b769d1.js";function De(o,l,s){const n=o.slice();return n[5]=l[s],n}function He(o,l,s){const n=o.slice();return n[5]=l[s],n}function Re(o,l){let s,n=l[5].code+"",f,_,r,u;function h(){return l[4](l[5])}return{key:o,first:null,c(){s=i("button"),f=v(n),_=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(w,y){c(w,s,y),a(s,f),a(s,_),r||(u=Ve(s,"click",h),r=!0)},p(w,y){l=w,y&4&&n!==(n=l[5].code+"")&&N(f,n),y&6&&J(s,"active",l[1]===l[5].code)},d(w){w&&d(s),r=!1,u()}}}function We(o,l){let s,n,f,_;return n=new Xe({props:{content:l[5].body}}),{key:o,first:null,c(){s=i("div"),pe(n.$$.fragment),f=m(),b(s,"class","tab-item"),J(s,"active",l[1]===l[5].code),this.first=s},m(r,u){c(r,s,u),ue(n,s,null),a(s,f),_=!0},p(r,u){l=r;const h={};u&4&&(h.content=l[5].body),n.$set(h),(!_||u&6)&&J(s,"active",l[1]===l[5].code)},i(r){_||(G(n.$$.fragment,r),_=!0)},o(r){K(n.$$.fragment,r),_=!1},d(r){r&&d(s),me(n)}}}function xe(o){var Ce,Se,Ee,Ie;let l,s,n=o[0].name+"",f,_,r,u,h,w,y,R=o[0].name+"",V,be,fe,X,Y,P,Z,I,x,$,W,he,z,T,_e,ee,Q=o[0].name+"",te,ke,le,ve,ge,U,se,B,ae,q,oe,L,ne,A,ie,$e,ce,E,de,M,re,C,O,g=[],we=new Map,ye,D,k=[],Pe=new Map,S;P=new Ye({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-06419df4.js b/ui/dist/assets/PageAdminConfirmPasswordReset-8e3ad9f6.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset-06419df4.js rename to ui/dist/assets/PageAdminConfirmPasswordReset-8e3ad9f6.js index 447adee0..51b5cd0d 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset-06419df4.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset-8e3ad9f6.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as R,m as A,t as B,a as N,d as T,C as M,q as J,e as _,w as P,b as k,f,r as L,g as b,h as c,u as j,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 q}from"./index-e4747107.js";function y(i){let e,n,s;return{c(){e=P("for "),n=_("strong"),s=P(i[3]),f(n,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,n,t),c(n,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&(w(e),w(n))}}}function x(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0,t.autofocus=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[0]),t.focus(),p||(d=j(t,"input",i[6]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&1&&t.value!==r[0]&&q(t,r[0])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function ee(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password confirm"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[1]),p||(d=j(t,"input",i[7]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&2&&t.value!==r[1]&&q(t,r[1])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function te(i){let e,n,s,l,t,u,p,d,r,a,g,S,C,v,h,F,z,m=i[3]&&y(i);return u=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),{c(){e=_("form"),n=_("div"),s=_("h4"),l=P(`Reset your admin password +import{S as E,i as G,s as I,F as K,c as R,m as A,t as B,a as N,d as T,C as M,q as J,e as _,w as P,b as k,f,r as L,g as b,h as c,u as j,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 q}from"./index-7d33ef4c.js";function y(i){let e,n,s;return{c(){e=P("for "),n=_("strong"),s=P(i[3]),f(n,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,n,t),c(n,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&(w(e),w(n))}}}function x(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0,t.autofocus=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[0]),t.focus(),p||(d=j(t,"input",i[6]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&1&&t.value!==r[0]&&q(t,r[0])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function ee(i){let e,n,s,l,t,u,p,d;return{c(){e=_("label"),n=P("New password confirm"),l=k(),t=_("input"),f(e,"for",s=i[8]),f(t,"type","password"),f(t,"id",u=i[8]),t.required=!0},m(r,a){b(r,e,a),c(e,n),b(r,l,a),b(r,t,a),q(t,i[1]),p||(d=j(t,"input",i[7]),p=!0)},p(r,a){a&256&&s!==(s=r[8])&&f(e,"for",s),a&256&&u!==(u=r[8])&&f(t,"id",u),a&2&&t.value!==r[1]&&q(t,r[1])},d(r){r&&(w(e),w(l),w(t)),p=!1,d()}}}function te(i){let e,n,s,l,t,u,p,d,r,a,g,S,C,v,h,F,z,m=i[3]&&y(i);return u=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:o})=>({8:o}),({uniqueId:o})=>o?256:0]},$$scope:{ctx:i}}}),{c(){e=_("form"),n=_("div"),s=_("h4"),l=P(`Reset your admin password `),m&&m.c(),t=k(),R(u.$$.fragment),p=k(),R(d.$$.fragment),r=k(),a=_("button"),g=_("span"),g.textContent="Set new password",S=k(),C=_("div"),v=_("a"),v.textContent="Back to login",f(s,"class","m-b-xs"),f(n,"class","content txt-center m-b-sm"),f(g,"class","txt"),f(a,"type","submit"),f(a,"class","btn btn-lg btn-block"),a.disabled=i[2],L(a,"btn-loading",i[2]),f(e,"class","m-b-base"),f(v,"href","/login"),f(v,"class","link-hint"),f(C,"class","content txt-center")},m(o,$){b(o,e,$),c(e,n),c(n,s),c(s,l),m&&m.m(s,null),c(e,t),A(u,e,null),c(e,p),A(d,e,null),c(e,r),c(e,a),c(a,g),b(o,S,$),b(o,C,$),c(C,v),h=!0,F||(z=[j(e,"submit",O(i[4])),Q(U.call(null,v))],F=!0)},p(o,$){o[3]?m?m.p(o,$):(m=y(o),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const D={};$&769&&(D.$$scope={dirty:$,ctx:o}),u.$set(D);const H={};$&770&&(H.$$scope={dirty:$,ctx:o}),d.$set(H),(!h||$&4)&&(a.disabled=o[2]),(!h||$&4)&&L(a,"btn-loading",o[2])},i(o){h||(B(u.$$.fragment,o),B(d.$$.fragment,o),h=!0)},o(o){N(u.$$.fragment,o),N(d.$$.fragment,o),h=!1},d(o){o&&(w(e),w(S),w(C)),m&&m.d(),T(u),T(d),F=!1,V(z)}}}function se(i){let e,n;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:i}}}),{c(){R(e.$$.fragment)},m(s,l){A(e,s,l),n=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){n||(B(e.$$.fragment,s),n=!0)},o(s){N(e.$$.fragment,s),n=!1},d(s){T(e,s)}}}function le(i,e,n){let s,{params:l}=e,t="",u="",p=!1;async function d(){if(!p){n(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,u),X("Successfully set a new admin password."),Y("/")}catch(g){W.error(g)}n(2,p=!1)}}function r(){t=this.value,n(0,t)}function a(){u=this.value,n(1,u)}return i.$$set=g=>{"params"in g&&n(5,l=g.params)},i.$$.update=()=>{i.$$.dirty&32&&n(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,u,p,s,d,l,r,a]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset-f0ee3c1c.js b/ui/dist/assets/PageAdminRequestPasswordReset-9bb5b8fc.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset-f0ee3c1c.js rename to ui/dist/assets/PageAdminRequestPasswordReset-9bb5b8fc.js index 85147cdf..2e6acc8b 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset-f0ee3c1c.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset-9bb5b8fc.js @@ -1 +1 @@ -import{S as M,i as T,s as j,F as z,c as R,m as S,t as w,a as y,d as E,b as v,e as _,f as p,g,h as d,j as A,l as B,k as N,n as D,o as k,p as C,q as G,r as F,u as H,v as I,w as h,x as J,y as P,z as L}from"./index-e4747107.js";function K(u){let e,s,n,l,t,o,c,m,r,a,b,f;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:i})=>({5:i}),({uniqueId:i})=>i?32:0]},$$scope:{ctx:u}}}),{c(){e=_("form"),s=_("div"),s.innerHTML='

Forgotten admin password

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

',n=v(),R(l.$$.fragment),t=v(),o=_("button"),c=_("i"),m=v(),r=_("span"),r.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(c,"class","ri-mail-send-line"),p(r,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=u[1],F(o,"btn-loading",u[1]),p(e,"class","m-b-base")},m(i,$){g(i,e,$),d(e,s),d(e,n),S(l,e,null),d(e,t),d(e,o),d(o,c),d(o,m),d(o,r),a=!0,b||(f=H(e,"submit",I(u[3])),b=!0)},p(i,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:i}),l.$set(q),(!a||$&2)&&(o.disabled=i[1]),(!a||$&2)&&F(o,"btn-loading",i[1])},i(i){a||(w(l.$$.fragment,i),a=!0)},o(i){y(l.$$.fragment,i),a=!1},d(i){i&&k(e),E(l),b=!1,f()}}}function O(u){let e,s,n,l,t,o,c,m,r;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=v(),l=_("div"),t=_("p"),o=h("Check "),c=_("strong"),m=h(u[0]),r=h(" for the recovery link."),p(s,"class","icon"),p(c,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){g(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,c),d(c,m),d(t,r)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&k(e)}}}function Q(u){let e,s,n,l,t,o,c,m;return{c(){e=_("label"),s=h("Email"),l=v(),t=_("input"),p(e,"for",n=u[5]),p(t,"type","email"),p(t,"id",o=u[5]),t.required=!0,t.autofocus=!0},m(r,a){g(r,e,a),d(e,s),g(r,l,a),g(r,t,a),L(t,u[0]),t.focus(),c||(m=H(t,"input",u[4]),c=!0)},p(r,a){a&32&&n!==(n=r[5])&&p(e,"for",n),a&32&&o!==(o=r[5])&&p(t,"id",o),a&1&&t.value!==r[0]&&L(t,r[0])},d(r){r&&(k(e),k(l),k(t)),c=!1,m()}}}function U(u){let e,s,n,l,t,o,c,m;const r=[O,K],a=[];function b(f,i){return f[2]?0:1}return e=b(u),s=a[e]=r[e](u),{c(){s.c(),n=v(),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(f,i){a[e].m(f,i),g(f,n,i),g(f,l,i),d(l,t),o=!0,c||(m=A(B.call(null,t)),c=!0)},p(f,i){let $=e;e=b(f),e===$?a[e].p(f,i):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(f,i):(s=a[e]=r[e](f),s.c()),w(s,1),s.m(n.parentNode,n))},i(f){o||(w(s),o=!0)},o(f){y(s),o=!1},d(f){f&&(k(n),k(l)),a[e].d(f),c=!1,m()}}}function V(u){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:u}}}),{c(){R(e.$$.fragment)},m(n,l){S(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){E(e,n)}}}function W(u,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.error(m)}s(1,l=!1)}}function c(){n=this.value,s(0,n)}return[n,l,t,o,c]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; +import{S as M,i as T,s as j,F as z,c as R,m as S,t as w,a as y,d as E,b as v,e as _,f as p,g,h as d,j as A,l as B,k as N,n as D,o as k,p as C,q as G,r as F,u as H,v as I,w as h,x as J,y as P,z as L}from"./index-7d33ef4c.js";function K(u){let e,s,n,l,t,o,c,m,r,a,b,f;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:i})=>({5:i}),({uniqueId:i})=>i?32:0]},$$scope:{ctx:u}}}),{c(){e=_("form"),s=_("div"),s.innerHTML='

Forgotten admin password

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

',n=v(),R(l.$$.fragment),t=v(),o=_("button"),c=_("i"),m=v(),r=_("span"),r.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(c,"class","ri-mail-send-line"),p(r,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=u[1],F(o,"btn-loading",u[1]),p(e,"class","m-b-base")},m(i,$){g(i,e,$),d(e,s),d(e,n),S(l,e,null),d(e,t),d(e,o),d(o,c),d(o,m),d(o,r),a=!0,b||(f=H(e,"submit",I(u[3])),b=!0)},p(i,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:i}),l.$set(q),(!a||$&2)&&(o.disabled=i[1]),(!a||$&2)&&F(o,"btn-loading",i[1])},i(i){a||(w(l.$$.fragment,i),a=!0)},o(i){y(l.$$.fragment,i),a=!1},d(i){i&&k(e),E(l),b=!1,f()}}}function O(u){let e,s,n,l,t,o,c,m,r;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=v(),l=_("div"),t=_("p"),o=h("Check "),c=_("strong"),m=h(u[0]),r=h(" for the recovery link."),p(s,"class","icon"),p(c,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){g(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,c),d(c,m),d(t,r)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&k(e)}}}function Q(u){let e,s,n,l,t,o,c,m;return{c(){e=_("label"),s=h("Email"),l=v(),t=_("input"),p(e,"for",n=u[5]),p(t,"type","email"),p(t,"id",o=u[5]),t.required=!0,t.autofocus=!0},m(r,a){g(r,e,a),d(e,s),g(r,l,a),g(r,t,a),L(t,u[0]),t.focus(),c||(m=H(t,"input",u[4]),c=!0)},p(r,a){a&32&&n!==(n=r[5])&&p(e,"for",n),a&32&&o!==(o=r[5])&&p(t,"id",o),a&1&&t.value!==r[0]&&L(t,r[0])},d(r){r&&(k(e),k(l),k(t)),c=!1,m()}}}function U(u){let e,s,n,l,t,o,c,m;const r=[O,K],a=[];function b(f,i){return f[2]?0:1}return e=b(u),s=a[e]=r[e](u),{c(){s.c(),n=v(),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(f,i){a[e].m(f,i),g(f,n,i),g(f,l,i),d(l,t),o=!0,c||(m=A(B.call(null,t)),c=!0)},p(f,i){let $=e;e=b(f),e===$?a[e].p(f,i):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(f,i):(s=a[e]=r[e](f),s.c()),w(s,1),s.m(n.parentNode,n))},i(f){o||(w(s),o=!0)},o(f){y(s),o=!1},d(f){f&&(k(n),k(l)),a[e].d(f),c=!1,m()}}}function V(u){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:u}}}),{c(){R(e.$$.fragment)},m(n,l){S(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){E(e,n)}}}function W(u,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.error(m)}s(1,l=!1)}}function c(){n=this.value,s(0,n)}return[n,l,t,o,c]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageOAuth2Redirect-7e9ec082.js b/ui/dist/assets/PageOAuth2Redirect-42a9e5c9.js similarity index 87% rename from ui/dist/assets/PageOAuth2Redirect-7e9ec082.js rename to ui/dist/assets/PageOAuth2Redirect-42a9e5c9.js index ea75a485..02202626 100644 --- a/ui/dist/assets/PageOAuth2Redirect-7e9ec082.js +++ b/ui/dist/assets/PageOAuth2Redirect-42a9e5c9.js @@ -1 +1 @@ -import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,I as h}from"./index-e4747107.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML='

Auth completed.

You can go back to the app if this window is not automatically closed.
',l(t,"class","content txt-hint txt-center p-base")},m(e,a){u(e,t,a)},p:s,i:s,o:s,d(e){e&&d(t)}}}function m(n){return h(()=>{window.close()}),[]}class x extends o{constructor(t){super(),i(this,t,m,f,c,{})}}export{x as default}; +import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,I as h}from"./index-7d33ef4c.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML='

Auth completed.

You can go back to the app if this window is not automatically closed.
',l(t,"class","content txt-hint txt-center p-base")},m(e,a){u(e,t,a)},p:s,i:s,o:s,d(e){e&&d(t)}}}function m(n){return h(()=>{window.close()}),[]}class x extends o{constructor(t){super(),i(this,t,m,f,c,{})}}export{x as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange-55d6b993.js b/ui/dist/assets/PageRecordConfirmEmailChange-9d9126f6.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmEmailChange-55d6b993.js rename to ui/dist/assets/PageRecordConfirmEmailChange-9d9126f6.js index e079b075..03466d16 100644 --- a/ui/dist/assets/PageRecordConfirmEmailChange-55d6b993.js +++ b/ui/dist/assets/PageRecordConfirmEmailChange-9d9126f6.js @@ -1,2 +1,2 @@ -import{S as G,i as I,s as J,F as M,c as S,m as L,t as h,a as v,d as z,C as N,E as R,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as y,b as C,f as p,r as T,h as g,u as P,v as K,y as E,x as O,z as F}from"./index-e4747107.js";function Q(i){let e,t,n,l,s,o,f,a,r,u,k,$,d=i[3]&&H(i);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:c})=>({8:c}),({uniqueId:c})=>c?256:0]},$$scope:{ctx:i}}}),{c(){e=m("form"),t=m("div"),n=m("h5"),l=y(`Type your password to confirm changing your email address +import{S as G,i as I,s as J,F as M,c as S,m as L,t as h,a as v,d as z,C as N,E as R,g as _,k as W,n as Y,o as b,G as j,H as A,p as B,q as D,e as m,w as y,b as C,f as p,r as T,h as g,u as P,v as K,y as E,x as O,z as F}from"./index-7d33ef4c.js";function Q(i){let e,t,n,l,s,o,f,a,r,u,k,$,d=i[3]&&H(i);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:c})=>({8:c}),({uniqueId:c})=>c?256:0]},$$scope:{ctx:i}}}),{c(){e=m("form"),t=m("div"),n=m("h5"),l=y(`Type your password to confirm changing your email address `),d&&d.c(),s=C(),S(o.$$.fragment),f=C(),a=m("button"),r=m("span"),r.textContent="Confirm new email",p(t,"class","content txt-center m-b-base"),p(r,"class","txt"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block"),a.disabled=i[1],T(a,"btn-loading",i[1])},m(c,w){_(c,e,w),g(e,t),g(t,n),g(n,l),d&&d.m(n,null),g(e,s),L(o,e,null),g(e,f),g(e,a),g(a,r),u=!0,k||($=P(e,"submit",K(i[4])),k=!0)},p(c,w){c[3]?d?d.p(c,w):(d=H(c),d.c(),d.m(n,null)):d&&(d.d(1),d=null);const q={};w&769&&(q.$$scope={dirty:w,ctx:c}),o.$set(q),(!u||w&2)&&(a.disabled=c[1]),(!u||w&2)&&T(a,"btn-loading",c[1])},i(c){u||(h(o.$$.fragment,c),u=!0)},o(c){v(o.$$.fragment,c),u=!1},d(c){c&&b(e),d&&d.d(),z(o),k=!1,$()}}}function U(i){let e,t,n,l,s;return{c(){e=m("div"),e.innerHTML='

Successfully changed the user email address.

You can now sign in with your new email address.

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

Successfully changed the user password.

You can now sign in with your new password.

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

Invalid or expired verification token.

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

Successfully verified email address.

',s=_(),e=f("button"),e.textContent="Close",d(t,"class","alert alert-success"),d(e,"type","button"),d(e,"class","btn btn-transparent btn-block")},m(i,o){a(i,t,o),a(i,s,o),a(i,e,o),n||(l=b(e,"click",c[3]),n=!0)},p,d(i){i&&(r(t),r(s),r(e)),n=!1,l()}}}function F(c){let t;return{c(){t=f("div"),t.innerHTML='
Please wait...
',d(t,"class","txt-center")},m(s,e){a(s,t,e)},p,d(s){s&&r(t)}}}function I(c){let t;function s(l,i){return l[1]?F:l[0]?h:S}let e=s(c),n=e(c);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),a(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){l&&r(t),n.d(l)}}}function V(c){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[I]},$$scope:{ctx:c}}}),{c(){C(t.$$.fragment)},m(e,n){x(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function q(c,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const u=new P("../");try{const m=T(e==null?void 0:e.token);await u.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const o=()=>window.close(),k=()=>window.close();return c.$$set=u=>{"params"in u&&s(2,e=u.params)},[n,l,e,o,k]}class G extends v{constructor(t){super(),y(this,t,q,V,g,{params:2})}}export{G as default}; +import{S as v,i as y,s as g,F as w,c as C,m as x,t as $,a as H,d as L,G as P,H as T,E as M,g as a,o as r,e as f,b as _,f as d,u as b,y as p}from"./index-7d33ef4c.js";function S(c){let t,s,e,n,l;return{c(){t=f("div"),t.innerHTML='

Invalid or expired verification token.

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

Successfully verified email address.

',s=_(),e=f("button"),e.textContent="Close",d(t,"class","alert alert-success"),d(e,"type","button"),d(e,"class","btn btn-transparent btn-block")},m(i,o){a(i,t,o),a(i,s,o),a(i,e,o),n||(l=b(e,"click",c[3]),n=!0)},p,d(i){i&&(r(t),r(s),r(e)),n=!1,l()}}}function F(c){let t;return{c(){t=f("div"),t.innerHTML='
Please wait...
',d(t,"class","txt-center")},m(s,e){a(s,t,e)},p,d(s){s&&r(t)}}}function I(c){let t;function s(l,i){return l[1]?F:l[0]?h:S}let e=s(c),n=e(c);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),a(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){l&&r(t),n.d(l)}}}function V(c){let t,s;return t=new w({props:{nobranding:!0,$$slots:{default:[I]},$$scope:{ctx:c}}}),{c(){C(t.$$.fragment)},m(e,n){x(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function q(c,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const u=new P("../");try{const m=T(e==null?void 0:e.token);await u.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const o=()=>window.close(),k=()=>window.close();return c.$$set=u=>{"params"in u&&s(2,e=u.params)},[n,l,e,o,k]}class G extends v{constructor(t){super(),y(this,t,q,V,g,{params:2})}}export{G as default}; diff --git a/ui/dist/assets/RealtimeApiDocs-d5c46b52.js b/ui/dist/assets/RealtimeApiDocs-531c981c.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs-d5c46b52.js rename to ui/dist/assets/RealtimeApiDocs-531c981c.js index ecfcf49b..731aedd0 100644 --- a/ui/dist/assets/RealtimeApiDocs-d5c46b52.js +++ b/ui/dist/assets/RealtimeApiDocs-531c981c.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,N as pe,C as P,e as p,w as y,b as a,c as se,f as u,g as s,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,p as me}from"./index-e4747107.js";import{S as de}from"./SdkTabs-2f78bf19.js";function fe(t){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,c=t[0].name+"",b,d,D,f,_,$,k,l,S,g,C,v,w,h,E,r,R;return l=new de({props:{js:` +import{S as re,i as ae,s as be,N as pe,C as P,e as p,w as y,b as a,c as se,f as u,g as s,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,p as me}from"./index-7d33ef4c.js";import{S as de}from"./SdkTabs-f0532e58.js";function fe(t){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,c=t[0].name+"",b,d,D,f,_,$,k,l,S,g,C,v,w,h,E,r,R;return l=new de({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${t[1]}'); diff --git a/ui/dist/assets/RequestEmailChangeDocs-94638ec4.js b/ui/dist/assets/RequestEmailChangeDocs-67bd3d32.js similarity index 98% rename from ui/dist/assets/RequestEmailChangeDocs-94638ec4.js rename to ui/dist/assets/RequestEmailChangeDocs-67bd3d32.js index b63a9fab..8fc55e1d 100644 --- a/ui/dist/assets/RequestEmailChangeDocs-94638ec4.js +++ b/ui/dist/assets/RequestEmailChangeDocs-67bd3d32.js @@ -1,4 +1,4 @@ -import{S as Ee,i as Be,s as Se,O as L,e as r,w as v,b as k,c as Ce,f as b,g as d,h as n,m as ye,x as N,P as ve,Q as Re,k as Me,R as Ae,n as We,t as ee,a as te,o as m,d as Te,C as ze,p as He,r as F,u as Oe,N as Ue}from"./index-e4747107.js";import{S as je}from"./SdkTabs-2f78bf19.js";function we(o,l,a){const s=o.slice();return s[5]=l[a],s}function $e(o,l,a){const s=o.slice();return s[5]=l[a],s}function qe(o,l){let a,s=l[5].code+"",h,f,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){a=r("button"),h=v(s),f=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m($,q){d($,a,q),n(a,h),n(a,f),i||(p=Oe(a,"click",u),i=!0)},p($,q){l=$,q&4&&s!==(s=l[5].code+"")&&N(h,s),q&6&&F(a,"active",l[1]===l[5].code)},d($){$&&m(a),i=!1,p()}}}function Pe(o,l){let a,s,h,f;return s=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){a=r("div"),Ce(s.$$.fragment),h=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m(i,p){d(i,a,p),ye(s,a,null),n(a,h),f=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),s.$set(u),(!f||p&6)&&F(a,"active",l[1]===l[5].code)},i(i){f||(ee(s.$$.fragment,i),f=!0)},o(i){te(s.$$.fragment,i),f=!1},d(i){i&&m(a),Te(s)}}}function De(o){var pe,ue,be,fe;let l,a,s=o[0].name+"",h,f,i,p,u,$,q,z=o[0].name+"",I,le,K,P,Q,T,G,w,H,ae,O,E,se,J,U=o[0].name+"",V,oe,ne,j,X,B,Y,S,Z,R,x,C,M,g=[],ie=new Map,ce,A,_=[],re=new Map,y;P=new je({props:{js:` +import{S as Ee,i as Be,s as Se,O as L,e as r,w as v,b as k,c as Ce,f as b,g as d,h as n,m as ye,x as N,P as ve,Q as Re,k as Me,R as Ae,n as We,t as ee,a as te,o as m,d as Te,C as ze,p as He,r as F,u as Oe,N as Ue}from"./index-7d33ef4c.js";import{S as je}from"./SdkTabs-f0532e58.js";function we(o,l,a){const s=o.slice();return s[5]=l[a],s}function $e(o,l,a){const s=o.slice();return s[5]=l[a],s}function qe(o,l){let a,s=l[5].code+"",h,f,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){a=r("button"),h=v(s),f=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m($,q){d($,a,q),n(a,h),n(a,f),i||(p=Oe(a,"click",u),i=!0)},p($,q){l=$,q&4&&s!==(s=l[5].code+"")&&N(h,s),q&6&&F(a,"active",l[1]===l[5].code)},d($){$&&m(a),i=!1,p()}}}function Pe(o,l){let a,s,h,f;return s=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){a=r("div"),Ce(s.$$.fragment),h=k(),b(a,"class","tab-item"),F(a,"active",l[1]===l[5].code),this.first=a},m(i,p){d(i,a,p),ye(s,a,null),n(a,h),f=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),s.$set(u),(!f||p&6)&&F(a,"active",l[1]===l[5].code)},i(i){f||(ee(s.$$.fragment,i),f=!0)},o(i){te(s.$$.fragment,i),f=!1},d(i){i&&m(a),Te(s)}}}function De(o){var pe,ue,be,fe;let l,a,s=o[0].name+"",h,f,i,p,u,$,q,z=o[0].name+"",I,le,K,P,Q,T,G,w,H,ae,O,E,se,J,U=o[0].name+"",V,oe,ne,j,X,B,Y,S,Z,R,x,C,M,g=[],ie=new Map,ce,A,_=[],re=new Map,y;P=new je({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/RequestPasswordResetDocs-d70c75f0.js b/ui/dist/assets/RequestPasswordResetDocs-c6b478f9.js similarity index 97% rename from ui/dist/assets/RequestPasswordResetDocs-d70c75f0.js rename to ui/dist/assets/RequestPasswordResetDocs-c6b478f9.js index 66cdc96f..a0bb1e6f 100644 --- a/ui/dist/assets/RequestPasswordResetDocs-d70c75f0.js +++ b/ui/dist/assets/RequestPasswordResetDocs-c6b478f9.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,O as I,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as L,P as fe,Q as ye,k as Re,R as Be,n as Ce,t as x,a as ee,o as p,d as we,C as Se,p as Te,r as N,u as Me,N as Ae}from"./index-e4747107.js";import{S as Ue}from"./SdkTabs-2f78bf19.js";function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s,l){const a=o.slice();return a[5]=s[l],a}function ke(o,s){let l,a=s[5].code+"",_,f,i,u;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=g(a),f=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(w,P){d(w,l,P),n(l,_),n(l,f),i||(u=Me(l,"click",m),i=!0)},p(w,P){s=w,P&4&&a!==(a=s[5].code+"")&&L(_,a),P&6&&N(l,"active",s[1]===s[5].code)},d(w){w&&p(l),i=!1,u()}}}function he(o,s){let l,a,_,f;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,u){d(i,l,u),ge(a,l,null),n(l,_),f=!0},p(i,u){s=i;const m={};u&4&&(m.content=s[5].body),a.$set(m),(!f||u&6)&&N(l,"active",s[1]===s[5].code)},i(i){f||(x(a.$$.fragment,i),f=!0)},o(i){ee(a.$$.fragment,i),f=!1},d(i){i&&p(l),we(a)}}}function je(o){var de,pe;let s,l,a=o[0].name+"",_,f,i,u,m,w,P,D=o[0].name+"",Q,te,z,$,G,B,J,q,H,se,O,C,le,K,E=o[0].name+"",V,ae,W,S,X,T,Y,M,Z,y,A,v=[],oe=new Map,ne,U,k=[],ie=new Map,R;$=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,O as I,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as L,P as fe,Q as ye,k as Re,R as Be,n as Ce,t as x,a as ee,o as p,d as we,C as Se,p as Te,r as N,u as Me,N as Ae}from"./index-7d33ef4c.js";import{S as Ue}from"./SdkTabs-f0532e58.js";function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s,l){const a=o.slice();return a[5]=s[l],a}function ke(o,s){let l,a=s[5].code+"",_,f,i,u;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=r("button"),_=g(a),f=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(w,P){d(w,l,P),n(l,_),n(l,f),i||(u=Me(l,"click",m),i=!0)},p(w,P){s=w,P&4&&a!==(a=s[5].code+"")&&L(_,a),P&6&&N(l,"active",s[1]===s[5].code)},d(w){w&&p(l),i=!1,u()}}}function he(o,s){let l,a,_,f;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=r("div"),ve(a.$$.fragment),_=h(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,u){d(i,l,u),ge(a,l,null),n(l,_),f=!0},p(i,u){s=i;const m={};u&4&&(m.content=s[5].body),a.$set(m),(!f||u&6)&&N(l,"active",s[1]===s[5].code)},i(i){f||(x(a.$$.fragment,i),f=!0)},o(i){ee(a.$$.fragment,i),f=!1},d(i){i&&p(l),we(a)}}}function je(o){var de,pe;let s,l,a=o[0].name+"",_,f,i,u,m,w,P,D=o[0].name+"",Q,te,z,$,G,B,J,q,H,se,O,C,le,K,E=o[0].name+"",V,ae,W,S,X,T,Y,M,Z,y,A,v=[],oe=new Map,ne,U,k=[],ie=new Map,R;$=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/RequestVerificationDocs-fef7a189.js b/ui/dist/assets/RequestVerificationDocs-7606398a.js similarity index 97% rename from ui/dist/assets/RequestVerificationDocs-fef7a189.js rename to ui/dist/assets/RequestVerificationDocs-7606398a.js index afba78cc..7f0f1ad9 100644 --- a/ui/dist/assets/RequestVerificationDocs-fef7a189.js +++ b/ui/dist/assets/RequestVerificationDocs-7606398a.js @@ -1,4 +1,4 @@ -import{S as qe,i as we,s as Pe,O as F,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as I,P as pe,Q as ye,k as Be,R as Ce,n as Se,t as x,a as ee,o as f,d as $e,C as Te,p as Re,r as L,u as Ve,N as Me}from"./index-e4747107.js";import{S as Ae}from"./SdkTabs-2f78bf19.js";function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l,s){const a=o.slice();return a[5]=l[s],a}function ke(o,l){let s,a=l[5].code+"",_,p,i,u;function m(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),p=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m($,q){d($,s,q),n(s,_),n(s,p),i||(u=Ve(s,"click",m),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&I(_,a),q&6&&L(s,"active",l[1]===l[5].code)},d($){$&&f(s),i=!1,u()}}}function he(o,l){let s,a,_,p;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ve(a.$$.fragment),_=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(i,u){d(i,s,u),ge(a,s,null),n(s,_),p=!0},p(i,u){l=i;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!p||u&6)&&L(s,"active",l[1]===l[5].code)},i(i){p||(x(a.$$.fragment,i),p=!0)},o(i){ee(a.$$.fragment,i),p=!1},d(i){i&&f(s),$e(a)}}}function Ue(o){var de,fe;let l,s,a=o[0].name+"",_,p,i,u,m,$,q,j=o[0].name+"",N,te,Q,w,z,C,G,P,D,le,H,S,se,J,O=o[0].name+"",K,ae,W,T,X,R,Y,V,Z,y,M,v=[],oe=new Map,ne,A,k=[],ie=new Map,B;w=new Ae({props:{js:` +import{S as qe,i as we,s as Pe,O as F,e as r,w as g,b as h,c as ve,f as b,g as d,h as n,m as ge,x as I,P as pe,Q as ye,k as Be,R as Ce,n as Se,t as x,a as ee,o as f,d as $e,C as Te,p as Re,r as L,u as Ve,N as Me}from"./index-7d33ef4c.js";import{S as Ae}from"./SdkTabs-f0532e58.js";function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l,s){const a=o.slice();return a[5]=l[s],a}function ke(o,l){let s,a=l[5].code+"",_,p,i,u;function m(){return l[4](l[5])}return{key:o,first:null,c(){s=r("button"),_=g(a),p=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m($,q){d($,s,q),n(s,_),n(s,p),i||(u=Ve(s,"click",m),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&I(_,a),q&6&&L(s,"active",l[1]===l[5].code)},d($){$&&f(s),i=!1,u()}}}function he(o,l){let s,a,_,p;return a=new Me({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),ve(a.$$.fragment),_=h(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(i,u){d(i,s,u),ge(a,s,null),n(s,_),p=!0},p(i,u){l=i;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!p||u&6)&&L(s,"active",l[1]===l[5].code)},i(i){p||(x(a.$$.fragment,i),p=!0)},o(i){ee(a.$$.fragment,i),p=!1},d(i){i&&f(s),$e(a)}}}function Ue(o){var de,fe;let l,s,a=o[0].name+"",_,p,i,u,m,$,q,j=o[0].name+"",N,te,Q,w,z,C,G,P,D,le,H,S,se,J,O=o[0].name+"",K,ae,W,T,X,R,Y,V,Z,y,M,v=[],oe=new Map,ne,A,k=[],ie=new Map,B;w=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/SdkTabs-2f78bf19.js b/ui/dist/assets/SdkTabs-f0532e58.js similarity index 98% rename from ui/dist/assets/SdkTabs-2f78bf19.js rename to ui/dist/assets/SdkTabs-f0532e58.js index a2638a85..11dad90a 100644 --- a/ui/dist/assets/SdkTabs-2f78bf19.js +++ b/ui/dist/assets/SdkTabs-f0532e58.js @@ -1 +1 @@ -import{S as B,i as F,s as J,O as j,e as v,b as S,f as h,g as w,h as m,P as D,Q as O,k as Q,R as Y,n as z,t as N,a as P,o as C,w as E,r as y,u as A,x as q,N as G,c as H,m as L,d as U}from"./index-e4747107.js";function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function R(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=S(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),y(l,"active",e[1]===e[6].language),this.first=l},m(_,f){w(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&q(r,g),f&6&&y(l,"active",e[1]===e[6].language)},d(_){_&&C(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=S(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=S(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),y(l,"active",e[1]===e[6].language),this.first=l},m(b,t){w(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&q(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&y(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&C(l),U(s)}}}function V(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=j(o[2]);const p=t=>t[6].language;for(let t=0;tt[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class Z extends B{constructor(e){super(),F(this,e,W,V,J,{class:0,js:3,dart:4})}}export{Z as S}; +import{S as B,i as F,s as J,O as j,e as v,b as S,f as h,g as w,h as m,P as D,Q as O,k as Q,R as Y,n as z,t as N,a as P,o as C,w as E,r as y,u as A,x as q,N as G,c as H,m as L,d as U}from"./index-7d33ef4c.js";function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function R(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=S(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),y(l,"active",e[1]===e[6].language),this.first=l},m(_,f){w(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&q(r,g),f&6&&y(l,"active",e[1]===e[6].language)},d(_){_&&C(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=S(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=S(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),y(l,"active",e[1]===e[6].language),this.first=l},m(b,t){w(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&q(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&y(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&C(l),U(s)}}}function V(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=j(o[2]);const p=t=>t[6].language;for(let t=0;tt[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class Z extends B{constructor(e){super(),F(this,e,W,V,J,{class:0,js:3,dart:4})}}export{Z as S}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs-486a9a62.js b/ui/dist/assets/UnlinkExternalAuthDocs-d7bb55bc.js similarity index 98% rename from ui/dist/assets/UnlinkExternalAuthDocs-486a9a62.js rename to ui/dist/assets/UnlinkExternalAuthDocs-d7bb55bc.js index 2bad1f6b..3fd474c7 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs-486a9a62.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs-d7bb55bc.js @@ -1,4 +1,4 @@ -import{S as Oe,i as De,s as Me,O as j,e as i,w as g,b as f,c as Be,f as b,g as d,h as a,m as Ue,x as I,P as Ae,Q as We,k as ze,R as He,n as Le,t as oe,a as ae,o as u,d as qe,C as Re,p as je,r as N,u as Ie,N as Ne}from"./index-e4747107.js";import{S as Ke}from"./SdkTabs-2f78bf19.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Te(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ee(n,l){let o,s=l[5].code+"",_,h,c,p;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=g(s),h=f(),b(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),a(o,_),a(o,h),c||(p=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&s!==(s=l[5].code+"")&&I(_,s),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Se(n,l){let o,s,_,h;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Be(s.$$.fragment),_=f(),b(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ue(s,o,null),a(o,_),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),s.$set(m),(!h||p&6)&&N(o,"active",l[1]===l[5].code)},i(c){h||(oe(s.$$.fragment,c),h=!0)},o(c){ae(s.$$.fragment,c),h=!1},d(c){c&&u(o),qe(s)}}}function Qe(n){var _e,ke,ge,ve;let l,o,s=n[0].name+"",_,h,c,p,m,$,P,M=n[0].name+"",K,se,ne,Q,F,A,G,E,J,w,W,ie,z,y,ce,V,H=n[0].name+"",X,re,Y,de,Z,ue,L,x,S,ee,B,te,U,le,C,q,v=[],pe=new Map,me,O,k=[],be=new Map,T;A=new Ke({props:{js:` +import{S as Oe,i as De,s as Me,O as j,e as i,w as g,b as f,c as Be,f as b,g as d,h as a,m as Ue,x as I,P as Ae,Q as We,k as ze,R as He,n as Le,t as oe,a as ae,o as u,d as qe,C as Re,p as je,r as N,u as Ie,N as Ne}from"./index-7d33ef4c.js";import{S as Ke}from"./SdkTabs-f0532e58.js";function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Te(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ee(n,l){let o,s=l[5].code+"",_,h,c,p;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=g(s),h=f(),b(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),a(o,_),a(o,h),c||(p=Ie(o,"click",m),c=!0)},p($,P){l=$,P&4&&s!==(s=l[5].code+"")&&I(_,s),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Se(n,l){let o,s,_,h;return s=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Be(s.$$.fragment),_=f(),b(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Ue(s,o,null),a(o,_),h=!0},p(c,p){l=c;const m={};p&4&&(m.content=l[5].body),s.$set(m),(!h||p&6)&&N(o,"active",l[1]===l[5].code)},i(c){h||(oe(s.$$.fragment,c),h=!0)},o(c){ae(s.$$.fragment,c),h=!1},d(c){c&&u(o),qe(s)}}}function Qe(n){var _e,ke,ge,ve;let l,o,s=n[0].name+"",_,h,c,p,m,$,P,M=n[0].name+"",K,se,ne,Q,F,A,G,E,J,w,W,ie,z,y,ce,V,H=n[0].name+"",X,re,Y,de,Z,ue,L,x,S,ee,B,te,U,le,C,q,v=[],pe=new Map,me,O,k=[],be=new Map,T;A=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/UpdateApiDocs-7870aa42.js b/ui/dist/assets/UpdateApiDocs-ae87c615.js similarity index 98% rename from ui/dist/assets/UpdateApiDocs-7870aa42.js rename to ui/dist/assets/UpdateApiDocs-ae87c615.js index cefd51d6..159fa333 100644 --- a/ui/dist/assets/UpdateApiDocs-7870aa42.js +++ b/ui/dist/assets/UpdateApiDocs-ae87c615.js @@ -1,4 +1,4 @@ -import{S as $t,i as Mt,s as qt,C as I,O as Z,N as Ot,e as r,w as b,b as f,c as he,f as v,g as i,h as s,m as ye,x as J,P as Ee,Q as _t,k as Ht,R as Rt,n as Dt,t as ce,a as pe,o as d,d as ke,p as Lt,r as ve,u as Pt,y as ee}from"./index-e4747107.js";import{S as Ft}from"./SdkTabs-2f78bf19.js";import{F as Nt}from"./FieldsQueryParam-d60af536.js";function ht(c,e,t){const n=c.slice();return n[8]=e[t],n}function yt(c,e,t){const n=c.slice();return n[8]=e[t],n}function kt(c,e,t){const n=c.slice();return n[13]=e[t],n}function vt(c){let e;return{c(){e=r("p"),e.innerHTML=`Note that in case of a password change all previously issued tokens for the current record +import{S as $t,i as Mt,s as qt,C as I,O as Z,N as Ot,e as r,w as b,b as f,c as he,f as v,g as i,h as s,m as ye,x as J,P as Ee,Q as _t,k as Ht,R as Rt,n as Dt,t as ce,a as pe,o as d,d as ke,p as Lt,r as ve,u as Pt,y as ee}from"./index-7d33ef4c.js";import{S as Ft}from"./SdkTabs-f0532e58.js";import{F as Nt}from"./FieldsQueryParam-f6b769d1.js";function ht(c,e,t){const n=c.slice();return n[8]=e[t],n}function yt(c,e,t){const n=c.slice();return n[8]=e[t],n}function kt(c,e,t){const n=c.slice();return n[13]=e[t],n}function vt(c){let e;return{c(){e=r("p"),e.innerHTML=`Note that in case of a password change all previously issued tokens for the current record will be automatically invalidated and if you want your user to remain signed in you need to reauthenticate manually after the update call.`},m(t,n){i(t,e,n)},d(t){t&&d(e)}}}function gt(c){let e;return{c(){e=r("p"),e.innerHTML="Requires admin Authorization:TOKEN header",v(e,"class","txt-hint txt-sm txt-right")},m(t,n){i(t,e,n)},d(t){t&&d(e)}}}function wt(c){let e,t,n,u,m,o,p,h,w,S,g,$,P,E,M,U,F;return{c(){e=r("tr"),e.innerHTML='Auth fields',t=f(),n=r("tr"),n.innerHTML='
Optional username
String The username of the auth record.',u=f(),m=r("tr"),m.innerHTML=`
Optional email
String The auth record email address.
diff --git a/ui/dist/assets/ViewApiDocs-3b705221.js b/ui/dist/assets/ViewApiDocs-7f75b66b.js similarity index 97% rename from ui/dist/assets/ViewApiDocs-3b705221.js rename to ui/dist/assets/ViewApiDocs-7f75b66b.js index d03d187b..a6c14852 100644 --- a/ui/dist/assets/ViewApiDocs-3b705221.js +++ b/ui/dist/assets/ViewApiDocs-7f75b66b.js @@ -1,4 +1,4 @@ -import{S as lt,i as nt,s as st,N as tt,O as K,e as o,w as _,b as m,c as W,f as b,g as r,h as l,m as X,x as ve,P as Je,Q as ot,k as at,R as it,n as rt,t as Q,a as U,o as d,d as Y,C as Ke,p as dt,r as Z,u as ct}from"./index-e4747107.js";import{S as pt}from"./SdkTabs-2f78bf19.js";import{F as ut}from"./FieldsQueryParam-d60af536.js";function We(a,n,s){const i=a.slice();return i[6]=n[s],i}function Xe(a,n,s){const i=a.slice();return i[6]=n[s],i}function Ye(a){let n;return{c(){n=o("p"),n.innerHTML="Requires admin Authorization:TOKEN header",b(n,"class","txt-hint txt-sm txt-right")},m(s,i){r(s,n,i)},d(s){s&&d(n)}}}function Ze(a,n){let s,i,v;function p(){return n[5](n[6])}return{key:a,first:null,c(){s=o("button"),s.textContent=`${n[6].code} `,b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),i||(v=ct(s,"click",p),i=!0)},p(c,f){n=c,f&20&&Z(s,"active",n[2]===n[6].code)},d(c){c&&d(s),i=!1,v()}}}function et(a,n){let s,i,v,p;return i=new tt({props:{content:n[6].body}}),{key:a,first:null,c(){s=o("div"),W(i.$$.fragment),v=m(),b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),X(i,s,null),l(s,v),p=!0},p(c,f){n=c,(!p||f&20)&&Z(s,"active",n[2]===n[6].code)},i(c){p||(Q(i.$$.fragment,c),p=!0)},o(c){U(i.$$.fragment,c),p=!1},d(c){c&&d(s),Y(i)}}}function ft(a){var je,Ve;let n,s,i=a[0].name+"",v,p,c,f,w,C,ee,j=a[0].name+"",te,$e,le,F,ne,x,se,$,V,ye,z,T,we,oe,G=a[0].name+"",ae,Ce,ie,Fe,re,B,de,A,ce,I,pe,R,ue,Re,M,O,fe,Oe,me,Pe,h,De,E,Te,Ee,Se,be,xe,_e,Be,Ae,Ie,he,Me,qe,S,ke,q,ge,P,H,y=[],He=new Map,Le,L,k=[],Ne=new Map,D;F=new pt({props:{js:` +import{S as lt,i as nt,s as st,N as tt,O as K,e as o,w as _,b as m,c as W,f as b,g as r,h as l,m as X,x as ve,P as Je,Q as ot,k as at,R as it,n as rt,t as Q,a as U,o as d,d as Y,C as Ke,p as dt,r as Z,u as ct}from"./index-7d33ef4c.js";import{S as pt}from"./SdkTabs-f0532e58.js";import{F as ut}from"./FieldsQueryParam-f6b769d1.js";function We(a,n,s){const i=a.slice();return i[6]=n[s],i}function Xe(a,n,s){const i=a.slice();return i[6]=n[s],i}function Ye(a){let n;return{c(){n=o("p"),n.innerHTML="Requires admin Authorization:TOKEN header",b(n,"class","txt-hint txt-sm txt-right")},m(s,i){r(s,n,i)},d(s){s&&d(n)}}}function Ze(a,n){let s,i,v;function p(){return n[5](n[6])}return{key:a,first:null,c(){s=o("button"),s.textContent=`${n[6].code} `,b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),i||(v=ct(s,"click",p),i=!0)},p(c,f){n=c,f&20&&Z(s,"active",n[2]===n[6].code)},d(c){c&&d(s),i=!1,v()}}}function et(a,n){let s,i,v,p;return i=new tt({props:{content:n[6].body}}),{key:a,first:null,c(){s=o("div"),W(i.$$.fragment),v=m(),b(s,"class","tab-item"),Z(s,"active",n[2]===n[6].code),this.first=s},m(c,f){r(c,s,f),X(i,s,null),l(s,v),p=!0},p(c,f){n=c,(!p||f&20)&&Z(s,"active",n[2]===n[6].code)},i(c){p||(Q(i.$$.fragment,c),p=!0)},o(c){U(i.$$.fragment,c),p=!1},d(c){c&&d(s),Y(i)}}}function ft(a){var je,Ve;let n,s,i=a[0].name+"",v,p,c,f,w,C,ee,j=a[0].name+"",te,$e,le,F,ne,x,se,$,V,ye,z,T,we,oe,G=a[0].name+"",ae,Ce,ie,Fe,re,B,de,A,ce,I,pe,R,ue,Re,M,O,fe,Oe,me,Pe,h,De,E,Te,Ee,Se,be,xe,_e,Be,Ae,Ie,he,Me,qe,S,ke,q,ge,P,H,y=[],He=new Map,Le,L,k=[],Ne=new Map,D;F=new pt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/index-e4747107.js b/ui/dist/assets/index-7d33ef4c.js similarity index 99% rename from ui/dist/assets/index-e4747107.js rename to ui/dist/assets/index-7d33ef4c.js index 5a9870ac..9ed930e2 100644 --- a/ui/dist/assets/index-e4747107.js +++ b/ui/dist/assets/index-7d33ef4c.js @@ -4,14 +4,14 @@ var l0=Object.defineProperty;var o0=(n,e,t)=>e in n?l0(n,e,{enumerable:!0,config }`,c=`__svelte_${m0(f)}_${r}`,d=w_(n),{stylesheet:h,rules:m}=go.get(d)||g0(d,n);m[c]||(m[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${c} ${i}ms linear ${s}ms 1 both`,_o+=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(", "),_o-=s,_o||_0())}function _0(){_a(()=>{_o||(go.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&k(e)}),go.clear())})}function b0(n,e,t,i){if(!e)return x;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return x;const{delay:l=0,duration:o=300,easing:r=Sl,start:a=qo()+l,end:u=a+o,tick:f=x,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,m;function g(){c&&(m=cl(n,0,1,o,l,r,c)),l||(h=!0)}function _(){c&&dl(n,m),d=!1}return jo(y=>{if(!h&&y>=a&&(h=!0),h&&y>=u&&(f(1,0),_()),!d)return!1;if(h){const S=y-a,C=0+1*r(S/o);f(C,1-C)}return!0}),g(),f(0,1),_}function v0(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,T_(n,s)}}function T_(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 wi(n){pl=n}function Tl(){if(!pl)throw new Error("Function called outside component initialization");return pl}function Kt(n){Tl().$$.on_mount.push(n)}function y0(n){Tl().$$.after_update.push(n)}function Cl(n){Tl().$$.on_destroy.push(n)}function pt(){const n=Tl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=S_(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Re(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ys=[],te=[];let ws=[];const Br=[],C_=Promise.resolve();let Ur=!1;function $_(){Ur||(Ur=!0,C_.then(ba))}function ln(){return $_(),C_}function xe(n){ws.push(n)}function ve(n){Br.push(n)}const lr=new Set;let hs=0;function ba(){if(hs!==0)return;const n=pl;do{try{for(;hsn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),ws=e}let Vs;function va(){return Vs||(Vs=Promise.resolve(),Vs.then(()=>{Vs=null})),Vs}function ss(n,e,t){n.dispatchEvent(S_(`${e?"intro":"outro"}${t}`))}const oo=new Set;let ui;function re(){ui={r:0,c:[],p:ui}}function ae(){ui.r||$e(ui.c),ui=ui.p}function A(n,e){n&&n.i&&(oo.delete(n),n.i(e))}function L(n,e,t,i){if(n&&n.o){if(oo.has(n))return;oo.add(n),ui.c.push(()=>{oo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ya={duration:0};function M_(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&dl(n,o)}function f(){const{delay:d=0,duration:h=300,easing:m=Sl,tick:g=x,css:_}=s||ya;_&&(o=cl(n,0,1,h,d,m,_,a++)),g(0,1);const y=qo()+d,S=y+h;r&&r.abort(),l=!0,xe(()=>ss(n,!0,"start")),r=jo(C=>{if(l){if(C>=S)return g(1,0),ss(n,!0,"end"),u(),l=!1;if(C>=y){const T=m((C-y)/h);g(T,1-T)}}return l})}let c=!1;return{start(){c||(c=!0,dl(n),Et(s)?(s=s(i),va().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function ka(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=ui;r.r+=1;let a;function u(){const{delay:f=0,duration:c=300,easing:d=Sl,tick:h=x,css:m}=s||ya;m&&(o=cl(n,1,0,c,f,d,m));const g=qo()+f,_=g+c;xe(()=>ss(n,!1,"start")),"inert"in n&&(a=n.inert,n.inert=!0),jo(y=>{if(l){if(y>=_)return h(0,1),ss(n,!1,"end"),--r.r||$e(r.c),!1;if(y>=g){const S=d((y-g)/c);h(1-S,S)}}return l})}return Et(s)?va().then(()=>{s=s(i),u()}):u(),{end(f){f&&"inert"in n&&(n.inert=a),f&&s.tick&&s.tick(1,0),l&&(o&&dl(n,o),l=!1)}}}function He(n,e,t,i){let l=e(n,t,{direction:"both"}),o=i?0:1,r=null,a=null,u=null,f;function c(){u&&dl(n,u)}function d(m,g){const _=m.b-o;return g*=Math.abs(_),{a:o,b:m.b,d:_,duration:g,start:m.start,end:m.start+g,group:m.group}}function h(m){const{delay:g=0,duration:_=300,easing:y=Sl,tick:S=x,css:C}=l||ya,T={start:qo()+g,b:m};m||(T.group=ui,ui.r+=1),"inert"in n&&(m?f!==void 0&&(n.inert=f):(f=n.inert,n.inert=!0)),r||a?a=T:(C&&(c(),u=cl(n,o,m,_,g,y,C)),m&&S(0,1),r=d(T,_),xe(()=>ss(n,m,"start")),jo($=>{if(a&&$>a.start&&(r=d(a,_),a=null,ss(n,r.b,"start"),C&&(c(),u=cl(n,o,r.b,r.duration,0,y,l.css))),r){if($>=r.end)S(o=r.b,1-o),ss(n,r.b,"end"),a||(r.b?c():--r.group.r||$e(r.group.c)),r=null;else if($>=r.start){const M=$-r.start;o=r.a+r.d*y(M/r.duration),S(o,1-o)}}return!!(r||a)}))}return{run(m){Et(l)?va().then(()=>{l=l({direction:m?"in":"out"}),h(m)}):h(m)},end(){c(),r=a=null}}}function hu(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(re(),L(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),ae())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ba()}if(r0(n)){const s=Tl();if(n.then(l=>{wi(s),i(e.then,1,e.value,l),wi(null)},l=>{if(wi(s),i(e.catch,2,e.error,l),wi(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function S0(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function pe(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}function Ui(n,e){n.d(1),e.delete(n.key)}function qt(n,e){L(n,1,1,()=>{e.delete(n.key)})}function T0(n,e){n.f(),qt(n,e)}function gt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,h=l.length,m=d;const g={};for(;m--;)g[n[m].key]=m;const _=[],y=new Map,S=new Map,C=[];for(m=h;m--;){const O=c(s,l,m),D=t(O);let I=o.get(D);I?i&&C.push(()=>I.p(O,e)):(I=u(D,O),I.c()),y.set(D,_[m]=I),D in g&&S.set(D,Math.abs(m-g[D]))}const T=new Set,$=new Set;function M(O){A(O,1),O.m(r,f),o.set(O.key,O),f=O.first,h--}for(;d&&h;){const O=_[h-1],D=n[d-1],I=O.key,N=D.key;O===D?(f=O.first,d--,h--):y.has(N)?!o.has(I)||T.has(I)?M(O):$.has(N)?d--:S.get(I)>S.get(N)?($.add(I),M(O)):(T.add(N),d--):(a(D,o),d--)}for(;d--;){const O=n[d];y.has(O.key)||a(O,o)}for(;h;)M(_[h-1]);return $e(C),_}function _t(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Dt(n){return typeof n=="object"&&n!==null?n:{}}function he(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function z(n){n&&n.c()}function H(n,e,t){const{fragment:i,after_update:s}=n.$$;i&&i.m(e,t),xe(()=>{const l=n.$$.on_mount.map(b_).filter(Et);n.$$.on_destroy?n.$$.on_destroy.push(...l):$e(l),n.$$.on_mount=[]}),s.forEach(xe)}function V(n,e){const t=n.$$;t.fragment!==null&&(w0(t.after_update),$e(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function C0(n,e){n.$$.dirty[0]===-1&&(ys.push(n),$_(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const m=h.length?h[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=m)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](m),f&&C0(n,c)),d}):[],u.update(),f=!0,$e(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=h0(e.target);u.fragment&&u.fragment.l(c),c.forEach(k)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),H(n,e.target,e.anchor),ba()}wi(a)}class be{constructor(){sr(this,"$$");sr(this,"$$set")}$destroy(){V(this,1),this.$destroy=x}$on(e,t){if(!Et(t))return x;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!a0(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const $0="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add($0);function jt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&t&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function E_(n,e,t){const i=!Array.isArray(n),s=i?[n]:n;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const l=e.length<2;return O_(t,(o,r)=>{let a=!1;const u=[];let f=0,c=x;const d=()=>{if(f)return;c();const m=e(i?u[0]:u,o,r);l?o(m):c=Et(m)?m:x},h=s.map((m,g)=>ga(m,_=>{u[g]=_,f&=~(1<{f|=1<{V(u,1)}),ae()}l?(e=Nt(l,o(r,a)),e.$on("routeEvent",r[7]),z(e.$$.fragment),A(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else if(l){const u=a&4?_t(s,[Dt(r[2])]):{};e.$set(u)}},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function O0(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r,a){let u={};if(a!==void 0&&a&6)u=_t(s,[a&2&&{params:r[1]},a&4&&Dt(r[2])]);else for(let f=0;f{V(u,1)}),ae()}l?(e=Nt(l,o(r,a)),e.$on("routeEvent",r[6]),z(e.$$.fragment),A(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else if(l){const u=a&6?_t(s,[a&2&&{params:r[1]},a&4&&Dt(r[2])]):{};e.$set(u)}},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&L(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function E0(n){let e,t,i,s;const l=[O0,M0],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},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):(re(),L(o[f],1,1,()=>{o[f]=null}),ae(),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){a&&k(i),o[e].d(a)}}}function mu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Ho=O_(null,function(e){e(mu());const t=()=>{e(mu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});E_(Ho,n=>n.location);const wa=E_(Ho,n=>n.querystring),gu=Ln(void 0);async function us(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await ln();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function dn(n,e){if(e=bu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return _u(n,e),{update(t){t=bu(t),_u(n,t)}}}function D0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function _u(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||A0(i.currentTarget.getAttribute("href"))})}function bu(n){return n&&typeof n=="string"?{href:n}:n||{}}function A0(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function I0(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor($,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!$||typeof $=="string"&&($.length<1||$.charAt(0)!="/"&&$.charAt(0)!="*")||typeof $=="object"&&!($ instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:D}=D_($);this.path=$,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=O,this._keys=D}match($){if(s){if(typeof s=="string")if($.startsWith(s))$=$.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const I=$.match(s);if(I&&I[0])$=$.substr(I[0].length)||"/";else return null}}const M=this._pattern.exec($);if(M===null)return null;if(this._keys===!1)return M;const O={};let D=0;for(;D{r.push(new o($,T))}):Object.keys(i).forEach(T=>{r.push(new o(T,i[T]))});let a=null,u=null,f={};const c=pt();async function d(T,$){await ln(),c(T,$)}let h=null,m=null;l&&(m=T=>{T.state&&(T.state.__svelte_spa_router_scrollY||T.state.__svelte_spa_router_scrollX)?h=T.state:h=null},window.addEventListener("popstate",m),y0(()=>{D0(h)}));let g=null,_=null;const y=Ho.subscribe(async T=>{g=T;let $=0;for(;${gu.set(u)});return}t(0,a=null),_=null,gu.set(void 0)});Cl(()=>{y(),m&&window.removeEventListener("popstate",m)});function S(T){Re.call(this,n,T)}function C(T){Re.call(this,n,T)}return n.$$set=T=>{"routes"in T&&t(3,i=T.routes),"prefix"in T&&t(4,s=T.prefix),"restoreScrollState"in T&&t(5,l=T.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,S,C]}class L0 extends be{constructor(e){super(),_e(this,e,I0,E0,me,{routes:3,prefix:4,restoreScrollState:5})}}const ro=[];let A_;function I_(n){const e=n.pattern.test(A_);vu(n,n.className,e),vu(n,n.inactiveClassName,!e)}function vu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Ho.subscribe(n=>{A_=n.location+(n.querystring?"?"+n.querystring:""),ro.map(I_)});function zn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?D_(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ro.push(i),I_(i),{destroy(){ro.splice(ro.indexOf(i),1)}}}const P0="modulepreload",N0=function(n,e){return new URL(n,e).href},yu={},ft=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=N0(l,i),l in yu)return;yu[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":P0,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e()).catch(l=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l})};function Zt(n,e,t,i){return new(t||(t=Promise))(function(s,l){function o(u){try{a(i.next(u))}catch(f){l(f)}}function r(u){try{a(i.throw(u))}catch(f){l(f)}}function a(u){u.done?s(u.value):function(c){return c instanceof t?c:new t(function(d){d(c)})}(u.value).then(o,r)}a((i=i.apply(n,e||[])).next())})}class Kn extends Error{constructor(e){var t,i,s,l;super("ClientResponseError"),this.url="",this.status=0,this.response={},this.isAbort=!1,this.originalError=null,Object.setPrototypeOf(this,Kn.prototype),e!==null&&typeof e=="object"&&(this.url=typeof e.url=="string"?e.url:"",this.status=typeof e.status=="number"?e.status:0,this.isAbort=!!e.isAbort,this.originalError=e.originalError,e.response!==null&&typeof e.response=="object"?this.response=e.response:e.data!==null&&typeof e.data=="object"?this.response=e.data:this.response={}),this.originalError||e instanceof Kn||(this.originalError=e),typeof DOMException<"u"&&e instanceof DOMException&&(this.isAbort=!0),this.name="ClientResponseError "+this.status,this.message=(t=this.response)===null||t===void 0?void 0:t.message,this.message||(this.isAbort?this.message="The request was autocancelled. You can find more info in https://github.com/pocketbase/js-sdk#auto-cancellation.":!((l=(s=(i=this.originalError)===null||i===void 0?void 0:i.cause)===null||s===void 0?void 0:s.message)===null||l===void 0)&&l.includes("ECONNREFUSED ::1")?this.message="Failed to connect to the PocketBase server. Try changing the SDK URL from localhost to 127.0.0.1 (https://github.com/pocketbase/js-sdk/issues/21).":this.message="Something went wrong while processing your request.")}get data(){return this.response}toJSON(){return Object.assign({},this)}}const ql=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function F0(n,e){const t={};if(typeof n!="string")return t;const i=Object.assign({},e||{}).decode||R0;let s=0;for(;s0&&(!t.exp||t.exp-e>Date.now()/1e3))}L_=typeof atob=="function"?atob:n=>{let e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};const wu="pb_auth";class j0{constructor(){this.baseToken="",this.baseModel=null,this._onChangeCallbacks=[]}get token(){return this.baseToken}get model(){return this.baseModel}get isValid(){return!Sa(this.token)}get isAdmin(){return ao(this.token).type==="admin"}get isAuthRecord(){return ao(this.token).type==="authRecord"}save(e,t){this.baseToken=e||"",this.baseModel=t||null,this.triggerChange()}clear(){this.baseToken="",this.baseModel=null,this.triggerChange()}loadFromCookie(e,t=wu){const i=F0(e||"")[t]||"";let s={};try{s=JSON.parse(i),(typeof s===null||typeof s!="object"||Array.isArray(s))&&(s={})}catch{}this.save(s.token||"",s.model||null)}exportToCookie(e,t=wu){var i,s;const l={secure:!0,sameSite:!0,httpOnly:!0,path:"/"},o=ao(this.token);o!=null&&o.exp?l.expires=new Date(1e3*o.exp):l.expires=new Date("1970-01-01"),e=Object.assign({},l,e);const r={token:this.token,model:this.model?JSON.parse(JSON.stringify(this.model)):null};let a=ku(t,JSON.stringify(r),e);const u=typeof Blob<"u"?new Blob([a]).size:a.length;if(r.model&&u>4096){r.model={id:(i=r==null?void 0:r.model)===null||i===void 0?void 0:i.id,email:(s=r==null?void 0:r.model)===null||s===void 0?void 0:s.email};const f=["collectionId","username","verified"];for(const c in this.model)f.includes(c)&&(r.model[c]=this.model[c]);a=ku(t,JSON.stringify(r),e)}return a}onChange(e,t=!1){return this._onChangeCallbacks.push(e),t&&e(this.token,this.model),()=>{for(let i=this._onChangeCallbacks.length-1;i>=0;i--)if(this._onChangeCallbacks[i]==e)return delete this._onChangeCallbacks[i],void this._onChangeCallbacks.splice(i,1)}}triggerChange(){for(const e of this._onChangeCallbacks)e&&e(this.token,this.model)}}class P_ extends j0{constructor(e="pocketbase_auth"){super(),this.storageFallback={},this.storageKey=e,this._bindStorageEvent()}get token(){return(this._storageGet(this.storageKey)||{}).token||""}get model(){return(this._storageGet(this.storageKey)||{}).model||null}save(e,t){this._storageSet(this.storageKey,{token:e,model:t}),super.save(e,t)}clear(){this._storageRemove(this.storageKey),super.clear()}_storageGet(e){if(typeof window<"u"&&(window!=null&&window.localStorage)){const t=window.localStorage.getItem(e)||"";try{return JSON.parse(t)}catch{return t}}return this.storageFallback[e]}_storageSet(e,t){if(typeof window<"u"&&(window!=null&&window.localStorage)){let i=t;typeof t!="string"&&(i=JSON.stringify(t)),window.localStorage.setItem(e,i)}else this.storageFallback[e]=t}_storageRemove(e){var t;typeof window<"u"&&(window!=null&&window.localStorage)&&((t=window.localStorage)===null||t===void 0||t.removeItem(e)),delete this.storageFallback[e]}_bindStorageEvent(){typeof window<"u"&&(window!=null&&window.localStorage)&&window.addEventListener&&window.addEventListener("storage",e=>{if(e.key!=this.storageKey)return;const t=this._storageGet(this.storageKey)||{};super.save(t.token||"",t.model||null)})}}class fs{constructor(e){this.client=e}}class H0 extends fs{getAll(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/settings",e)}update(e,t){return t=Object.assign({method:"PATCH",body:e},t),this.client.send("/api/settings",t)}testS3(e="storage",t){return t=Object.assign({method:"POST",body:{filesystem:e}},t),this.client.send("/api/settings/test/s3",t).then(()=>!0)}testEmail(e,t,i){return i=Object.assign({method:"POST",body:{email:e,template:t}},i),this.client.send("/api/settings/test/email",i).then(()=>!0)}generateAppleClientSecret(e,t,i,s,l,o){return o=Object.assign({method:"POST",body:{clientId:e,teamId:t,keyId:i,privateKey:s,duration:l}},o),this.client.send("/api/settings/apple/generate-client-secret",o)}}class Ta extends fs{decode(e){return e}getFullList(e,t){if(typeof e=="number")return this._getFullList(e,t);let i=500;return(t=Object.assign({},e,t)).batch&&(i=t.batch,delete t.batch),this._getFullList(i,t)}getList(e=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:e,perPage:t},i.query),this.client.send(this.baseCrudPath,i).then(s=>{var l;return s.items=((l=s.items)===null||l===void 0?void 0:l.map(o=>this.decode(o)))||[],s})}getFirstListItem(e,t){return(t=Object.assign({requestKey:"one_by_filter_"+this.baseCrudPath+"_"+e},t)).query=Object.assign({filter:e,skipTotal:1},t.query),this.getList(1,1,t).then(i=>{var s;if(!(!((s=i==null?void 0:i.items)===null||s===void 0)&&s.length))throw new Kn({status:404,data:{code:404,message:"The requested resource wasn't found.",data:{}}});return i.items[0]})}getOne(e,t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then(i=>this.decode(i))}create(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send(this.baseCrudPath,t).then(i=>this.decode(i))}update(e,t,i){return i=Object.assign({method:"PATCH",body:t},i),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),i).then(s=>this.decode(s))}delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e),t).then(()=>!0)}_getFullList(e=500,t){(t=t||{}).query=Object.assign({skipTotal:1},t.query);let i=[],s=l=>Zt(this,void 0,void 0,function*(){return this.getList(l,e||500,t).then(o=>{const r=o.items;return i=i.concat(r),r.length==o.perPage?s(l+1):i})});return s(1)}}function En(n,e,t,i){const s=i!==void 0;return s||t!==void 0?s?(console.warn(n),e.body=Object.assign({},e.body,t),e.query=Object.assign({},e.query,i),e):Object.assign(e,t):e}function or(n){var e,t;(t=(e=n)._resetAutoRefresh)===null||t===void 0||t.call(e)}class V0 extends Ta{get baseCrudPath(){return"/api/admins"}update(e,t,i){return super.update(e,t,i).then(s=>{var l,o;return((l=this.client.authStore.model)===null||l===void 0?void 0:l.id)===s.id&&((o=this.client.authStore.model)===null||o===void 0?void 0:o.collectionId)===void 0&&this.client.authStore.save(this.client.authStore.token,s),s})}delete(e,t){return super.delete(e,t).then(i=>{var s,l;return i&&((s=this.client.authStore.model)===null||s===void 0?void 0:s.id)===e&&((l=this.client.authStore.model)===null||l===void 0?void 0:l.collectionId)===void 0&&this.client.authStore.clear(),i})}authResponse(e){const t=this.decode((e==null?void 0:e.admin)||{});return e!=null&&e.token&&(e!=null&&e.admin)&&this.client.authStore.save(e.token,t),Object.assign({},e,{token:(e==null?void 0:e.token)||"",admin:t})}authWithPassword(e,t,i,s){return Zt(this,void 0,void 0,function*(){let l={method:"POST",body:{identity:e,password:t}};l=En("This form of authWithPassword(email, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(email, pass, options?).",l,i,s);const o=l.autoRefreshThreshold;delete l.autoRefreshThreshold,l.autoRefresh||or(this.client);let r=yield this.client.send(this.baseCrudPath+"/auth-with-password",l);return r=this.authResponse(r),o&&function(u,f,c,d){or(u);const h=u.beforeSend,m=u.authStore.model,g=u.authStore.onChange((_,y)=>{(!_||(y==null?void 0:y.id)!=(m==null?void 0:m.id)||(y!=null&&y.collectionId||m!=null&&m.collectionId)&&(y==null?void 0:y.collectionId)!=(m==null?void 0:m.collectionId))&&or(u)});u._resetAutoRefresh=function(){g(),u.beforeSend=h,delete u._resetAutoRefresh},u.beforeSend=(_,y)=>Zt(this,void 0,void 0,function*(){var S;const C=u.authStore.token;if(!((S=y.query)===null||S===void 0)&&S.autoRefresh)return h?h(_,y):{url:_,sendOptions:y};let T=u.authStore.isValid;if(T&&Sa(u.authStore.token,f))try{yield c()}catch{T=!1}T||(yield d());const $=y.headers||{};for(let M in $)if(M.toLowerCase()=="authorization"&&C==$[M]&&u.authStore.token){$[M]=u.authStore.token;break}return y.headers=$,h?h(_,y):{url:_,sendOptions:y}})}(this.client,o,()=>this.authRefresh({autoRefresh:!0}),()=>this.authWithPassword(e,t,Object.assign({autoRefresh:!0},l))),r})}authRefresh(e,t){let i={method:"POST"};return i=En("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",i,e,t),this.client.send(this.baseCrudPath+"/auth-refresh",i).then(this.authResponse.bind(this))}requestPasswordReset(e,t,i){let s={method:"POST",body:{email:e}};return s=En("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,t,i),this.client.send(this.baseCrudPath+"/request-password-reset",s).then(()=>!0)}confirmPasswordReset(e,t,i,s,l){let o={method:"POST",body:{token:e,password:t,passwordConfirm:i}};return o=En("This form of confirmPasswordReset(resetToken, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(resetToken, password, passwordConfirm, options?).",o,s,l),this.client.send(this.baseCrudPath+"/confirm-password-reset",o).then(()=>!0)}}class N_ extends fs{constructor(){super(...arguments),this.clientId="",this.eventSource=null,this.subscriptions={},this.lastSentTopics=[],this.maxConnectTimeout=15e3,this.reconnectAttempts=0,this.maxReconnectAttempts=1/0,this.predefinedReconnectIntervals=[200,300,500,1e3,1200,1500,2e3],this.pendingConnects=[]}get isConnected(){return!!this.eventSource&&!!this.clientId&&!this.pendingConnects.length}subscribe(e,t){var i;return Zt(this,void 0,void 0,function*(){if(!e)throw new Error("topic must be set.");const s=function(l){const o=l;let r;try{r=JSON.parse(o==null?void 0:o.data)}catch{}t(r||{})};return this.subscriptions[e]||(this.subscriptions[e]=[]),this.subscriptions[e].push(s),this.isConnected?this.subscriptions[e].length===1?yield this.submitSubscriptions():(i=this.eventSource)===null||i===void 0||i.addEventListener(e,s):yield this.connect(),()=>Zt(this,void 0,void 0,function*(){return this.unsubscribeByTopicAndListener(e,s)})})}unsubscribe(e){var t;return Zt(this,void 0,void 0,function*(){if(this.hasSubscriptionListeners(e)){if(e){for(let i of this.subscriptions[e])(t=this.eventSource)===null||t===void 0||t.removeEventListener(e,i);delete this.subscriptions[e]}else this.subscriptions={};this.hasSubscriptionListeners()?this.hasSubscriptionListeners(e)||(yield this.submitSubscriptions()):this.disconnect()}})}unsubscribeByPrefix(e){var t;return Zt(this,void 0,void 0,function*(){let i=!1;for(let s in this.subscriptions)if(s.startsWith(e)){i=!0;for(let l of this.subscriptions[s])(t=this.eventSource)===null||t===void 0||t.removeEventListener(s,l);delete this.subscriptions[s]}i&&(this.hasSubscriptionListeners()?yield this.submitSubscriptions():this.disconnect())})}unsubscribeByTopicAndListener(e,t){var i;return Zt(this,void 0,void 0,function*(){if(!Array.isArray(this.subscriptions[e])||!this.subscriptions[e].length)return;let s=!1;for(let l=this.subscriptions[e].length-1;l>=0;l--)this.subscriptions[e][l]===t&&(s=!0,delete this.subscriptions[e][l],this.subscriptions[e].splice(l,1),(i=this.eventSource)===null||i===void 0||i.removeEventListener(e,t));s&&(this.subscriptions[e].length||delete this.subscriptions[e],this.hasSubscriptionListeners()?this.hasSubscriptionListeners(e)||(yield this.submitSubscriptions()):this.disconnect())})}hasSubscriptionListeners(e){var t,i;if(this.subscriptions=this.subscriptions||{},e)return!!(!((t=this.subscriptions[e])===null||t===void 0)&&t.length);for(let s in this.subscriptions)if(!((i=this.subscriptions[s])===null||i===void 0)&&i.length)return!0;return!1}submitSubscriptions(){return Zt(this,void 0,void 0,function*(){if(this.clientId)return this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},requestKey:this.getSubscriptionsCancelKey()}).catch(e=>{if(!(e!=null&&e.isAbort))throw e})})}getSubscriptionsCancelKey(){return"realtime_"+this.clientId}getNonEmptySubscriptionTopics(){const e=[];for(let t in this.subscriptions)this.subscriptions[t].length&&e.push(t);return e}addAllSubscriptionListeners(){if(this.eventSource){this.removeAllSubscriptionListeners();for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.addEventListener(e,t)}}removeAllSubscriptionListeners(){if(this.eventSource)for(let e in this.subscriptions)for(let t of this.subscriptions[e])this.eventSource.removeEventListener(e,t)}connect(){return Zt(this,void 0,void 0,function*(){if(!(this.reconnectAttempts>0))return new Promise((e,t)=>{this.pendingConnects.push({resolve:e,reject:t}),this.pendingConnects.length>1||this.initConnect()})})}initConnect(){this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(()=>{this.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=e=>{this.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",e=>{const t=e;this.clientId=t==null?void 0:t.lastEventId,this.submitSubscriptions().then(()=>Zt(this,void 0,void 0,function*(){let i=3;for(;this.hasUnsentSubscriptions()&&i>0;)i--,yield this.submitSubscriptions()})).then(()=>{for(let i of this.pendingConnects)i.resolve();this.pendingConnects=[],this.reconnectAttempts=0,clearTimeout(this.reconnectTimeoutId),clearTimeout(this.connectTimeoutId)}).catch(i=>{this.clientId="",this.connectErrorHandler(i)})})}hasUnsentSubscriptions(){const e=this.getNonEmptySubscriptionTopics();if(e.length!=this.lastSentTopics.length)return!0;for(const t of e)if(!this.lastSentTopics.includes(t))return!0;return!1}connectErrorHandler(e){if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),!this.clientId&&!this.reconnectAttempts||this.reconnectAttempts>this.maxReconnectAttempts){for(let i of this.pendingConnects)i.reject(new Kn(e));return this.pendingConnects=[],void this.disconnect()}this.disconnect(!0);const t=this.predefinedReconnectIntervals[this.reconnectAttempts]||this.predefinedReconnectIntervals[this.predefinedReconnectIntervals.length-1];this.reconnectAttempts++,this.reconnectTimeoutId=setTimeout(()=>{this.initConnect()},t)}disconnect(e=!1){var t;if(clearTimeout(this.connectTimeoutId),clearTimeout(this.reconnectTimeoutId),this.removeAllSubscriptionListeners(),this.client.cancelRequest(this.getSubscriptionsCancelKey()),(t=this.eventSource)===null||t===void 0||t.close(),this.eventSource=null,this.clientId="",!e){this.reconnectAttempts=0;for(let i of this.pendingConnects)i.resolve();this.pendingConnects=[]}}}class z0 extends Ta{constructor(e,t){super(e),this.collectionIdOrName=t}get baseCrudPath(){return this.baseCollectionPath+"/records"}get baseCollectionPath(){return"/api/collections/"+encodeURIComponent(this.collectionIdOrName)}subscribeOne(e,t){return Zt(this,void 0,void 0,function*(){return console.warn("PocketBase: subscribeOne(recordId, callback) is deprecated. Please replace it with subscribe(recordId, callback)."),this.client.realtime.subscribe(this.collectionIdOrName+"/"+e,t)})}subscribe(e,t){return Zt(this,void 0,void 0,function*(){if(typeof e=="function")return console.warn("PocketBase: subscribe(callback) is deprecated. Please replace it with subscribe('*', callback)."),this.client.realtime.subscribe(this.collectionIdOrName,e);if(!t)throw new Error("Missing subscription callback.");if(e==="")throw new Error("Missing topic.");let i=this.collectionIdOrName;return e!=="*"&&(i+="/"+e),this.client.realtime.subscribe(i,t)})}unsubscribe(e){return Zt(this,void 0,void 0,function*(){return e==="*"?this.client.realtime.unsubscribe(this.collectionIdOrName):e?this.client.realtime.unsubscribe(this.collectionIdOrName+"/"+e):this.client.realtime.unsubscribeByPrefix(this.collectionIdOrName)})}getFullList(e,t){if(typeof e=="number")return super.getFullList(e,t);const i=Object.assign({},e,t);return super.getFullList(i)}getList(e=1,t=30,i){return super.getList(e,t,i)}getFirstListItem(e,t){return super.getFirstListItem(e,t)}getOne(e,t){return super.getOne(e,t)}create(e,t){return super.create(e,t)}update(e,t,i){return super.update(e,t,i).then(s=>{var l,o,r;return((l=this.client.authStore.model)===null||l===void 0?void 0:l.id)!==(s==null?void 0:s.id)||((o=this.client.authStore.model)===null||o===void 0?void 0:o.collectionId)!==this.collectionIdOrName&&((r=this.client.authStore.model)===null||r===void 0?void 0:r.collectionName)!==this.collectionIdOrName||this.client.authStore.save(this.client.authStore.token,s),s})}delete(e,t){return super.delete(e,t).then(i=>{var s,l,o;return!i||((s=this.client.authStore.model)===null||s===void 0?void 0:s.id)!==e||((l=this.client.authStore.model)===null||l===void 0?void 0:l.collectionId)!==this.collectionIdOrName&&((o=this.client.authStore.model)===null||o===void 0?void 0:o.collectionName)!==this.collectionIdOrName||this.client.authStore.clear(),i})}authResponse(e){const t=this.decode((e==null?void 0:e.record)||{});return this.client.authStore.save(e==null?void 0:e.token,t),Object.assign({},e,{token:(e==null?void 0:e.token)||"",record:t})}listAuthMethods(e){return e=Object.assign({method:"GET"},e),this.client.send(this.baseCollectionPath+"/auth-methods",e).then(t=>Object.assign({},t,{usernamePassword:!!(t!=null&&t.usernamePassword),emailPassword:!!(t!=null&&t.emailPassword),authProviders:Array.isArray(t==null?void 0:t.authProviders)?t==null?void 0:t.authProviders:[]}))}authWithPassword(e,t,i,s){let l={method:"POST",body:{identity:e,password:t}};return l=En("This form of authWithPassword(usernameOrEmail, pass, body?, query?) is deprecated. Consider replacing it with authWithPassword(usernameOrEmail, pass, options?).",l,i,s),this.client.send(this.baseCollectionPath+"/auth-with-password",l).then(o=>this.authResponse(o))}authWithOAuth2Code(e,t,i,s,l,o,r){let a={method:"POST",body:{provider:e,code:t,codeVerifier:i,redirectUrl:s,createData:l}};return a=En("This form of authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, body?, query?) is deprecated. Consider replacing it with authWithOAuth2Code(provider, code, codeVerifier, redirectUrl, createData?, options?).",a,o,r),this.client.send(this.baseCollectionPath+"/auth-with-oauth2",a).then(u=>this.authResponse(u))}authWithOAuth2(...e){return Zt(this,void 0,void 0,function*(){if(e.length>1||typeof(e==null?void 0:e[0])=="string")return console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),this.authWithOAuth2Code((e==null?void 0:e[0])||"",(e==null?void 0:e[1])||"",(e==null?void 0:e[2])||"",(e==null?void 0:e[3])||"",(e==null?void 0:e[4])||{},(e==null?void 0:e[5])||{},(e==null?void 0:e[6])||{});const t=(e==null?void 0:e[0])||{},i=(yield this.listAuthMethods()).authProviders.find(a=>a.name===t.provider);if(!i)throw new Kn(new Error(`Missing or invalid provider "${t.provider}".`));const s=this.client.buildUrl("/api/oauth2-redirect"),l=new N_(this.client);let o=null;function r(){o==null||o.close(),l.unsubscribe()}return t.urlCallback||(o=Su(void 0)),new Promise((a,u)=>Zt(this,void 0,void 0,function*(){var f;try{yield l.subscribe("@oauth2",m=>Zt(this,void 0,void 0,function*(){const g=l.clientId;try{if(!m.state||g!==m.state)throw new Error("State parameters don't match.");const _=Object.assign({},t);delete _.provider,delete _.scopes,delete _.createData,delete _.urlCallback;const y=yield this.authWithOAuth2Code(i.name,m.code,i.codeVerifier,s,t.createData,_);a(y)}catch(_){u(new Kn(_))}r()}));const c={state:l.clientId};!((f=t.scopes)===null||f===void 0)&&f.length&&(c.scope=t.scopes.join(" "));const d=this._replaceQueryParams(i.authUrl+s,c);yield(t.urlCallback||function(m){o?o.location.href=m:o=Su(m)})(d)}catch(c){r(),u(new Kn(c))}}))})}authRefresh(e,t){let i={method:"POST"};return i=En("This form of authRefresh(body?, query?) is deprecated. Consider replacing it with authRefresh(options?).",i,e,t),this.client.send(this.baseCollectionPath+"/auth-refresh",i).then(s=>this.authResponse(s))}requestPasswordReset(e,t,i){let s={method:"POST",body:{email:e}};return s=En("This form of requestPasswordReset(email, body?, query?) is deprecated. Consider replacing it with requestPasswordReset(email, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/request-password-reset",s).then(()=>!0)}confirmPasswordReset(e,t,i,s,l){let o={method:"POST",body:{token:e,password:t,passwordConfirm:i}};return o=En("This form of confirmPasswordReset(token, password, passwordConfirm, body?, query?) is deprecated. Consider replacing it with confirmPasswordReset(token, password, passwordConfirm, options?).",o,s,l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",o).then(()=>!0)}requestVerification(e,t,i){let s={method:"POST",body:{email:e}};return s=En("This form of requestVerification(email, body?, query?) is deprecated. Consider replacing it with requestVerification(email, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/request-verification",s).then(()=>!0)}confirmVerification(e,t,i){let s={method:"POST",body:{token:e}};return s=En("This form of confirmVerification(token, body?, query?) is deprecated. Consider replacing it with confirmVerification(token, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/confirm-verification",s).then(()=>!0)}requestEmailChange(e,t,i){let s={method:"POST",body:{newEmail:e}};return s=En("This form of requestEmailChange(newEmail, body?, query?) is deprecated. Consider replacing it with requestEmailChange(newEmail, options?).",s,t,i),this.client.send(this.baseCollectionPath+"/request-email-change",s).then(()=>!0)}confirmEmailChange(e,t,i,s){let l={method:"POST",body:{token:e,password:t}};return l=En("This form of confirmEmailChange(token, password, body?, query?) is deprecated. Consider replacing it with confirmEmailChange(token, password, options?).",l,i,s),this.client.send(this.baseCollectionPath+"/confirm-email-change",l).then(()=>!0)}listExternalAuths(e,t){return t=Object.assign({method:"GET"},t),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/external-auths",t)}unlinkExternalAuth(e,t,i){return i=Object.assign({method:"DELETE"},i),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(e)+"/external-auths/"+encodeURIComponent(t),i).then(()=>!0)}_replaceQueryParams(e,t={}){let i=e,s="";e.indexOf("?")>=0&&(i=e.substring(0,e.indexOf("?")),s=e.substring(e.indexOf("?")+1));const l={},o=s.split("&");for(const r of o){if(r=="")continue;const a=r.split("=");l[decodeURIComponent(a[0].replace(/\+/g," "))]=decodeURIComponent((a[1]||"").replace(/\+/g," "))}for(let r in t)t.hasOwnProperty(r)&&(t[r]==null?delete l[r]:l[r]=t[r]);s="";for(let r in l)l.hasOwnProperty(r)&&(s!=""&&(s+="&"),s+=encodeURIComponent(r.replace(/%20/g,"+"))+"="+encodeURIComponent(l[r].replace(/%20/g,"+")));return s!=""?i+"?"+s:i}}function Su(n){if(typeof window>"u"||!(window!=null&&window.open))throw new Kn(new Error("Not in a browser context - please pass a custom urlCallback function."));let e=1024,t=768,i=window.innerWidth,s=window.innerHeight;e=e>i?i:e,t=t>s?s:t;let l=i/2-e/2,o=s/2-t/2;return window.open(n,"popup_window","width="+e+",height="+t+",top="+o+",left="+l+",resizable,menubar=no")}class B0 extends Ta{get baseCrudPath(){return"/api/collections"}import(e,t=!1,i){return Zt(this,void 0,void 0,function*(){return i=Object.assign({method:"PUT",body:{collections:e,deleteMissing:t}},i),this.client.send(this.baseCrudPath+"/import",i).then(()=>!0)})}}class U0 extends fs{getRequestsList(e=1,t=30,i){return(i=Object.assign({method:"GET"},i)).query=Object.assign({page:e,perPage:t},i.query),this.client.send("/api/logs/requests",i)}getRequest(e,t){return t=Object.assign({method:"GET"},t),this.client.send("/api/logs/requests/"+encodeURIComponent(e),t)}getRequestsStats(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/logs/requests/stats",e)}}class W0 extends fs{check(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/health",e)}}class Y0 extends fs{getUrl(e,t,i={}){if(!t||!(e!=null&&e.id)||!(e!=null&&e.collectionId)&&!(e!=null&&e.collectionName))return"";const s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));let l=this.client.buildUrl(s.join("/"));if(Object.keys(i).length){i.download===!1&&delete i.download;const o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l}getToken(e){return e=Object.assign({method:"POST"},e),this.client.send("/api/files/token",e).then(t=>(t==null?void 0:t.token)||"")}}class K0 extends fs{getFullList(e){return e=Object.assign({method:"GET"},e),this.client.send("/api/backups",e)}create(e,t){return t=Object.assign({method:"POST",body:{name:e}},t),this.client.send("/api/backups",t).then(()=>!0)}upload(e,t){return t=Object.assign({method:"POST",body:e},t),this.client.send("/api/backups/upload",t).then(()=>!0)}delete(e,t){return t=Object.assign({method:"DELETE"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}`,t).then(()=>!0)}restore(e,t){return t=Object.assign({method:"POST"},t),this.client.send(`/api/backups/${encodeURIComponent(e)}/restore`,t).then(()=>!0)}getDownloadUrl(e,t){return this.client.buildUrl(`/api/backups/${encodeURIComponent(t)}?token=${encodeURIComponent(e)}`)}}const J0=["requestKey","$cancelKey","$autoCancel","fetch","headers","body","query","params","cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","signal","window"];class Vo{constructor(e="/",t,i="en-US"){this.cancelControllers={},this.recordServices={},this.enableAutoCancellation=!0,this.baseUrl=e,this.lang=i,this.authStore=t||new P_,this.admins=new V0(this),this.collections=new B0(this),this.files=new Y0(this),this.logs=new U0(this),this.settings=new H0(this),this.realtime=new N_(this),this.health=new W0(this),this.backups=new K0(this)}collection(e){return this.recordServices[e]||(this.recordServices[e]=new z0(this,e)),this.recordServices[e]}autoCancellation(e){return this.enableAutoCancellation=!!e,this}cancelRequest(e){return this.cancelControllers[e]&&(this.cancelControllers[e].abort(),delete this.cancelControllers[e]),this}cancelAllRequests(){for(let e in this.cancelControllers)this.cancelControllers[e].abort();return this.cancelControllers={},this}getFileUrl(e,t,i={}){return this.files.getUrl(e,t,i)}buildUrl(e){var t;let i=this.baseUrl;return typeof window>"u"||!window.location||i.startsWith("https://")||i.startsWith("http://")||(i=!((t=window.location.origin)===null||t===void 0)&&t.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(i+=window.location.pathname||"/",i+=i.endsWith("/")?"":"/"),i+=this.baseUrl),e&&(i+=i.endsWith("/")?"":"/",i+=e.startsWith("/")?e.substring(1):e),i}send(e,t){return Zt(this,void 0,void 0,function*(){t=this.initSendOptions(e,t);let i=this.buildUrl(e);if(this.beforeSend){const s=Object.assign({},yield this.beforeSend(i,t));s.url!==void 0||s.options!==void 0?(i=s.url||i,t=s.options||t):Object.keys(s).length&&(t=s,console!=null&&console.warn&&console.warn("Deprecated format of beforeSend return: please use `return { url, options }`, instead of `return options`."))}if(t.query!==void 0){const s=this.serializeQueryParams(t.query);s&&(i+=(i.includes("?")?"&":"?")+s),delete t.query}return this.getHeader(t.headers,"Content-Type")=="application/json"&&t.body&&typeof t.body!="string"&&(t.body=JSON.stringify(t.body)),(t.fetch||fetch)(i,t).then(s=>Zt(this,void 0,void 0,function*(){let l={};try{l=yield s.json()}catch{}if(this.afterSend&&(l=yield this.afterSend(s,l)),s.status>=400)throw new Kn({url:s.url,status:s.status,data:l});return l})).catch(s=>{throw new Kn(s)})})}initSendOptions(e,t){(t=Object.assign({method:"GET"},t)).query=t.query||{},t.body=this.convertToFormDataIfNeeded(t.body);for(let i in t)J0.includes(i)||(t.query[i]=t[i],delete t[i]);if(t.query=Object.assign({},t.params,t.query),t.requestKey===void 0&&(t.$autoCancel===!1||t.query.$autoCancel===!1?t.requestKey=null:(t.$cancelKey||t.query.$cancelKey)&&(t.requestKey=t.$cancelKey||t.query.$cancelKey)),delete t.$autoCancel,delete t.query.$autoCancel,delete t.$cancelKey,delete t.query.$cancelKey,this.getHeader(t.headers,"Content-Type")!==null||this.isFormData(t.body)||(t.headers=Object.assign({},t.headers,{"Content-Type":"application/json"})),this.getHeader(t.headers,"Accept-Language")===null&&(t.headers=Object.assign({},t.headers,{"Accept-Language":this.lang})),this.authStore.token&&this.getHeader(t.headers,"Authorization")===null&&(t.headers=Object.assign({},t.headers,{Authorization:this.authStore.token})),this.enableAutoCancellation&&t.requestKey!==null){const i=t.requestKey||(t.method||"GET")+e;delete t.requestKey,this.cancelRequest(i);const s=new AbortController;this.cancelControllers[i]=s,t.signal=s.signal}return t}convertToFormDataIfNeeded(e){if(typeof FormData>"u"||e===void 0||typeof e!="object"||e===null||this.isFormData(e)||!this.hasBlobField(e))return e;const t=new FormData;for(let i in e){const s=Array.isArray(e[i])?e[i]:[e[i]];for(let l of s)t.append(i,l)}return t}hasBlobField(e){for(let t in e){const i=Array.isArray(e[t])?e[t]:[e[t]];for(let s of i)if(typeof Blob<"u"&&s instanceof Blob||typeof File<"u"&&s instanceof File)return!0}return!1}getHeader(e,t){e=e||{},t=t.toLowerCase();for(let i in e)if(i.toLowerCase()==t)return e[i];return null}isFormData(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)}serializeQueryParams(e){const t=[];for(const i in e){if(e[i]===null)continue;const s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(const o of s)t.push(l+"="+encodeURIComponent(o));else s instanceof Date?t.push(l+"="+encodeURIComponent(s.toISOString())):typeof s!==null&&typeof s=="object"?t.push(l+"="+encodeURIComponent(JSON.stringify(s))):t.push(l+"="+encodeURIComponent(s))}return t.join("&")}}class cs extends Error{}class G0 extends cs{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class Z0 extends cs{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class X0 extends cs{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class xs extends cs{}class F_ extends cs{constructor(e){super(`Invalid unit ${e}`)}}class Un extends cs{}class Ii extends cs{constructor(){super("Zone is an abstract class")}}const Le="numeric",si="short",In="long",Wr={year:Le,month:Le,day:Le},R_={year:Le,month:si,day:Le},Q0={year:Le,month:si,day:Le,weekday:si},q_={year:Le,month:In,day:Le},j_={year:Le,month:In,day:Le,weekday:In},H_={hour:Le,minute:Le},V_={hour:Le,minute:Le,second:Le},z_={hour:Le,minute:Le,second:Le,timeZoneName:si},B_={hour:Le,minute:Le,second:Le,timeZoneName:In},U_={hour:Le,minute:Le,hourCycle:"h23"},W_={hour:Le,minute:Le,second:Le,hourCycle:"h23"},Y_={hour:Le,minute:Le,second:Le,hourCycle:"h23",timeZoneName:si},K_={hour:Le,minute:Le,second:Le,hourCycle:"h23",timeZoneName:In},J_={year:Le,month:Le,day:Le,hour:Le,minute:Le},G_={year:Le,month:Le,day:Le,hour:Le,minute:Le,second:Le},Z_={year:Le,month:si,day:Le,hour:Le,minute:Le},X_={year:Le,month:si,day:Le,hour:Le,minute:Le,second:Le},x0={year:Le,month:si,day:Le,weekday:si,hour:Le,minute:Le},Q_={year:Le,month:In,day:Le,hour:Le,minute:Le,timeZoneName:si},x_={year:Le,month:In,day:Le,hour:Le,minute:Le,second:Le,timeZoneName:si},eb={year:Le,month:In,day:Le,weekday:In,hour:Le,minute:Le,timeZoneName:In},tb={year:Le,month:In,day:Le,weekday:In,hour:Le,minute:Le,second:Le,timeZoneName:In};function rt(n){return typeof n>"u"}function ls(n){return typeof n=="number"}function zo(n){return typeof n=="number"&&n%1===0}function ev(n){return typeof n=="string"}function tv(n){return Object.prototype.toString.call(n)==="[object Date]"}function nb(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function nv(n){return Array.isArray(n)?n:[n]}function Tu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function iv(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Os(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function Si(n,e,t){return zo(n)&&n>=e&&n<=t}function sv(n,e){return n-e*Math.floor(n/e)}function Gt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Pi(n){if(!(rt(n)||n===null||n===""))return parseInt(n,10)}function Ki(n){if(!(rt(n)||n===null||n===""))return parseFloat(n)}function Ca(n){if(!(rt(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function $a(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function $l(n){return n%4===0&&(n%100!==0||n%400===0)}function il(n){return $l(n)?366:365}function bo(n,e){const t=sv(e-1,12)+1,i=n+(e-t)/12;return t===2?$l(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ma(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function vo(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function Yr(n){return n>99?n:n>60?1900+n:2e3+n}function ib(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Bo(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function sb(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Un(`Invalid unit value ${n}`);return e}function yo(n,e){const t={};for(const i in n)if(Os(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=sb(s)}return t}function sl(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Gt(t,2)}:${Gt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Gt(t,2)}${Gt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Uo(n){return iv(n,["hour","minute","second","millisecond"])}const lb=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,lv=["January","February","March","April","May","June","July","August","September","October","November","December"],ob=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ov=["J","F","M","A","M","J","J","A","S","O","N","D"];function rb(n){switch(n){case"narrow":return[...ov];case"short":return[...ob];case"long":return[...lv];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ab=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ub=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],rv=["M","T","W","T","F","S","S"];function fb(n){switch(n){case"narrow":return[...rv];case"short":return[...ub];case"long":return[...ab];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const cb=["AM","PM"],av=["Before Christ","Anno Domini"],uv=["BC","AD"],fv=["B","A"];function db(n){switch(n){case"narrow":return[...fv];case"short":return[...uv];case"long":return[...av];default:return null}}function cv(n){return cb[n.hour<12?0:1]}function dv(n,e){return fb(e)[n.weekday-1]}function pv(n,e){return rb(e)[n.month-1]}function hv(n,e){return db(e)[n.year<0?0:1]}function mv(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function Cu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const gv={D:Wr,DD:R_,DDD:q_,DDDD:j_,t:H_,tt:V_,ttt:z_,tttt:B_,T:U_,TT:W_,TTT:Y_,TTTT:K_,f:J_,ff:Z_,fff:Q_,ffff:eb,F:G_,FF:X_,FFF:x_,FFFF:tb};class wn{static create(e,t={}){return new wn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return gv[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Gt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(h,m)=>this.loc.extract(e,h,m),o=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",r=()=>i?cv(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(h,m)=>i?pv(e,h):l(m?{month:h}:{month:h,day:"numeric"},"month"),u=(h,m)=>i?dv(e,h):l(m?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const m=wn.macroTokenToFormatOpts(h);return m?this.formatWithSystemDefault(e,m):h},c=h=>i?hv(e,h):l({era:h},"era"),d=h=>{switch(h){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(h)}};return Cu(wn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=wn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return Cu(l,s(r))}}class ti{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ml{get type(){throw new Ii}get name(){throw new Ii}get ianaName(){return this.name}get isUniversal(){throw new Ii}offsetName(e,t){throw new Ii}formatOffset(e,t){throw new Ii}offset(e){throw new Ii}equals(e){throw new Ii}get isValid(){throw new Ii}}let rr=null;class Oa extends Ml{static get instance(){return rr===null&&(rr=new Oa),rr}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return ib(e,t,i)}formatOffset(e,t){return sl(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let uo={};function _v(n){return uo[n]||(uo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),uo[n]}const bv={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function vv(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function yv(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?m:1e3+m,(d-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let ar=null;class bn extends Ml{static get utcInstance(){return ar===null&&(ar=new bn(0)),ar}static instance(e){return e===0?bn.utcInstance:new bn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new bn(Bo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${sl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${sl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return sl(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class kv extends Ml{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Fi(n,e){if(rt(n)||n===null)return e;if(n instanceof Ml)return n;if(ev(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?bn.utcInstance:bn.parseSpecifier(t)||Ti.create(n)}else return ls(n)?bn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new kv(n)}let $u=()=>Date.now(),Mu="system",Ou=null,Eu=null,Du=null,Au;class tn{static get now(){return $u}static set now(e){$u=e}static set defaultZone(e){Mu=e}static get defaultZone(){return Fi(Mu,Oa.instance)}static get defaultLocale(){return Ou}static set defaultLocale(e){Ou=e}static get defaultNumberingSystem(){return Eu}static set defaultNumberingSystem(e){Eu=e}static get defaultOutputCalendar(){return Du}static set defaultOutputCalendar(e){Du=e}static get throwOnInvalid(){return Au}static set throwOnInvalid(e){Au=e}static resetCaches(){Rt.resetCache(),Ti.resetCache()}}let Iu={};function wv(n,e={}){const t=JSON.stringify([n,e]);let i=Iu[t];return i||(i=new Intl.ListFormat(n,e),Iu[t]=i),i}let Kr={};function Jr(n,e={}){const t=JSON.stringify([n,e]);let i=Kr[t];return i||(i=new Intl.DateTimeFormat(n,e),Kr[t]=i),i}let Gr={};function Sv(n,e={}){const t=JSON.stringify([n,e]);let i=Gr[t];return i||(i=new Intl.NumberFormat(n,e),Gr[t]=i),i}let Zr={};function Tv(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Zr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Zr[s]=l),l}let el=null;function Cv(){return el||(el=new Intl.DateTimeFormat().resolvedOptions().locale,el)}function $v(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Jr(n).resolvedOptions()}catch{t=Jr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function Mv(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function Ov(n){const e=[];for(let t=1;t<=12;t++){const i=Ye.utc(2016,t,1);e.push(n(i))}return e}function Ev(n){const e=[];for(let t=1;t<=7;t++){const i=Ye.utc(2016,11,13+t);e.push(n(i))}return e}function Hl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function Dv(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class Av{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=Sv(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):$a(e,3);return Gt(t,this.padTo)}}}class Iv{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&Ti.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Ye.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Jr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class Lv{constructor(e,t,i){this.opts={style:"long",...i},!t&&nb()&&(this.rtf=Tv(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):mv(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Rt{static fromOpts(e){return Rt.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||tn.defaultLocale,o=l||(s?"en-US":Cv()),r=t||tn.defaultNumberingSystem,a=i||tn.defaultOutputCalendar;return new Rt(o,r,a,l)}static resetCache(){el=null,Kr={},Gr={},Zr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Rt.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=$v(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=Mv(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Dv(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Rt.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return Hl(this,e,i,rb,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=Ov(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Hl(this,e,i,fb,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=Ev(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Hl(this,void 0,e,()=>cb,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ye.utc(2016,11,13,9),Ye.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Hl(this,e,t,db,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ye.utc(-40,1,1),Ye.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new Av(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Iv(e,this.intl,t)}relFormatter(e={}){return new Lv(this.intl,this.isEnglish(),e)}listFormatter(e={}){return wv(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Ps(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Ns(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function Fs(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function pb(...n){return(e,t)=>{const i={};let s;for(s=0;sh!==void 0&&(m||h&&f)?-h:h;return[{years:d(Ki(t)),months:d(Ki(i)),weeks:d(Ki(s)),days:d(Ki(l)),hours:d(Ki(o)),minutes:d(Ki(r)),seconds:d(Ki(a),a==="-0"),milliseconds:d(Ca(u),c)}]}const Yv={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Aa(n,e,t,i,s,l,o){const r={year:e.length===2?Yr(Pi(e)):Pi(e),month:ob.indexOf(t)+1,day:Pi(i),hour:Pi(s),minute:Pi(l)};return o&&(r.second=Pi(o)),n&&(r.weekday=n.length>3?ab.indexOf(n)+1:ub.indexOf(n)+1),r}const Kv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Jv(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=Aa(e,s,i,t,l,o,r);let h;return a?h=Yv[a]:u?h=0:h=Bo(f,c),[d,new bn(h)]}function Gv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Zv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Xv=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Qv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Lu(n){const[,e,t,i,s,l,o,r]=n;return[Aa(e,s,i,t,l,o,r),bn.utcInstance]}function xv(n){const[,e,t,i,s,l,o,r]=n;return[Aa(e,r,t,i,s,l,o),bn.utcInstance]}const ey=Ps(Nv,Da),ty=Ps(Fv,Da),ny=Ps(Rv,Da),iy=Ps(mb),_b=Ns(zv,Rs,Ol,El),sy=Ns(qv,Rs,Ol,El),ly=Ns(jv,Rs,Ol,El),oy=Ns(Rs,Ol,El);function ry(n){return Fs(n,[ey,_b],[ty,sy],[ny,ly],[iy,oy])}function ay(n){return Fs(Gv(n),[Kv,Jv])}function uy(n){return Fs(n,[Zv,Lu],[Xv,Lu],[Qv,xv])}function fy(n){return Fs(n,[Uv,Wv])}const cy=Ns(Rs);function dy(n){return Fs(n,[Bv,cy])}const py=Ps(Hv,Vv),hy=Ps(gb),my=Ns(Rs,Ol,El);function gy(n){return Fs(n,[py,_b],[hy,my])}const _y="Invalid Duration",bb={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},by={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...bb},qn=146097/400,gs=146097/4800,vy={years:{quarters:4,months:12,weeks:qn/7,days:qn,hours:qn*24,minutes:qn*24*60,seconds:qn*24*60*60,milliseconds:qn*24*60*60*1e3},quarters:{months:3,weeks:qn/28,days:qn/4,hours:qn*24/4,minutes:qn*24*60/4,seconds:qn*24*60*60/4,milliseconds:qn*24*60*60*1e3/4},months:{weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},...bb},xi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],yy=xi.slice(0).reverse();function Ji(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new ct(i)}function ky(n){return n<0?Math.floor(n):Math.ceil(n)}function vb(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?ky(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function wy(n,e){yy.reduce((t,i)=>rt(e[i])?t:(t&&vb(n,e,t,e,i),i),null)}class ct{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Rt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?vy:by,this.isLuxonDuration=!0}static fromMillis(e,t){return ct.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Un(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ct({values:yo(e,ct.normalizeUnit),loc:Rt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ls(e))return ct.fromMillis(e);if(ct.isDuration(e))return e;if(typeof e=="object")return ct.fromObject(e);throw new Un(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=fy(e);return i?ct.fromObject(i,t):ct.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=dy(e);return i?ct.fromObject(i,t):ct.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Un("need to specify a reason the Duration is invalid");const i=e instanceof ti?e:new ti(e,t);if(tn.throwOnInvalid)throw new X0(i);return new ct({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new F_(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?wn.create(this.loc,i).formatDurationFromString(this,e):_y}toHuman(e={}){const t=xi.map(i=>{const s=this.values[i];return rt(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=$a(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=ct.fromDurationLike(e),i={};for(const s of xi)(Os(t.values,s)||Os(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ji(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=ct.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=sb(e(this.values[i],i));return Ji(this,{values:t},!0)}get(e){return this[ct.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...yo(e,ct.normalizeUnit)};return Ji(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Ji(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return wy(this.matrix,e),Ji(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>ct.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of xi)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;ls(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)xi.indexOf(u)>xi.indexOf(o)&&vb(this.matrix,s,u,t,o)}else ls(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Ji(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Ji(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of xi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const zs="Invalid Interval";function Sy(n,e){return!n||!n.isValid?Ht.invalid("missing or invalid start"):!e||!e.isValid?Ht.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?Ht.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ws).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(Ht.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=ct.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(Ht.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:Ht.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Ht.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(Ht.fromDateTimes(t,a.time)),t=null);return Ht.merge(s)}difference(...e){return Ht.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:zs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:zs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:zs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:zs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:zs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ct.invalid(this.invalidReason)}mapEndpoints(e){return Ht.fromDateTimes(e(this.s),e(this.e))}}class Vl{static hasDST(e=tn.defaultZone){const t=Ye.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Ti.isValidZone(e)}static normalizeZone(e){return Fi(e,tn.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Rt.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Rt.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Rt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Rt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Rt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Rt.create(t,null,"gregory").eras(e)}static features(){return{relative:nb()}}}function Pu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(ct.fromMillis(i).as("days"))}function Ty(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=Pu(r,a);return(u-u%7)/7}],["days",Pu]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function Cy(n,e,t,i){let[s,l,o,r]=Ty(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?ct.fromMillis(a,i).shiftTo(...u).plus(f):f}const Ia={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Nu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},$y=Ia.hanidec.replace(/[\[|\]]/g,"").split("");function My(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function xn({numberingSystem:n},e=""){return new RegExp(`${Ia[n||"latn"]}${e}`)}const Oy="missing Intl.DateTimeFormat.formatToParts support";function ht(n,e=t=>t){return{regex:n,deser:([t])=>e(My(t))}}const Ey=String.fromCharCode(160),yb=`[ ${Ey}]`,kb=new RegExp(yb,"g");function Dy(n){return n.replace(/\./g,"\\.?").replace(kb,yb)}function Fu(n){return n.replace(/\./g,"").replace(kb," ").toLowerCase()}function ei(n,e){return n===null?null:{regex:RegExp(n.map(Dy).join("|")),deser:([t])=>n.findIndex(i=>Fu(t)===Fu(i))+e}}function Ru(n,e){return{regex:n,deser:([,t,i])=>Bo(t,i),groups:e}}function ur(n){return{regex:n,deser:([e])=>e}}function Ay(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Iy(n,e){const t=xn(e),i=xn(e,"{2}"),s=xn(e,"{3}"),l=xn(e,"{4}"),o=xn(e,"{6}"),r=xn(e,"{1,2}"),a=xn(e,"{1,3}"),u=xn(e,"{1,6}"),f=xn(e,"{1,9}"),c=xn(e,"{2,4}"),d=xn(e,"{4,6}"),h=_=>({regex:RegExp(Ay(_.val)),deser:([y])=>y,literal:!0}),g=(_=>{if(n.literal)return h(_);switch(_.val){case"G":return ei(e.eras("short",!1),0);case"GG":return ei(e.eras("long",!1),0);case"y":return ht(u);case"yy":return ht(c,Yr);case"yyyy":return ht(l);case"yyyyy":return ht(d);case"yyyyyy":return ht(o);case"M":return ht(r);case"MM":return ht(i);case"MMM":return ei(e.months("short",!0,!1),1);case"MMMM":return ei(e.months("long",!0,!1),1);case"L":return ht(r);case"LL":return ht(i);case"LLL":return ei(e.months("short",!1,!1),1);case"LLLL":return ei(e.months("long",!1,!1),1);case"d":return ht(r);case"dd":return ht(i);case"o":return ht(a);case"ooo":return ht(s);case"HH":return ht(i);case"H":return ht(r);case"hh":return ht(i);case"h":return ht(r);case"mm":return ht(i);case"m":return ht(r);case"q":return ht(r);case"qq":return ht(i);case"s":return ht(r);case"ss":return ht(i);case"S":return ht(a);case"SSS":return ht(s);case"u":return ur(f);case"uu":return ur(r);case"uuu":return ht(t);case"a":return ei(e.meridiems(),0);case"kkkk":return ht(l);case"kk":return ht(c,Yr);case"W":return ht(r);case"WW":return ht(i);case"E":case"c":return ht(t);case"EEE":return ei(e.weekdays("short",!1,!1),1);case"EEEE":return ei(e.weekdays("long",!1,!1),1);case"ccc":return ei(e.weekdays("short",!0,!1),1);case"cccc":return ei(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Ru(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return Ru(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return ur(/[a-z_+-/]{1,256}?/i);default:return h(_)}})(n)||{invalidReason:Oy};return g.token=n,g}const Ly={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function Py(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=Ly[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function Ny(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function Fy(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Os(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function Ry(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return rt(n.z)||(t=Ti.create(n.z)),rt(n.Z)||(t||(t=new bn(n.Z)),i=n.Z),rt(n.q)||(n.M=(n.q-1)*3+1),rt(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),rt(n.u)||(n.S=Ca(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let fr=null;function qy(){return fr||(fr=Ye.fromMillis(1555555555555)),fr}function jy(n,e){if(n.literal)return n;const t=wn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=wn.create(e,t).formatDateTimeParts(qy()).map(o=>Py(o,e,t));return l.includes(void 0)?n:l}function Hy(n,e){return Array.prototype.concat(...n.map(t=>jy(t,e)))}function wb(n,e,t){const i=Hy(wn.parseFormat(t),n),s=i.map(o=>Iy(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=Ny(s),a=RegExp(o,"i"),[u,f]=Fy(e,a,r),[c,d,h]=f?Ry(f):[null,null,void 0];if(Os(f,"a")&&Os(f,"H"))throw new xs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:h}}}function Vy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=wb(n,e,t);return[i,s,l,o]}const Sb=[0,31,59,90,120,151,181,212,243,273,304,334],Tb=[0,31,60,91,121,152,182,213,244,274,305,335];function Yn(n,e){return new ti("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Cb(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function $b(n,e,t){return t+($l(n)?Tb:Sb)[e-1]}function Mb(n,e){const t=$l(n)?Tb:Sb,i=t.findIndex(l=>lvo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Uo(n)}}function qu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Cb(e,1,4),l=il(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=il(r)):o>l?(r=e+1,o-=il(e)):r=e;const{month:a,day:u}=Mb(r,o);return{year:r,month:a,day:u,...Uo(n)}}function cr(n){const{year:e,month:t,day:i}=n,s=$b(e,t,i);return{year:e,ordinal:s,...Uo(n)}}function ju(n){const{year:e,ordinal:t}=n,{month:i,day:s}=Mb(e,t);return{year:e,month:i,day:s,...Uo(n)}}function zy(n){const e=zo(n.weekYear),t=Si(n.weekNumber,1,vo(n.weekYear)),i=Si(n.weekday,1,7);return e?t?i?!1:Yn("weekday",n.weekday):Yn("week",n.week):Yn("weekYear",n.weekYear)}function By(n){const e=zo(n.year),t=Si(n.ordinal,1,il(n.year));return e?t?!1:Yn("ordinal",n.ordinal):Yn("year",n.year)}function Ob(n){const e=zo(n.year),t=Si(n.month,1,12),i=Si(n.day,1,bo(n.year,n.month));return e?t?i?!1:Yn("day",n.day):Yn("month",n.month):Yn("year",n.year)}function Eb(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=Si(e,0,23)||e===24&&t===0&&i===0&&s===0,o=Si(t,0,59),r=Si(i,0,59),a=Si(s,0,999);return l?o?r?a?!1:Yn("millisecond",s):Yn("second",i):Yn("minute",t):Yn("hour",e)}const dr="Invalid DateTime",Hu=864e13;function zl(n){return new ti("unsupported zone",`the zone "${n.name}" is not supported`)}function pr(n){return n.weekData===null&&(n.weekData=Xr(n.c)),n.weekData}function Bs(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Ye({...t,...e,old:t})}function Db(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Vu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function fo(n,e,t){return Db(Ma(n),e,t)}function zu(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,bo(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=ct.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=Ma(l);let[a,u]=Db(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Us(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Ye.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Ye.invalid(new ti("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?wn.create(Rt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function hr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Gt(n.c.year,t?6:4),e?(i+="-",i+=Gt(n.c.month),i+="-",i+=Gt(n.c.day)):(i+=Gt(n.c.month),i+=Gt(n.c.day)),i}function Bu(n,e,t,i,s,l){let o=Gt(n.c.hour);return e?(o+=":",o+=Gt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Gt(n.c.minute),(n.c.second!==0||!t)&&(o+=Gt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Gt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Gt(Math.trunc(-n.o/60)),o+=":",o+=Gt(Math.trunc(-n.o%60))):(o+="+",o+=Gt(Math.trunc(n.o/60)),o+=":",o+=Gt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const Ab={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Uy={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Wy={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ib=["year","month","day","hour","minute","second","millisecond"],Yy=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ky=["year","ordinal","hour","minute","second","millisecond"];function Uu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new F_(n);return e}function Wu(n,e){const t=Fi(e.zone,tn.defaultZone),i=Rt.fromObject(e),s=tn.now();let l,o;if(rt(n.year))l=s;else{for(const u of Ib)rt(n[u])&&(n[u]=Ab[u]);const r=Ob(n)||Eb(n);if(r)return Ye.invalid(r);const a=t.offset(s);[l,o]=fo(n,a,t)}return new Ye({ts:l,zone:t,loc:i,o})}function Yu(n,e,t){const i=rt(t.round)?!0:t.round,s=(o,r)=>(o=$a(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Ku(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class Ye{constructor(e){const t=e.zone||tn.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new ti("invalid input"):null)||(t.isValid?null:zl(t));this.ts=rt(e.ts)?tn.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Vu(this.ts,r),i=Number.isNaN(s.year)?new ti("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Rt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Ye({})}static local(){const[e,t]=Ku(arguments),[i,s,l,o,r,a,u]=t;return Wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Ku(arguments),[i,s,l,o,r,a,u]=t;return e.zone=bn.utcInstance,Wu({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=tv(e)?e.valueOf():NaN;if(Number.isNaN(i))return Ye.invalid("invalid input");const s=Fi(t.zone,tn.defaultZone);return s.isValid?new Ye({ts:i,zone:s,loc:Rt.fromObject(t)}):Ye.invalid(zl(s))}static fromMillis(e,t={}){if(ls(e))return e<-Hu||e>Hu?Ye.invalid("Timestamp out of range"):new Ye({ts:e,zone:Fi(t.zone,tn.defaultZone),loc:Rt.fromObject(t)});throw new Un(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ls(e))return new Ye({ts:e*1e3,zone:Fi(t.zone,tn.defaultZone),loc:Rt.fromObject(t)});throw new Un("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Fi(t.zone,tn.defaultZone);if(!i.isValid)return Ye.invalid(zl(i));const s=tn.now(),l=rt(t.specificOffset)?i.offset(s):t.specificOffset,o=yo(e,Uu),r=!rt(o.ordinal),a=!rt(o.year),u=!rt(o.month)||!rt(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=Rt.fromObject(t);if((f||r)&&c)throw new xs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new xs("Can't mix ordinal dates with month/day");const h=c||o.weekday&&!f;let m,g,_=Vu(s,l);h?(m=Yy,g=Uy,_=Xr(_)):r?(m=Ky,g=Wy,_=cr(_)):(m=Ib,g=Ab);let y=!1;for(const D of m){const I=o[D];rt(I)?y?o[D]=g[D]:o[D]=_[D]:y=!0}const S=h?zy(o):r?By(o):Ob(o),C=S||Eb(o);if(C)return Ye.invalid(C);const T=h?qu(o):r?ju(o):o,[$,M]=fo(T,l,i),O=new Ye({ts:$,zone:i,o:M,loc:d});return o.weekday&&f&&e.weekday!==O.weekday?Ye.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=ry(e);return Us(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=ay(e);return Us(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=uy(e);return Us(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(rt(e)||rt(t))throw new Un("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Rt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=Vy(o,e,t);return f?Ye.invalid(f):Us(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Ye.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=gy(e);return Us(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Un("need to specify a reason the DateTime is invalid");const i=e instanceof ti?e:new ti(e,t);if(tn.throwOnInvalid)throw new G0(i);return new Ye({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?pr(this).weekYear:NaN}get weekNumber(){return this.isValid?pr(this).weekNumber:NaN}get weekday(){return this.isValid?pr(this).weekday:NaN}get ordinal(){return this.isValid?cr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Vl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Vl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Vl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Vl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return $l(this.year)}get daysInMonth(){return bo(this.year,this.month)}get daysInYear(){return this.isValid?il(this.year):NaN}get weeksInWeekYear(){return this.isValid?vo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=wn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(bn.instance(e),t)}toLocal(){return this.setZone(tn.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Fi(e,tn.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=fo(o,l,e)}return Bs(this,{ts:s,zone:e})}else return Ye.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Bs(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=yo(e,Uu),i=!rt(t.weekYear)||!rt(t.weekNumber)||!rt(t.weekday),s=!rt(t.ordinal),l=!rt(t.year),o=!rt(t.month)||!rt(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new xs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new xs("Can't mix ordinal dates with month/day");let u;i?u=qu({...Xr(this.c),...t}):rt(t.ordinal)?(u={...this.toObject(),...t},rt(t.day)&&(u.day=Math.min(bo(u.year,u.month),u.day))):u=ju({...cr(this.c),...t});const[f,c]=fo(u,this.o,this.zone);return Bs(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=ct.fromDurationLike(e);return Bs(this,zu(this,t))}minus(e){if(!this.isValid)return this;const t=ct.fromDurationLike(e).negate();return Bs(this,zu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=ct.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?wn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):dr}toLocaleString(e=Wr,t={}){return this.isValid?wn.create(this.loc.clone(t),e).formatDateTime(this):dr}toLocaleParts(e={}){return this.isValid?wn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=hr(this,o);return r+="T",r+=Bu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?hr(this,e==="extended"):null}toISOWeekDate(){return Bl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Bu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Bl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Bl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?hr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Bl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():dr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return ct.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=nv(t).map(ct.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=Cy(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Ye.now(),e,t)}until(e){return this.isValid?Ht.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Ye.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Ye.isDateTime))throw new Un("max requires all arguments be DateTimes");return Tu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Rt.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return wb(o,e,t)}static fromStringExplain(e,t,i={}){return Ye.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Wr}static get DATE_MED(){return R_}static get DATE_MED_WITH_WEEKDAY(){return Q0}static get DATE_FULL(){return q_}static get DATE_HUGE(){return j_}static get TIME_SIMPLE(){return H_}static get TIME_WITH_SECONDS(){return V_}static get TIME_WITH_SHORT_OFFSET(){return z_}static get TIME_WITH_LONG_OFFSET(){return B_}static get TIME_24_SIMPLE(){return U_}static get TIME_24_WITH_SECONDS(){return W_}static get TIME_24_WITH_SHORT_OFFSET(){return Y_}static get TIME_24_WITH_LONG_OFFSET(){return K_}static get DATETIME_SHORT(){return J_}static get DATETIME_SHORT_WITH_SECONDS(){return G_}static get DATETIME_MED(){return Z_}static get DATETIME_MED_WITH_SECONDS(){return X_}static get DATETIME_MED_WITH_WEEKDAY(){return x0}static get DATETIME_FULL(){return Q_}static get DATETIME_FULL_WITH_SECONDS(){return x_}static get DATETIME_HUGE(){return eb}static get DATETIME_HUGE_WITH_SECONDS(){return tb}}function Ws(n){if(Ye.isDateTime(n))return n;if(n&&n.valueOf&&ls(n.valueOf()))return Ye.fromJSDate(n);if(n&&typeof n=="object")return Ye.fromObject(n);throw new Un(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const Jy=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],Gy=[".mp4",".avi",".mov",".3gp",".wmv"],Zy=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],Xy=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class j{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||j.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||(e==null?void 0:e.isContentEditable)}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return j.isInput(e)||t==="button"||t==="a"||t==="details"||(e==null?void 0:e.tabIndex)>=0}static hasNonEmptyProps(e){for(let t in e)if(!j.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!j.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){j.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=j.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!j.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!j.isObject(l)&&!Array.isArray(l)||!j.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!j.isObject(s)&&!Array.isArray(s)||!j.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):j.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||j.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||j.isObject(e)&&Object.keys(e).length>0)&&j.deleteByPath(e,l.join(i),i)}static randomString(e=10){let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s"u")return j.randomString(e);const t=new Uint8Array(e);crypto.getRandomValues(t);const i="-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";let s="";for(let l=0;ll.replaceAll("{_PB_ESCAPED_}",t));for(let l of s)l=l.trim(),j.isEmpty(l)||i.push(l);return i}static joinNonEmpty(e,t=", "){e=e||[];const i=[],s=t.length>1?t.trim():t;for(let l of e)l=typeof l=="string"?l.trim():"",j.isEmpty(l)||i.push(l.replaceAll(s,"\\"+s));return i.join(t)}static getInitials(e){if(e=(e||"").split("@")[0].trim(),e.length<=2)return e.toUpperCase();const t=e.split(/[\.\_\-\ ]/);return t.length>=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static formattedFileSize(e){const t=e?Math.floor(Math.log(e)/Math.log(1024)):0;return(e/Math.pow(1024,t)).toFixed(2)*1+" "+["B","KB","MB","GB","TB"][t]}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ss'Z'",24:"yyyy-MM-dd HH:mm:ss.SSS'Z'"},i=t[e.length]||t[19];return Ye.fromFormat(e,i,{zone:"UTC"})}return Ye.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return j.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return j.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{console.warn("Failed to copy.",i)})}static download(e,t){const i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download",t),i.click(),i.remove()}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2));t=t.endsWith(".json")?t:t+".json",j.download(i,t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return e=e||"",!!Jy.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return e=e||"",!!Gy.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return e=e||"",!!Zy.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return e=e||"",!!Xy.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return j.hasImageExtension(e)?"image":j.hasDocumentExtension(e)?"document":j.hasVideoExtension(e)?"video":j.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(j.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)j.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):j.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var a,u,f,c,d,h,m;const t=(e==null?void 0:e.schema)||[],i=(e==null?void 0:e.type)==="auth",s=(e==null?void 0:e.type)==="view",l={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name};i&&(l.username="username123",l.verified=!1,l.emailVisibility=!0,l.email="test@example.com"),(!s||j.extractColumnsFromQuery((a=e==null?void 0:e.options)==null?void 0:a.query).includes("created"))&&(l.created="2022-01-01 01:00:00.123Z"),(!s||j.extractColumnsFromQuery((u=e==null?void 0:e.options)==null?void 0:u.query).includes("updated"))&&(l.updated="2022-01-01 23:59:59.456Z");for(const g of t){let _=null;g.type==="number"?_=123:g.type==="date"?_="2022-01-01 10:00:00.123Z":g.type==="bool"?_=!0:g.type==="email"?_="test@example.com":g.type==="url"?_="https://example.com":g.type==="json"?_="JSON":g.type==="file"?(_="filename.jpg",((f=g.options)==null?void 0:f.maxSelect)!==1&&(_=[_])):g.type==="select"?(_=(d=(c=g.options)==null?void 0:c.values)==null?void 0:d[0],((h=g.options)==null?void 0:h.maxSelect)!==1&&(_=[_])):g.type==="relation"?(_="RELATION_RECORD_ID",((m=g.options)==null?void 0:m.maxSelect)!==1&&(_=[_])):_="test",l[g.name]=_}return l}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"view":return"ri-table-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!j.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!j.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=j.isObject(u)&&j.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const o of e)o.type==="auth"?t.push(o):o.type==="base"?i.push(o):s.push(o);function l(o,r){return o.name>r.name?1:o.name{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){const e=["DIV","P","A","EM","B","STRONG","H1","H2","H3","H4","H5","H6","TABLE","TR","TD","TH","TBODY","THEAD","TFOOT","BR","HR","Q","SUP","SUB","DEL","IMG","OL","UL","LI","CODE"];function t(s){let l=s.parentNode;for(;s.firstChild;)l.insertBefore(s.firstChild,s);l.removeChild(s)}function i(s){if(s){for(const l of s.children)i(l);e.includes(s.tagName)?(s.removeAttribute("style"),s.removeAttribute("class")):t(s)}}return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image_picker table codesample direction | code fullscreen",paste_postprocess:(s,l)=>{i(l.node)},file_picker_types:"image",file_picker_callback:(s,l,o)=>{const r=document.createElement("input");r.setAttribute("type","file"),r.setAttribute("accept","image/*"),r.addEventListener("change",a=>{const u=a.target.files[0],f=new FileReader;f.addEventListener("load",()=>{if(!tinymce)return;const c="blobid"+new Date().getTime(),d=tinymce.activeEditor.editorUpload.blobCache,h=f.result.split(",")[1],m=d.create(c,u,h);d.add(m),s(m.blobUri(),{title:u.name})}),f.readAsDataURL(u)}),r.click()},setup:s=>{s.on("keydown",o=>{(o.ctrlKey||o.metaKey)&&o.code=="KeyS"&&s.formElement&&(o.preventDefault(),o.stopPropagation(),s.formElement.dispatchEvent(new KeyboardEvent("keydown",o)))});const l="tinymce_last_direction";s.on("init",()=>{var r;const o=(r=window==null?void 0:window.localStorage)==null?void 0:r.getItem(l);!s.isDirty()&&s.getContent()==""&&o=="rtl"&&s.execCommand("mceDirectionRTL")}),s.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:o=>{o([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var a;(a=window==null?void 0:window.localStorage)==null||a.setItem(l,"ltr"),s.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTL content",icon:"rtl",onAction:()=>{var a;(a=window==null?void 0:window.localStorage)==null||a.setItem(l,"rtl"),s.execCommand("mceDirectionRTL")}}])}}),s.ui.registry.addMenuButton("image_picker",{icon:"image",fetch:o=>{o([{type:"menuitem",text:"From collection",icon:"gallery",onAction:()=>{s.dispatch("collections_file_picker",{})}},{type:"menuitem",text:"Inline",icon:"browse",onAction:()=>{s.execCommand("mceImage")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(r=j.stringifyValue(r,i),s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","slug","email","username","nickname","label","heading","message","key","identifier","id"];for(const o of l){let r=j.stringifyValue(e[o],"");if(r)return r}return i}static stringifyValue(e,t="N/A"){if(j.isEmpty(e))return t;if(typeof e=="boolean")return e?"True":"False";if(typeof e=="string")return e=e.indexOf("<")>=0?j.plainText(e):e,j.truncate(e)||t;if(Array.isArray(e))return e.join(",");if(typeof e=="object")try{return j.truncate(JSON.stringify(e))||t}catch{return t}return""+e}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.type==="view")for(let l of j.extractColumnsFromQuery(e.options.query))j.pushUnique(i,t+l);else e.type==="auth"?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)j.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,c,d;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s*\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!j.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let h of r){h=h.trim().replaceAll("{PB_TEMP}",",");const g=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(h);if((g==null?void 0:g.length)!=4)continue;const _=(c=(f=g[1])==null?void 0:f.trim())==null?void 0:c.replace(l,"");_&&t.columns.push({name:_,collate:g[2]||"",sort:((d=g[3])==null?void 0:d.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+j.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` `),t+=i.map(s=>{let l="";return s.name.includes("(")||s.name.includes(" ")?l+=s.name:l+="`"+s.name+"`",s.collate&&(l+=" COLLATE "+s.collate),s.sort&&(l+=" "+s.sort.toUpperCase()),l}).join(`, `),i.length>1&&(t+=` -`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=j.parseIndex(e);return i.tableName=t,j.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=j.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?j.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}static initCollection(e){return Object.assign({id:"",created:"",updated:"",name:"",type:"base",system:!1,listRule:null,viewRule:null,createRule:null,updateRule:null,deleteRule:null,schema:[],indexes:[],options:{}},e)}static initSchemaField(e){return Object.assign({id:"",name:"",type:"text",system:!1,required:!1,options:{}},e)}static triggerResize(){window.dispatchEvent(new Event("resize"))}static getHashQueryParams(){let e="";const t=window.location.hash.indexOf("?");return t>-1&&(e=window.location.hash.substring(t+1)),Object.fromEntries(new URLSearchParams(e))}static replaceHashQueryParams(e){e=e||{};let t="",i=window.location.hash;const s=i.indexOf("?");s>-1&&(t=i.substring(s+1),i=i.substring(0,s));const l=new URLSearchParams(t);for(let a in e){const u=e[a];u===null?l.delete(a):l.set(a,u)}t=l.toString(),t!=""&&(i+="?"+t);let o=window.location.href;const r=o.indexOf("#");r>-1&&(o=o.substring(0,r)),window.location.replace(o+i)}}const Wo=Ln([]);function ko(n,e=4e3){return Yo(n,"info",e)}function zt(n,e=3e3){return Yo(n,"success",e)}function Ci(n,e=4500){return Yo(n,"error",e)}function Qy(n,e=4500){return Yo(n,"warning",e)}function Yo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{Lb(i)},t)};Wo.update(s=>(Pa(s,i.message),j.pushOrReplaceByKey(s,i,"message"),s))}function Lb(n){Wo.update(e=>(Pa(e,n),e))}function La(){Wo.update(n=>{for(let e of n)Pa(n,e);return[]})}function Pa(n,e){let t;typeof e=="string"?t=j.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),j.removeByKey(n,"message",t.message))}const Mi=Ln({});function on(n){Mi.set(n||{})}function pi(n){Mi.update(e=>(j.deleteByPath(e,n),e))}const Na=Ln({});function Qr(n){Na.set(n||{})}const Zn=Ln([]),hi=Ln({}),wo=Ln(!1),Pb=Ln({});function xy(n){Zn.update(e=>{const t=j.findByKey(e,"id",n);return t?hi.set(t):e.length&&hi.set(e[0]),e})}function ek(n){hi.update(e=>j.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),Zn.update(e=>(j.pushOrReplaceByKey(e,n,"id"),Fa(),j.sortCollections(e)))}function tk(n){Zn.update(e=>(j.removeByKey(e,"id",n.id),hi.update(t=>t.id===n.id?e[0]:t),Fa(),e))}async function nk(n=null){wo.set(!0);try{let e=await ce.collections.getFullList(200,{sort:"+name"});e=j.sortCollections(e),Zn.set(e);const t=n&&j.findByKey(e,"id",n);t?hi.set(t):e.length&&hi.set(e[0]),Fa()}catch(e){ce.error(e)}wo.set(!1)}function Fa(){Pb.update(n=>(Zn.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const mr="pb_admin_file_token";Vo.prototype.logout=function(n=!0){this.authStore.clear(),n&&us("/login")};Vo.prototype.error=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{},l=s.message||n.message||t;if(e&&l&&Ci(l),j.isEmpty(s.data)||on(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),us("/")};Vo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=u0(Pb);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(mr)||"";return(!t||Sa(t,10))&&(t&&localStorage.removeItem(mr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(mr,t),this._adminFileTokenRequest=null),t};class ik extends P_{save(e,t){super.save(e,t),t&&!t.collectionId&&Qr(t)}clear(){super.clear(),Qr(null)}}const ce=new Vo("../",new ik("pb_admin_auth"));ce.authStore.model&&!ce.authStore.model.collectionId&&Qr(ce.authStore.model);const sk=n=>({}),Ju=n=>({});function lk(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;const m=n[3].default,g=Tt(m,n,n[2],null),_=n[3].footer,y=Tt(_,n,n[2],Ju);return{c(){e=v("div"),t=v("main"),g&&g.c(),i=E(),s=v("footer"),y&&y.c(),l=E(),o=v("a"),o.innerHTML=' Docs',r=E(),a=v("span"),a.textContent="|",u=E(),f=v("a"),c=v("span"),c.textContent="PocketBase v0.20.0-rc2",p(t,"class","page-content"),p(o,"href","https://pocketbase.io/docs/"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),p(a,"class","delimiter"),p(c,"class","txt"),p(f,"href","https://github.com/pocketbase/pocketbase/releases"),p(f,"target","_blank"),p(f,"rel","noopener noreferrer"),p(f,"title","Releases"),p(s,"class","page-footer"),p(e,"class",d="page-wrapper "+n[1]),Q(e,"center-content",n[0])},m(S,C){w(S,e,C),b(e,t),g&&g.m(t,null),b(e,i),b(e,s),y&&y.m(s,null),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(s,f),b(f,c),h=!0},p(S,[C]){g&&g.p&&(!h||C&4)&&$t(g,m,S,S[2],h?Ct(m,S[2],C,null):Mt(S[2]),null),y&&y.p&&(!h||C&4)&&$t(y,_,S,S[2],h?Ct(_,S[2],C,sk):Mt(S[2]),Ju),(!h||C&2&&d!==(d="page-wrapper "+S[1]))&&p(e,"class",d),(!h||C&3)&&Q(e,"center-content",S[0])},i(S){h||(A(g,S),A(y,S),h=!0)},o(S){L(g,S),L(y,S),h=!1},d(S){S&&k(e),g&&g.d(S),y&&y.d(S)}}}function ok(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class Tn extends be{constructor(e){super(),_e(this,e,ok,lk,me,{center:0,class:1})}}function Gu(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',t=E(),i=v("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),k(t),k(i))}}}function rk(n){let e,t,i,s=!n[0]&&Gu();const l=n[1].default,o=Tt(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=E(),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),b(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Gu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&$t(o,l,r,r[2],i?Ct(l,r[2],a,null):Mt(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 ak(n){let e,t;return e=new Tn({props:{class:"full-page",center:!0,$$slots:{default:[rk]},$$scope:{ctx:n}}}),{c(){z(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){V(e,i)}}}function uk(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 Nb extends be{constructor(e){super(),_e(this,e,uk,ak,me,{nobranding:0})}}function Ko(n){const e=n-1;return e*e*e+1}function hl(n,{delay:e=0,duration:t=400,easing:i=Sl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function mi(n,{delay:e=0,duration:t=400,easing:i=Ko,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),[c,d]=pu(s),[h,m]=pu(l);return{delay:e,duration:t,easing:i,css:(g,_)=>` +`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=j.parseIndex(e);return i.tableName=t,j.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=j.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?j.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}static initCollection(e){return Object.assign({id:"",created:"",updated:"",name:"",type:"base",system:!1,listRule:null,viewRule:null,createRule:null,updateRule:null,deleteRule:null,schema:[],indexes:[],options:{}},e)}static initSchemaField(e){return Object.assign({id:"",name:"",type:"text",system:!1,required:!1,options:{}},e)}static triggerResize(){window.dispatchEvent(new Event("resize"))}static getHashQueryParams(){let e="";const t=window.location.hash.indexOf("?");return t>-1&&(e=window.location.hash.substring(t+1)),Object.fromEntries(new URLSearchParams(e))}static replaceHashQueryParams(e){e=e||{};let t="",i=window.location.hash;const s=i.indexOf("?");s>-1&&(t=i.substring(s+1),i=i.substring(0,s));const l=new URLSearchParams(t);for(let a in e){const u=e[a];u===null?l.delete(a):l.set(a,u)}t=l.toString(),t!=""&&(i+="?"+t);let o=window.location.href;const r=o.indexOf("#");r>-1&&(o=o.substring(0,r)),window.location.replace(o+i)}}const Wo=Ln([]);function ko(n,e=4e3){return Yo(n,"info",e)}function zt(n,e=3e3){return Yo(n,"success",e)}function Ci(n,e=4500){return Yo(n,"error",e)}function Qy(n,e=4500){return Yo(n,"warning",e)}function Yo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{Lb(i)},t)};Wo.update(s=>(Pa(s,i.message),j.pushOrReplaceByKey(s,i,"message"),s))}function Lb(n){Wo.update(e=>(Pa(e,n),e))}function La(){Wo.update(n=>{for(let e of n)Pa(n,e);return[]})}function Pa(n,e){let t;typeof e=="string"?t=j.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),j.removeByKey(n,"message",t.message))}const Mi=Ln({});function on(n){Mi.set(n||{})}function pi(n){Mi.update(e=>(j.deleteByPath(e,n),e))}const Na=Ln({});function Qr(n){Na.set(n||{})}const Zn=Ln([]),hi=Ln({}),wo=Ln(!1),Pb=Ln({});function xy(n){Zn.update(e=>{const t=j.findByKey(e,"id",n);return t?hi.set(t):e.length&&hi.set(e[0]),e})}function ek(n){hi.update(e=>j.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),Zn.update(e=>(j.pushOrReplaceByKey(e,n,"id"),Fa(),j.sortCollections(e)))}function tk(n){Zn.update(e=>(j.removeByKey(e,"id",n.id),hi.update(t=>t.id===n.id?e[0]:t),Fa(),e))}async function nk(n=null){wo.set(!0);try{let e=await ce.collections.getFullList(200,{sort:"+name"});e=j.sortCollections(e),Zn.set(e);const t=n&&j.findByKey(e,"id",n);t?hi.set(t):e.length&&hi.set(e[0]),Fa()}catch(e){ce.error(e)}wo.set(!1)}function Fa(){Pb.update(n=>(Zn.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const mr="pb_admin_file_token";Vo.prototype.logout=function(n=!0){this.authStore.clear(),n&&us("/login")};Vo.prototype.error=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{},l=s.message||n.message||t;if(e&&l&&Ci(l),j.isEmpty(s.data)||on(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),us("/")};Vo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=u0(Pb);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(mr)||"";return(!t||Sa(t,10))&&(t&&localStorage.removeItem(mr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(mr,t),this._adminFileTokenRequest=null),t};class ik extends P_{save(e,t){super.save(e,t),t&&!t.collectionId&&Qr(t)}clear(){super.clear(),Qr(null)}}const ce=new Vo("../",new ik("pb_admin_auth"));ce.authStore.model&&!ce.authStore.model.collectionId&&Qr(ce.authStore.model);const sk=n=>({}),Ju=n=>({});function lk(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;const m=n[3].default,g=Tt(m,n,n[2],null),_=n[3].footer,y=Tt(_,n,n[2],Ju);return{c(){e=v("div"),t=v("main"),g&&g.c(),i=E(),s=v("footer"),y&&y.c(),l=E(),o=v("a"),o.innerHTML=' Docs',r=E(),a=v("span"),a.textContent="|",u=E(),f=v("a"),c=v("span"),c.textContent="PocketBase v0.20.0-rc3",p(t,"class","page-content"),p(o,"href","https://pocketbase.io/docs/"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),p(a,"class","delimiter"),p(c,"class","txt"),p(f,"href","https://github.com/pocketbase/pocketbase/releases"),p(f,"target","_blank"),p(f,"rel","noopener noreferrer"),p(f,"title","Releases"),p(s,"class","page-footer"),p(e,"class",d="page-wrapper "+n[1]),Q(e,"center-content",n[0])},m(S,C){w(S,e,C),b(e,t),g&&g.m(t,null),b(e,i),b(e,s),y&&y.m(s,null),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(s,f),b(f,c),h=!0},p(S,[C]){g&&g.p&&(!h||C&4)&&$t(g,m,S,S[2],h?Ct(m,S[2],C,null):Mt(S[2]),null),y&&y.p&&(!h||C&4)&&$t(y,_,S,S[2],h?Ct(_,S[2],C,sk):Mt(S[2]),Ju),(!h||C&2&&d!==(d="page-wrapper "+S[1]))&&p(e,"class",d),(!h||C&3)&&Q(e,"center-content",S[0])},i(S){h||(A(g,S),A(y,S),h=!0)},o(S){L(g,S),L(y,S),h=!1},d(S){S&&k(e),g&&g.d(S),y&&y.d(S)}}}function ok(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class Tn extends be{constructor(e){super(),_e(this,e,ok,lk,me,{center:0,class:1})}}function Gu(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',t=E(),i=v("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),k(t),k(i))}}}function rk(n){let e,t,i,s=!n[0]&&Gu();const l=n[1].default,o=Tt(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=E(),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),b(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Gu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&$t(o,l,r,r[2],i?Ct(l,r[2],a,null):Mt(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 ak(n){let e,t;return e=new Tn({props:{class:"full-page",center:!0,$$slots:{default:[rk]},$$scope:{ctx:n}}}),{c(){z(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){V(e,i)}}}function uk(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 Nb extends be{constructor(e){super(),_e(this,e,uk,ak,me,{nobranding:0})}}function Ko(n){const e=n-1;return e*e*e+1}function hl(n,{delay:e=0,duration:t=400,easing:i=Sl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function mi(n,{delay:e=0,duration:t=400,easing:i=Ko,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),[c,d]=pu(s),[h,m]=pu(l);return{delay:e,duration:t,easing:i,css:(g,_)=>` transform: ${u} translate(${(1-g)*c}${d}, ${(1-g)*h}${m}); opacity: ${a-f*_}`}}function lt(n,{delay:e=0,duration:t=400,easing:i=Ko,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),u=s==="y"?["top","bottom"]:["left","right"],f=u.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(l[`padding${f[0]}`]),d=parseFloat(l[`padding${f[1]}`]),h=parseFloat(l[`margin${f[0]}`]),m=parseFloat(l[`margin${f[1]}`]),g=parseFloat(l[`border${f[0]}Width`]),_=parseFloat(l[`border${f[1]}Width`]);return{delay:e,duration:t,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${r}: ${y*a}px;padding-${u[0]}: ${y*c}px;padding-${u[1]}: ${y*d}px;margin-${u[0]}: ${y*h}px;margin-${u[1]}: ${y*m}px;border-${u[0]}-width: ${y*g}px;border-${u[1]}-width: ${y*_}px;`}}function Qt(n,{delay:e=0,duration:t=400,easing:i=Ko,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} `}}let xr,Gi;const ea="app-tooltip";function Zu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Hi(){return Gi=Gi||document.querySelector("."+ea),Gi||(Gi=document.createElement("div"),Gi.classList.add(ea),document.body.appendChild(Gi)),Gi}function Fb(n,e){let t=Hi();if(!t.classList.contains("active")||!(e!=null&&e.text)){ta();return}t.textContent=e.text,t.className=ea+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function ta(){clearTimeout(xr),Hi().classList.remove("active"),Hi().activeNode=void 0}function fk(n,e){Hi().activeNode=n,clearTimeout(xr),xr=setTimeout(()=>{Hi().classList.add("active"),Fb(n,e)},isNaN(e.delay)?0:e.delay)}function Be(n,e){let t=Zu(e);function i(){fk(n,t)}function s(){ta()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&j.isFocusable(n))&&n.addEventListener("click",s),Hi(),{update(l){var o,r;t=Zu(l),(r=(o=Hi())==null?void 0:o.activeNode)!=null&&r.contains(n)&&Fb(n,t)},destroy(){var l,o;(o=(l=Hi())==null?void 0:l.activeNode)!=null&&o.contains(n)&&ta(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Xu(n,e,t){const i=n.slice();return i[12]=e[t],i}const ck=n=>({}),Qu=n=>({uniqueId:n[4]});function dk(n){let e,t,i=pe(n[3]),s=[];for(let o=0;oL(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=He(t,Qt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=He(t,Qt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&k(e),a&&s&&s.end(),o=!1,r()}}}function xu(n){let e,t,i=So(n[12])+"",s,l,o,r;return{c(){e=v("div"),t=v("pre"),s=W(i),l=E(),p(e,"class","help-block help-block-error")},m(a,u){w(a,e,u),b(e,t),b(t,s),b(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=So(a[12])+"")&&le(s,i)},i(a){r||(a&&xe(()=>{r&&(o||(o=He(e,lt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=He(e,lt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&k(e),a&&o&&o.end()}}}function hk(n){let e,t,i,s,l,o,r;const a=n[9].default,u=Tt(a,n,n[8],Qu),f=[pk,dk],c=[];function d(h,m){return h[0]&&h[3].length?0:1}return i=d(n),s=c[i]=f[i](n),{c(){e=v("div"),u&&u.c(),t=E(),s.c(),p(e,"class",n[1]),Q(e,"error",n[3].length)},m(h,m){w(h,e,m),u&&u.m(e,null),b(e,t),c[i].m(e,null),n[11](e),l=!0,o||(r=Y(e,"click",n[10]),o=!0)},p(h,[m]){u&&u.p&&(!l||m&256)&&$t(u,a,h,h[8],l?Ct(a,h[8],m,ck):Mt(h[8]),Qu);let g=i;i=d(h),i===g?c[i].p(h,m):(re(),L(c[g],1,1,()=>{c[g]=null}),ae(),s=c[i],s?s.p(h,m):(s=c[i]=f[i](h),s.c()),A(s,1),s.m(e,null)),(!l||m&2)&&p(e,"class",h[1]),(!l||m&10)&&Q(e,"error",h[3].length)},i(h){l||(A(u,h),A(s),l=!0)},o(h){L(u,h),L(s),l=!1},d(h){h&&k(e),u&&u.d(h),c[i].d(),n[11](null),o=!1,r()}}}const ef="Invalid value";function So(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||ef:n||ef}function mk(n,e,t){let i;Ge(n,Mi,g=>t(7,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+j.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,c=[];function d(){pi(r)}Kt(()=>(f.addEventListener("input",d),f.addEventListener("change",d),()=>{f.removeEventListener("input",d),f.removeEventListener("change",d)}));function h(g){Re.call(this,n,g)}function m(g){te[g?"unshift":"push"](()=>{f=g,t(2,f)})}return n.$$set=g=>{"name"in g&&t(5,r=g.name),"inlineError"in g&&t(0,a=g.inlineError),"class"in g&&t(1,u=g.class),"$$scope"in g&&t(8,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,c=j.toArray(j.getNestedVal(i,r)))},[a,u,f,c,o,r,d,i,l,s,h,m]}class ge extends be{constructor(e){super(),_e(this,e,mk,hk,me,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function gk(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Email"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0]),l.focus(),r||(a=Y(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&de(l,u[0])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function _k(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=W("Password"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),de(l,n[1]),w(c,r,d),w(c,a,d),u||(f=Y(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&de(l,c[1])},d(c){c&&(k(e),k(s),k(l),k(r),k(a)),u=!1,f()}}}function bk(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Password confirm"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[2]),r||(a=Y(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&de(l,u[2])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function vk(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return s=new ge({props:{class:"form-field required",name:"email",$$slots:{default:[gk,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[_k,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[bk,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=E(),z(s.$$.fragment),l=E(),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),f=v("button"),f.innerHTML='Create and login ',p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),Q(f,"btn-disabled",n[3]),Q(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(m,g){w(m,e,g),b(e,t),b(e,i),H(s,e,null),b(e,l),H(o,e,null),b(e,r),H(a,e,null),b(e,u),b(e,f),c=!0,d||(h=Y(e,"submit",Ze(n[4])),d=!0)},p(m,[g]){const _={};g&1537&&(_.$$scope={dirty:g,ctx:m}),s.$set(_);const y={};g&1538&&(y.$$scope={dirty:g,ctx:m}),o.$set(y);const S={};g&1540&&(S.$$scope={dirty:g,ctx:m}),a.$set(S),(!c||g&8)&&Q(f,"btn-disabled",m[3]),(!c||g&8)&&Q(f,"btn-loading",m[3])},i(m){c||(A(s.$$.fragment,m),A(o.$$.fragment,m),A(a.$$.fragment,m),c=!0)},o(m){L(s.$$.fragment,m),L(o.$$.fragment,m),L(a.$$.fragment,m),c=!1},d(m){m&&k(e),V(s),V(o),V(a),d=!1,h()}}}function yk(n,e,t){const i=pt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await ce.admins.create({email:s,password:l,passwordConfirm:o}),await ce.admins.authWithPassword(s,l),i("submit")}catch(d){ce.error(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 kk extends be{constructor(e){super(),_e(this,e,yk,vk,me,{})}}function tf(n){let e,t;return e=new Nb({props:{$$slots:{default:[wk]},$$scope:{ctx:n}}}),{c(){z(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){V(e,i)}}}function wk(n){let e,t;return e=new kk({}),e.$on("submit",n[1]),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p:x,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Sk(n){let e,t,i=n[0]&&tf(n);return{c(){i&&i.c(),e=ye()},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=tf(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(re(),L(i,1,1,()=>{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){s&&k(e),i&&i.d(s)}}}function Tk(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ce.logout(!1),t(0,i=!0);return}ce.authStore.isValid?us("/collections"):ce.logout()}return[i,async()=>{t(0,i=!1),await ln(),window.location.search=""}]}class Ck extends be{constructor(e){super(),_e(this,e,Tk,Sk,me,{})}}const Ft=Ln(""),To=Ln(""),Es=Ln(!1);function $k(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){w(l,e,o),n[13](e),de(e,n[7]),i||(s=Y(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&de(e,l[7])},i:x,o:x,d(l){l&&k(e),n[13](null),i=!1,s()}}}function Mk(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a,u){let f={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&&(f.value=a[7]),{props:f}}return o&&(e=Nt(o,r(n)),te.push(()=>he(e,"value",l)),e.$on("submit",n[10])),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&H(e,a,u),w(a,i,u),s=!0},p(a,u){if(u&16&&o!==(o=a[4])){if(e){re();const f=e;L(f.$$.fragment,1,0,()=>{V(f,1)}),ae()}o?(e=Nt(o,r(a)),te.push(()=>he(e,"value",l)),e.$on("submit",a[10]),z(e.$$.fragment),A(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else if(o){const f={};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],ve(()=>t=!1)),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&&V(e,a)}}}function nf(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded-sm btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&xe(()=>{i&&(t||(t=He(e,mi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,mi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function sf(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",n[15]),s=!0)},p:x,i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,mi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,mi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Ok(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[Mk,$k],h=[];function m(y,S){return y[4]&&!y[5]?0:1}l=m(n),o=h[l]=d[l](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&nf(),_=(n[0].length||n[7].length)&&sf(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=E(),o.c(),r=E(),g&&g.c(),a=E(),_&&_.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(y,S){w(y,e,S),b(e,t),b(t,i),b(e,s),h[l].m(e,null),b(e,r),g&&g.m(e,null),b(e,a),_&&_.m(e,null),u=!0,f||(c=[Y(e,"click",Sn(n[11])),Y(e,"submit",Ze(n[10]))],f=!0)},p(y,[S]){let C=l;l=m(y),l===C?h[l].p(y,S):(re(),L(h[C],1,1,()=>{h[C]=null}),ae(),o=h[l],o?o.p(y,S):(o=h[l]=d[l](y),o.c()),A(o,1),o.m(e,r)),(y[0].length||y[7].length)&&y[7]!=y[0]?g?S&129&&A(g,1):(g=nf(),g.c(),A(g,1),g.m(e,a)):g&&(re(),L(g,1,1,()=>{g=null}),ae()),y[0].length||y[7].length?_?(_.p(y,S),S&129&&A(_,1)):(_=sf(y),_.c(),A(_,1),_.m(e,null)):_&&(re(),L(_,1,1,()=>{_=null}),ae())},i(y){u||(A(o),A(g),A(_),u=!0)},o(y){L(o),L(g),L(_),u=!1},d(y){y&&k(e),h[l].d(),g&&g.d(),_&&_.d(),f=!1,$e(c)}}}function Ek(n,e,t){const i=pt(),s="search_"+j.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=j.initCollection()}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h($=!0){t(7,d=""),$&&(c==null||c.focus()),i("clear")}function m(){t(0,l=d),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await ft(()=>import("./FilterAutocompleteInput-f3198726.js"),["./FilterAutocompleteInput-f3198726.js","./index-30dee195.js"],import.meta.url)).default),t(5,f=!1))}Kt(()=>{g()});function _($){Re.call(this,n,$)}function y($){d=$,t(7,d),t(0,l)}function S($){te[$?"unshift":"push"](()=>{c=$,t(6,c)})}function C(){d=this.value,t(7,d),t(0,l)}const T=()=>{h(!1),m()};return n.$$set=$=>{"value"in $&&t(0,l=$.value),"placeholder"in $&&t(1,o=$.placeholder),"autocompleteCollection"in $&&t(2,r=$.autocompleteCollection),"extraAutocompleteKeys"in $&&t(3,a=$.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,m,_,y,S,C,T]}class Dl extends be{constructor(e){super(),_e(this,e,Ek,Ok,me,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Dk(n){let e,t,i,s,l,o;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-refresh-line svelte-1bvelc2"),p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class",i="btn btn-transparent btn-circle "+n[1]+" svelte-1bvelc2"),Q(e,"refreshing",n[2])},m(r,a){w(r,e,a),b(e,t),l||(o=[Ce(s=Be.call(null,e,n[0])),Y(e,"click",n[3])],l=!0)},p(r,[a]){a&2&&i!==(i="btn btn-transparent btn-circle "+r[1]+" svelte-1bvelc2")&&p(e,"class",i),s&&Et(s.update)&&a&1&&s.update.call(null,r[0]),a&6&&Q(e,"refreshing",r[2])},i:x,o:x,d(r){r&&k(e),l=!1,$e(o)}}}function Ak(n,e,t){const i=pt();let{tooltip:s={text:"Refresh",position:"right"}}=e,{class:l=""}=e,o=null;function r(){i("refresh");const a=s;t(0,s=null),clearTimeout(o),t(2,o=setTimeout(()=>{t(2,o=null),t(0,s=a)},150))}return Kt(()=>()=>clearTimeout(o)),n.$$set=a=>{"tooltip"in a&&t(0,s=a.tooltip),"class"in a&&t(1,l=a.class)},[s,l,o,r]}class Jo extends be{constructor(e){super(),_e(this,e,Ak,Dk,me,{tooltip:0,class:1})}}function Ik(n){let e,t,i,s,l;const o=n[6].default,r=Tt(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){w(a,e,u),r&&r.m(e,null),i=!0,s||(l=[Y(e,"click",n[7]),Y(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&$t(r,o,a,a[5],i?Ct(o,a[5],u,null):Mt(a[5]),null),(!i||u&4)&&p(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&Q(e,"col-sort-disabled",a[3]),(!i||u&7)&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&Q(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&Q(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){L(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),s=!1,$e(l)}}}function Lk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class hn extends be{constructor(e){super(),_e(this,e,Lk,Ik,me,{class:1,name:2,sort:0,disable:3})}}function Pk(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Nk(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("div"),t=v("div"),i=W(n[2]),s=E(),l=v("div"),o=W(n[1]),r=W(" UTC"),p(t,"class","date"),p(l,"class","time svelte-5pjd03"),p(e,"class","datetime svelte-5pjd03")},m(f,c){w(f,e,c),b(e,t),b(t,i),b(e,s),b(e,l),b(l,o),b(l,r),a||(u=Ce(Be.call(null,e,n[3])),a=!0)},p(f,c){c&4&&le(i,f[2]),c&2&&le(o,f[1])},d(f){f&&k(e),a=!1,u()}}}function Fk(n){let e;function t(l,o){return l[0]?Nk:Pk}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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:x,o:x,d(l){l&&k(e),s.d(l)}}}function Rk(n,e,t){let i,s,{date:l=""}=e;const o={get text(){return j.formatToLocalDate(l)+" Local"}};return n.$$set=r=>{"date"in r&&t(0,l=r.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i,o]}class $i extends be{constructor(e){super(),_e(this,e,Rk,Fk,me,{date:0})}}const qk=n=>({}),lf=n=>({}),jk=n=>({}),of=n=>({});function Hk(n){let e,t,i,s,l,o,r,a;const u=n[11].before,f=Tt(u,n,n[10],of),c=n[11].default,d=Tt(c,n,n[10],null),h=n[11].after,m=Tt(h,n,n[10],lf);return{c(){e=v("div"),f&&f.c(),t=E(),i=v("div"),d&&d.c(),l=E(),m&&m.c(),p(i,"class",s="scroller "+n[0]+" "+n[3]+" svelte-3a0gfs"),p(e,"class","scroller-wrapper svelte-3a0gfs")},m(g,_){w(g,e,_),f&&f.m(e,null),b(e,t),b(e,i),d&&d.m(i,null),n[12](i),b(e,l),m&&m.m(e,null),o=!0,r||(a=[Y(window,"resize",n[1]),Y(i,"scroll",n[1])],r=!0)},p(g,[_]){f&&f.p&&(!o||_&1024)&&$t(f,u,g,g[10],o?Ct(u,g[10],_,jk):Mt(g[10]),of),d&&d.p&&(!o||_&1024)&&$t(d,c,g,g[10],o?Ct(c,g[10],_,null):Mt(g[10]),null),(!o||_&9&&s!==(s="scroller "+g[0]+" "+g[3]+" svelte-3a0gfs"))&&p(i,"class",s),m&&m.p&&(!o||_&1024)&&$t(m,h,g,g[10],o?Ct(h,g[10],_,qk):Mt(g[10]),lf)},i(g){o||(A(f,g),A(d,g),A(m,g),o=!0)},o(g){L(f,g),L(d,g),L(m,g),o=!1},d(g){g&&k(e),f&&f.d(g),d&&d.d(g),n[12](null),m&&m.d(g),r=!1,$e(a)}}}function Vk(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=pt();let{class:o=""}=e,{vThreshold:r=0}=e,{hThreshold:a=0}=e,{dispatchOnNoScroll:u=!0}=e,f=null,c="",d=null,h,m,g,_,y;function S(){f&&t(2,f.scrollTop=0,f)}function C(){f&&t(2,f.scrollLeft=0,f)}function T(){f&&(t(3,c=""),g=f.clientWidth+2,_=f.clientHeight+2,h=f.scrollWidth-g,m=f.scrollHeight-_,m>0?(t(3,c+=" v-scroll"),r>=_&&t(4,r=0),f.scrollTop-r<=0&&(t(3,c+=" v-scroll-start"),l("vScrollStart")),f.scrollTop+r>=m&&(t(3,c+=" v-scroll-end"),l("vScrollEnd"))):u&&l("vScrollEnd"),h>0?(t(3,c+=" h-scroll"),a>=g&&t(5,a=0),f.scrollLeft-a<=0&&(t(3,c+=" h-scroll-start"),l("hScrollStart")),f.scrollLeft+a>=h&&(t(3,c+=" h-scroll-end"),l("hScrollEnd"))):u&&l("hScrollEnd"))}function $(){d||(d=setTimeout(()=>{T(),d=null},150))}Kt(()=>($(),y=new MutationObserver($),y.observe(f,{attributeFilter:["width","height"],childList:!0,subtree:!0}),()=>{y==null||y.disconnect(),clearTimeout(d)}));function M(O){te[O?"unshift":"push"](()=>{f=O,t(2,f)})}return n.$$set=O=>{"class"in O&&t(0,o=O.class),"vThreshold"in O&&t(4,r=O.vThreshold),"hThreshold"in O&&t(5,a=O.hThreshold),"dispatchOnNoScroll"in O&&t(6,u=O.dispatchOnNoScroll),"$$scope"in O&&t(10,s=O.$$scope)},[o,$,f,c,r,a,u,S,C,T,s,i,M]}class Go extends be{constructor(e){super(),_e(this,e,Vk,Hk,me,{class:0,vThreshold:4,hThreshold:5,dispatchOnNoScroll:6,resetVerticalScroll:7,resetHorizontalScroll:8,refresh:9,throttleRefresh:1})}get resetVerticalScroll(){return this.$$.ctx[7]}get resetHorizontalScroll(){return this.$$.ctx[8]}get refresh(){return this.$$.ctx[9]}get throttleRefresh(){return this.$$.ctx[1]}}function rf(n,e,t){const i=n.slice();return i[23]=e[t],i}function zk(n){let e;return{c(){e=v("div"),e.innerHTML=' Method',p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Bk(n){let e;return{c(){e=v("div"),e.innerHTML=` URL`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Uk(n){let e;return{c(){e=v("div"),e.innerHTML=` Referer`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Wk(n){let e;return{c(){e=v("div"),e.innerHTML=` User IP`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Yk(n){let e;return{c(){e=v("div"),e.innerHTML=` Status`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Kk(n){let e;return{c(){e=v("div"),e.innerHTML=` Created`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function af(n){let e;function t(l,o){return l[6]?Gk:Jk}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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){l&&k(e),s.d(l)}}}function Jk(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&uf(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=uf(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function Gk(n){let e;return{c(){e=v("tr"),e.innerHTML=' '},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function uf(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[19]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function ff(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function cf(n,e){var Me,Je,dt;let t,i,s,l=((Me=e[23].method)==null?void 0:Me.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,h,m,g,_,y,S=(e[23].referer||"N/A")+"",C,T,$,M,O,D=(e[23].userIp||"N/A")+"",I,N,P,F,R,q=e[23].status+"",B,Z,X,J,U,oe,ee,se,Ee,qe,Ve=(((Je=e[23].meta)==null?void 0:Je.errorMessage)||((dt=e[23].meta)==null?void 0:dt.errorData))&&ff();J=new $i({props:{date:e[23].created}});function We(){return e[17](e[23])}function ke(...Se){return e[18](e[23],...Se)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=W(l),a=E(),u=v("td"),f=v("span"),d=W(c),m=E(),Ve&&Ve.c(),g=E(),_=v("td"),y=v("span"),C=W(S),$=E(),M=v("td"),O=v("span"),I=W(D),P=E(),F=v("td"),R=v("span"),B=W(q),Z=E(),X=v("td"),z(J.$$.fragment),U=E(),oe=v("td"),oe.innerHTML='',ee=E(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",T=e[23].referer),Q(y,"txt-hint",!e[23].referer),p(_,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",N=e[23].userIp),Q(O,"txt-hint",!e[23].userIp),p(M,"class","col-type-number col-field-userIp"),p(R,"class","label"),Q(R,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(X,"class","col-type-date col-field-created"),p(oe,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Se,we){w(Se,t,we),b(t,i),b(i,s),b(s,o),b(t,a),b(t,u),b(u,f),b(f,d),b(u,m),Ve&&Ve.m(u,null),b(t,g),b(t,_),b(_,y),b(y,C),b(t,$),b(t,M),b(M,O),b(O,I),b(t,P),b(t,F),b(F,R),b(R,B),b(t,Z),b(t,X),H(J,X,null),b(t,U),b(t,oe),b(t,ee),se=!0,Ee||(qe=[Y(t,"click",We),Y(t,"keydown",ke)],Ee=!0)},p(Se,we){var nt,ne,Ne;e=Se,(!se||we&8)&&l!==(l=((nt=e[23].method)==null?void 0:nt.toUpperCase())+"")&&le(o,l),(!se||we&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!se||we&8)&&c!==(c=e[23].url+"")&&le(d,c),(!se||we&8&&h!==(h=e[23].url))&&p(f,"title",h),(ne=e[23].meta)!=null&&ne.errorMessage||(Ne=e[23].meta)!=null&&Ne.errorData?Ve||(Ve=ff(),Ve.c(),Ve.m(u,null)):Ve&&(Ve.d(1),Ve=null),(!se||we&8)&&S!==(S=(e[23].referer||"N/A")+"")&&le(C,S),(!se||we&8&&T!==(T=e[23].referer))&&p(y,"title",T),(!se||we&8)&&Q(y,"txt-hint",!e[23].referer),(!se||we&8)&&D!==(D=(e[23].userIp||"N/A")+"")&&le(I,D),(!se||we&8&&N!==(N=e[23].userIp))&&p(O,"title",N),(!se||we&8)&&Q(O,"txt-hint",!e[23].userIp),(!se||we&8)&&q!==(q=e[23].status+"")&&le(B,q),(!se||we&8)&&Q(R,"label-danger",e[23].status>=400);const Ue={};we&8&&(Ue.date=e[23].created),J.$set(Ue)},i(Se){se||(A(J.$$.fragment,Se),se=!0)},o(Se){L(J.$$.fragment,Se),se=!1},d(Se){Se&&k(t),Ve&&Ve.d(),V(J),Ee=!1,$e(qe)}}}function Zk(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M,O,D,I=[],N=new Map,P;function F(ke){n[11](ke)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[zk]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new hn({props:R}),te.push(()=>he(s,"sort",F));function q(ke){n[12](ke)}let B={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[Bk]},$$scope:{ctx:n}};n[1]!==void 0&&(B.sort=n[1]),r=new hn({props:B}),te.push(()=>he(r,"sort",q));function Z(ke){n[13](ke)}let X={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[Uk]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),f=new hn({props:X}),te.push(()=>he(f,"sort",Z));function J(ke){n[14](ke)}let U={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[Wk]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),h=new hn({props:U}),te.push(()=>he(h,"sort",J));function oe(ke){n[15](ke)}let ee={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Yk]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),_=new hn({props:ee}),te.push(()=>he(_,"sort",oe));function se(ke){n[16](ke)}let Ee={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[Kk]},$$scope:{ctx:n}};n[1]!==void 0&&(Ee.sort=n[1]),C=new hn({props:Ee}),te.push(()=>he(C,"sort",se));let qe=pe(n[3]);const Ve=ke=>ke[23].id;for(let ke=0;kel=!1)),s.$set(Je);const dt={};Me&67108864&&(dt.$$scope={dirty:Me,ctx:ke}),!a&&Me&2&&(a=!0,dt.sort=ke[1],ve(()=>a=!1)),r.$set(dt);const Se={};Me&67108864&&(Se.$$scope={dirty:Me,ctx:ke}),!c&&Me&2&&(c=!0,Se.sort=ke[1],ve(()=>c=!1)),f.$set(Se);const we={};Me&67108864&&(we.$$scope={dirty:Me,ctx:ke}),!m&&Me&2&&(m=!0,we.sort=ke[1],ve(()=>m=!1)),h.$set(we);const Ue={};Me&67108864&&(Ue.$$scope={dirty:Me,ctx:ke}),!y&&Me&2&&(y=!0,Ue.sort=ke[1],ve(()=>y=!1)),_.$set(Ue);const nt={};Me&67108864&&(nt.$$scope={dirty:Me,ctx:ke}),!T&&Me&2&&(T=!0,nt.sort=ke[1],ve(()=>T=!1)),C.$set(nt),Me&841&&(qe=pe(ke[3]),re(),I=gt(I,Me,Ve,1,ke,qe,N,D,qt,cf,null,rf),ae(),!qe.length&&We?We.p(ke,Me):qe.length?We&&(We.d(1),We=null):(We=af(ke),We.c(),We.m(D,null))),(!P||Me&64)&&Q(e,"table-loading",ke[6])},i(ke){if(!P){A(s.$$.fragment,ke),A(r.$$.fragment,ke),A(f.$$.fragment,ke),A(h.$$.fragment,ke),A(_.$$.fragment,ke),A(C.$$.fragment,ke);for(let Me=0;Me{if(N<=1&&g(),t(6,d=!1),t(5,f=F.page),t(4,c=F.totalItems),s("load",u.concat(F.items)),P){const R=++h;for(;F.items.length&&h==R;)t(3,u=u.concat(F.items.splice(0,10))),await j.yieldToMain()}else t(3,u=u.concat(F.items))}).catch(F=>{F!=null&&F.isAbort||(t(6,d=!1),console.warn(F),g(),ce.error(F,(F==null?void 0:F.status)!=400))})}function g(){t(3,u=[]),t(5,f=1),t(4,c=0)}function _(N){a=N,t(1,a)}function y(N){a=N,t(1,a)}function S(N){a=N,t(1,a)}function C(N){a=N,t(1,a)}function T(N){a=N,t(1,a)}function $(N){a=N,t(1,a)}const M=N=>s("select",N),O=(N,P)=>{P.code==="Enter"&&(P.preventDefault(),s("select",N))},D=()=>t(0,o=""),I=()=>m(f+1);return n.$$set=N=>{"filter"in N&&t(0,o=N.filter),"presets"in N&&t(10,r=N.presets),"sort"in N&&t(1,a=N.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),m(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,m,u,c,f,d,i,s,l,r,_,y,S,C,T,$,M,O,D,I]}class xk extends be{constructor(e){super(),_e(this,e,Qk,Xk,me,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! +`)})},i(a){l||(a&&xe(()=>{l&&(s||(s=He(t,Qt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=He(t,Qt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&k(e),a&&s&&s.end(),o=!1,r()}}}function xu(n){let e,t,i=So(n[12])+"",s,l,o,r;return{c(){e=v("div"),t=v("pre"),s=W(i),l=E(),p(e,"class","help-block help-block-error")},m(a,u){w(a,e,u),b(e,t),b(t,s),b(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=So(a[12])+"")&&le(s,i)},i(a){r||(a&&xe(()=>{r&&(o||(o=He(e,lt,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=He(e,lt,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&k(e),a&&o&&o.end()}}}function hk(n){let e,t,i,s,l,o,r;const a=n[9].default,u=Tt(a,n,n[8],Qu),f=[pk,dk],c=[];function d(h,m){return h[0]&&h[3].length?0:1}return i=d(n),s=c[i]=f[i](n),{c(){e=v("div"),u&&u.c(),t=E(),s.c(),p(e,"class",n[1]),Q(e,"error",n[3].length)},m(h,m){w(h,e,m),u&&u.m(e,null),b(e,t),c[i].m(e,null),n[11](e),l=!0,o||(r=Y(e,"click",n[10]),o=!0)},p(h,[m]){u&&u.p&&(!l||m&256)&&$t(u,a,h,h[8],l?Ct(a,h[8],m,ck):Mt(h[8]),Qu);let g=i;i=d(h),i===g?c[i].p(h,m):(re(),L(c[g],1,1,()=>{c[g]=null}),ae(),s=c[i],s?s.p(h,m):(s=c[i]=f[i](h),s.c()),A(s,1),s.m(e,null)),(!l||m&2)&&p(e,"class",h[1]),(!l||m&10)&&Q(e,"error",h[3].length)},i(h){l||(A(u,h),A(s),l=!0)},o(h){L(u,h),L(s),l=!1},d(h){h&&k(e),u&&u.d(h),c[i].d(),n[11](null),o=!1,r()}}}const ef="Invalid value";function So(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||ef:n||ef}function mk(n,e,t){let i;Ge(n,Mi,g=>t(7,i=g));let{$$slots:s={},$$scope:l}=e;const o="field_"+j.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,c=[];function d(){pi(r)}Kt(()=>(f.addEventListener("input",d),f.addEventListener("change",d),()=>{f.removeEventListener("input",d),f.removeEventListener("change",d)}));function h(g){Re.call(this,n,g)}function m(g){te[g?"unshift":"push"](()=>{f=g,t(2,f)})}return n.$$set=g=>{"name"in g&&t(5,r=g.name),"inlineError"in g&&t(0,a=g.inlineError),"class"in g&&t(1,u=g.class),"$$scope"in g&&t(8,l=g.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,c=j.toArray(j.getNestedVal(i,r)))},[a,u,f,c,o,r,d,i,l,s,h,m]}class ge extends be{constructor(e){super(),_e(this,e,mk,hk,me,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function gk(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Email"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0]),l.focus(),r||(a=Y(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&de(l,u[0])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function _k(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=W("Password"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),b(e,t),w(c,s,d),w(c,l,d),de(l,n[1]),w(c,r,d),w(c,a,d),u||(f=Y(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&de(l,c[1])},d(c){c&&(k(e),k(s),k(l),k(r),k(a)),u=!1,f()}}}function bk(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Password confirm"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[2]),r||(a=Y(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&de(l,u[2])},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function vk(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return s=new ge({props:{class:"form-field required",name:"email",$$slots:{default:[gk,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[_k,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[bk,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=E(),z(s.$$.fragment),l=E(),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),f=v("button"),f.innerHTML='Create and login ',p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),Q(f,"btn-disabled",n[3]),Q(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(m,g){w(m,e,g),b(e,t),b(e,i),H(s,e,null),b(e,l),H(o,e,null),b(e,r),H(a,e,null),b(e,u),b(e,f),c=!0,d||(h=Y(e,"submit",Ze(n[4])),d=!0)},p(m,[g]){const _={};g&1537&&(_.$$scope={dirty:g,ctx:m}),s.$set(_);const y={};g&1538&&(y.$$scope={dirty:g,ctx:m}),o.$set(y);const S={};g&1540&&(S.$$scope={dirty:g,ctx:m}),a.$set(S),(!c||g&8)&&Q(f,"btn-disabled",m[3]),(!c||g&8)&&Q(f,"btn-loading",m[3])},i(m){c||(A(s.$$.fragment,m),A(o.$$.fragment,m),A(a.$$.fragment,m),c=!0)},o(m){L(s.$$.fragment,m),L(o.$$.fragment,m),L(a.$$.fragment,m),c=!1},d(m){m&&k(e),V(s),V(o),V(a),d=!1,h()}}}function yk(n,e,t){const i=pt();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await ce.admins.create({email:s,password:l,passwordConfirm:o}),await ce.admins.authWithPassword(s,l),i("submit")}catch(d){ce.error(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 kk extends be{constructor(e){super(),_e(this,e,yk,vk,me,{})}}function tf(n){let e,t;return e=new Nb({props:{$$slots:{default:[wk]},$$scope:{ctx:n}}}),{c(){z(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){V(e,i)}}}function wk(n){let e,t;return e=new kk({}),e.$on("submit",n[1]),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p:x,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Sk(n){let e,t,i=n[0]&&tf(n);return{c(){i&&i.c(),e=ye()},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=tf(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(re(),L(i,1,1,()=>{i=null}),ae())},i(s){t||(A(i),t=!0)},o(s){L(i),t=!1},d(s){s&&k(e),i&&i.d(s)}}}function Tk(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ce.logout(!1),t(0,i=!0);return}ce.authStore.isValid?us("/collections"):ce.logout()}return[i,async()=>{t(0,i=!1),await ln(),window.location.search=""}]}class Ck extends be{constructor(e){super(),_e(this,e,Tk,Sk,me,{})}}const Ft=Ln(""),To=Ln(""),Es=Ln(!1);function $k(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){w(l,e,o),n[13](e),de(e,n[7]),i||(s=Y(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&de(e,l[7])},i:x,o:x,d(l){l&&k(e),n[13](null),i=!1,s()}}}function Mk(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a,u){let f={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&&(f.value=a[7]),{props:f}}return o&&(e=Nt(o,r(n)),te.push(()=>he(e,"value",l)),e.$on("submit",n[10])),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&H(e,a,u),w(a,i,u),s=!0},p(a,u){if(u&16&&o!==(o=a[4])){if(e){re();const f=e;L(f.$$.fragment,1,0,()=>{V(f,1)}),ae()}o?(e=Nt(o,r(a)),te.push(()=>he(e,"value",l)),e.$on("submit",a[10]),z(e.$$.fragment),A(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else if(o){const f={};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],ve(()=>t=!1)),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&&V(e,a)}}}function nf(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded-sm btn-sm btn-warning")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&xe(()=>{i&&(t||(t=He(e,mi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,mi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function sf(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",n[15]),s=!0)},p:x,i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,mi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,mi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Ok(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[Mk,$k],h=[];function m(y,S){return y[4]&&!y[5]?0:1}l=m(n),o=h[l]=d[l](n);let g=(n[0].length||n[7].length)&&n[7]!=n[0]&&nf(),_=(n[0].length||n[7].length)&&sf(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=E(),o.c(),r=E(),g&&g.c(),a=E(),_&&_.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(y,S){w(y,e,S),b(e,t),b(t,i),b(e,s),h[l].m(e,null),b(e,r),g&&g.m(e,null),b(e,a),_&&_.m(e,null),u=!0,f||(c=[Y(e,"click",Sn(n[11])),Y(e,"submit",Ze(n[10]))],f=!0)},p(y,[S]){let C=l;l=m(y),l===C?h[l].p(y,S):(re(),L(h[C],1,1,()=>{h[C]=null}),ae(),o=h[l],o?o.p(y,S):(o=h[l]=d[l](y),o.c()),A(o,1),o.m(e,r)),(y[0].length||y[7].length)&&y[7]!=y[0]?g?S&129&&A(g,1):(g=nf(),g.c(),A(g,1),g.m(e,a)):g&&(re(),L(g,1,1,()=>{g=null}),ae()),y[0].length||y[7].length?_?(_.p(y,S),S&129&&A(_,1)):(_=sf(y),_.c(),A(_,1),_.m(e,null)):_&&(re(),L(_,1,1,()=>{_=null}),ae())},i(y){u||(A(o),A(g),A(_),u=!0)},o(y){L(o),L(g),L(_),u=!1},d(y){y&&k(e),h[l].d(),g&&g.d(),_&&_.d(),f=!1,$e(c)}}}function Ek(n,e,t){const i=pt(),s="search_"+j.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=j.initCollection()}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h($=!0){t(7,d=""),$&&(c==null||c.focus()),i("clear")}function m(){t(0,l=d),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await ft(()=>import("./FilterAutocompleteInput-288f3849.js"),["./FilterAutocompleteInput-288f3849.js","./index-30dee195.js"],import.meta.url)).default),t(5,f=!1))}Kt(()=>{g()});function _($){Re.call(this,n,$)}function y($){d=$,t(7,d),t(0,l)}function S($){te[$?"unshift":"push"](()=>{c=$,t(6,c)})}function C(){d=this.value,t(7,d),t(0,l)}const T=()=>{h(!1),m()};return n.$$set=$=>{"value"in $&&t(0,l=$.value),"placeholder"in $&&t(1,o=$.placeholder),"autocompleteCollection"in $&&t(2,r=$.autocompleteCollection),"extraAutocompleteKeys"in $&&t(3,a=$.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,m,_,y,S,C,T]}class Dl extends be{constructor(e){super(),_e(this,e,Ek,Ok,me,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function Dk(n){let e,t,i,s,l,o;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-refresh-line svelte-1bvelc2"),p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class",i="btn btn-transparent btn-circle "+n[1]+" svelte-1bvelc2"),Q(e,"refreshing",n[2])},m(r,a){w(r,e,a),b(e,t),l||(o=[Ce(s=Be.call(null,e,n[0])),Y(e,"click",n[3])],l=!0)},p(r,[a]){a&2&&i!==(i="btn btn-transparent btn-circle "+r[1]+" svelte-1bvelc2")&&p(e,"class",i),s&&Et(s.update)&&a&1&&s.update.call(null,r[0]),a&6&&Q(e,"refreshing",r[2])},i:x,o:x,d(r){r&&k(e),l=!1,$e(o)}}}function Ak(n,e,t){const i=pt();let{tooltip:s={text:"Refresh",position:"right"}}=e,{class:l=""}=e,o=null;function r(){i("refresh");const a=s;t(0,s=null),clearTimeout(o),t(2,o=setTimeout(()=>{t(2,o=null),t(0,s=a)},150))}return Kt(()=>()=>clearTimeout(o)),n.$$set=a=>{"tooltip"in a&&t(0,s=a.tooltip),"class"in a&&t(1,l=a.class)},[s,l,o,r]}class Jo extends be{constructor(e){super(),_e(this,e,Ak,Dk,me,{tooltip:0,class:1})}}function Ik(n){let e,t,i,s,l;const o=n[6].default,r=Tt(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){w(a,e,u),r&&r.m(e,null),i=!0,s||(l=[Y(e,"click",n[7]),Y(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&$t(r,o,a,a[5],i?Ct(o,a[5],u,null):Mt(a[5]),null),(!i||u&4)&&p(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&Q(e,"col-sort-disabled",a[3]),(!i||u&7)&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&Q(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&Q(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){L(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),s=!1,$e(l)}}}function Lk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class hn extends be{constructor(e){super(),_e(this,e,Lk,Ik,me,{class:1,name:2,sort:0,disable:3})}}function Pk(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Nk(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("div"),t=v("div"),i=W(n[2]),s=E(),l=v("div"),o=W(n[1]),r=W(" UTC"),p(t,"class","date"),p(l,"class","time svelte-5pjd03"),p(e,"class","datetime svelte-5pjd03")},m(f,c){w(f,e,c),b(e,t),b(t,i),b(e,s),b(e,l),b(l,o),b(l,r),a||(u=Ce(Be.call(null,e,n[3])),a=!0)},p(f,c){c&4&&le(i,f[2]),c&2&&le(o,f[1])},d(f){f&&k(e),a=!1,u()}}}function Fk(n){let e;function t(l,o){return l[0]?Nk:Pk}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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:x,o:x,d(l){l&&k(e),s.d(l)}}}function Rk(n,e,t){let i,s,{date:l=""}=e;const o={get text(){return j.formatToLocalDate(l)+" Local"}};return n.$$set=r=>{"date"in r&&t(0,l=r.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i,o]}class $i extends be{constructor(e){super(),_e(this,e,Rk,Fk,me,{date:0})}}const qk=n=>({}),lf=n=>({}),jk=n=>({}),of=n=>({});function Hk(n){let e,t,i,s,l,o,r,a;const u=n[11].before,f=Tt(u,n,n[10],of),c=n[11].default,d=Tt(c,n,n[10],null),h=n[11].after,m=Tt(h,n,n[10],lf);return{c(){e=v("div"),f&&f.c(),t=E(),i=v("div"),d&&d.c(),l=E(),m&&m.c(),p(i,"class",s="scroller "+n[0]+" "+n[3]+" svelte-3a0gfs"),p(e,"class","scroller-wrapper svelte-3a0gfs")},m(g,_){w(g,e,_),f&&f.m(e,null),b(e,t),b(e,i),d&&d.m(i,null),n[12](i),b(e,l),m&&m.m(e,null),o=!0,r||(a=[Y(window,"resize",n[1]),Y(i,"scroll",n[1])],r=!0)},p(g,[_]){f&&f.p&&(!o||_&1024)&&$t(f,u,g,g[10],o?Ct(u,g[10],_,jk):Mt(g[10]),of),d&&d.p&&(!o||_&1024)&&$t(d,c,g,g[10],o?Ct(c,g[10],_,null):Mt(g[10]),null),(!o||_&9&&s!==(s="scroller "+g[0]+" "+g[3]+" svelte-3a0gfs"))&&p(i,"class",s),m&&m.p&&(!o||_&1024)&&$t(m,h,g,g[10],o?Ct(h,g[10],_,qk):Mt(g[10]),lf)},i(g){o||(A(f,g),A(d,g),A(m,g),o=!0)},o(g){L(f,g),L(d,g),L(m,g),o=!1},d(g){g&&k(e),f&&f.d(g),d&&d.d(g),n[12](null),m&&m.d(g),r=!1,$e(a)}}}function Vk(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=pt();let{class:o=""}=e,{vThreshold:r=0}=e,{hThreshold:a=0}=e,{dispatchOnNoScroll:u=!0}=e,f=null,c="",d=null,h,m,g,_,y;function S(){f&&t(2,f.scrollTop=0,f)}function C(){f&&t(2,f.scrollLeft=0,f)}function T(){f&&(t(3,c=""),g=f.clientWidth+2,_=f.clientHeight+2,h=f.scrollWidth-g,m=f.scrollHeight-_,m>0?(t(3,c+=" v-scroll"),r>=_&&t(4,r=0),f.scrollTop-r<=0&&(t(3,c+=" v-scroll-start"),l("vScrollStart")),f.scrollTop+r>=m&&(t(3,c+=" v-scroll-end"),l("vScrollEnd"))):u&&l("vScrollEnd"),h>0?(t(3,c+=" h-scroll"),a>=g&&t(5,a=0),f.scrollLeft-a<=0&&(t(3,c+=" h-scroll-start"),l("hScrollStart")),f.scrollLeft+a>=h&&(t(3,c+=" h-scroll-end"),l("hScrollEnd"))):u&&l("hScrollEnd"))}function $(){d||(d=setTimeout(()=>{T(),d=null},150))}Kt(()=>($(),y=new MutationObserver($),y.observe(f,{attributeFilter:["width","height"],childList:!0,subtree:!0}),()=>{y==null||y.disconnect(),clearTimeout(d)}));function M(O){te[O?"unshift":"push"](()=>{f=O,t(2,f)})}return n.$$set=O=>{"class"in O&&t(0,o=O.class),"vThreshold"in O&&t(4,r=O.vThreshold),"hThreshold"in O&&t(5,a=O.hThreshold),"dispatchOnNoScroll"in O&&t(6,u=O.dispatchOnNoScroll),"$$scope"in O&&t(10,s=O.$$scope)},[o,$,f,c,r,a,u,S,C,T,s,i,M]}class Go extends be{constructor(e){super(),_e(this,e,Vk,Hk,me,{class:0,vThreshold:4,hThreshold:5,dispatchOnNoScroll:6,resetVerticalScroll:7,resetHorizontalScroll:8,refresh:9,throttleRefresh:1})}get resetVerticalScroll(){return this.$$.ctx[7]}get resetHorizontalScroll(){return this.$$.ctx[8]}get refresh(){return this.$$.ctx[9]}get throttleRefresh(){return this.$$.ctx[1]}}function rf(n,e,t){const i=n.slice();return i[23]=e[t],i}function zk(n){let e;return{c(){e=v("div"),e.innerHTML=' Method',p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Bk(n){let e;return{c(){e=v("div"),e.innerHTML=` URL`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Uk(n){let e;return{c(){e=v("div"),e.innerHTML=` Referer`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Wk(n){let e;return{c(){e=v("div"),e.innerHTML=` User IP`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Yk(n){let e;return{c(){e=v("div"),e.innerHTML=` Status`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Kk(n){let e;return{c(){e=v("div"),e.innerHTML=` Created`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function af(n){let e;function t(l,o){return l[6]?Gk:Jk}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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){l&&k(e),s.d(l)}}}function Jk(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&uf(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),b(e,t),b(t,i),b(t,s),o&&o.m(t,null),b(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=uf(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function Gk(n){let e;return{c(){e=v("tr"),e.innerHTML=' '},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function uf(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[19]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function ff(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function cf(n,e){var Me,Je,dt;let t,i,s,l=((Me=e[23].method)==null?void 0:Me.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,h,m,g,_,y,S=(e[23].referer||"N/A")+"",C,T,$,M,O,D=(e[23].userIp||"N/A")+"",I,N,P,F,R,q=e[23].status+"",B,Z,X,J,U,oe,ee,se,Ee,qe,Ve=(((Je=e[23].meta)==null?void 0:Je.errorMessage)||((dt=e[23].meta)==null?void 0:dt.errorData))&&ff();J=new $i({props:{date:e[23].created}});function We(){return e[17](e[23])}function ke(...Se){return e[18](e[23],...Se)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=W(l),a=E(),u=v("td"),f=v("span"),d=W(c),m=E(),Ve&&Ve.c(),g=E(),_=v("td"),y=v("span"),C=W(S),$=E(),M=v("td"),O=v("span"),I=W(D),P=E(),F=v("td"),R=v("span"),B=W(q),Z=E(),X=v("td"),z(J.$$.fragment),U=E(),oe=v("td"),oe.innerHTML='',ee=E(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",T=e[23].referer),Q(y,"txt-hint",!e[23].referer),p(_,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",N=e[23].userIp),Q(O,"txt-hint",!e[23].userIp),p(M,"class","col-type-number col-field-userIp"),p(R,"class","label"),Q(R,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(X,"class","col-type-date col-field-created"),p(oe,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Se,we){w(Se,t,we),b(t,i),b(i,s),b(s,o),b(t,a),b(t,u),b(u,f),b(f,d),b(u,m),Ve&&Ve.m(u,null),b(t,g),b(t,_),b(_,y),b(y,C),b(t,$),b(t,M),b(M,O),b(O,I),b(t,P),b(t,F),b(F,R),b(R,B),b(t,Z),b(t,X),H(J,X,null),b(t,U),b(t,oe),b(t,ee),se=!0,Ee||(qe=[Y(t,"click",We),Y(t,"keydown",ke)],Ee=!0)},p(Se,we){var nt,ne,Ne;e=Se,(!se||we&8)&&l!==(l=((nt=e[23].method)==null?void 0:nt.toUpperCase())+"")&&le(o,l),(!se||we&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!se||we&8)&&c!==(c=e[23].url+"")&&le(d,c),(!se||we&8&&h!==(h=e[23].url))&&p(f,"title",h),(ne=e[23].meta)!=null&&ne.errorMessage||(Ne=e[23].meta)!=null&&Ne.errorData?Ve||(Ve=ff(),Ve.c(),Ve.m(u,null)):Ve&&(Ve.d(1),Ve=null),(!se||we&8)&&S!==(S=(e[23].referer||"N/A")+"")&&le(C,S),(!se||we&8&&T!==(T=e[23].referer))&&p(y,"title",T),(!se||we&8)&&Q(y,"txt-hint",!e[23].referer),(!se||we&8)&&D!==(D=(e[23].userIp||"N/A")+"")&&le(I,D),(!se||we&8&&N!==(N=e[23].userIp))&&p(O,"title",N),(!se||we&8)&&Q(O,"txt-hint",!e[23].userIp),(!se||we&8)&&q!==(q=e[23].status+"")&&le(B,q),(!se||we&8)&&Q(R,"label-danger",e[23].status>=400);const Ue={};we&8&&(Ue.date=e[23].created),J.$set(Ue)},i(Se){se||(A(J.$$.fragment,Se),se=!0)},o(Se){L(J.$$.fragment,Se),se=!1},d(Se){Se&&k(t),Ve&&Ve.d(),V(J),Ee=!1,$e(qe)}}}function Zk(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M,O,D,I=[],N=new Map,P;function F(ke){n[11](ke)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[zk]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new hn({props:R}),te.push(()=>he(s,"sort",F));function q(ke){n[12](ke)}let B={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[Bk]},$$scope:{ctx:n}};n[1]!==void 0&&(B.sort=n[1]),r=new hn({props:B}),te.push(()=>he(r,"sort",q));function Z(ke){n[13](ke)}let X={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[Uk]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),f=new hn({props:X}),te.push(()=>he(f,"sort",Z));function J(ke){n[14](ke)}let U={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[Wk]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),h=new hn({props:U}),te.push(()=>he(h,"sort",J));function oe(ke){n[15](ke)}let ee={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Yk]},$$scope:{ctx:n}};n[1]!==void 0&&(ee.sort=n[1]),_=new hn({props:ee}),te.push(()=>he(_,"sort",oe));function se(ke){n[16](ke)}let Ee={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[Kk]},$$scope:{ctx:n}};n[1]!==void 0&&(Ee.sort=n[1]),C=new hn({props:Ee}),te.push(()=>he(C,"sort",se));let qe=pe(n[3]);const Ve=ke=>ke[23].id;for(let ke=0;kel=!1)),s.$set(Je);const dt={};Me&67108864&&(dt.$$scope={dirty:Me,ctx:ke}),!a&&Me&2&&(a=!0,dt.sort=ke[1],ve(()=>a=!1)),r.$set(dt);const Se={};Me&67108864&&(Se.$$scope={dirty:Me,ctx:ke}),!c&&Me&2&&(c=!0,Se.sort=ke[1],ve(()=>c=!1)),f.$set(Se);const we={};Me&67108864&&(we.$$scope={dirty:Me,ctx:ke}),!m&&Me&2&&(m=!0,we.sort=ke[1],ve(()=>m=!1)),h.$set(we);const Ue={};Me&67108864&&(Ue.$$scope={dirty:Me,ctx:ke}),!y&&Me&2&&(y=!0,Ue.sort=ke[1],ve(()=>y=!1)),_.$set(Ue);const nt={};Me&67108864&&(nt.$$scope={dirty:Me,ctx:ke}),!T&&Me&2&&(T=!0,nt.sort=ke[1],ve(()=>T=!1)),C.$set(nt),Me&841&&(qe=pe(ke[3]),re(),I=gt(I,Me,Ve,1,ke,qe,N,D,qt,cf,null,rf),ae(),!qe.length&&We?We.p(ke,Me):qe.length?We&&(We.d(1),We=null):(We=af(ke),We.c(),We.m(D,null))),(!P||Me&64)&&Q(e,"table-loading",ke[6])},i(ke){if(!P){A(s.$$.fragment,ke),A(r.$$.fragment,ke),A(f.$$.fragment,ke),A(h.$$.fragment,ke),A(_.$$.fragment,ke),A(C.$$.fragment,ke);for(let Me=0;Me{if(N<=1&&g(),t(6,d=!1),t(5,f=F.page),t(4,c=F.totalItems),s("load",u.concat(F.items)),P){const R=++h;for(;F.items.length&&h==R;)t(3,u=u.concat(F.items.splice(0,10))),await j.yieldToMain()}else t(3,u=u.concat(F.items))}).catch(F=>{F!=null&&F.isAbort||(t(6,d=!1),console.warn(F),g(),ce.error(F,(F==null?void 0:F.status)!=400))})}function g(){t(3,u=[]),t(5,f=1),t(4,c=0)}function _(N){a=N,t(1,a)}function y(N){a=N,t(1,a)}function S(N){a=N,t(1,a)}function C(N){a=N,t(1,a)}function T(N){a=N,t(1,a)}function $(N){a=N,t(1,a)}const M=N=>s("select",N),O=(N,P)=>{P.code==="Enter"&&(P.preventDefault(),s("select",N))},D=()=>t(0,o=""),I=()=>m(f+1);return n.$$set=N=>{"filter"in N&&t(0,o=N.filter),"presets"in N&&t(10,r=N.presets),"sort"in N&&t(1,a=N.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),m(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,m,u,c,f,d,i,s,l,r,_,y,S,C,T,$,M,O,D,I]}class xk extends be{constructor(e){super(),_e(this,e,Qk,Xk,me,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! * Chart.js v3.9.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors @@ -44,7 +44,7 @@ var l0=Object.defineProperty;var o0=(n,e,t)=>e in n?l0(n,e,{enumerable:!0,config `),_.hasAttribute("data-start")||_.setAttribute("data-start",String(I+1))}y.textContent=M,t.highlightElement(y)},function(M){_.setAttribute(r,f),y.textContent=M})}}),t.plugins.fileHighlight={highlight:function(_){for(var y=(_||document).querySelectorAll(c),S=0,C;C=y[S++];)t.highlightElement(C)}};var m=!1;t.fileHighlight=function(){m||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),m=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(P1);var F4=P1.exports;const Qs=N4(F4);var R4={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;ar&&(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="",m="",g=!1,_=0;_>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 q4(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){w(s,e,l),b(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:x,o:x,d(s){s&&k(e)}}}function j4(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=Qs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Qs.highlight(a,Qs.languages[l]||Qs.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 Qs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class N1 extends be{constructor(e){super(),_e(this,e,j4,q4,me,{class:0,content:2,language:3})}}const H4=n=>({}),Oc=n=>({}),V4=n=>({}),Ec=n=>({});function Dc(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C=n[4]&&!n[2]&&Ac(n);const T=n[19].header,$=Tt(T,n,n[18],Ec);let M=n[4]&&n[2]&&Ic(n);const O=n[19].default,D=Tt(O,n,n[18],null),I=n[19].footer,N=Tt(I,n,n[18],Oc);return{c(){e=v("div"),t=v("div"),s=E(),l=v("div"),o=v("div"),C&&C.c(),r=E(),$&&$.c(),a=E(),M&&M.c(),u=E(),f=v("div"),D&&D.c(),c=E(),d=v("div"),N&&N.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]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(P,F){w(P,e,F),b(e,t),b(e,s),b(e,l),b(l,o),C&&C.m(o,null),b(o,r),$&&$.m(o,null),b(o,a),M&&M.m(o,null),b(l,u),b(l,f),D&&D.m(f,null),n[21](f),b(l,c),b(l,d),N&&N.m(d,null),_=!0,y||(S=[Y(t,"click",Ze(n[20])),Y(f,"scroll",n[22])],y=!0)},p(P,F){n=P,n[4]&&!n[2]?C?(C.p(n,F),F[0]&20&&A(C,1)):(C=Ac(n),C.c(),A(C,1),C.m(o,r)):C&&(re(),L(C,1,1,()=>{C=null}),ae()),$&&$.p&&(!_||F[0]&262144)&&$t($,T,n,n[18],_?Ct(T,n[18],F,V4):Mt(n[18]),Ec),n[4]&&n[2]?M?M.p(n,F):(M=Ic(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),D&&D.p&&(!_||F[0]&262144)&&$t(D,O,n,n[18],_?Ct(O,n[18],F,null):Mt(n[18]),null),N&&N.p&&(!_||F[0]&262144)&&$t(N,I,n,n[18],_?Ct(I,n[18],F,H4):Mt(n[18]),Oc),(!_||F[0]&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),(!_||F[0]&262)&&Q(l,"popup",n[2]),(!_||F[0]&4)&&Q(e,"padded",n[2]),(!_||F[0]&1)&&Q(e,"active",n[0])},i(P){_||(P&&xe(()=>{_&&(i||(i=He(t,hl,{duration:Ni,opacity:0},!0)),i.run(1))}),A(C),A($,P),A(D,P),A(N,P),P&&xe(()=>{_&&(g&&g.end(1),m=M_(l,mi,n[2]?{duration:Ni,y:-10}:{duration:Ni,x:50}),m.start())}),_=!0)},o(P){P&&(i||(i=He(t,hl,{duration:Ni,opacity:0},!1)),i.run(0)),L(C),L($,P),L(D,P),L(N,P),m&&m.invalidate(),P&&(g=ka(l,mi,n[2]?{duration:Ni,y:10}:{duration:Ni,x:50})),_=!1},d(P){P&&k(e),P&&i&&i.end(),C&&C.d(),$&&$.d(P),M&&M.d(),D&&D.d(P),n[21](null),N&&N.d(P),P&&g&&g.end(),y=!1,$e(S)}}}function Ac(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",Ze(n[5])),s=!0)},p(o,r){n=o},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,hl,{duration:Ni},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,hl,{duration:Ni},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Ic(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Ze(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function z4(n){let e,t,i,s,l=n[0]&&Dc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[Y(window,"resize",n[10]),Y(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Dc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){L(l),t=!1},d(o){o&&k(e),l&&l.d(),n[23](null),i=!1,$e(s)}}}let Qi,Dr=[];function F1(){return Qi=Qi||document.querySelector(".overlays"),Qi||(Qi=document.createElement("div"),Qi.classList.add("overlays"),document.body.appendChild(Qi)),Qi}let Ni=150;function Lc(){return 1e3+F1().querySelectorAll(".overlay-panel-container.active").length}function B4(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const h=pt(),m="op_"+j.randomString(10);let g,_,y,S,C="",T=o;function $(){typeof c=="function"&&c()===!1||t(0,o=!0)}function M(){typeof d=="function"&&d()===!1||t(0,o=!1)}function O(){return o}async function D(U){t(17,T=U),U?(y=document.activeElement,h("show"),g==null||g.focus()):(clearTimeout(S),h("hide"),y==null||y.focus()),await ln(),I()}function I(){g&&(o?t(6,g.style.zIndex=Lc(),g):t(6,g.style="",g))}function N(){j.pushUnique(Dr,m),document.body.classList.add("overlay-active")}function P(){j.removeByValue(Dr,m),Dr.length||document.body.classList.remove("overlay-active")}function F(U){o&&f&&U.code=="Escape"&&!j.isInput(U.target)&&g&&g.style.zIndex==Lc()&&(U.preventDefault(),M())}function R(U){o&&q(_)}function q(U,oe){oe&&t(8,C=""),!(!U||S)&&(S=setTimeout(()=>{if(clearTimeout(S),S=null,!U)return;if(U.scrollHeight-U.offsetHeight>0)t(8,C="scrollable");else{t(8,C="");return}U.scrollTop==0?t(8,C+=" scroll-top-reached"):U.scrollTop+U.offsetHeight==U.scrollHeight&&t(8,C+=" scroll-bottom-reached")},100))}Kt(()=>(F1().appendChild(g),()=>{var U;clearTimeout(S),P(),(U=g==null?void 0:g.classList)==null||U.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const B=()=>a?M():!0;function Z(U){te[U?"unshift":"push"](()=>{_=U,t(7,_)})}const X=U=>q(U.target);function J(U){te[U?"unshift":"push"](()=>{g=U,t(6,g)})}return n.$$set=U=>{"class"in U&&t(1,l=U.class),"active"in U&&t(0,o=U.active),"popup"in U&&t(2,r=U.popup),"overlayClose"in U&&t(3,a=U.overlayClose),"btnClose"in U&&t(4,u=U.btnClose),"escClose"in U&&t(12,f=U.escClose),"beforeOpen"in U&&t(13,c=U.beforeOpen),"beforeHide"in U&&t(14,d=U.beforeHide),"$$scope"in U&&t(18,s=U.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&T!=o&&D(o),n.$$.dirty[0]&128&&q(_,!0),n.$$.dirty[0]&64&&g&&I(),n.$$.dirty[0]&1&&(o?N():P())},[o,l,r,a,u,M,g,_,C,F,R,q,f,c,d,$,O,T,s,i,B,Z,X,J]}class rn extends be{constructor(e){super(),_e(this,e,B4,z4,me,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function U4(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function W4(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=W(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){w(l,e,o),b(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&le(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&k(e)}}}function Y4(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function K4(n){let e,t,i;return t=new N1({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","block")},m(s,l){w(s,e,l),H(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function J4(n){var Pe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,h,m,g=n[2].status+"",_,y,S,C,T,$,M=((Pe=n[2].method)==null?void 0:Pe.toUpperCase())+"",O,D,I,N,P,F,R=n[2].auth+"",q,B,Z,X,J,U,oe=n[2].url+"",ee,se,Ee,qe,Ve,We,ke,Me,Je,dt,Se,we=n[2].remoteIp+"",Ue,nt,ne,Ne,Te,ot,At=n[2].userIp+"",nn,sn,an,Nn,_i,Fn,Ie=n[2].userAgent+"",Ot,oi,cn,Xn,Ai,Cn,Qn,en,et,ue,De,Xe,Jt,it,It,Lt;function Rn(Fe,Ae){return Fe[2].referer?W4:U4}let K=Rn(n),G=K(n);const ie=[K4,Y4],fe=[];function Oe(Fe,Ae){return Ae&4&&(Qn=null),Qn==null&&(Qn=!j.isEmpty(Fe[2].meta)),Qn?0:1}return en=Oe(n,-1),et=fe[en]=ie[en](n),It=new $i({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=E(),o=v("td"),a=W(r),u=E(),f=v("tr"),c=v("td"),c.textContent="Status",d=E(),h=v("td"),m=v("span"),_=W(g),y=E(),S=v("tr"),C=v("td"),C.textContent="Method",T=E(),$=v("td"),O=W(M),D=E(),I=v("tr"),N=v("td"),N.textContent="Auth",P=E(),F=v("td"),q=W(R),B=E(),Z=v("tr"),X=v("td"),X.textContent="URL",J=E(),U=v("td"),ee=W(oe),se=E(),Ee=v("tr"),qe=v("td"),qe.textContent="Referer",Ve=E(),We=v("td"),G.c(),ke=E(),Me=v("tr"),Je=v("td"),Je.textContent="Remote IP",dt=E(),Se=v("td"),Ue=W(we),nt=E(),ne=v("tr"),Ne=v("td"),Ne.textContent="User IP",Te=E(),ot=v("td"),nn=W(At),sn=E(),an=v("tr"),Nn=v("td"),Nn.textContent="UserAgent",_i=E(),Fn=v("td"),Ot=W(Ie),oi=E(),cn=v("tr"),Xn=v("td"),Xn.textContent="Meta",Ai=E(),Cn=v("td"),et.c(),ue=E(),De=v("tr"),Xe=v("td"),Xe.textContent="Created",Jt=E(),it=v("td"),z(It.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(m,"class","label"),Q(m,"label-danger",n[2].status>=400),p(C,"class","min-width txt-hint txt-bold"),p(N,"class","min-width txt-hint txt-bold"),p(X,"class","min-width txt-hint txt-bold"),p(qe,"class","min-width txt-hint txt-bold"),p(Je,"class","min-width txt-hint txt-bold"),p(Ne,"class","min-width txt-hint txt-bold"),p(Nn,"class","min-width txt-hint txt-bold"),p(Xn,"class","min-width txt-hint txt-bold"),p(Xe,"class","min-width txt-hint txt-bold"),p(e,"class","table-border")},m(Fe,Ae){w(Fe,e,Ae),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o),b(o,a),b(t,u),b(t,f),b(f,c),b(f,d),b(f,h),b(h,m),b(m,_),b(t,y),b(t,S),b(S,C),b(S,T),b(S,$),b($,O),b(t,D),b(t,I),b(I,N),b(I,P),b(I,F),b(F,q),b(t,B),b(t,Z),b(Z,X),b(Z,J),b(Z,U),b(U,ee),b(t,se),b(t,Ee),b(Ee,qe),b(Ee,Ve),b(Ee,We),G.m(We,null),b(t,ke),b(t,Me),b(Me,Je),b(Me,dt),b(Me,Se),b(Se,Ue),b(t,nt),b(t,ne),b(ne,Ne),b(ne,Te),b(ne,ot),b(ot,nn),b(t,sn),b(t,an),b(an,Nn),b(an,_i),b(an,Fn),b(Fn,Ot),b(t,oi),b(t,cn),b(cn,Xn),b(cn,Ai),b(cn,Cn),fe[en].m(Cn,null),b(t,ue),b(t,De),b(De,Xe),b(De,Jt),b(De,it),H(It,it,null),Lt=!0},p(Fe,Ae){var Ke;(!Lt||Ae&4)&&r!==(r=Fe[2].id+"")&&le(a,r),(!Lt||Ae&4)&&g!==(g=Fe[2].status+"")&&le(_,g),(!Lt||Ae&4)&&Q(m,"label-danger",Fe[2].status>=400),(!Lt||Ae&4)&&M!==(M=((Ke=Fe[2].method)==null?void 0:Ke.toUpperCase())+"")&&le(O,M),(!Lt||Ae&4)&&R!==(R=Fe[2].auth+"")&&le(q,R),(!Lt||Ae&4)&&oe!==(oe=Fe[2].url+"")&&le(ee,oe),K===(K=Rn(Fe))&&G?G.p(Fe,Ae):(G.d(1),G=K(Fe),G&&(G.c(),G.m(We,null))),(!Lt||Ae&4)&&we!==(we=Fe[2].remoteIp+"")&&le(Ue,we),(!Lt||Ae&4)&&At!==(At=Fe[2].userIp+"")&&le(nn,At),(!Lt||Ae&4)&&Ie!==(Ie=Fe[2].userAgent+"")&&le(Ot,Ie);let Qe=en;en=Oe(Fe,Ae),en===Qe?fe[en].p(Fe,Ae):(re(),L(fe[Qe],1,1,()=>{fe[Qe]=null}),ae(),et=fe[en],et?et.p(Fe,Ae):(et=fe[en]=ie[en](Fe),et.c()),A(et,1),et.m(Cn,null));const ze={};Ae&4&&(ze.date=Fe[2].created),It.$set(ze)},i(Fe){Lt||(A(et),A(It.$$.fragment,Fe),Lt=!0)},o(Fe){L(et),L(It.$$.fragment,Fe),Lt=!1},d(Fe){Fe&&k(e),G.d(),fe[en].d(),V(It)}}}function G4(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Z4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[4]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function X4(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[Z4],header:[G4],default:[J4]},$$scope:{ctx:n}};return e=new rn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[5](null),V(e,s)}}}function Q4(n,e,t){let i,s={};function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){te[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){Re.call(this,n,c)}function f(c){Re.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class x4 extends be{constructor(e){super(),_e(this,e,Q4,X4,me,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function eT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){w(u,e,f),e.checked=n[1],w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Pc(n){let e,t;return e=new P4({props:{filter:n[4],presets:n[5]}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Nc(n){let e,t;return e=new xk({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function tT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S=n[3],C,T=n[3],$,M;r=new Jo({}),r.$on("refresh",n[9]),d=new ge({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[eT,({uniqueId:I})=>({14:I}),({uniqueId:I})=>I?16384:0]},$$scope:{ctx:n}}}),m=new Dl({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),m.$on("submit",n[11]);let O=Pc(n),D=Nc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=W(n[6]),o=E(),z(r.$$.fragment),a=E(),u=v("div"),f=E(),c=v("div"),z(d.$$.fragment),h=E(),z(m.$$.fragment),g=E(),_=v("div"),y=E(),O.c(),C=E(),D.c(),$=ye(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(_,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(I,N){w(I,e,N),b(e,t),b(t,i),b(i,s),b(s,l),b(t,o),H(r,t,null),b(t,a),b(t,u),b(t,f),b(t,c),H(d,c,null),b(e,h),H(m,e,null),b(e,g),b(e,_),b(e,y),O.m(e,null),w(I,C,N),D.m(I,N),w(I,$,N),M=!0},p(I,N){(!M||N&64)&&le(l,I[6]);const P={};N&49154&&(P.$$scope={dirty:N,ctx:I}),d.$set(P);const F={};N&1&&(F.value=I[0]),m.$set(F),N&8&&me(S,S=I[3])?(re(),L(O,1,1,x),ae(),O=Pc(I),O.c(),A(O,1),O.m(e,null)):O.p(I,N),N&8&&me(T,T=I[3])?(re(),L(D,1,1,x),ae(),D=Nc(I),D.c(),A(D,1),D.m($.parentNode,$)):D.p(I,N)},i(I){M||(A(r.$$.fragment,I),A(d.$$.fragment,I),A(m.$$.fragment,I),A(O),A(D),M=!0)},o(I){L(r.$$.fragment,I),L(d.$$.fragment,I),L(m.$$.fragment,I),L(O),L(D),M=!1},d(I){I&&(k(e),k(C),k($)),V(r),V(d),V(m),O.d(I),D.d(I)}}}function nT(n){let e,t,i,s;e=new Tn({props:{$$slots:{default:[tT]},$$scope:{ctx:n}}});let l={};return i=new x4({props:l}),n[13](i),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(o,r){H(e,o,r),w(o,t,r),H(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){L(e.$$.fragment,o),L(i.$$.fragment,o),s=!1},d(o){o&&k(t),V(e,o),n[13](null),V(i,o)}}}const Fc="includeAdminLogs";function iT(n,e,t){var y;let i,s,l;Ge(n,Ft,S=>t(6,l=S));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];un(Ft,l="Request logs",l);let r,a="",u=((y=window.localStorage)==null?void 0:y.getItem(Fc))<<0,f=1;function c(){t(3,f++,f)}const d=()=>c();function h(){u=this.checked,t(1,u)}const m=S=>t(0,a=S.detail),g=S=>r==null?void 0:r.show(S==null?void 0:S.detail);function _(S){te[S?"unshift":"push"](()=>{r=S,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Fc,u<<0),n.$$.dirty&1&&t(4,s=j.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,c,d,h,m,g,_]}class sT extends be{constructor(e){super(),_e(this,e,iT,nT,me,{})}}function lT(n){let e,t,i;return{c(){e=v("span"),p(e,"class","dragline svelte-1g2t3dj"),Q(e,"dragging",n[1])},m(s,l){w(s,e,l),n[4](e),t||(i=[Y(e,"mousedown",n[5]),Y(e,"touchstart",n[2])],t=!0)},p(s,[l]){l&2&&Q(e,"dragging",s[1])},i:x,o:x,d(s){s&&k(e),n[4](null),t=!1,$e(i)}}}function oT(n,e,t){const i=pt();let{tolerance:s=0}=e,l,o=0,r=0,a=0,u=0,f=!1;function c(_){_.stopPropagation(),o=_.clientX,r=_.clientY,a=_.clientX-l.offsetLeft,u=_.clientY-l.offsetTop,document.addEventListener("touchmove",h),document.addEventListener("mousemove",h),document.addEventListener("touchend",d),document.addEventListener("mouseup",d)}function d(_){f&&(_.preventDefault(),t(1,f=!1),l.classList.remove("no-pointer-events"),i("dragstop",{event:_,elem:l})),document.removeEventListener("touchmove",h),document.removeEventListener("mousemove",h),document.removeEventListener("touchend",d),document.removeEventListener("mouseup",d)}function h(_){let y=_.clientX-o,S=_.clientY-r,C=_.clientX-a,T=_.clientY-u;!f&&Math.abs(C-l.offsetLeft){l=_,t(0,l)})}const g=_=>{_.button==0&&c(_)};return n.$$set=_=>{"tolerance"in _&&t(3,s=_.tolerance)},[l,f,c,s,m,g]}class rT extends be{constructor(e){super(),_e(this,e,oT,lT,me,{tolerance:3})}}function aT(n){let e,t,i,s,l;const o=n[5].default,r=Tt(o,n,n[4],null);return s=new rT({}),s.$on("dragstart",n[7]),s.$on("dragging",n[8]),s.$on("dragstop",n[9]),{c(){e=v("aside"),r&&r.c(),i=E(),z(s.$$.fragment),p(e,"class",t="page-sidebar "+n[0])},m(a,u){w(a,e,u),r&&r.m(e,null),n[6](e),w(a,i,u),H(s,a,u),l=!0},p(a,[u]){r&&r.p&&(!l||u&16)&&$t(r,o,a,a[4],l?Ct(o,a[4],u,null):Mt(a[4]),null),(!l||u&1&&t!==(t="page-sidebar "+a[0]))&&p(e,"class",t)},i(a){l||(A(r,a),A(s.$$.fragment,a),l=!0)},o(a){L(r,a),L(s.$$.fragment,a),l=!1},d(a){a&&(k(e),k(i)),r&&r.d(a),n[6](null),V(s,a)}}}const Rc="@adminSidebarWidth";function uT(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o,r,a=localStorage.getItem(Rc)||null;function u(h){te[h?"unshift":"push"](()=>{o=h,t(1,o),t(2,a)})}const f=()=>{t(3,r=o.offsetWidth)},c=h=>{t(2,a=r+h.detail.diffX+"px")},d=()=>{j.triggerResize()};return n.$$set=h=>{"class"in h&&t(0,l=h.class),"$$scope"in h&&t(4,s=h.$$scope)},n.$$.update=()=>{n.$$.dirty&6&&a&&o&&(t(1,o.style.width=a,o),localStorage.setItem(Rc,a))},[l,o,a,r,s,i,u,f,c,d]}class R1 extends be{constructor(e){super(),_e(this,e,uT,aT,me,{class:0})}}const lu=Ln({});function _n(n,e,t){lu.set({text:n,yesCallback:e,noCallback:t})}function q1(){lu.set({})}function qc(n){let e,t,i;const s=n[17].default,l=Tt(s,n,n[16],null);return{c(){e=v("div"),l&&l.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(o,r){w(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&$t(l,s,o,o[16],i?Ct(s,o[16],r,null):Mt(o[16]),null),(!i||r&2)&&p(e,"class",o[1]),(!i||r&3)&&Q(e,"active",o[0])},i(o){i||(A(l,o),o&&xe(()=>{i&&(t||(t=He(e,mi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){L(l,o),o&&(t||(t=He(e,mi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function fT(n){let e,t,i,s,l=n[0]&&qc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[Y(window,"mousedown",n[5]),Y(window,"click",n[6]),Y(window,"keydown",n[4]),Y(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=qc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){L(l),t=!1},d(o){o&&k(e),l&&l.d(),n[19](null),i=!1,$e(s)}}}function cT(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,c,d,h,m,g=!1;const _=pt();function y(){t(0,o=!1),g=!1,clearTimeout(m)}function S(){t(0,o=!0),clearTimeout(m),m=setTimeout(()=>{a&&(d!=null&&d.scrollIntoViewIfNeeded?d==null||d.scrollIntoViewIfNeeded():d!=null&&d.scrollIntoView&&(d==null||d.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function C(){o?y():S()}function T(B){return!c||B.classList.contains(u)||(h==null?void 0:h.contains(B))&&!c.contains(B)||c.contains(B)&&B.closest&&B.closest("."+u)}function $(B){(!o||T(B.target))&&(B.preventDefault(),B.stopPropagation(),C())}function M(B){(B.code==="Enter"||B.code==="Space")&&(!o||T(B.target))&&(B.preventDefault(),B.stopPropagation(),C())}function O(B){o&&r&&B.code==="Escape"&&(B.preventDefault(),y())}function D(B){o&&!(c!=null&&c.contains(B.target))?g=!0:g&&(g=!1)}function I(B){var Z;o&&g&&!(c!=null&&c.contains(B.target))&&!(h!=null&&h.contains(B.target))&&!((Z=B.target)!=null&&Z.closest(".flatpickr-calendar"))&&y()}function N(B){D(B),I(B)}function P(B){F(),c==null||c.addEventListener("click",$),t(15,h=B||(c==null?void 0:c.parentNode)),h==null||h.addEventListener("click",$),h==null||h.addEventListener("keydown",M)}function F(){clearTimeout(m),c==null||c.removeEventListener("click",$),h==null||h.removeEventListener("click",$),h==null||h.removeEventListener("keydown",M)}Kt(()=>(P(),()=>F()));function R(B){te[B?"unshift":"push"](()=>{d=B,t(3,d)})}function q(B){te[B?"unshift":"push"](()=>{c=B,t(2,c)})}return n.$$set=B=>{"trigger"in B&&t(8,l=B.trigger),"active"in B&&t(0,o=B.active),"escClose"in B&&t(9,r=B.escClose),"autoScroll"in B&&t(10,a=B.autoScroll),"closableClass"in B&&t(11,u=B.closableClass),"class"in B&&t(1,f=B.class),"$$scope"in B&&t(16,s=B.$$scope)},n.$$.update=()=>{var B,Z;n.$$.dirty&260&&c&&P(l),n.$$.dirty&32769&&(o?((B=h==null?void 0:h.classList)==null||B.add("active"),_("show")):((Z=h==null?void 0:h.classList)==null||Z.remove("active"),_("hide")))},[o,f,c,d,O,D,I,N,l,r,a,u,y,S,C,h,s,i,R,q]}class Pn extends be{constructor(e){super(),_e(this,e,cT,fT,me,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function jc(n,e,t){const i=n.slice();return i[27]=e[t],i}function dT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("input"),s=E(),l=v("label"),o=W("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[30]),e.checked=i=n[3].unique,p(l,"for",r=n[30])},m(f,c){w(f,e,c),w(f,s,c),w(f,l,c),b(l,o),a||(u=Y(e,"change",n[19]),a=!0)},p(f,c){c[0]&1073741824&&t!==(t=f[30])&&p(e,"id",t),c[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),c[0]&1073741824&&r!==(r=f[30])&&p(l,"for",r)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function pT(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a,u){var c;let f={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(c=a[0])==null?void 0:c.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(f.value=a[2]),{props:f}}return o&&(e=Nt(o,r(n)),te.push(()=>he(e,"value",l))),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&H(e,a,u),w(a,i,u),s=!0},p(a,u){var f;if(u[0]&128&&o!==(o=a[7])){if(e){re();const c=e;L(c.$$.fragment,1,0,()=>{V(c,1)}),ae()}o?(e=Nt(o,r(a)),te.push(()=>he(e,"value",l)),z(e.$$.fragment),A(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else if(o){const c={};u[0]&1073741824&&(c.id=a[30]),u[0]&1&&(c.placeholder=`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`),!t&&u[0]&4&&(t=!0,c.value=a[2],ve(()=>t=!1)),e.$set(c)}},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&&V(e,a)}}}function hT(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function mT(n){let e,t,i,s;const l=[hT,pT],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},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):(re(),L(o[f],1,1,()=>{o[f]=null}),ae(),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){a&&k(i),o[e].d(a)}}}function Hc(n){let e,t,i,s=pe(n[10]),l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new ge({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[mT,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Hc(n);return{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),r&&r.c(),l=ye()},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};u[0]&64&&(c.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(c.$$scope={dirty:u,ctx:a}),i.$set(c),a[10].length>0?r?r.p(a,u):(r=Hc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),o=!1},d(a){a&&(k(t),k(s),k(l)),V(e,a),V(i,a),r&&r.d(a)}}}function _T(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=v("h4"),i=W(t),s=W(" index")},m(l,o){w(l,e,o),b(e,i),b(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&le(i,t)},d(l){l&&k(e)}}}function zc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){w(s,e,l),t||(i=[Ce(Be.call(null,e,{text:"Delete",position:"top"})),Y(e,"click",n[16])],t=!0)},p:x,d(s){s&&k(e),t=!1,$e(i)}}}function bT(n){let e,t,i,s,l,o,r=n[5]!=""&&zc(n);return{c(){r&&r.c(),e=E(),t=v("button"),t.innerHTML='Cancel',i=E(),s=v("button"),s.innerHTML='Set index',p(t,"type","button"),p(t,"class","btn btn-transparent"),p(s,"type","button"),p(s,"class","btn"),Q(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),l||(o=[Y(t,"click",n[17]),Y(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=zc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&Q(s,"btn-disabled",a[9].length<=0)},d(a){a&&(k(e),k(t),k(i),k(s)),r&&r.d(a),l=!1,$e(o)}}}function vT(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[bT],header:[_T],default:[gT]},$$scope:{ctx:n}};for(let l=0;lJ.name==B);X?j.removeByValue(Z.columns,X):j.pushUnique(Z.columns,{name:B}),t(2,d=j.buildIndex(Z))}Kt(async()=>{t(8,g=!0);try{t(7,m=(await ft(()=>import("./CodeEditor-c7cce7e3.js"),["./CodeEditor-c7cce7e3.js","./index-30dee195.js"],import.meta.url)).default)}catch(B){console.warn(B)}t(8,g=!1)});const M=()=>C(),O=()=>y(),D=()=>T(),I=B=>{t(3,s.unique=B.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,d=j.buildIndex(s))};function N(B){d=B,t(2,d)}const P=B=>$(B);function F(B){te[B?"unshift":"push"](()=>{f=B,t(4,f)})}function R(B){Re.call(this,n,B)}function q(B){Re.call(this,n,B)}return n.$$set=B=>{e=je(je({},e),xt(B)),t(14,r=tt(e,o)),"collection"in B&&t(0,u=B.collection)},n.$$.update=()=>{var B,Z,X;n.$$.dirty[0]&1&&t(10,i=(((Z=(B=u==null?void 0:u.schema)==null?void 0:B.filter(J=>!J.toDelete))==null?void 0:Z.map(J=>J.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=j.parseIndex(d)),n.$$.dirty[0]&8&&t(9,l=((X=s.columns)==null?void 0:X.map(J=>J.name))||[])},[u,y,d,s,f,c,h,m,g,l,i,C,T,$,r,_,M,O,D,I,N,P,F,R,q]}class kT extends be{constructor(e){super(),_e(this,e,yT,vT,me,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Bc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=j.parseIndex(i[10]);return i[11]=s,i}function Uc(n){let e;return{c(){e=v("strong"),e.textContent="Unique:"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Wc(n){var d;let e,t,i,s=((d=n[11].columns)==null?void 0:d.map(Yc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Uc();function c(){return n[4](n[10],n[13])}return{c(){var h,m;e=v("button"),f&&f.c(),t=E(),i=v("span"),l=W(s),p(i,"class","txt"),p(e,"type","button"),p(e,"class",o="label link-primary "+((m=(h=n[2].indexes)==null?void 0:h[n[13]])!=null&&m.message?"label-danger":"")+" svelte-167lbwu")},m(h,m){var g,_;w(h,e,m),f&&f.m(e,null),b(e,t),b(e,i),b(i,l),a||(u=[Ce(r=Be.call(null,e,((_=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:_.message)||"")),Y(e,"click",c)],a=!0)},p(h,m){var g,_,y,S,C;n=h,n[11].unique?f||(f=Uc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),m&1&&s!==(s=((g=n[11].columns)==null?void 0:g.map(Yc).join(", "))+"")&&le(l,s),m&4&&o!==(o="label link-primary "+((y=(_=n[2].indexes)==null?void 0:_[n[13]])!=null&&y.message?"label-danger":"")+" svelte-167lbwu")&&p(e,"class",o),r&&Et(r.update)&&m&4&&r.update.call(null,((C=(S=n[2].indexes)==null?void 0:S[n[13]])==null?void 0:C.message)||"")},d(h){h&&k(e),f&&f.d(),a=!1,$e(u)}}}function wT(n){var T,$,M;let e,t,i=((($=(T=n[0])==null?void 0:T.indexes)==null?void 0:$.length)||0)+"",s,l,o,r,a,u,f,c,d,h,m,g,_=pe(((M=n[0])==null?void 0:M.indexes)||[]),y=[];for(let O=0;O<_.length;O+=1)y[O]=Wc(Bc(n,_,O));function S(O){n[7](O)}let C={};return n[0]!==void 0&&(C.collection=n[0]),c=new kT({props:C}),n[6](c),te.push(()=>he(c,"collection",S)),c.$on("remove",n[8]),c.$on("submit",n[9]),{c(){e=v("div"),t=W("Unique constraints and indexes ("),s=W(i),l=W(")"),o=E(),r=v("div");for(let O=0;O+ New index',f=E(),z(c.$$.fragment),p(e,"class","section-title"),p(u,"type","button"),p(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),p(r,"class","indexes-list svelte-167lbwu")},m(O,D){w(O,e,D),b(e,t),b(e,s),b(e,l),w(O,o,D),w(O,r,D);for(let I=0;Id=!1)),c.$set(I)},i(O){h||(A(c.$$.fragment,O),h=!0)},o(O){L(c.$$.fragment,O),h=!1},d(O){O&&(k(e),k(o),k(r),k(f)),vt(y,O),n[6](null),V(c,O),m=!1,g()}}}const Yc=n=>n.name;function ST(n,e,t){let i;Ge(n,Mi,h=>t(2,i=h));let{collection:s}=e,l;function o(h,m){for(let g=0;gl==null?void 0:l.show(h,m),a=()=>l==null?void 0:l.show();function u(h){te[h?"unshift":"push"](()=>{l=h,t(1,l)})}function f(h){s=h,t(0,s)}const c=h=>{for(let m=0;m{o(h.detail.old,h.detail.new)};return n.$$set=h=>{"collection"in h&&t(0,s=h.collection)},[s,l,i,o,r,a,u,f,c,d]}class TT extends be{constructor(e){super(),_e(this,e,ST,wT,me,{collection:0})}}function Kc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Jc(n){let e,t,i,s,l,o,r;function a(){return n[4](n[6])}function u(...f){return n[5](n[6],...f)}return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent=`${n[6].label}`,l=E(),p(t,"class","icon "+n[6].icon+" svelte-1gz9b6p"),p(s,"class","txt"),p(e,"tabindex","0"),p(e,"class","dropdown-item closable svelte-1gz9b6p")},m(f,c){w(f,e,c),b(e,t),b(e,i),b(e,s),b(e,l),o||(r=[Y(e,"click",Sn(a)),Y(e,"keydown",Sn(u))],o=!0)},p(f,c){n=f},d(f){f&&k(e),o=!1,$e(r)}}}function CT(n){let e,t=pe(n[2]),i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class OT extends be{constructor(e){super(),_e(this,e,MT,$T,me,{class:0})}}const ET=n=>({interactive:n&64,hasErrors:n&32}),Gc=n=>({interactive:n[6],hasErrors:n[5]}),DT=n=>({interactive:n&64,hasErrors:n&32}),Zc=n=>({interactive:n[6],hasErrors:n[5]}),AT=n=>({interactive:n&64,hasErrors:n&32}),Xc=n=>({interactive:n[6],hasErrors:n[5]});function Qc(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","drag-handle-wrapper"),p(e,"draggable",!0),p(e,"aria-label","Sort")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xc(n){let e,t,i;return{c(){e=v("div"),t=v("span"),i=W(n[4]),p(t,"class","label label-success"),p(e,"class","field-labels")},m(s,l){w(s,e,l),b(e,t),b(t,i)},p(s,l){l&16&&le(i,s[4])},d(s){s&&k(e)}}}function IT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[0].required&&xc(n);return{c(){h&&h.c(),e=E(),t=v("div"),i=v("i"),l=E(),o=v("input"),p(i,"class",s=j.getFieldTypeIcon(n[0].type)),p(t,"class","form-field-addon prefix no-pointer-events field-type-icon"),Q(t,"txt-disabled",!n[6]),p(o,"type","text"),o.required=!0,o.disabled=r=!n[6],o.readOnly=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,p(o,"placeholder","Field name"),o.value=f=n[0].name},m(m,g){h&&h.m(m,g),w(m,e,g),w(m,t,g),b(t,i),w(m,l,g),w(m,o,g),n[14](o),n[0].id||o.focus(),c||(d=Y(o,"input",n[15]),c=!0)},p(m,g){m[0].required?h?h.p(m,g):(h=xc(m),h.c(),h.m(e.parentNode,e)):h&&(h.d(1),h=null),g&1&&s!==(s=j.getFieldTypeIcon(m[0].type))&&p(i,"class",s),g&64&&Q(t,"txt-disabled",!m[6]),g&64&&r!==(r=!m[6])&&(o.disabled=r),g&1&&a!==(a=m[0].id&&m[0].system)&&(o.readOnly=a),g&1&&u!==(u=!m[0].id)&&(o.autofocus=u),g&1&&f!==(f=m[0].name)&&o.value!==f&&(o.value=f)},d(m){m&&(k(e),k(t),k(l),k(o)),h&&h.d(m),n[14](null),c=!1,d()}}}function LT(n){let e;return{c(){e=v("span"),p(e,"class","separator")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function PT(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-settings-3-line"),p(e,"type","button"),p(e,"aria-label","Toggle field options"),p(e,"class",i="btn btn-sm btn-circle options-trigger "+(n[3]?"btn-secondary":"btn-transparent")),Q(e,"btn-hint",!n[3]&&!n[5]),Q(e,"btn-danger",n[5])},m(o,r){w(o,e,r),b(e,t),s||(l=Y(e,"click",n[11]),s=!0)},p(o,r){r&8&&i!==(i="btn btn-sm btn-circle options-trigger "+(o[3]?"btn-secondary":"btn-transparent"))&&p(e,"class",i),r&40&&Q(e,"btn-hint",!o[3]&&!o[5]),r&40&&Q(e,"btn-danger",o[5])},d(o){o&&k(e),s=!1,l()}}}function NT(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),p(e,"aria-label","Restore")},m(s,l){w(s,e,l),t||(i=[Ce(Be.call(null,e,"Restore")),Y(e,"click",n[9])],t=!0)},p:x,d(s){s&&k(e),t=!1,$e(i)}}}function ed(n){let e,t,i,s,l,o,r,a,u,f,c;const d=n[13].options,h=Tt(d,n,n[18],Zc);l=new ge({props:{class:"form-field form-field-toggle",name:"requried",$$slots:{default:[FT,({uniqueId:y})=>({24:y}),({uniqueId:y})=>y?16777216:0]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field form-field-toggle",name:"presentable",$$slots:{default:[RT,({uniqueId:y})=>({24:y}),({uniqueId:y})=>y?16777216:0]},$$scope:{ctx:n}}});const m=n[13].optionsFooter,g=Tt(m,n,n[18],Gc);let _=!n[0].toDelete&&td(n);return{c(){e=v("div"),t=v("div"),h&&h.c(),i=E(),s=v("div"),z(l.$$.fragment),o=E(),z(r.$$.fragment),a=E(),g&&g.c(),u=E(),_&&_.c(),p(t,"class","hidden-empty m-b-sm"),p(s,"class","schema-field-options-footer"),p(e,"class","schema-field-options")},m(y,S){w(y,e,S),b(e,t),h&&h.m(t,null),b(e,i),b(e,s),H(l,s,null),b(s,o),H(r,s,null),b(s,a),g&&g.m(s,null),b(s,u),_&&_.m(s,null),c=!0},p(y,S){h&&h.p&&(!c||S&262240)&&$t(h,d,y,y[18],c?Ct(d,y[18],S,DT):Mt(y[18]),Zc);const C={};S&17039377&&(C.$$scope={dirty:S,ctx:y}),l.$set(C);const T={};S&17039361&&(T.$$scope={dirty:S,ctx:y}),r.$set(T),g&&g.p&&(!c||S&262240)&&$t(g,m,y,y[18],c?Ct(m,y[18],S,ET):Mt(y[18]),Gc),y[0].toDelete?_&&(re(),L(_,1,1,()=>{_=null}),ae()):_?(_.p(y,S),S&1&&A(_,1)):(_=td(y),_.c(),A(_,1),_.m(s,null))},i(y){c||(A(h,y),A(l.$$.fragment,y),A(r.$$.fragment,y),A(g,y),A(_),y&&xe(()=>{c&&(f||(f=He(e,lt,{duration:150},!0)),f.run(1))}),c=!0)},o(y){L(h,y),L(l.$$.fragment,y),L(r.$$.fragment,y),L(g,y),L(_),y&&(f||(f=He(e,lt,{duration:150},!1)),f.run(0)),c=!1},d(y){y&&k(e),h&&h.d(y),V(l),V(r),g&&g.d(y),_&&_.d(),y&&f&&f.end()}}}function FT(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),o=W(n[4]),r=E(),a=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[24]),p(l,"class","txt"),p(a,"class","ri-information-line link-hint"),p(s,"for",f=n[24])},m(h,m){w(h,e,m),e.checked=n[0].required,w(h,i,m),w(h,s,m),b(s,l),b(l,o),b(s,r),b(s,a),c||(d=[Y(e,"change",n[16]),Ce(u=Be.call(null,a,{text:`Requires the field value NOT to be ${j.zeroDefaultStr(n[0])}.`}))],c=!0)},p(h,m){m&16777216&&t!==(t=h[24])&&p(e,"id",t),m&1&&(e.checked=h[0].required),m&16&&le(o,h[4]),u&&Et(u.update)&&m&1&&u.update.call(null,{text:`Requires the field value NOT to be ${j.zeroDefaultStr(h[0])}.`}),m&16777216&&f!==(f=h[24])&&p(s,"for",f)},d(h){h&&(k(e),k(i),k(s)),c=!1,$e(d)}}}function RT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Presentable",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[24]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[24])},m(c,d){w(c,e,d),e.checked=n[0].presentable,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[17]),Ce(Be.call(null,r,{text:"Whether the field should be preferred in the Admin UI relation listings (default to auto)."}))],u=!0)},p(c,d){d&16777216&&t!==(t=c[24])&&p(e,"id",t),d&1&&(e.checked=c[0].presentable),d&16777216&&a!==(a=c[24])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function td(n){let e,t,i,s,l,o,r,a,u;return a=new Pn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[qT]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=E(),s=v("div"),l=v("button"),o=v("i"),r=E(),z(a.$$.fragment),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","m-l-auto txt-right")},m(f,c){w(f,e,c),b(e,t),b(e,i),b(e,s),b(s,l),b(l,o),b(l,r),H(a,l,null),u=!0},p(f,c){const d={};c&262144&&(d.$$scope={dirty:c,ctx:f}),a.$set(d)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){L(a.$$.fragment,f),u=!1},d(f){f&&k(e),V(a)}}}function qT(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function jT(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Qc();s=new ge({props:{class:"form-field required m-0 "+(n[6]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[IT]},$$scope:{ctx:n}}});const c=n[13].default,d=Tt(c,n,n[18],Xc),h=d||LT();function m(S,C){if(S[0].toDelete)return NT;if(S[6])return PT}let g=m(n),_=g&&g(n),y=n[6]&&n[3]&&ed(n);return{c(){e=v("div"),t=v("div"),f&&f.c(),i=E(),z(s.$$.fragment),l=E(),h&&h.c(),o=E(),_&&_.c(),r=E(),y&&y.c(),p(t,"class","schema-field-header"),p(e,"class","schema-field"),Q(e,"required",n[0].required),Q(e,"expanded",n[6]&&n[3]),Q(e,"deleted",n[0].toDelete)},m(S,C){w(S,e,C),b(e,t),f&&f.m(t,null),b(t,i),H(s,t,null),b(t,l),h&&h.m(t,null),b(t,o),_&&_.m(t,null),b(e,r),y&&y.m(e,null),u=!0},p(S,[C]){S[6]?f||(f=Qc(),f.c(),f.m(t,i)):f&&(f.d(1),f=null);const T={};C&64&&(T.class="form-field required m-0 "+(S[6]?"":"disabled")),C&2&&(T.name="schema."+S[1]+".name"),C&262229&&(T.$$scope={dirty:C,ctx:S}),s.$set(T),d&&d.p&&(!u||C&262240)&&$t(d,c,S,S[18],u?Ct(c,S[18],C,AT):Mt(S[18]),Xc),g===(g=m(S))&&_?_.p(S,C):(_&&_.d(1),_=g&&g(S),_&&(_.c(),_.m(t,null))),S[6]&&S[3]?y?(y.p(S,C),C&72&&A(y,1)):(y=ed(S),y.c(),A(y,1),y.m(e,null)):y&&(re(),L(y,1,1,()=>{y=null}),ae()),(!u||C&1)&&Q(e,"required",S[0].required),(!u||C&72)&&Q(e,"expanded",S[6]&&S[3]),(!u||C&1)&&Q(e,"deleted",S[0].toDelete)},i(S){u||(A(s.$$.fragment,S),A(h,S),A(y),S&&xe(()=>{u&&(a||(a=He(e,lt,{duration:150},!0)),a.run(1))}),u=!0)},o(S){L(s.$$.fragment,S),L(h,S),L(y),S&&(a||(a=He(e,lt,{duration:150},!1)),a.run(0)),u=!1},d(S){S&&k(e),f&&f.d(),V(s),h&&h.d(S),_&&_.d(),y&&y.d(),S&&a&&a.end()}}}let Ar=[];function HT(n,e,t){let i,s,l,o;Ge(n,Mi,P=>t(12,o=P));let{$$slots:r={},$$scope:a}=e;const u="f_"+j.randomString(8),f=pt(),c={bool:"Nonfalsey",number:"Nonzero"};let{key:d=""}=e,{field:h=j.initSchemaField()}=e,m,g=!1;function _(){h.id?t(0,h.toDelete=!0,h):f("remove")}function y(){t(0,h.toDelete=!1,h),on({})}function S(P){return j.slugify(P)}function C(){t(3,g=!0),M()}function T(){t(3,g=!1)}function $(){g?T():C()}function M(){for(let P of Ar)P.id!=u&&P.collapse()}Kt(()=>(Ar.push({id:u,collapse:T}),h.onMountSelect&&(t(0,h.onMountSelect=!1,h),m==null||m.select()),()=>{j.removeByKey(Ar,"id",u)}));function O(P){te[P?"unshift":"push"](()=>{m=P,t(2,m)})}const D=P=>{const F=h.name;t(0,h.name=S(P.target.value),h),P.target.value=h.name,f("rename",{oldName:F,newName:h.name})};function I(){h.required=this.checked,t(0,h)}function N(){h.presentable=this.checked,t(0,h)}return n.$$set=P=>{"key"in P&&t(1,d=P.key),"field"in P&&t(0,h=P.field),"$$scope"in P&&t(18,a=P.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&h.toDelete&&h.originalName&&h.name!==h.originalName&&t(0,h.name=h.originalName,h),n.$$.dirty&1&&!h.originalName&&h.name&&t(0,h.originalName=h.name,h),n.$$.dirty&1&&typeof h.toDelete>"u"&&t(0,h.toDelete=!1,h),n.$$.dirty&1&&h.required&&t(0,h.nullable=!1,h),n.$$.dirty&1&&t(6,i=!h.toDelete&&!(h.id&&h.system)),n.$$.dirty&4098&&t(5,s=!j.isEmpty(j.getNestedVal(o,`schema.${d}`))),n.$$.dirty&1&&t(4,l=c[h==null?void 0:h.type]||"Nonempty")},[h,d,m,g,l,s,i,f,_,y,S,$,o,r,O,D,I,N,a]}class gi extends be{constructor(e){super(),_e(this,e,HT,jT,me,{key:1,field:0})}}function VT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Min length"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min","0")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].options.min),r||(a=Y(l,"input",n[3]),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&&yt(l.value)!==u[0].options.min&&de(l,u[0].options.min)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function zT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=W("Max length"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min",r=n[0].options.min||0)},m(f,c){w(f,e,c),b(e,t),w(f,s,c),w(f,l,c),de(l,n[0].options.max),a||(u=Y(l,"input",n[4]),a=!0)},p(f,c){c&512&&i!==(i=f[9])&&p(e,"for",i),c&512&&o!==(o=f[9])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min||0)&&p(l,"min",r),c&1&&yt(l.value)!==f[0].options.max&&de(l,f[0].options.max)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function BT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Regex pattern"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","text"),p(l,"id",o=n[9]),p(l,"placeholder","Valid Go regular expression, eg. ^\\w+$")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].options.pattern),r||(a=Y(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0].options.pattern&&de(l,u[0].options.pattern)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function UT(n){let e,t,i,s,l,o,r,a,u,f;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[VT,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[zT,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[BT,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),p(t,"class","col-sm-3"),p(l,"class","col-sm-3"),p(a,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(c,d){w(c,e,d),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),b(e,r),b(e,a),H(u,a,null),f=!0},p(c,d){const h={};d&2&&(h.name="schema."+c[1]+".options.min"),d&1537&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const m={};d&2&&(m.name="schema."+c[1]+".options.max"),d&1537&&(m.$$scope={dirty:d,ctx:c}),o.$set(m);const g={};d&2&&(g.name="schema."+c[1]+".options.pattern"),d&1537&&(g.$$scope={dirty:d,ctx:c}),u.$set(g)},i(c){f||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){L(i.$$.fragment,c),L(o.$$.fragment,c),L(u.$$.fragment,c),f=!1},d(c){c&&k(e),V(i),V(o),V(u)}}}function WT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[UT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};a&1027&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function YT(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=yt(this.value),t(0,l)}function a(){l.options.max=yt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(h){l=h,t(0,l)}function c(h){Re.call(this,n,h)}function d(h){Re.call(this,n,h)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(2,s=tt(e,i)),"field"in h&&t(0,l=h.field),"key"in h&&t(1,o=h.key)},[l,o,s,r,a,u,f,c,d]}class KT extends be{constructor(e){super(),_e(this,e,YT,WT,me,{field:0,key:1})}}function JT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Min"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9])},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].options.min),r||(a=Y(l,"input",n[4]),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&&yt(l.value)!==u[0].options.min&&de(l,u[0].options.min)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function GT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=W("Max"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"min",r=n[0].options.min)},m(f,c){w(f,e,c),b(e,t),w(f,s,c),w(f,l,c),de(l,n[0].options.max),a||(u=Y(l,"input",n[5]),a=!0)},p(f,c){c&512&&i!==(i=f[9])&&p(e,"for",i),c&512&&o!==(o=f[9])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min)&&p(l,"min",r),c&1&&yt(l.value)!==f[0].options.max&&de(l,f[0].options.max)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function ZT(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[JT,({uniqueId:a})=>({9:a}),({uniqueId:a})=>a?512:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[GT,({uniqueId:a})=>({9:a}),({uniqueId:a})=>a?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&1537&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&1537&&(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),V(i),V(o)}}}function XT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="No decimals",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[9]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[9])},m(c,d){w(c,e,d),e.checked=n[0].options.noDecimal,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[3]),Ce(Be.call(null,r,{text:"Existing decimal numbers will not be affected."}))],u=!0)},p(c,d){d&512&&t!==(t=c[9])&&p(e,"id",t),d&1&&(e.checked=c[0].options.noDecimal),d&512&&a!==(a=c[9])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function QT(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.noDecimal",$$slots:{default:[XT,({uniqueId:i})=>({9:i}),({uniqueId:i})=>i?512:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.noDecimal"),s&1537&&(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){V(e,i)}}}function xT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{optionsFooter:[QT],options:[ZT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};a&1027&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function eC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.noDecimal=this.checked,t(0,l)}function a(){l.options.min=yt(this.value),t(0,l)}function u(){l.options.max=yt(this.value),t(0,l)}function f(h){l=h,t(0,l)}function c(h){Re.call(this,n,h)}function d(h){Re.call(this,n,h)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(2,s=tt(e,i)),"field"in h&&t(0,l=h.field),"key"in h&&t(1,o=h.key)},[l,o,s,r,a,u,f,c,d]}class tC extends be{constructor(e){super(),_e(this,e,eC,xT,me,{field:0,key:1})}}function nC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function iC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Re.call(this,n,f)}function u(f){Re.call(this,n,f)}return n.$$set=f=>{e=je(je({},e),xt(f)),t(2,s=tt(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class sC extends be{constructor(e){super(),_e(this,e,iC,nC,me,{field:0,key:1})}}function lC(n){let e,t,i,s,l=[{type:t=n[5].type||"text"},{value:n[4]},{disabled:n[3]},{readOnly:n[2]},n[5]],o={};for(let r=0;r{t(0,o=j.splitNonEmpty(c.target.value,r))};return n.$$set=c=>{e=je(je({},e),xt(c)),t(5,l=tt(e,s)),"value"in c&&t(0,o=c.value),"separator"in c&&t(1,r=c.separator),"readonly"in c&&t(2,a=c.readonly),"disabled"in c&&t(3,u=c.disabled)},n.$$.update=()=>{n.$$.dirty&3&&t(4,i=j.joinNonEmpty(o,r+" "))},[o,r,a,u,i,l,f]}class qs extends be{constructor(e){super(),_e(this,e,oC,lC,me,{value:0,separator:1,readonly:2,disabled:3})}}function rC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(_){n[3](_)}let g={id:n[8],disabled:!j.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(g.value=n[0].options.exceptDomains),r=new qs({props:g}),te.push(()=>he(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),H(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=Ce(Be.call(null,s,{text:`List of domains that are NOT allowed. +`)}},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="",m="",g=!1,_=0;_>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 q4(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){w(s,e,l),b(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:x,o:x,d(s){s&&k(e)}}}function j4(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=Qs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Qs.highlight(a,Qs.languages[l]||Qs.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 Qs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class N1 extends be{constructor(e){super(),_e(this,e,j4,q4,me,{class:0,content:2,language:3})}}const H4=n=>({}),Oc=n=>({}),V4=n=>({}),Ec=n=>({});function Dc(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C=n[4]&&!n[2]&&Ac(n);const T=n[19].header,$=Tt(T,n,n[18],Ec);let M=n[4]&&n[2]&&Ic(n);const O=n[19].default,D=Tt(O,n,n[18],null),I=n[19].footer,N=Tt(I,n,n[18],Oc);return{c(){e=v("div"),t=v("div"),s=E(),l=v("div"),o=v("div"),C&&C.c(),r=E(),$&&$.c(),a=E(),M&&M.c(),u=E(),f=v("div"),D&&D.c(),c=E(),d=v("div"),N&&N.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]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(P,F){w(P,e,F),b(e,t),b(e,s),b(e,l),b(l,o),C&&C.m(o,null),b(o,r),$&&$.m(o,null),b(o,a),M&&M.m(o,null),b(l,u),b(l,f),D&&D.m(f,null),n[21](f),b(l,c),b(l,d),N&&N.m(d,null),_=!0,y||(S=[Y(t,"click",Ze(n[20])),Y(f,"scroll",n[22])],y=!0)},p(P,F){n=P,n[4]&&!n[2]?C?(C.p(n,F),F[0]&20&&A(C,1)):(C=Ac(n),C.c(),A(C,1),C.m(o,r)):C&&(re(),L(C,1,1,()=>{C=null}),ae()),$&&$.p&&(!_||F[0]&262144)&&$t($,T,n,n[18],_?Ct(T,n[18],F,V4):Mt(n[18]),Ec),n[4]&&n[2]?M?M.p(n,F):(M=Ic(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),D&&D.p&&(!_||F[0]&262144)&&$t(D,O,n,n[18],_?Ct(O,n[18],F,null):Mt(n[18]),null),N&&N.p&&(!_||F[0]&262144)&&$t(N,I,n,n[18],_?Ct(I,n[18],F,H4):Mt(n[18]),Oc),(!_||F[0]&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),(!_||F[0]&262)&&Q(l,"popup",n[2]),(!_||F[0]&4)&&Q(e,"padded",n[2]),(!_||F[0]&1)&&Q(e,"active",n[0])},i(P){_||(P&&xe(()=>{_&&(i||(i=He(t,hl,{duration:Ni,opacity:0},!0)),i.run(1))}),A(C),A($,P),A(D,P),A(N,P),P&&xe(()=>{_&&(g&&g.end(1),m=M_(l,mi,n[2]?{duration:Ni,y:-10}:{duration:Ni,x:50}),m.start())}),_=!0)},o(P){P&&(i||(i=He(t,hl,{duration:Ni,opacity:0},!1)),i.run(0)),L(C),L($,P),L(D,P),L(N,P),m&&m.invalidate(),P&&(g=ka(l,mi,n[2]?{duration:Ni,y:10}:{duration:Ni,x:50})),_=!1},d(P){P&&k(e),P&&i&&i.end(),C&&C.d(),$&&$.d(P),M&&M.d(),D&&D.d(P),n[21](null),N&&N.d(P),P&&g&&g.end(),y=!1,$e(S)}}}function Ac(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",Ze(n[5])),s=!0)},p(o,r){n=o},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,hl,{duration:Ni},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,hl,{duration:Ni},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Ic(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Ze(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function z4(n){let e,t,i,s,l=n[0]&&Dc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[Y(window,"resize",n[10]),Y(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Dc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){L(l),t=!1},d(o){o&&k(e),l&&l.d(),n[23](null),i=!1,$e(s)}}}let Qi,Dr=[];function F1(){return Qi=Qi||document.querySelector(".overlays"),Qi||(Qi=document.createElement("div"),Qi.classList.add("overlays"),document.body.appendChild(Qi)),Qi}let Ni=150;function Lc(){return 1e3+F1().querySelectorAll(".overlay-panel-container.active").length}function B4(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const h=pt(),m="op_"+j.randomString(10);let g,_,y,S,C="",T=o;function $(){typeof c=="function"&&c()===!1||t(0,o=!0)}function M(){typeof d=="function"&&d()===!1||t(0,o=!1)}function O(){return o}async function D(U){t(17,T=U),U?(y=document.activeElement,h("show"),g==null||g.focus()):(clearTimeout(S),h("hide"),y==null||y.focus()),await ln(),I()}function I(){g&&(o?t(6,g.style.zIndex=Lc(),g):t(6,g.style="",g))}function N(){j.pushUnique(Dr,m),document.body.classList.add("overlay-active")}function P(){j.removeByValue(Dr,m),Dr.length||document.body.classList.remove("overlay-active")}function F(U){o&&f&&U.code=="Escape"&&!j.isInput(U.target)&&g&&g.style.zIndex==Lc()&&(U.preventDefault(),M())}function R(U){o&&q(_)}function q(U,oe){oe&&t(8,C=""),!(!U||S)&&(S=setTimeout(()=>{if(clearTimeout(S),S=null,!U)return;if(U.scrollHeight-U.offsetHeight>0)t(8,C="scrollable");else{t(8,C="");return}U.scrollTop==0?t(8,C+=" scroll-top-reached"):U.scrollTop+U.offsetHeight==U.scrollHeight&&t(8,C+=" scroll-bottom-reached")},100))}Kt(()=>(F1().appendChild(g),()=>{var U;clearTimeout(S),P(),(U=g==null?void 0:g.classList)==null||U.add("hidden"),setTimeout(()=>{g==null||g.remove()},0)}));const B=()=>a?M():!0;function Z(U){te[U?"unshift":"push"](()=>{_=U,t(7,_)})}const X=U=>q(U.target);function J(U){te[U?"unshift":"push"](()=>{g=U,t(6,g)})}return n.$$set=U=>{"class"in U&&t(1,l=U.class),"active"in U&&t(0,o=U.active),"popup"in U&&t(2,r=U.popup),"overlayClose"in U&&t(3,a=U.overlayClose),"btnClose"in U&&t(4,u=U.btnClose),"escClose"in U&&t(12,f=U.escClose),"beforeOpen"in U&&t(13,c=U.beforeOpen),"beforeHide"in U&&t(14,d=U.beforeHide),"$$scope"in U&&t(18,s=U.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&T!=o&&D(o),n.$$.dirty[0]&128&&q(_,!0),n.$$.dirty[0]&64&&g&&I(),n.$$.dirty[0]&1&&(o?N():P())},[o,l,r,a,u,M,g,_,C,F,R,q,f,c,d,$,O,T,s,i,B,Z,X,J]}class rn extends be{constructor(e){super(),_e(this,e,B4,z4,me,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function U4(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function W4(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=W(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){w(l,e,o),b(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&le(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&k(e)}}}function Y4(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function K4(n){let e,t,i;return t=new N1({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","block")},m(s,l){w(s,e,l),H(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function J4(n){var Pe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,h,m,g=n[2].status+"",_,y,S,C,T,$,M=((Pe=n[2].method)==null?void 0:Pe.toUpperCase())+"",O,D,I,N,P,F,R=n[2].auth+"",q,B,Z,X,J,U,oe=n[2].url+"",ee,se,Ee,qe,Ve,We,ke,Me,Je,dt,Se,we=n[2].remoteIp+"",Ue,nt,ne,Ne,Te,ot,At=n[2].userIp+"",nn,sn,an,Nn,_i,Fn,Ie=n[2].userAgent+"",Ot,oi,cn,Xn,Ai,Cn,Qn,en,et,ue,De,Xe,Jt,it,It,Lt;function Rn(Fe,Ae){return Fe[2].referer?W4:U4}let K=Rn(n),G=K(n);const ie=[K4,Y4],fe=[];function Oe(Fe,Ae){return Ae&4&&(Qn=null),Qn==null&&(Qn=!j.isEmpty(Fe[2].meta)),Qn?0:1}return en=Oe(n,-1),et=fe[en]=ie[en](n),It=new $i({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=E(),o=v("td"),a=W(r),u=E(),f=v("tr"),c=v("td"),c.textContent="Status",d=E(),h=v("td"),m=v("span"),_=W(g),y=E(),S=v("tr"),C=v("td"),C.textContent="Method",T=E(),$=v("td"),O=W(M),D=E(),I=v("tr"),N=v("td"),N.textContent="Auth",P=E(),F=v("td"),q=W(R),B=E(),Z=v("tr"),X=v("td"),X.textContent="URL",J=E(),U=v("td"),ee=W(oe),se=E(),Ee=v("tr"),qe=v("td"),qe.textContent="Referer",Ve=E(),We=v("td"),G.c(),ke=E(),Me=v("tr"),Je=v("td"),Je.textContent="Remote IP",dt=E(),Se=v("td"),Ue=W(we),nt=E(),ne=v("tr"),Ne=v("td"),Ne.textContent="User IP",Te=E(),ot=v("td"),nn=W(At),sn=E(),an=v("tr"),Nn=v("td"),Nn.textContent="UserAgent",_i=E(),Fn=v("td"),Ot=W(Ie),oi=E(),cn=v("tr"),Xn=v("td"),Xn.textContent="Meta",Ai=E(),Cn=v("td"),et.c(),ue=E(),De=v("tr"),Xe=v("td"),Xe.textContent="Created",Jt=E(),it=v("td"),z(It.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(m,"class","label"),Q(m,"label-danger",n[2].status>=400),p(C,"class","min-width txt-hint txt-bold"),p(N,"class","min-width txt-hint txt-bold"),p(X,"class","min-width txt-hint txt-bold"),p(qe,"class","min-width txt-hint txt-bold"),p(Je,"class","min-width txt-hint txt-bold"),p(Ne,"class","min-width txt-hint txt-bold"),p(Nn,"class","min-width txt-hint txt-bold"),p(Xn,"class","min-width txt-hint txt-bold"),p(Xe,"class","min-width txt-hint txt-bold"),p(e,"class","table-border")},m(Fe,Ae){w(Fe,e,Ae),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o),b(o,a),b(t,u),b(t,f),b(f,c),b(f,d),b(f,h),b(h,m),b(m,_),b(t,y),b(t,S),b(S,C),b(S,T),b(S,$),b($,O),b(t,D),b(t,I),b(I,N),b(I,P),b(I,F),b(F,q),b(t,B),b(t,Z),b(Z,X),b(Z,J),b(Z,U),b(U,ee),b(t,se),b(t,Ee),b(Ee,qe),b(Ee,Ve),b(Ee,We),G.m(We,null),b(t,ke),b(t,Me),b(Me,Je),b(Me,dt),b(Me,Se),b(Se,Ue),b(t,nt),b(t,ne),b(ne,Ne),b(ne,Te),b(ne,ot),b(ot,nn),b(t,sn),b(t,an),b(an,Nn),b(an,_i),b(an,Fn),b(Fn,Ot),b(t,oi),b(t,cn),b(cn,Xn),b(cn,Ai),b(cn,Cn),fe[en].m(Cn,null),b(t,ue),b(t,De),b(De,Xe),b(De,Jt),b(De,it),H(It,it,null),Lt=!0},p(Fe,Ae){var Ke;(!Lt||Ae&4)&&r!==(r=Fe[2].id+"")&&le(a,r),(!Lt||Ae&4)&&g!==(g=Fe[2].status+"")&&le(_,g),(!Lt||Ae&4)&&Q(m,"label-danger",Fe[2].status>=400),(!Lt||Ae&4)&&M!==(M=((Ke=Fe[2].method)==null?void 0:Ke.toUpperCase())+"")&&le(O,M),(!Lt||Ae&4)&&R!==(R=Fe[2].auth+"")&&le(q,R),(!Lt||Ae&4)&&oe!==(oe=Fe[2].url+"")&&le(ee,oe),K===(K=Rn(Fe))&&G?G.p(Fe,Ae):(G.d(1),G=K(Fe),G&&(G.c(),G.m(We,null))),(!Lt||Ae&4)&&we!==(we=Fe[2].remoteIp+"")&&le(Ue,we),(!Lt||Ae&4)&&At!==(At=Fe[2].userIp+"")&&le(nn,At),(!Lt||Ae&4)&&Ie!==(Ie=Fe[2].userAgent+"")&&le(Ot,Ie);let Qe=en;en=Oe(Fe,Ae),en===Qe?fe[en].p(Fe,Ae):(re(),L(fe[Qe],1,1,()=>{fe[Qe]=null}),ae(),et=fe[en],et?et.p(Fe,Ae):(et=fe[en]=ie[en](Fe),et.c()),A(et,1),et.m(Cn,null));const ze={};Ae&4&&(ze.date=Fe[2].created),It.$set(ze)},i(Fe){Lt||(A(et),A(It.$$.fragment,Fe),Lt=!0)},o(Fe){L(et),L(It.$$.fragment,Fe),Lt=!1},d(Fe){Fe&&k(e),G.d(),fe[en].d(),V(It)}}}function G4(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Z4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[4]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function X4(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[Z4],header:[G4],default:[J4]},$$scope:{ctx:n}};return e=new rn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[5](null),V(e,s)}}}function Q4(n,e,t){let i,s={};function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){te[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){Re.call(this,n,c)}function f(c){Re.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class x4 extends be{constructor(e){super(),_e(this,e,Q4,X4,me,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function eT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){w(u,e,f),e.checked=n[1],w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Pc(n){let e,t;return e=new P4({props:{filter:n[4],presets:n[5]}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Nc(n){let e,t;return e=new xk({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function tT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S=n[3],C,T=n[3],$,M;r=new Jo({}),r.$on("refresh",n[9]),d=new ge({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[eT,({uniqueId:I})=>({14:I}),({uniqueId:I})=>I?16384:0]},$$scope:{ctx:n}}}),m=new Dl({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),m.$on("submit",n[11]);let O=Pc(n),D=Nc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=W(n[6]),o=E(),z(r.$$.fragment),a=E(),u=v("div"),f=E(),c=v("div"),z(d.$$.fragment),h=E(),z(m.$$.fragment),g=E(),_=v("div"),y=E(),O.c(),C=E(),D.c(),$=ye(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(_,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(I,N){w(I,e,N),b(e,t),b(t,i),b(i,s),b(s,l),b(t,o),H(r,t,null),b(t,a),b(t,u),b(t,f),b(t,c),H(d,c,null),b(e,h),H(m,e,null),b(e,g),b(e,_),b(e,y),O.m(e,null),w(I,C,N),D.m(I,N),w(I,$,N),M=!0},p(I,N){(!M||N&64)&&le(l,I[6]);const P={};N&49154&&(P.$$scope={dirty:N,ctx:I}),d.$set(P);const F={};N&1&&(F.value=I[0]),m.$set(F),N&8&&me(S,S=I[3])?(re(),L(O,1,1,x),ae(),O=Pc(I),O.c(),A(O,1),O.m(e,null)):O.p(I,N),N&8&&me(T,T=I[3])?(re(),L(D,1,1,x),ae(),D=Nc(I),D.c(),A(D,1),D.m($.parentNode,$)):D.p(I,N)},i(I){M||(A(r.$$.fragment,I),A(d.$$.fragment,I),A(m.$$.fragment,I),A(O),A(D),M=!0)},o(I){L(r.$$.fragment,I),L(d.$$.fragment,I),L(m.$$.fragment,I),L(O),L(D),M=!1},d(I){I&&(k(e),k(C),k($)),V(r),V(d),V(m),O.d(I),D.d(I)}}}function nT(n){let e,t,i,s;e=new Tn({props:{$$slots:{default:[tT]},$$scope:{ctx:n}}});let l={};return i=new x4({props:l}),n[13](i),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(o,r){H(e,o,r),w(o,t,r),H(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){L(e.$$.fragment,o),L(i.$$.fragment,o),s=!1},d(o){o&&k(t),V(e,o),n[13](null),V(i,o)}}}const Fc="includeAdminLogs";function iT(n,e,t){var y;let i,s,l;Ge(n,Ft,S=>t(6,l=S));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];un(Ft,l="Request logs",l);let r,a="",u=((y=window.localStorage)==null?void 0:y.getItem(Fc))<<0,f=1;function c(){t(3,f++,f)}const d=()=>c();function h(){u=this.checked,t(1,u)}const m=S=>t(0,a=S.detail),g=S=>r==null?void 0:r.show(S==null?void 0:S.detail);function _(S){te[S?"unshift":"push"](()=>{r=S,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Fc,u<<0),n.$$.dirty&1&&t(4,s=j.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,c,d,h,m,g,_]}class sT extends be{constructor(e){super(),_e(this,e,iT,nT,me,{})}}function lT(n){let e,t,i;return{c(){e=v("span"),p(e,"class","dragline svelte-1g2t3dj"),Q(e,"dragging",n[1])},m(s,l){w(s,e,l),n[4](e),t||(i=[Y(e,"mousedown",n[5]),Y(e,"touchstart",n[2])],t=!0)},p(s,[l]){l&2&&Q(e,"dragging",s[1])},i:x,o:x,d(s){s&&k(e),n[4](null),t=!1,$e(i)}}}function oT(n,e,t){const i=pt();let{tolerance:s=0}=e,l,o=0,r=0,a=0,u=0,f=!1;function c(_){_.stopPropagation(),o=_.clientX,r=_.clientY,a=_.clientX-l.offsetLeft,u=_.clientY-l.offsetTop,document.addEventListener("touchmove",h),document.addEventListener("mousemove",h),document.addEventListener("touchend",d),document.addEventListener("mouseup",d)}function d(_){f&&(_.preventDefault(),t(1,f=!1),l.classList.remove("no-pointer-events"),i("dragstop",{event:_,elem:l})),document.removeEventListener("touchmove",h),document.removeEventListener("mousemove",h),document.removeEventListener("touchend",d),document.removeEventListener("mouseup",d)}function h(_){let y=_.clientX-o,S=_.clientY-r,C=_.clientX-a,T=_.clientY-u;!f&&Math.abs(C-l.offsetLeft){l=_,t(0,l)})}const g=_=>{_.button==0&&c(_)};return n.$$set=_=>{"tolerance"in _&&t(3,s=_.tolerance)},[l,f,c,s,m,g]}class rT extends be{constructor(e){super(),_e(this,e,oT,lT,me,{tolerance:3})}}function aT(n){let e,t,i,s,l;const o=n[5].default,r=Tt(o,n,n[4],null);return s=new rT({}),s.$on("dragstart",n[7]),s.$on("dragging",n[8]),s.$on("dragstop",n[9]),{c(){e=v("aside"),r&&r.c(),i=E(),z(s.$$.fragment),p(e,"class",t="page-sidebar "+n[0])},m(a,u){w(a,e,u),r&&r.m(e,null),n[6](e),w(a,i,u),H(s,a,u),l=!0},p(a,[u]){r&&r.p&&(!l||u&16)&&$t(r,o,a,a[4],l?Ct(o,a[4],u,null):Mt(a[4]),null),(!l||u&1&&t!==(t="page-sidebar "+a[0]))&&p(e,"class",t)},i(a){l||(A(r,a),A(s.$$.fragment,a),l=!0)},o(a){L(r,a),L(s.$$.fragment,a),l=!1},d(a){a&&(k(e),k(i)),r&&r.d(a),n[6](null),V(s,a)}}}const Rc="@adminSidebarWidth";function uT(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o,r,a=localStorage.getItem(Rc)||null;function u(h){te[h?"unshift":"push"](()=>{o=h,t(1,o),t(2,a)})}const f=()=>{t(3,r=o.offsetWidth)},c=h=>{t(2,a=r+h.detail.diffX+"px")},d=()=>{j.triggerResize()};return n.$$set=h=>{"class"in h&&t(0,l=h.class),"$$scope"in h&&t(4,s=h.$$scope)},n.$$.update=()=>{n.$$.dirty&6&&a&&o&&(t(1,o.style.width=a,o),localStorage.setItem(Rc,a))},[l,o,a,r,s,i,u,f,c,d]}class R1 extends be{constructor(e){super(),_e(this,e,uT,aT,me,{class:0})}}const lu=Ln({});function _n(n,e,t){lu.set({text:n,yesCallback:e,noCallback:t})}function q1(){lu.set({})}function qc(n){let e,t,i;const s=n[17].default,l=Tt(s,n,n[16],null);return{c(){e=v("div"),l&&l.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(o,r){w(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&$t(l,s,o,o[16],i?Ct(s,o[16],r,null):Mt(o[16]),null),(!i||r&2)&&p(e,"class",o[1]),(!i||r&3)&&Q(e,"active",o[0])},i(o){i||(A(l,o),o&&xe(()=>{i&&(t||(t=He(e,mi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){L(l,o),o&&(t||(t=He(e,mi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function fT(n){let e,t,i,s,l=n[0]&&qc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[Y(window,"mousedown",n[5]),Y(window,"click",n[6]),Y(window,"keydown",n[4]),Y(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=qc(o),l.c(),A(l,1),l.m(e,null)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){t||(A(l),t=!0)},o(o){L(l),t=!1},d(o){o&&k(e),l&&l.d(),n[19](null),i=!1,$e(s)}}}function cT(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,c,d,h,m,g=!1;const _=pt();function y(){t(0,o=!1),g=!1,clearTimeout(m)}function S(){t(0,o=!0),clearTimeout(m),m=setTimeout(()=>{a&&(d!=null&&d.scrollIntoViewIfNeeded?d==null||d.scrollIntoViewIfNeeded():d!=null&&d.scrollIntoView&&(d==null||d.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function C(){o?y():S()}function T(B){return!c||B.classList.contains(u)||(h==null?void 0:h.contains(B))&&!c.contains(B)||c.contains(B)&&B.closest&&B.closest("."+u)}function $(B){(!o||T(B.target))&&(B.preventDefault(),B.stopPropagation(),C())}function M(B){(B.code==="Enter"||B.code==="Space")&&(!o||T(B.target))&&(B.preventDefault(),B.stopPropagation(),C())}function O(B){o&&r&&B.code==="Escape"&&(B.preventDefault(),y())}function D(B){o&&!(c!=null&&c.contains(B.target))?g=!0:g&&(g=!1)}function I(B){var Z;o&&g&&!(c!=null&&c.contains(B.target))&&!(h!=null&&h.contains(B.target))&&!((Z=B.target)!=null&&Z.closest(".flatpickr-calendar"))&&y()}function N(B){D(B),I(B)}function P(B){F(),c==null||c.addEventListener("click",$),t(15,h=B||(c==null?void 0:c.parentNode)),h==null||h.addEventListener("click",$),h==null||h.addEventListener("keydown",M)}function F(){clearTimeout(m),c==null||c.removeEventListener("click",$),h==null||h.removeEventListener("click",$),h==null||h.removeEventListener("keydown",M)}Kt(()=>(P(),()=>F()));function R(B){te[B?"unshift":"push"](()=>{d=B,t(3,d)})}function q(B){te[B?"unshift":"push"](()=>{c=B,t(2,c)})}return n.$$set=B=>{"trigger"in B&&t(8,l=B.trigger),"active"in B&&t(0,o=B.active),"escClose"in B&&t(9,r=B.escClose),"autoScroll"in B&&t(10,a=B.autoScroll),"closableClass"in B&&t(11,u=B.closableClass),"class"in B&&t(1,f=B.class),"$$scope"in B&&t(16,s=B.$$scope)},n.$$.update=()=>{var B,Z;n.$$.dirty&260&&c&&P(l),n.$$.dirty&32769&&(o?((B=h==null?void 0:h.classList)==null||B.add("active"),_("show")):((Z=h==null?void 0:h.classList)==null||Z.remove("active"),_("hide")))},[o,f,c,d,O,D,I,N,l,r,a,u,y,S,C,h,s,i,R,q]}class Pn extends be{constructor(e){super(),_e(this,e,cT,fT,me,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function jc(n,e,t){const i=n.slice();return i[27]=e[t],i}function dT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("input"),s=E(),l=v("label"),o=W("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[30]),e.checked=i=n[3].unique,p(l,"for",r=n[30])},m(f,c){w(f,e,c),w(f,s,c),w(f,l,c),b(l,o),a||(u=Y(e,"change",n[19]),a=!0)},p(f,c){c[0]&1073741824&&t!==(t=f[30])&&p(e,"id",t),c[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),c[0]&1073741824&&r!==(r=f[30])&&p(l,"for",r)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function pT(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a,u){var c;let f={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(c=a[0])==null?void 0:c.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(f.value=a[2]),{props:f}}return o&&(e=Nt(o,r(n)),te.push(()=>he(e,"value",l))),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&H(e,a,u),w(a,i,u),s=!0},p(a,u){var f;if(u[0]&128&&o!==(o=a[7])){if(e){re();const c=e;L(c.$$.fragment,1,0,()=>{V(c,1)}),ae()}o?(e=Nt(o,r(a)),te.push(()=>he(e,"value",l)),z(e.$$.fragment),A(e.$$.fragment,1),H(e,i.parentNode,i)):e=null}else if(o){const c={};u[0]&1073741824&&(c.id=a[30]),u[0]&1&&(c.placeholder=`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`),!t&&u[0]&4&&(t=!0,c.value=a[2],ve(()=>t=!1)),e.$set(c)}},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&&V(e,a)}}}function hT(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function mT(n){let e,t,i,s;const l=[hT,pT],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},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):(re(),L(o[f],1,1,()=>{o[f]=null}),ae(),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){a&&k(i),o[e].d(a)}}}function Hc(n){let e,t,i,s=pe(n[10]),l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new ge({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[mT,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Hc(n);return{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),r&&r.c(),l=ye()},m(a,u){H(e,a,u),w(a,t,u),H(i,a,u),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};u[0]&64&&(c.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(c.$$scope={dirty:u,ctx:a}),i.$set(c),a[10].length>0?r?r.p(a,u):(r=Hc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){L(e.$$.fragment,a),L(i.$$.fragment,a),o=!1},d(a){a&&(k(t),k(s),k(l)),V(e,a),V(i,a),r&&r.d(a)}}}function _T(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=v("h4"),i=W(t),s=W(" index")},m(l,o){w(l,e,o),b(e,i),b(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&le(i,t)},d(l){l&&k(e)}}}function zc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){w(s,e,l),t||(i=[Ce(Be.call(null,e,{text:"Delete",position:"top"})),Y(e,"click",n[16])],t=!0)},p:x,d(s){s&&k(e),t=!1,$e(i)}}}function bT(n){let e,t,i,s,l,o,r=n[5]!=""&&zc(n);return{c(){r&&r.c(),e=E(),t=v("button"),t.innerHTML='Cancel',i=E(),s=v("button"),s.innerHTML='Set index',p(t,"type","button"),p(t,"class","btn btn-transparent"),p(s,"type","button"),p(s,"class","btn"),Q(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),l||(o=[Y(t,"click",n[17]),Y(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=zc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&Q(s,"btn-disabled",a[9].length<=0)},d(a){a&&(k(e),k(t),k(i),k(s)),r&&r.d(a),l=!1,$e(o)}}}function vT(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[bT],header:[_T],default:[gT]},$$scope:{ctx:n}};for(let l=0;lJ.name==B);X?j.removeByValue(Z.columns,X):j.pushUnique(Z.columns,{name:B}),t(2,d=j.buildIndex(Z))}Kt(async()=>{t(8,g=!0);try{t(7,m=(await ft(()=>import("./CodeEditor-c648ece6.js"),["./CodeEditor-c648ece6.js","./index-30dee195.js"],import.meta.url)).default)}catch(B){console.warn(B)}t(8,g=!1)});const M=()=>C(),O=()=>y(),D=()=>T(),I=B=>{t(3,s.unique=B.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,d=j.buildIndex(s))};function N(B){d=B,t(2,d)}const P=B=>$(B);function F(B){te[B?"unshift":"push"](()=>{f=B,t(4,f)})}function R(B){Re.call(this,n,B)}function q(B){Re.call(this,n,B)}return n.$$set=B=>{e=je(je({},e),xt(B)),t(14,r=tt(e,o)),"collection"in B&&t(0,u=B.collection)},n.$$.update=()=>{var B,Z,X;n.$$.dirty[0]&1&&t(10,i=(((Z=(B=u==null?void 0:u.schema)==null?void 0:B.filter(J=>!J.toDelete))==null?void 0:Z.map(J=>J.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=j.parseIndex(d)),n.$$.dirty[0]&8&&t(9,l=((X=s.columns)==null?void 0:X.map(J=>J.name))||[])},[u,y,d,s,f,c,h,m,g,l,i,C,T,$,r,_,M,O,D,I,N,P,F,R,q]}class kT extends be{constructor(e){super(),_e(this,e,yT,vT,me,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Bc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=j.parseIndex(i[10]);return i[11]=s,i}function Uc(n){let e;return{c(){e=v("strong"),e.textContent="Unique:"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Wc(n){var d;let e,t,i,s=((d=n[11].columns)==null?void 0:d.map(Yc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Uc();function c(){return n[4](n[10],n[13])}return{c(){var h,m;e=v("button"),f&&f.c(),t=E(),i=v("span"),l=W(s),p(i,"class","txt"),p(e,"type","button"),p(e,"class",o="label link-primary "+((m=(h=n[2].indexes)==null?void 0:h[n[13]])!=null&&m.message?"label-danger":"")+" svelte-167lbwu")},m(h,m){var g,_;w(h,e,m),f&&f.m(e,null),b(e,t),b(e,i),b(i,l),a||(u=[Ce(r=Be.call(null,e,((_=(g=n[2].indexes)==null?void 0:g[n[13]])==null?void 0:_.message)||"")),Y(e,"click",c)],a=!0)},p(h,m){var g,_,y,S,C;n=h,n[11].unique?f||(f=Uc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),m&1&&s!==(s=((g=n[11].columns)==null?void 0:g.map(Yc).join(", "))+"")&&le(l,s),m&4&&o!==(o="label link-primary "+((y=(_=n[2].indexes)==null?void 0:_[n[13]])!=null&&y.message?"label-danger":"")+" svelte-167lbwu")&&p(e,"class",o),r&&Et(r.update)&&m&4&&r.update.call(null,((C=(S=n[2].indexes)==null?void 0:S[n[13]])==null?void 0:C.message)||"")},d(h){h&&k(e),f&&f.d(),a=!1,$e(u)}}}function wT(n){var T,$,M;let e,t,i=((($=(T=n[0])==null?void 0:T.indexes)==null?void 0:$.length)||0)+"",s,l,o,r,a,u,f,c,d,h,m,g,_=pe(((M=n[0])==null?void 0:M.indexes)||[]),y=[];for(let O=0;O<_.length;O+=1)y[O]=Wc(Bc(n,_,O));function S(O){n[7](O)}let C={};return n[0]!==void 0&&(C.collection=n[0]),c=new kT({props:C}),n[6](c),te.push(()=>he(c,"collection",S)),c.$on("remove",n[8]),c.$on("submit",n[9]),{c(){e=v("div"),t=W("Unique constraints and indexes ("),s=W(i),l=W(")"),o=E(),r=v("div");for(let O=0;O+ New index',f=E(),z(c.$$.fragment),p(e,"class","section-title"),p(u,"type","button"),p(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),p(r,"class","indexes-list svelte-167lbwu")},m(O,D){w(O,e,D),b(e,t),b(e,s),b(e,l),w(O,o,D),w(O,r,D);for(let I=0;Id=!1)),c.$set(I)},i(O){h||(A(c.$$.fragment,O),h=!0)},o(O){L(c.$$.fragment,O),h=!1},d(O){O&&(k(e),k(o),k(r),k(f)),vt(y,O),n[6](null),V(c,O),m=!1,g()}}}const Yc=n=>n.name;function ST(n,e,t){let i;Ge(n,Mi,h=>t(2,i=h));let{collection:s}=e,l;function o(h,m){for(let g=0;gl==null?void 0:l.show(h,m),a=()=>l==null?void 0:l.show();function u(h){te[h?"unshift":"push"](()=>{l=h,t(1,l)})}function f(h){s=h,t(0,s)}const c=h=>{for(let m=0;m{o(h.detail.old,h.detail.new)};return n.$$set=h=>{"collection"in h&&t(0,s=h.collection)},[s,l,i,o,r,a,u,f,c,d]}class TT extends be{constructor(e){super(),_e(this,e,ST,wT,me,{collection:0})}}function Kc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Jc(n){let e,t,i,s,l,o,r;function a(){return n[4](n[6])}function u(...f){return n[5](n[6],...f)}return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent=`${n[6].label}`,l=E(),p(t,"class","icon "+n[6].icon+" svelte-1gz9b6p"),p(s,"class","txt"),p(e,"tabindex","0"),p(e,"class","dropdown-item closable svelte-1gz9b6p")},m(f,c){w(f,e,c),b(e,t),b(e,i),b(e,s),b(e,l),o||(r=[Y(e,"click",Sn(a)),Y(e,"keydown",Sn(u))],o=!0)},p(f,c){n=f},d(f){f&&k(e),o=!1,$e(r)}}}function CT(n){let e,t=pe(n[2]),i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class OT extends be{constructor(e){super(),_e(this,e,MT,$T,me,{class:0})}}const ET=n=>({interactive:n&64,hasErrors:n&32}),Gc=n=>({interactive:n[6],hasErrors:n[5]}),DT=n=>({interactive:n&64,hasErrors:n&32}),Zc=n=>({interactive:n[6],hasErrors:n[5]}),AT=n=>({interactive:n&64,hasErrors:n&32}),Xc=n=>({interactive:n[6],hasErrors:n[5]});function Qc(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","drag-handle-wrapper"),p(e,"draggable",!0),p(e,"aria-label","Sort")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xc(n){let e,t,i;return{c(){e=v("div"),t=v("span"),i=W(n[4]),p(t,"class","label label-success"),p(e,"class","field-labels")},m(s,l){w(s,e,l),b(e,t),b(t,i)},p(s,l){l&16&&le(i,s[4])},d(s){s&&k(e)}}}function IT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[0].required&&xc(n);return{c(){h&&h.c(),e=E(),t=v("div"),i=v("i"),l=E(),o=v("input"),p(i,"class",s=j.getFieldTypeIcon(n[0].type)),p(t,"class","form-field-addon prefix no-pointer-events field-type-icon"),Q(t,"txt-disabled",!n[6]),p(o,"type","text"),o.required=!0,o.disabled=r=!n[6],o.readOnly=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,p(o,"placeholder","Field name"),o.value=f=n[0].name},m(m,g){h&&h.m(m,g),w(m,e,g),w(m,t,g),b(t,i),w(m,l,g),w(m,o,g),n[14](o),n[0].id||o.focus(),c||(d=Y(o,"input",n[15]),c=!0)},p(m,g){m[0].required?h?h.p(m,g):(h=xc(m),h.c(),h.m(e.parentNode,e)):h&&(h.d(1),h=null),g&1&&s!==(s=j.getFieldTypeIcon(m[0].type))&&p(i,"class",s),g&64&&Q(t,"txt-disabled",!m[6]),g&64&&r!==(r=!m[6])&&(o.disabled=r),g&1&&a!==(a=m[0].id&&m[0].system)&&(o.readOnly=a),g&1&&u!==(u=!m[0].id)&&(o.autofocus=u),g&1&&f!==(f=m[0].name)&&o.value!==f&&(o.value=f)},d(m){m&&(k(e),k(t),k(l),k(o)),h&&h.d(m),n[14](null),c=!1,d()}}}function LT(n){let e;return{c(){e=v("span"),p(e,"class","separator")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function PT(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-settings-3-line"),p(e,"type","button"),p(e,"aria-label","Toggle field options"),p(e,"class",i="btn btn-sm btn-circle options-trigger "+(n[3]?"btn-secondary":"btn-transparent")),Q(e,"btn-hint",!n[3]&&!n[5]),Q(e,"btn-danger",n[5])},m(o,r){w(o,e,r),b(e,t),s||(l=Y(e,"click",n[11]),s=!0)},p(o,r){r&8&&i!==(i="btn btn-sm btn-circle options-trigger "+(o[3]?"btn-secondary":"btn-transparent"))&&p(e,"class",i),r&40&&Q(e,"btn-hint",!o[3]&&!o[5]),r&40&&Q(e,"btn-danger",o[5])},d(o){o&&k(e),s=!1,l()}}}function NT(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),p(e,"aria-label","Restore")},m(s,l){w(s,e,l),t||(i=[Ce(Be.call(null,e,"Restore")),Y(e,"click",n[9])],t=!0)},p:x,d(s){s&&k(e),t=!1,$e(i)}}}function ed(n){let e,t,i,s,l,o,r,a,u,f,c;const d=n[13].options,h=Tt(d,n,n[18],Zc);l=new ge({props:{class:"form-field form-field-toggle",name:"requried",$$slots:{default:[FT,({uniqueId:y})=>({24:y}),({uniqueId:y})=>y?16777216:0]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field form-field-toggle",name:"presentable",$$slots:{default:[RT,({uniqueId:y})=>({24:y}),({uniqueId:y})=>y?16777216:0]},$$scope:{ctx:n}}});const m=n[13].optionsFooter,g=Tt(m,n,n[18],Gc);let _=!n[0].toDelete&&td(n);return{c(){e=v("div"),t=v("div"),h&&h.c(),i=E(),s=v("div"),z(l.$$.fragment),o=E(),z(r.$$.fragment),a=E(),g&&g.c(),u=E(),_&&_.c(),p(t,"class","hidden-empty m-b-sm"),p(s,"class","schema-field-options-footer"),p(e,"class","schema-field-options")},m(y,S){w(y,e,S),b(e,t),h&&h.m(t,null),b(e,i),b(e,s),H(l,s,null),b(s,o),H(r,s,null),b(s,a),g&&g.m(s,null),b(s,u),_&&_.m(s,null),c=!0},p(y,S){h&&h.p&&(!c||S&262240)&&$t(h,d,y,y[18],c?Ct(d,y[18],S,DT):Mt(y[18]),Zc);const C={};S&17039377&&(C.$$scope={dirty:S,ctx:y}),l.$set(C);const T={};S&17039361&&(T.$$scope={dirty:S,ctx:y}),r.$set(T),g&&g.p&&(!c||S&262240)&&$t(g,m,y,y[18],c?Ct(m,y[18],S,ET):Mt(y[18]),Gc),y[0].toDelete?_&&(re(),L(_,1,1,()=>{_=null}),ae()):_?(_.p(y,S),S&1&&A(_,1)):(_=td(y),_.c(),A(_,1),_.m(s,null))},i(y){c||(A(h,y),A(l.$$.fragment,y),A(r.$$.fragment,y),A(g,y),A(_),y&&xe(()=>{c&&(f||(f=He(e,lt,{duration:150},!0)),f.run(1))}),c=!0)},o(y){L(h,y),L(l.$$.fragment,y),L(r.$$.fragment,y),L(g,y),L(_),y&&(f||(f=He(e,lt,{duration:150},!1)),f.run(0)),c=!1},d(y){y&&k(e),h&&h.d(y),V(l),V(r),g&&g.d(y),_&&_.d(),y&&f&&f.end()}}}function FT(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),o=W(n[4]),r=E(),a=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[24]),p(l,"class","txt"),p(a,"class","ri-information-line link-hint"),p(s,"for",f=n[24])},m(h,m){w(h,e,m),e.checked=n[0].required,w(h,i,m),w(h,s,m),b(s,l),b(l,o),b(s,r),b(s,a),c||(d=[Y(e,"change",n[16]),Ce(u=Be.call(null,a,{text:`Requires the field value NOT to be ${j.zeroDefaultStr(n[0])}.`}))],c=!0)},p(h,m){m&16777216&&t!==(t=h[24])&&p(e,"id",t),m&1&&(e.checked=h[0].required),m&16&&le(o,h[4]),u&&Et(u.update)&&m&1&&u.update.call(null,{text:`Requires the field value NOT to be ${j.zeroDefaultStr(h[0])}.`}),m&16777216&&f!==(f=h[24])&&p(s,"for",f)},d(h){h&&(k(e),k(i),k(s)),c=!1,$e(d)}}}function RT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Presentable",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[24]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[24])},m(c,d){w(c,e,d),e.checked=n[0].presentable,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[17]),Ce(Be.call(null,r,{text:"Whether the field should be preferred in the Admin UI relation listings (default to auto)."}))],u=!0)},p(c,d){d&16777216&&t!==(t=c[24])&&p(e,"id",t),d&1&&(e.checked=c[0].presentable),d&16777216&&a!==(a=c[24])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function td(n){let e,t,i,s,l,o,r,a,u;return a=new Pn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[qT]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=E(),s=v("div"),l=v("button"),o=v("i"),r=E(),z(a.$$.fragment),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","m-l-auto txt-right")},m(f,c){w(f,e,c),b(e,t),b(e,i),b(e,s),b(s,l),b(l,o),b(l,r),H(a,l,null),u=!0},p(f,c){const d={};c&262144&&(d.$$scope={dirty:c,ctx:f}),a.$set(d)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){L(a.$$.fragment,f),u=!1},d(f){f&&k(e),V(a)}}}function qT(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function jT(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Qc();s=new ge({props:{class:"form-field required m-0 "+(n[6]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[IT]},$$scope:{ctx:n}}});const c=n[13].default,d=Tt(c,n,n[18],Xc),h=d||LT();function m(S,C){if(S[0].toDelete)return NT;if(S[6])return PT}let g=m(n),_=g&&g(n),y=n[6]&&n[3]&&ed(n);return{c(){e=v("div"),t=v("div"),f&&f.c(),i=E(),z(s.$$.fragment),l=E(),h&&h.c(),o=E(),_&&_.c(),r=E(),y&&y.c(),p(t,"class","schema-field-header"),p(e,"class","schema-field"),Q(e,"required",n[0].required),Q(e,"expanded",n[6]&&n[3]),Q(e,"deleted",n[0].toDelete)},m(S,C){w(S,e,C),b(e,t),f&&f.m(t,null),b(t,i),H(s,t,null),b(t,l),h&&h.m(t,null),b(t,o),_&&_.m(t,null),b(e,r),y&&y.m(e,null),u=!0},p(S,[C]){S[6]?f||(f=Qc(),f.c(),f.m(t,i)):f&&(f.d(1),f=null);const T={};C&64&&(T.class="form-field required m-0 "+(S[6]?"":"disabled")),C&2&&(T.name="schema."+S[1]+".name"),C&262229&&(T.$$scope={dirty:C,ctx:S}),s.$set(T),d&&d.p&&(!u||C&262240)&&$t(d,c,S,S[18],u?Ct(c,S[18],C,AT):Mt(S[18]),Xc),g===(g=m(S))&&_?_.p(S,C):(_&&_.d(1),_=g&&g(S),_&&(_.c(),_.m(t,null))),S[6]&&S[3]?y?(y.p(S,C),C&72&&A(y,1)):(y=ed(S),y.c(),A(y,1),y.m(e,null)):y&&(re(),L(y,1,1,()=>{y=null}),ae()),(!u||C&1)&&Q(e,"required",S[0].required),(!u||C&72)&&Q(e,"expanded",S[6]&&S[3]),(!u||C&1)&&Q(e,"deleted",S[0].toDelete)},i(S){u||(A(s.$$.fragment,S),A(h,S),A(y),S&&xe(()=>{u&&(a||(a=He(e,lt,{duration:150},!0)),a.run(1))}),u=!0)},o(S){L(s.$$.fragment,S),L(h,S),L(y),S&&(a||(a=He(e,lt,{duration:150},!1)),a.run(0)),u=!1},d(S){S&&k(e),f&&f.d(),V(s),h&&h.d(S),_&&_.d(),y&&y.d(),S&&a&&a.end()}}}let Ar=[];function HT(n,e,t){let i,s,l,o;Ge(n,Mi,P=>t(12,o=P));let{$$slots:r={},$$scope:a}=e;const u="f_"+j.randomString(8),f=pt(),c={bool:"Nonfalsey",number:"Nonzero"};let{key:d=""}=e,{field:h=j.initSchemaField()}=e,m,g=!1;function _(){h.id?t(0,h.toDelete=!0,h):f("remove")}function y(){t(0,h.toDelete=!1,h),on({})}function S(P){return j.slugify(P)}function C(){t(3,g=!0),M()}function T(){t(3,g=!1)}function $(){g?T():C()}function M(){for(let P of Ar)P.id!=u&&P.collapse()}Kt(()=>(Ar.push({id:u,collapse:T}),h.onMountSelect&&(t(0,h.onMountSelect=!1,h),m==null||m.select()),()=>{j.removeByKey(Ar,"id",u)}));function O(P){te[P?"unshift":"push"](()=>{m=P,t(2,m)})}const D=P=>{const F=h.name;t(0,h.name=S(P.target.value),h),P.target.value=h.name,f("rename",{oldName:F,newName:h.name})};function I(){h.required=this.checked,t(0,h)}function N(){h.presentable=this.checked,t(0,h)}return n.$$set=P=>{"key"in P&&t(1,d=P.key),"field"in P&&t(0,h=P.field),"$$scope"in P&&t(18,a=P.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&h.toDelete&&h.originalName&&h.name!==h.originalName&&t(0,h.name=h.originalName,h),n.$$.dirty&1&&!h.originalName&&h.name&&t(0,h.originalName=h.name,h),n.$$.dirty&1&&typeof h.toDelete>"u"&&t(0,h.toDelete=!1,h),n.$$.dirty&1&&h.required&&t(0,h.nullable=!1,h),n.$$.dirty&1&&t(6,i=!h.toDelete&&!(h.id&&h.system)),n.$$.dirty&4098&&t(5,s=!j.isEmpty(j.getNestedVal(o,`schema.${d}`))),n.$$.dirty&1&&t(4,l=c[h==null?void 0:h.type]||"Nonempty")},[h,d,m,g,l,s,i,f,_,y,S,$,o,r,O,D,I,N,a]}class gi extends be{constructor(e){super(),_e(this,e,HT,jT,me,{key:1,field:0})}}function VT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Min length"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min","0")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].options.min),r||(a=Y(l,"input",n[3]),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&&yt(l.value)!==u[0].options.min&&de(l,u[0].options.min)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function zT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=W("Max length"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min",r=n[0].options.min||0)},m(f,c){w(f,e,c),b(e,t),w(f,s,c),w(f,l,c),de(l,n[0].options.max),a||(u=Y(l,"input",n[4]),a=!0)},p(f,c){c&512&&i!==(i=f[9])&&p(e,"for",i),c&512&&o!==(o=f[9])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min||0)&&p(l,"min",r),c&1&&yt(l.value)!==f[0].options.max&&de(l,f[0].options.max)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function BT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Regex pattern"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","text"),p(l,"id",o=n[9]),p(l,"placeholder","Valid Go regular expression, eg. ^\\w+$")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].options.pattern),r||(a=Y(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0].options.pattern&&de(l,u[0].options.pattern)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function UT(n){let e,t,i,s,l,o,r,a,u,f;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[VT,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[zT,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[BT,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),p(t,"class","col-sm-3"),p(l,"class","col-sm-3"),p(a,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(c,d){w(c,e,d),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),b(e,r),b(e,a),H(u,a,null),f=!0},p(c,d){const h={};d&2&&(h.name="schema."+c[1]+".options.min"),d&1537&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const m={};d&2&&(m.name="schema."+c[1]+".options.max"),d&1537&&(m.$$scope={dirty:d,ctx:c}),o.$set(m);const g={};d&2&&(g.name="schema."+c[1]+".options.pattern"),d&1537&&(g.$$scope={dirty:d,ctx:c}),u.$set(g)},i(c){f||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){L(i.$$.fragment,c),L(o.$$.fragment,c),L(u.$$.fragment,c),f=!1},d(c){c&&k(e),V(i),V(o),V(u)}}}function WT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[UT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};a&1027&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function YT(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=yt(this.value),t(0,l)}function a(){l.options.max=yt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(h){l=h,t(0,l)}function c(h){Re.call(this,n,h)}function d(h){Re.call(this,n,h)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(2,s=tt(e,i)),"field"in h&&t(0,l=h.field),"key"in h&&t(1,o=h.key)},[l,o,s,r,a,u,f,c,d]}class KT extends be{constructor(e){super(),_e(this,e,YT,WT,me,{field:0,key:1})}}function JT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Min"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9])},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].options.min),r||(a=Y(l,"input",n[4]),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&&yt(l.value)!==u[0].options.min&&de(l,u[0].options.min)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function GT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=W("Max"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"min",r=n[0].options.min)},m(f,c){w(f,e,c),b(e,t),w(f,s,c),w(f,l,c),de(l,n[0].options.max),a||(u=Y(l,"input",n[5]),a=!0)},p(f,c){c&512&&i!==(i=f[9])&&p(e,"for",i),c&512&&o!==(o=f[9])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min)&&p(l,"min",r),c&1&&yt(l.value)!==f[0].options.max&&de(l,f[0].options.max)},d(f){f&&(k(e),k(s),k(l)),a=!1,u()}}}function ZT(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[JT,({uniqueId:a})=>({9:a}),({uniqueId:a})=>a?512:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[GT,({uniqueId:a})=>({9:a}),({uniqueId:a})=>a?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&1537&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&1537&&(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),V(i),V(o)}}}function XT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="No decimals",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[9]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[9])},m(c,d){w(c,e,d),e.checked=n[0].options.noDecimal,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[3]),Ce(Be.call(null,r,{text:"Existing decimal numbers will not be affected."}))],u=!0)},p(c,d){d&512&&t!==(t=c[9])&&p(e,"id",t),d&1&&(e.checked=c[0].options.noDecimal),d&512&&a!==(a=c[9])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function QT(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.noDecimal",$$slots:{default:[XT,({uniqueId:i})=>({9:i}),({uniqueId:i})=>i?512:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.noDecimal"),s&1537&&(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){V(e,i)}}}function xT(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{optionsFooter:[QT],options:[ZT]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};a&1027&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function eC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.noDecimal=this.checked,t(0,l)}function a(){l.options.min=yt(this.value),t(0,l)}function u(){l.options.max=yt(this.value),t(0,l)}function f(h){l=h,t(0,l)}function c(h){Re.call(this,n,h)}function d(h){Re.call(this,n,h)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(2,s=tt(e,i)),"field"in h&&t(0,l=h.field),"key"in h&&t(1,o=h.key)},[l,o,s,r,a,u,f,c,d]}class tC extends be{constructor(e){super(),_e(this,e,eC,xT,me,{field:0,key:1})}}function nC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function iC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Re.call(this,n,f)}function u(f){Re.call(this,n,f)}return n.$$set=f=>{e=je(je({},e),xt(f)),t(2,s=tt(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class sC extends be{constructor(e){super(),_e(this,e,iC,nC,me,{field:0,key:1})}}function lC(n){let e,t,i,s,l=[{type:t=n[5].type||"text"},{value:n[4]},{disabled:n[3]},{readOnly:n[2]},n[5]],o={};for(let r=0;r{t(0,o=j.splitNonEmpty(c.target.value,r))};return n.$$set=c=>{e=je(je({},e),xt(c)),t(5,l=tt(e,s)),"value"in c&&t(0,o=c.value),"separator"in c&&t(1,r=c.separator),"readonly"in c&&t(2,a=c.readonly),"disabled"in c&&t(3,u=c.disabled)},n.$$.update=()=>{n.$$.dirty&3&&t(4,i=j.joinNonEmpty(o,r+" "))},[o,r,a,u,i,l,f]}class qs extends be{constructor(e){super(),_e(this,e,oC,lC,me,{value:0,separator:1,readonly:2,disabled:3})}}function rC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(_){n[3](_)}let g={id:n[8],disabled:!j.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(g.value=n[0].options.exceptDomains),r=new qs({props:g}),te.push(()=>he(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),H(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=Ce(Be.call(null,s,{text:`List of domains that are NOT allowed. This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&256&&l!==(l=_[8]))&&p(e,"for",l);const S={};y&256&&(S.id=_[8]),y&1&&(S.disabled=!j.isEmpty(_[0].options.onlyDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.exceptDomains,ve(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){L(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),V(r,_),d=!1,h()}}}function aC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(_){n[4](_)}let g={id:n[8]+".options.onlyDomains",disabled:!j.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(g.value=n[0].options.onlyDomains),r=new qs({props:g}),te.push(()=>he(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]+".options.onlyDomains"),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),H(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=Ce(Be.call(null,s,{text:`List of domains that are ONLY allowed. This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&256&&l!==(l=_[8]+".options.onlyDomains"))&&p(e,"for",l);const S={};y&256&&(S.id=_[8]+".options.onlyDomains"),y&1&&(S.disabled=!j.isEmpty(_[0].options.exceptDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.onlyDomains,ve(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){L(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),V(r,_),d=!1,h()}}}function uC(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[rC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[aC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&769&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&769&&(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),V(i),V(o)}}}function fC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[uC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};a&515&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function cC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(d){n.$$.not_equal(l.options.exceptDomains,d)&&(l.options.exceptDomains=d,t(0,l))}function a(d){n.$$.not_equal(l.options.onlyDomains,d)&&(l.options.onlyDomains=d,t(0,l))}function u(d){l=d,t(0,l)}function f(d){Re.call(this,n,d)}function c(d){Re.call(this,n,d)}return n.$$set=d=>{e=je(je({},e),xt(d)),t(2,s=tt(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,s,r,a,u,f,c]}class j1 extends be{constructor(e){super(),_e(this,e,cC,fC,me,{field:0,key:1})}}function dC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function pC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Re.call(this,n,f)}function u(f){Re.call(this,n,f)}return n.$$set=f=>{e=je(je({},e),xt(f)),t(2,s=tt(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class hC extends be{constructor(e){super(),_e(this,e,pC,dC,me,{field:0,key:1})}}function mC(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Strip urls domain",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[8]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[8])},m(c,d){w(c,e,d),e.checked=n[0].options.convertUrls,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[3]),Ce(Be.call(null,r,{text:"This could help making the editor content more portable between environments since there will be no local base url to replace."}))],u=!0)},p(c,d){d&256&&t!==(t=c[8])&&p(e,"id",t),d&1&&(e.checked=c[0].options.convertUrls),d&256&&a!==(a=c[8])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function gC(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",name:"schema."+n[1]+".options.convertUrls",$$slots:{default:[mC,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.convertUrls"),s&769&&(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){V(e,i)}}}function _C(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[4](r)}let o={$$slots:{optionsFooter:[gC]},$$scope:{ctx:n}};for(let r=0;rhe(e,"field",l)),e.$on("rename",n[5]),e.$on("remove",n[6]),{c(){z(e.$$.fragment)},m(r,a){H(e,r,a),i=!0},p(r,[a]){const u=a&6?_t(s,[a&2&&{key:r[1]},a&4&&Dt(r[2])]):{};a&515&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){L(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function bC(n,e,t){const i=["field","key"];let s=tt(e,i),{field:l}=e,{key:o=""}=e;function r(){t(0,l.options={convertUrls:!1},l)}function a(){l.options.convertUrls=this.checked,t(0,l)}function u(d){l=d,t(0,l)}function f(d){Re.call(this,n,d)}function c(d){Re.call(this,n,d)}return n.$$set=d=>{e=je(je({},e),xt(d)),t(2,s=tt(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},n.$$.update=()=>{n.$$.dirty&1&&j.isEmpty(l.options)&&r()},[l,o,s,a,u,f,c]}class vC extends be{constructor(e){super(),_e(this,e,bC,_C,me,{field:0,key:1})}}var Ir=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Cs={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},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 toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},vn=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},Vn=function(n){return n===!0?1:0};function nd(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Lr=function(n){return n instanceof Array?n:[n]};function gn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function mt(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function io(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function H1(n,e){if(e(n))return n;if(n.parentNode)return H1(n.parentNode,e)}function so(n,e){var t=mt("div","numInputWrapper"),i=mt("input","numInput "+n),s=mt("span","arrowUp"),l=mt("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function Mn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Pr=function(){},Ro=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},yC={D:Pr,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*Vn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Pr,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Pr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},ns={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},fl={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[fl.w(n,e,t)]},F:function(n,e,t){return Ro(fl.n(n,e,t)-1,!1,e)},G:function(n,e,t){return vn(fl.h(n,e,t))},H:function(n){return vn(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[Vn(n.getHours()>11)]},M:function(n,e){return Ro(n.getMonth(),!0,e)},S:function(n){return vn(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return vn(n.getFullYear(),4)},d:function(n){return vn(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return vn(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return vn(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},V1=function(n){var e=n.config,t=e===void 0?Cs:e,i=n.l10n,s=i===void 0?yl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,h){return fl[c]&&h[d-1]!=="\\"?fl[c](r,f,t):c!=="\\"?c:""}).join("")}},ma=function(n){var e=n.config,t=e===void 0?Cs:e,i=n.l10n,s=i===void 0?yl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||Cs).dateFormat,h=String(l).trim();if(h==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(h)||/GMT$/.test(h))f=new Date(l);else{for(var m=void 0,g=[],_=0,y=0,S="";_Math.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ie=Fr(t.config);G.setHours(ie.hours,ie.minutes,ie.seconds,G.getMilliseconds()),t.selectedDates=[G],t.latestSelectedDateObj=G}K!==void 0&&K.type!=="blur"&&Rn(K);var fe=t._input.value;c(),It(),t._input.value!==fe&&t._debouncedChange()}function u(K,G){return K%12+12*Vn(G===t.l10n.amPM[1])}function f(K){switch(K%24){case 0:case 12:return 12;default:return K%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var K=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,G=(parseInt(t.minuteElement.value,10)||0)%60,ie=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(K=u(K,t.amPM.textContent));var fe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&On(t.latestSelectedDateObj,t.config.minDate,!0)===0,Oe=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&On(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Pe=Nr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Fe=Nr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Ae=Nr(K,G,ie);if(Ae>Fe&&Ae=12)]),t.secondElement!==void 0&&(t.secondElement.value=vn(ie)))}function m(K){var G=Mn(K),ie=parseInt(G.value)+(K.delta||0);(ie/1e3>1||K.key==="Enter"&&!/[^\d]/.test(ie.toString()))&&ke(ie)}function g(K,G,ie,fe){if(G instanceof Array)return G.forEach(function(Oe){return g(K,Oe,ie,fe)});if(K instanceof Array)return K.forEach(function(Oe){return g(Oe,G,ie,fe)});K.addEventListener(G,ie,fe),t._handlers.push({remove:function(){return K.removeEventListener(G,ie,fe)}})}function _(){et("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ie){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ie+"]"),function(fe){return g(fe,"click",t[ie])})}),t.isMobile){Qn();return}var K=nd(Ue,50);if(t._debouncedChange=nd(_,TC),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(ie){t.config.mode==="range"&&we(Mn(ie))}),g(t._input,"keydown",Se),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",Se),!t.config.inline&&!t.config.static&&g(window,"resize",K),window.ontouchstart!==void 0?g(window.document,"touchstart",We):g(window.document,"mousedown",We),g(window.document,"focus",We,{capture:!0}),t.config.clickOpens===!0&&(g(t._input,"focus",t.open),g(t._input,"click",t.open)),t.daysContainer!==void 0&&(g(t.monthNav,"click",Lt),g(t.monthNav,["keyup","increment"],m),g(t.daysContainer,"click",_i)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var G=function(ie){return Mn(ie).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",C),g([t.hourElement,t.minuteElement],["focus","click"],G),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(ie){a(ie)})}t.config.allowInput&&g(t._input,"blur",dt)}function S(K,G){var ie=K!==void 0?t.parseDate(K):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(K);var Oe=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Oe&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Pe=mt("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Pe,t.element),Pe.appendChild(t.element),t.altInput&&Pe.appendChild(t.altInput),Pe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(K,G,ie,fe){var Oe=Me(G,!0),Pe=mt("span",K,G.getDate().toString());return Pe.dateObj=G,Pe.$i=fe,Pe.setAttribute("aria-label",t.formatDate(G,t.config.ariaDateFormat)),K.indexOf("hidden")===-1&&On(G,t.now)===0&&(t.todayDateElem=Pe,Pe.classList.add("today"),Pe.setAttribute("aria-current","date")),Oe?(Pe.tabIndex=-1,De(G)&&(Pe.classList.add("selected"),t.selectedDateElem=Pe,t.config.mode==="range"&&(gn(Pe,"startRange",t.selectedDates[0]&&On(G,t.selectedDates[0],!0)===0),gn(Pe,"endRange",t.selectedDates[1]&&On(G,t.selectedDates[1],!0)===0),K==="nextMonthDay"&&Pe.classList.add("inRange")))):Pe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Xe(G)&&!De(G)&&Pe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&K!=="prevMonthDay"&&fe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(G)+""),et("onDayCreate",Pe),Pe}function O(K){K.focus(),t.config.mode==="range"&&we(K)}function D(K){for(var G=K>0?0:t.config.showMonths-1,ie=K>0?t.config.showMonths:-1,fe=G;fe!=ie;fe+=K)for(var Oe=t.daysContainer.children[fe],Pe=K>0?0:Oe.children.length-1,Fe=K>0?Oe.children.length:-1,Ae=Pe;Ae!=Fe;Ae+=K){var Qe=Oe.children[Ae];if(Qe.className.indexOf("hidden")===-1&&Me(Qe.dateObj))return Qe}}function I(K,G){for(var ie=K.className.indexOf("Month")===-1?K.dateObj.getMonth():t.currentMonth,fe=G>0?t.config.showMonths:-1,Oe=G>0?1:-1,Pe=ie-t.currentMonth;Pe!=fe;Pe+=Oe)for(var Fe=t.daysContainer.children[Pe],Ae=ie-t.currentMonth===Pe?K.$i+G:G<0?Fe.children.length-1:0,Qe=Fe.children.length,ze=Ae;ze>=0&&ze0?Qe:-1);ze+=Oe){var Ke=Fe.children[ze];if(Ke.className.indexOf("hidden")===-1&&Me(Ke.dateObj)&&Math.abs(K.$i-ze)>=Math.abs(G))return O(Ke)}t.changeMonth(Oe),N(D(Oe),0)}function N(K,G){var ie=l(),fe=Je(ie||document.body),Oe=K!==void 0?K:fe?ie:t.selectedDateElem!==void 0&&Je(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Je(t.todayDateElem)?t.todayDateElem:D(G>0?1:-1);Oe===void 0?t._input.focus():fe?I(Oe,G):O(Oe)}function P(K,G){for(var ie=(new Date(K,G,1).getDay()-t.l10n.firstDayOfWeek+7)%7,fe=t.utils.getDaysInMonth((G-1+12)%12,K),Oe=t.utils.getDaysInMonth(G,K),Pe=window.document.createDocumentFragment(),Fe=t.config.showMonths>1,Ae=Fe?"prevMonthDay hidden":"prevMonthDay",Qe=Fe?"nextMonthDay hidden":"nextMonthDay",ze=fe+1-ie,Ke=0;ze<=fe;ze++,Ke++)Pe.appendChild(M("flatpickr-day "+Ae,new Date(K,G-1,ze),ze,Ke));for(ze=1;ze<=Oe;ze++,Ke++)Pe.appendChild(M("flatpickr-day",new Date(K,G,ze),ze,Ke));for(var St=Oe+1;St<=42-ie&&(t.config.showMonths===1||Ke%7!==0);St++,Ke++)Pe.appendChild(M("flatpickr-day "+Qe,new Date(K,G+1,St%Oe),St,Ke));var ri=mt("div","dayContainer");return ri.appendChild(Pe),ri}function F(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var K=document.createDocumentFragment(),G=0;G1||t.config.monthSelectorType!=="dropdown")){var K=function(fe){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&fet.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var G=0;G<12;G++)if(K(G)){var ie=mt("option","flatpickr-monthDropdown-month");ie.value=new Date(t.currentYear,G).getMonth().toString(),ie.textContent=Ro(G,t.config.shorthandCurrentMonth,t.l10n),ie.tabIndex=-1,t.currentMonth===G&&(ie.selected=!0),t.monthsDropdownContainer.appendChild(ie)}}}function q(){var K=mt("div","flatpickr-month"),G=window.document.createDocumentFragment(),ie;t.config.showMonths>1||t.config.monthSelectorType==="static"?ie=mt("span","cur-month"):(t.monthsDropdownContainer=mt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(Fe){var Ae=Mn(Fe),Qe=parseInt(Ae.value,10);t.changeMonth(Qe-t.currentMonth),et("onMonthChange")}),R(),ie=t.monthsDropdownContainer);var fe=so("cur-year",{tabindex:"-1"}),Oe=fe.getElementsByTagName("input")[0];Oe.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Oe.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Oe.setAttribute("max",t.config.maxDate.getFullYear().toString()),Oe.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Pe=mt("div","flatpickr-current-month");return Pe.appendChild(ie),Pe.appendChild(fe),G.appendChild(Pe),K.appendChild(G),{container:K,yearElement:Oe,monthElement:ie}}function B(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var K=t.config.showMonths;K--;){var G=q();t.yearElements.push(G.yearElement),t.monthElements.push(G.monthElement),t.monthNav.appendChild(G.container)}t.monthNav.appendChild(t.nextMonthNav)}function Z(){return t.monthNav=mt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=mt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=mt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,B(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(K){t.__hidePrevMonthArrow!==K&&(gn(t.prevMonthNav,"flatpickr-disabled",K),t.__hidePrevMonthArrow=K)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(K){t.__hideNextMonthArrow!==K&&(gn(t.nextMonthNav,"flatpickr-disabled",K),t.__hideNextMonthArrow=K)}}),t.currentYearElement=t.yearElements[0],Jt(),t.monthNav}function X(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var K=Fr(t.config);t.timeContainer=mt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var G=mt("span","flatpickr-time-separator",":"),ie=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ie.getElementsByTagName("input")[0];var fe=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=fe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=vn(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?K.hours:f(K.hours)),t.minuteElement.value=vn(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():K.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ie),t.timeContainer.appendChild(G),t.timeContainer.appendChild(fe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Oe=so("flatpickr-second");t.secondElement=Oe.getElementsByTagName("input")[0],t.secondElement.value=vn(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():K.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(mt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Oe)}return t.config.time_24hr||(t.amPM=mt("span","flatpickr-am-pm",t.l10n.amPM[Vn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function J(){t.weekdayContainer?io(t.weekdayContainer):t.weekdayContainer=mt("div","flatpickr-weekdays");for(var K=t.config.showMonths;K--;){var G=mt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(G)}return U(),t.weekdayContainer}function U(){if(t.weekdayContainer){var K=t.l10n.firstDayOfWeek,G=id(t.l10n.weekdays.shorthand);K>0&&K @@ -76,7 +76,7 @@ var l0=Object.defineProperty;var o0=(n,e,t)=>e in n?l0(n,e,{enumerable:!0,config `),s=v("code"),s.textContent="id",l=W(` , `),o=v("code"),o.textContent="created",r=W(` , `),a=v("code"),a.textContent="updated",u=E(),O&&O.c(),f=W(` - .`),c=E(),d=v("div");for(let F=0;F$=!1)),T.$set(q)},i(F){if(!M){for(let R=0;RM.name===T))}function f(T){return i.findIndex($=>$===T)}function c(T,$){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||T===$||!$||t(0,s.indexes=s.indexes.map(O=>j.replaceIndexColumn(O,T,$)),s)}function d(T,$,M,O){M[O]=T,t(0,s)}const h=T=>o(T),m=T=>c(T.detail.oldName,T.detail.newName);function g(T){n.$$.not_equal(s.schema,T)&&(s.schema=T,t(0,s))}const _=T=>{if(!T.detail)return;const $=T.detail.target;$.style.opacity=0,setTimeout(()=>{var M;(M=$==null?void 0:$.style)==null||M.removeProperty("opacity")},0),T.detail.dataTransfer.setDragImage($,0,0)},y=()=>{on({})},S=T=>r(T.detail);function C(T){s=T,t(0,s)}return n.$$set=T=>{"collection"in T&&t(0,s=T.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&t(0,s.schema=[],s),n.$$.dirty&1&&(i=s.schema.filter(T=>!T.toDelete)||[])},[s,l,o,r,f,c,d,h,m,g,_,y,S,C]}class Y$ extends be{constructor(e){super(),_e(this,e,W$,U$,me,{collection:0})}}const K$=n=>({isAdminOnly:n&512}),Ad=n=>({isAdminOnly:n[9]}),J$=n=>({isAdminOnly:n&512}),Id=n=>({isAdminOnly:n[9]}),G$=n=>({isAdminOnly:n&512}),Ld=n=>({isAdminOnly:n[9]});function Z$(n){let e,t;return e=new ge({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[Q$,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(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){V(e,i)}}}function X$(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Pd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' Set Admins only',p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[11]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Nd(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Unlock and set custom rule
',p(e,"type","button"),p(e,"class","unlock-overlay svelte-1akuazq"),p(e,"aria-label","Unlock and set custom rule")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",n[10]),s=!0)},p:x,i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Q$(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,c,d,h,m,g,_,y,S;const C=n[12].beforeLabel,T=Tt(C,n,n[15],Ld),$=n[12].afterLabel,M=Tt($,n,n[15],Id);let O=!n[9]&&Pd(n);function D(q){n[14](q)}var I=n[7];function N(q,B){let Z={id:q[18],baseCollection:q[1],disabled:q[9],placeholder:q[9]?"":q[5]};return q[0]!==void 0&&(Z.value=q[0]),{props:Z}}I&&(h=Nt(I,N(n)),n[13](h),te.push(()=>he(h,"value",D)));let P=n[9]&&Nd(n);const F=n[12].default,R=Tt(F,n,n[15],Ad);return{c(){e=v("div"),t=v("label"),T&&T.c(),i=E(),s=v("span"),l=W(n[2]),o=E(),a=W(r),u=E(),M&&M.c(),f=E(),O&&O.c(),d=E(),h&&z(h.$$.fragment),g=E(),P&&P.c(),_=E(),y=v("div"),R&&R.c(),p(s,"class","txt"),Q(s,"txt-hint",n[9]),p(t,"for",c=n[18]),p(e,"class","input-wrapper svelte-1akuazq"),p(y,"class","help-block")},m(q,B){w(q,e,B),b(e,t),T&&T.m(t,null),b(t,i),b(t,s),b(s,l),b(s,o),b(s,a),b(t,u),M&&M.m(t,null),b(t,f),O&&O.m(t,null),b(e,d),h&&H(h,e,null),b(e,g),P&&P.m(e,null),w(q,_,B),w(q,y,B),R&&R.m(y,null),S=!0},p(q,B){if(T&&T.p&&(!S||B&33280)&&$t(T,C,q,q[15],S?Ct(C,q[15],B,G$):Mt(q[15]),Ld),(!S||B&4)&&le(l,q[2]),(!S||B&512)&&r!==(r=q[9]?"- Admins only":"")&&le(a,r),(!S||B&512)&&Q(s,"txt-hint",q[9]),M&&M.p&&(!S||B&33280)&&$t(M,$,q,q[15],S?Ct($,q[15],B,J$):Mt(q[15]),Id),q[9]?O&&(O.d(1),O=null):O?O.p(q,B):(O=Pd(q),O.c(),O.m(t,null)),(!S||B&262144&&c!==(c=q[18]))&&p(t,"for",c),B&128&&I!==(I=q[7])){if(h){re();const Z=h;L(Z.$$.fragment,1,0,()=>{V(Z,1)}),ae()}I?(h=Nt(I,N(q)),q[13](h),te.push(()=>he(h,"value",D)),z(h.$$.fragment),A(h.$$.fragment,1),H(h,e,g)):h=null}else if(I){const Z={};B&262144&&(Z.id=q[18]),B&2&&(Z.baseCollection=q[1]),B&512&&(Z.disabled=q[9]),B&544&&(Z.placeholder=q[9]?"":q[5]),!m&&B&1&&(m=!0,Z.value=q[0],ve(()=>m=!1)),h.$set(Z)}q[9]?P?(P.p(q,B),B&512&&A(P,1)):(P=Nd(q),P.c(),A(P,1),P.m(e,null)):P&&(re(),L(P,1,1,()=>{P=null}),ae()),R&&R.p&&(!S||B&33280)&&$t(R,F,q,q[15],S?Ct(F,q[15],B,K$):Mt(q[15]),Ad)},i(q){S||(A(T,q),A(M,q),h&&A(h.$$.fragment,q),A(P),A(R,q),S=!0)},o(q){L(T,q),L(M,q),h&&L(h.$$.fragment,q),L(P),L(R,q),S=!1},d(q){q&&(k(e),k(_),k(y)),T&&T.d(q),M&&M.d(q),O&&O.d(),n[13](null),h&&V(h),P&&P.d(),R&&R.d(q)}}}function x$(n){let e,t,i,s;const l=[X$,Z$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},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):(re(),L(o[f],1,1,()=>{o[f]=null}),ae(),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){a&&k(i),o[e].d(a)}}}let Fd;function eM(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,{placeholder:c="Leave empty to grant everyone access..."}=e,d=null,h=null,m=Fd,g=!1;_();async function _(){m||g||(t(8,g=!0),t(7,m=(await ft(()=>import("./FilterAutocompleteInput-f3198726.js"),["./FilterAutocompleteInput-f3198726.js","./index-30dee195.js"],import.meta.url)).default),Fd=m,t(8,g=!1))}async function y(){t(0,r=h||""),await ln(),d==null||d.focus()}async function S(){h=r,t(0,r=null)}function C($){te[$?"unshift":"push"](()=>{d=$,t(6,d)})}function T($){r=$,t(0,r)}return n.$$set=$=>{"collection"in $&&t(1,o=$.collection),"rule"in $&&t(0,r=$.rule),"label"in $&&t(2,a=$.label),"formKey"in $&&t(3,u=$.formKey),"required"in $&&t(4,f=$.required),"placeholder"in $&&t(5,c=$.placeholder),"$$scope"in $&&t(15,l=$.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,m,g,i,y,S,s,C,T,l]}class Ms extends be{constructor(e){super(),_e(this,e,eM,x$,me,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Rd(n,e,t){const i=n.slice();return i[11]=e[t],i}function qd(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M,O,D,I=pe(n[2]),N=[];for(let P=0;P@request
filter:",c=E(),d=v("div"),d.innerHTML="@request.headers.* @request.query.* @request.data.* @request.auth.*",h=E(),m=v("hr"),g=E(),_=v("p"),_.innerHTML="You could also add constraints and query other collections using the @collection filter:",y=E(),S=v("div"),S.innerHTML="@collection.ANY_COLLECTION_NAME.*",C=E(),T=v("hr"),$=E(),M=v("p"),M.innerHTML=`Example rule: + .`),c=E(),d=v("div");for(let F=0;F$=!1)),T.$set(q)},i(F){if(!M){for(let R=0;RM.name===T))}function f(T){return i.findIndex($=>$===T)}function c(T,$){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||T===$||!$||t(0,s.indexes=s.indexes.map(O=>j.replaceIndexColumn(O,T,$)),s)}function d(T,$,M,O){M[O]=T,t(0,s)}const h=T=>o(T),m=T=>c(T.detail.oldName,T.detail.newName);function g(T){n.$$.not_equal(s.schema,T)&&(s.schema=T,t(0,s))}const _=T=>{if(!T.detail)return;const $=T.detail.target;$.style.opacity=0,setTimeout(()=>{var M;(M=$==null?void 0:$.style)==null||M.removeProperty("opacity")},0),T.detail.dataTransfer.setDragImage($,0,0)},y=()=>{on({})},S=T=>r(T.detail);function C(T){s=T,t(0,s)}return n.$$set=T=>{"collection"in T&&t(0,s=T.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&t(0,s.schema=[],s),n.$$.dirty&1&&(i=s.schema.filter(T=>!T.toDelete)||[])},[s,l,o,r,f,c,d,h,m,g,_,y,S,C]}class Y$ extends be{constructor(e){super(),_e(this,e,W$,U$,me,{collection:0})}}const K$=n=>({isAdminOnly:n&512}),Ad=n=>({isAdminOnly:n[9]}),J$=n=>({isAdminOnly:n&512}),Id=n=>({isAdminOnly:n[9]}),G$=n=>({isAdminOnly:n&512}),Ld=n=>({isAdminOnly:n[9]});function Z$(n){let e,t;return e=new ge({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[Q$,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(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){V(e,i)}}}function X$(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Pd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' Set Admins only',p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[11]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Nd(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Unlock and set custom rule
',p(e,"type","button"),p(e,"class","unlock-overlay svelte-1akuazq"),p(e,"aria-label","Unlock and set custom rule")},m(o,r){w(o,e,r),i=!0,s||(l=Y(e,"click",n[10]),s=!0)},p:x,i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Q$(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,c,d,h,m,g,_,y,S;const C=n[12].beforeLabel,T=Tt(C,n,n[15],Ld),$=n[12].afterLabel,M=Tt($,n,n[15],Id);let O=!n[9]&&Pd(n);function D(q){n[14](q)}var I=n[7];function N(q,B){let Z={id:q[18],baseCollection:q[1],disabled:q[9],placeholder:q[9]?"":q[5]};return q[0]!==void 0&&(Z.value=q[0]),{props:Z}}I&&(h=Nt(I,N(n)),n[13](h),te.push(()=>he(h,"value",D)));let P=n[9]&&Nd(n);const F=n[12].default,R=Tt(F,n,n[15],Ad);return{c(){e=v("div"),t=v("label"),T&&T.c(),i=E(),s=v("span"),l=W(n[2]),o=E(),a=W(r),u=E(),M&&M.c(),f=E(),O&&O.c(),d=E(),h&&z(h.$$.fragment),g=E(),P&&P.c(),_=E(),y=v("div"),R&&R.c(),p(s,"class","txt"),Q(s,"txt-hint",n[9]),p(t,"for",c=n[18]),p(e,"class","input-wrapper svelte-1akuazq"),p(y,"class","help-block")},m(q,B){w(q,e,B),b(e,t),T&&T.m(t,null),b(t,i),b(t,s),b(s,l),b(s,o),b(s,a),b(t,u),M&&M.m(t,null),b(t,f),O&&O.m(t,null),b(e,d),h&&H(h,e,null),b(e,g),P&&P.m(e,null),w(q,_,B),w(q,y,B),R&&R.m(y,null),S=!0},p(q,B){if(T&&T.p&&(!S||B&33280)&&$t(T,C,q,q[15],S?Ct(C,q[15],B,G$):Mt(q[15]),Ld),(!S||B&4)&&le(l,q[2]),(!S||B&512)&&r!==(r=q[9]?"- Admins only":"")&&le(a,r),(!S||B&512)&&Q(s,"txt-hint",q[9]),M&&M.p&&(!S||B&33280)&&$t(M,$,q,q[15],S?Ct($,q[15],B,J$):Mt(q[15]),Id),q[9]?O&&(O.d(1),O=null):O?O.p(q,B):(O=Pd(q),O.c(),O.m(t,null)),(!S||B&262144&&c!==(c=q[18]))&&p(t,"for",c),B&128&&I!==(I=q[7])){if(h){re();const Z=h;L(Z.$$.fragment,1,0,()=>{V(Z,1)}),ae()}I?(h=Nt(I,N(q)),q[13](h),te.push(()=>he(h,"value",D)),z(h.$$.fragment),A(h.$$.fragment,1),H(h,e,g)):h=null}else if(I){const Z={};B&262144&&(Z.id=q[18]),B&2&&(Z.baseCollection=q[1]),B&512&&(Z.disabled=q[9]),B&544&&(Z.placeholder=q[9]?"":q[5]),!m&&B&1&&(m=!0,Z.value=q[0],ve(()=>m=!1)),h.$set(Z)}q[9]?P?(P.p(q,B),B&512&&A(P,1)):(P=Nd(q),P.c(),A(P,1),P.m(e,null)):P&&(re(),L(P,1,1,()=>{P=null}),ae()),R&&R.p&&(!S||B&33280)&&$t(R,F,q,q[15],S?Ct(F,q[15],B,K$):Mt(q[15]),Ad)},i(q){S||(A(T,q),A(M,q),h&&A(h.$$.fragment,q),A(P),A(R,q),S=!0)},o(q){L(T,q),L(M,q),h&&L(h.$$.fragment,q),L(P),L(R,q),S=!1},d(q){q&&(k(e),k(_),k(y)),T&&T.d(q),M&&M.d(q),O&&O.d(),n[13](null),h&&V(h),P&&P.d(),R&&R.d(q)}}}function x$(n){let e,t,i,s;const l=[X$,Z$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},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):(re(),L(o[f],1,1,()=>{o[f]=null}),ae(),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){a&&k(i),o[e].d(a)}}}let Fd;function eM(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,{placeholder:c="Leave empty to grant everyone access..."}=e,d=null,h=null,m=Fd,g=!1;_();async function _(){m||g||(t(8,g=!0),t(7,m=(await ft(()=>import("./FilterAutocompleteInput-288f3849.js"),["./FilterAutocompleteInput-288f3849.js","./index-30dee195.js"],import.meta.url)).default),Fd=m,t(8,g=!1))}async function y(){t(0,r=h||""),await ln(),d==null||d.focus()}async function S(){h=r,t(0,r=null)}function C($){te[$?"unshift":"push"](()=>{d=$,t(6,d)})}function T($){r=$,t(0,r)}return n.$$set=$=>{"collection"in $&&t(1,o=$.collection),"rule"in $&&t(0,r=$.rule),"label"in $&&t(2,a=$.label),"formKey"in $&&t(3,u=$.formKey),"required"in $&&t(4,f=$.required),"placeholder"in $&&t(5,c=$.placeholder),"$$scope"in $&&t(15,l=$.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,m,g,i,y,S,s,C,T,l]}class Ms extends be{constructor(e){super(),_e(this,e,eM,x$,me,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function Rd(n,e,t){const i=n.slice();return i[11]=e[t],i}function qd(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M,O,D,I=pe(n[2]),N=[];for(let P=0;P@request filter:",c=E(),d=v("div"),d.innerHTML="@request.headers.* @request.query.* @request.data.* @request.auth.*",h=E(),m=v("hr"),g=E(),_=v("p"),_.innerHTML="You could also add constraints and query other collections using the @collection filter:",y=E(),S=v("div"),S.innerHTML="@collection.ANY_COLLECTION_NAME.*",C=E(),T=v("hr"),$=E(),M=v("p"),M.innerHTML=`Example rule:
@request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(a,"class","m-t-10 m-b-5"),p(f,"class","m-b-0"),p(d,"class","inline-flex flex-gap-5"),p(m,"class","m-t-10 m-b-5"),p(_,"class","m-b-0"),p(S,"class","inline-flex flex-gap-5"),p(T,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(P,F){w(P,e,F),b(e,t),b(t,i),b(i,s),b(i,l),b(i,o);for(let R=0;R{D&&(O||(O=He(e,lt,{duration:150},!0)),O.run(1))}),D=!0)},o(P){P&&(O||(O=He(e,lt,{duration:150},!1)),O.run(0)),D=!1},d(P){P&&k(e),vt(N,P),P&&O&&O.end()}}}function jd(n){let e,t=n[11]+"",i;return{c(){e=v("code"),i=W(t)},m(s,l){w(s,e,l),b(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&le(i,t)},d(s){s&&k(e)}}}function Hd(n){let e,t,i,s,l,o,r,a,u;function f(_){n[6](_)}let c={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[tM,({isAdminOnly:_})=>({10:_}),({isAdminOnly:_})=>_?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(c.rule=n[0].createRule),e=new Ms({props:c}),te.push(()=>he(e,"rule",f));function d(_){n[7](_)}let h={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(h.rule=n[0].updateRule),s=new Ms({props:h}),te.push(()=>he(s,"rule",d));function m(_){n[8](_)}let g={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(g.rule=n[0].deleteRule),r=new Ms({props:g}),te.push(()=>he(r,"rule",m)),{c(){z(e.$$.fragment),i=E(),z(s.$$.fragment),o=E(),z(r.$$.fragment)},m(_,y){H(e,_,y),w(_,i,y),H(s,_,y),w(_,o,y),H(r,_,y),u=!0},p(_,y){const S={};y&1&&(S.collection=_[0]),y&17408&&(S.$$scope={dirty:y,ctx:_}),!t&&y&1&&(t=!0,S.rule=_[0].createRule,ve(()=>t=!1)),e.$set(S);const C={};y&1&&(C.collection=_[0]),!l&&y&1&&(l=!0,C.rule=_[0].updateRule,ve(()=>l=!1)),s.$set(C);const T={};y&1&&(T.collection=_[0]),!a&&y&1&&(a=!0,T.rule=_[0].deleteRule,ve(()=>a=!1)),r.$set(T)},i(_){u||(A(e.$$.fragment,_),A(s.$$.fragment,_),A(r.$$.fragment,_),u=!0)},o(_){L(e.$$.fragment,_),L(s.$$.fragment,_),L(r.$$.fragment,_),u=!1},d(_){_&&(k(i),k(o)),V(e,_),V(s,_),V(r,_)}}}function Vd(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-information-line link-hint")},m(s,l){w(s,e,l),t||(i=Ce(Be.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&k(e),t=!1,i()}}}function tM(n){let e,t=!n[10]&&Vd();return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=Vd(),t.c(),t.m(e.parentNode,e))},d(i){i&&k(e),t&&t.d(i)}}}function zd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[nM]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new Ms({props:l}),te.push(()=>he(e,"rule",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,ve(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function nM(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. changing the password without requiring to enter the old one, directly updating the verified state or email, etc.`,t=E(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},p:x,d(s){s&&(k(e),k(t),k(i))}}}function iM(n){var F,R;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,h,m,g,_,y,S,C,T,$=n[1]&&qd(n);function M(q){n[4](q)}let O={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(O.rule=n[0].listRule),f=new Ms({props:O}),te.push(()=>he(f,"rule",M));function D(q){n[5](q)}let I={label:"View rule",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(I.rule=n[0].viewRule),h=new Ms({props:I}),te.push(()=>he(h,"rule",D));let N=((F=n[0])==null?void 0:F.type)!=="view"&&Hd(n),P=((R=n[0])==null?void 0:R.type)==="auth"&&zd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the @@ -85,16 +85,16 @@ var l0=Object.defineProperty;var o0=(n,e,t)=>e in n?l0(n,e,{enumerable:!0,config
If your query doesn't have a suitable one, you can use the universal (ROW_NUMBER() OVER()) as id.
  • Expressions must be aliased with a valid formatted field name (eg. - MAX(balance) as maxBalance).
  • `,u=E(),g&&g.c(),f=ye(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(_,y){w(_,e,y),b(e,t),w(_,s,y),h[l].m(_,y),w(_,r,y),w(_,a,y),w(_,u,y),g&&g.m(_,y),w(_,f,y),c=!0},p(_,y){(!c||y&256&&i!==(i=_[8]))&&p(e,"for",i);let S=l;l=m(_),l===S?h[l].p(_,y):(re(),L(h[S],1,1,()=>{h[S]=null}),ae(),o=h[l],o?o.p(_,y):(o=h[l]=d[l](_),o.c()),A(o,1),o.m(r.parentNode,r)),_[3].length?g?g.p(_,y):(g=Ud(_),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(_){c||(A(o),c=!0)},o(_){L(o),c=!1},d(_){_&&(k(e),k(s),k(r),k(a),k(u),k(f)),h[l].d(_),g&&g.d(_)}}}function uM(n){let e,t;return e=new ge({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[aM,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function fM(n,e,t){let i;Ge(n,Mi,c=>t(4,i=c));let{collection:s}=e,l,o=!1,r=[];function a(c){var m;t(3,r=[]);const d=j.getNestedVal(c,"schema",null);if(j.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const h=j.extractColumnsFromQuery((m=s==null?void 0:s.options)==null?void 0:m.query);j.removeByValue(h,"id"),j.removeByValue(h,"created"),j.removeByValue(h,"updated");for(let g in d)for(let _ in d[g]){const y=d[g][_].message,S=h[g]||g;r.push(j.sentenize(S+": "+y))}}Kt(async()=>{t(2,o=!0);try{t(1,l=(await ft(()=>import("./CodeEditor-c7cce7e3.js"),["./CodeEditor-c7cce7e3.js","./index-30dee195.js"],import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function u(c){n.$$.not_equal(s.options.query,c)&&(s.options.query=c,t(0,s))}const f=()=>{r.length&&pi("schema")};return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class cM extends be{constructor(e){super(),_e(this,e,fM,uM,me,{collection:0})}}const dM=n=>({active:n&1}),Yd=n=>({active:n[0]});function Kd(n){let e,t,i;const s=n[15].default,l=Tt(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){w(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&$t(l,s,o,o[14],i?Ct(s,o[14],r,null):Mt(o[14]),null)},i(o){i||(A(l,o),o&&xe(()=>{i&&(t||(t=He(e,lt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){L(l,o),o&&(t||(t=He(e,lt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),o&&t&&t.end()}}}function pM(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Tt(a,n,n[14],Yd);let f=n[0]&&Kd(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=E(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){w(c,e,d),b(e,t),u&&u.m(t,null),b(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[Y(t,"click",Ze(n[17])),Y(t,"drop",Ze(n[18])),Y(t,"dragstart",n[19]),Y(t,"dragenter",n[20]),Y(t,"dragleave",n[21]),Y(t,"dragover",Ze(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&$t(u,a,c,c[14],l?Ct(a,c[14],d,dM):Mt(c[14]),Yd),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Kd(c),f.c(),A(f,1),f.m(e,null)):f&&(re(),L(f,1,1,()=>{f=null}),ae()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){L(u,c),L(f),l=!1},d(c){c&&k(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,$e(r)}}}function hM(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=pt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,h=!1;function m(){return!!f}function g(){S(),t(0,f=!0),l("expand")}function _(){t(0,f=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),f?_():g()}function S(){if(d&&o.closest(".accordions")){const N=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const P of N)P.click()}}Kt(()=>()=>clearTimeout(r));function C(N){Re.call(this,n,N)}const T=()=>c&&y(),$=N=>{u&&(t(7,h=!1),S(),l("drop",N))},M=N=>u&&l("dragstart",N),O=N=>{u&&(t(7,h=!0),l("dragenter",N))},D=N=>{u&&(t(7,h=!1),l("dragleave",N))};function I(N){te[N?"unshift":"push"](()=>{o=N,t(6,o)})}return n.$$set=N=>{"class"in N&&t(1,a=N.class),"draggable"in N&&t(2,u=N.draggable),"active"in N&&t(0,f=N.active),"interactive"in N&&t(3,c=N.interactive),"single"in N&&t(9,d=N.single),"$$scope"in N&&t(14,s=N.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,c,y,S,o,h,l,d,m,g,_,r,s,i,C,T,$,M,O,D,I]}class po extends be{constructor(e){super(),_e(this,e,hM,pM,me,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function mM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowUsernameAuth,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function gM(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[mM,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function _M(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function bM(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Jd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function vM(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowUsernameAuth?bM:_M}let a=r(n),u=a(n),f=n[3]&&Jd();return{c(){e=v("div"),e.innerHTML=' Username/Password',t=E(),i=v("div"),s=E(),u.c(),l=E(),f&&f.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){w(c,e,d),w(c,t,d),w(c,i,d),w(c,s,d),u.m(c,d),w(c,l,d),f&&f.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(l.parentNode,l))),c[3]?f?d&8&&A(f,1):(f=Jd(),f.c(),A(f,1),f.m(o.parentNode,o)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(s),k(l),k(o)),u.d(c),f&&f.d(c)}}}function yM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowEmailAuth,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Gd(n){let e,t,i,s,l,o,r,a;return i=new ge({props:{class:"form-field "+(j.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[kM,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+(j.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[wM,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){w(u,e,f),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(j.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(j.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&xe(()=>{a&&(r||(r=He(e,lt,{duration:150},!0)),r.run(1))}),a=!0)},o(u){L(i.$$.fragment,u),L(o.$$.fragment,u),u&&(r||(r=He(e,lt,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&k(e),V(i),V(o),u&&r&&r.end()}}}function kM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(_){n[7](_)}let g={id:n[12],disabled:!j.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new qs({props:g}),te.push(()=>he(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),H(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=Ce(Be.call(null,s,{text:`Email domains that are NOT allowed to sign up. + MAX(balance) as maxBalance).`,u=E(),g&&g.c(),f=ye(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(_,y){w(_,e,y),b(e,t),w(_,s,y),h[l].m(_,y),w(_,r,y),w(_,a,y),w(_,u,y),g&&g.m(_,y),w(_,f,y),c=!0},p(_,y){(!c||y&256&&i!==(i=_[8]))&&p(e,"for",i);let S=l;l=m(_),l===S?h[l].p(_,y):(re(),L(h[S],1,1,()=>{h[S]=null}),ae(),o=h[l],o?o.p(_,y):(o=h[l]=d[l](_),o.c()),A(o,1),o.m(r.parentNode,r)),_[3].length?g?g.p(_,y):(g=Ud(_),g.c(),g.m(f.parentNode,f)):g&&(g.d(1),g=null)},i(_){c||(A(o),c=!0)},o(_){L(o),c=!1},d(_){_&&(k(e),k(s),k(r),k(a),k(u),k(f)),h[l].d(_),g&&g.d(_)}}}function uM(n){let e,t;return e=new ge({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[aM,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function fM(n,e,t){let i;Ge(n,Mi,c=>t(4,i=c));let{collection:s}=e,l,o=!1,r=[];function a(c){var m;t(3,r=[]);const d=j.getNestedVal(c,"schema",null);if(j.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const h=j.extractColumnsFromQuery((m=s==null?void 0:s.options)==null?void 0:m.query);j.removeByValue(h,"id"),j.removeByValue(h,"created"),j.removeByValue(h,"updated");for(let g in d)for(let _ in d[g]){const y=d[g][_].message,S=h[g]||g;r.push(j.sentenize(S+": "+y))}}Kt(async()=>{t(2,o=!0);try{t(1,l=(await ft(()=>import("./CodeEditor-c648ece6.js"),["./CodeEditor-c648ece6.js","./index-30dee195.js"],import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function u(c){n.$$.not_equal(s.options.query,c)&&(s.options.query=c,t(0,s))}const f=()=>{r.length&&pi("schema")};return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class cM extends be{constructor(e){super(),_e(this,e,fM,uM,me,{collection:0})}}const dM=n=>({active:n&1}),Yd=n=>({active:n[0]});function Kd(n){let e,t,i;const s=n[15].default,l=Tt(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){w(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&$t(l,s,o,o[14],i?Ct(s,o[14],r,null):Mt(o[14]),null)},i(o){i||(A(l,o),o&&xe(()=>{i&&(t||(t=He(e,lt,{duration:150},!0)),t.run(1))}),i=!0)},o(o){L(l,o),o&&(t||(t=He(e,lt,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),o&&t&&t.end()}}}function pM(n){let e,t,i,s,l,o,r;const a=n[15].header,u=Tt(a,n,n[14],Yd);let f=n[0]&&Kd(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=E(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){w(c,e,d),b(e,t),u&&u.m(t,null),b(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[Y(t,"click",Ze(n[17])),Y(t,"drop",Ze(n[18])),Y(t,"dragstart",n[19]),Y(t,"dragenter",n[20]),Y(t,"dragleave",n[21]),Y(t,"dragover",Ze(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&$t(u,a,c,c[14],l?Ct(a,c[14],d,dM):Mt(c[14]),Yd),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Kd(c),f.c(),A(f,1),f.m(e,null)):f&&(re(),L(f,1,1,()=>{f=null}),ae()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){L(u,c),L(f),l=!1},d(c){c&&k(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,$e(r)}}}function hM(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=pt();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,h=!1;function m(){return!!f}function g(){S(),t(0,f=!0),l("expand")}function _(){t(0,f=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),f?_():g()}function S(){if(d&&o.closest(".accordions")){const N=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const P of N)P.click()}}Kt(()=>()=>clearTimeout(r));function C(N){Re.call(this,n,N)}const T=()=>c&&y(),$=N=>{u&&(t(7,h=!1),S(),l("drop",N))},M=N=>u&&l("dragstart",N),O=N=>{u&&(t(7,h=!0),l("dragenter",N))},D=N=>{u&&(t(7,h=!1),l("dragleave",N))};function I(N){te[N?"unshift":"push"](()=>{o=N,t(6,o)})}return n.$$set=N=>{"class"in N&&t(1,a=N.class),"draggable"in N&&t(2,u=N.draggable),"active"in N&&t(0,f=N.active),"interactive"in N&&t(3,c=N.interactive),"single"in N&&t(9,d=N.single),"$$scope"in N&&t(14,s=N.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,c,y,S,o,h,l,d,m,g,_,r,s,i,C,T,$,M,O,D,I]}class po extends be{constructor(e){super(),_e(this,e,hM,pM,me,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function mM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowUsernameAuth,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function gM(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[mM,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function _M(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function bM(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Jd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function vM(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowUsernameAuth?bM:_M}let a=r(n),u=a(n),f=n[3]&&Jd();return{c(){e=v("div"),e.innerHTML=' Username/Password',t=E(),i=v("div"),s=E(),u.c(),l=E(),f&&f.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){w(c,e,d),w(c,t,d),w(c,i,d),w(c,s,d),u.m(c,d),w(c,l,d),f&&f.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(l.parentNode,l))),c[3]?f?d&8&&A(f,1):(f=Jd(),f.c(),A(f,1),f.m(o.parentNode,o)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(s),k(l),k(o)),u.d(c),f&&f.d(c)}}}function yM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowEmailAuth,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Gd(n){let e,t,i,s,l,o,r,a;return i=new ge({props:{class:"form-field "+(j.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[kM,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+(j.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[wM,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){w(u,e,f),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(j.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(j.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&xe(()=>{a&&(r||(r=He(e,lt,{duration:150},!0)),r.run(1))}),a=!0)},o(u){L(i.$$.fragment,u),L(o.$$.fragment,u),u&&(r||(r=He(e,lt,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&k(e),V(i),V(o),u&&r&&r.end()}}}function kM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(_){n[7](_)}let g={id:n[12],disabled:!j.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new qs({props:g}),te.push(()=>he(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),H(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=Ce(Be.call(null,s,{text:`Email domains that are NOT allowed to sign up. This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&4096&&l!==(l=_[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=_[12]),y&1&&(S.disabled=!j.isEmpty(_[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.exceptEmailDomains,ve(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){L(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),V(r,_),d=!1,h()}}}function wM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(_){n[8](_)}let g={id:n[12],disabled:!j.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new qs({props:g}),te.push(()=>he(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(_,y){w(_,e,y),b(e,t),b(e,i),b(e,s),w(_,o,y),H(r,_,y),w(_,u,y),w(_,f,y),c=!0,d||(h=Ce(Be.call(null,s,{text:`Email domains that are ONLY allowed to sign up. This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(_,y){(!c||y&4096&&l!==(l=_[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=_[12]),y&1&&(S.disabled=!j.isEmpty(_[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,S.value=_[0].options.onlyEmailDomains,ve(()=>a=!1)),r.$set(S)},i(_){c||(A(r.$$.fragment,_),c=!0)},o(_){L(r.$$.fragment,_),c=!1},d(_){_&&(k(e),k(o),k(u),k(f)),V(r,_),d=!1,h()}}}function SM(n){let e,t,i,s;e=new ge({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[yM,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Gd(n);return{c(){z(e.$$.fragment),t=E(),l&&l.c(),i=ye()},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&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=Gd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){o&&(k(t),k(i)),V(e,o),l&&l.d(o)}}}function TM(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function CM(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Zd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function $M(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowEmailAuth?CM:TM}let a=r(n),u=a(n),f=n[2]&&Zd();return{c(){e=v("div"),e.innerHTML=' Email/Password',t=E(),i=v("div"),s=E(),u.c(),l=E(),f&&f.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){w(c,e,d),w(c,t,d),w(c,i,d),w(c,s,d),u.m(c,d),w(c,l,d),f&&f.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(l.parentNode,l))),c[2]?f?d&4&&A(f,1):(f=Zd(),f.c(),A(f,1),f.m(o.parentNode,o)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(s),k(l),k(o)),u.d(c),f&&f.d(c)}}}function MM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowOAuth2Auth,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Xd(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='
    ',p(e,"class","block")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&xe(()=>{i&&(t||(t=He(e,lt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=He(e,lt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function OM(n){let e,t,i,s;e=new ge({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[MM,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Xd();return{c(){z(e.$$.fragment),t=E(),l&&l.c(),i=ye()},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&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=Xd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){L(e.$$.fragment,o),L(l),s=!1},d(o){o&&(k(t),k(i)),V(e,o),l&&l.d(o)}}}function EM(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function DM(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Qd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function AM(n){let e,t,i,s,l,o;function r(c,d){return c[0].options.allowOAuth2Auth?DM:EM}let a=r(n),u=a(n),f=n[1]&&Qd();return{c(){e=v("div"),e.innerHTML=' OAuth2',t=E(),i=v("div"),s=E(),u.c(),l=E(),f&&f.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(c,d){w(c,e,d),w(c,t,d),w(c,i,d),w(c,s,d),u.m(c,d),w(c,l,d),f&&f.m(c,d),w(c,o,d)},p(c,d){a!==(a=r(c))&&(u.d(1),u=a(c),u&&(u.c(),u.m(l.parentNode,l))),c[1]?f?d&2&&A(f,1):(f=Qd(),f.c(),A(f,1),f.m(o.parentNode,o)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(t),k(i),k(s),k(l),k(o)),u.d(c),f&&f.d(c)}}}function IM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Minimum password length"),s=E(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].options.minPasswordLength),r||(a=Y(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&yt(l.value)!==u[0].options.minPasswordLength&&de(l,u[0].options.minPasswordLength)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function LM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Always require email",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){w(c,e,d),e.checked=n[0].options.requireEmail,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[11]),Ce(Be.call(null,r,{text:`The constraint is applied only for new records. Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function PM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y;return s=new po({props:{single:!0,$$slots:{header:[vM],default:[gM]},$$scope:{ctx:n}}}),o=new po({props:{single:!0,$$slots:{header:[$M],default:[SM]},$$scope:{ctx:n}}}),a=new po({props:{single:!0,$$slots:{header:[AM],default:[OM]},$$scope:{ctx:n}}}),m=new ge({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[IM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),_=new ge({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[LM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=E(),i=v("div"),z(s.$$.fragment),l=E(),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),f=v("hr"),c=E(),d=v("h4"),d.textContent="General",h=E(),z(m.$$.fragment),g=E(),z(_.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(S,C){w(S,e,C),w(S,t,C),w(S,i,C),H(s,i,null),b(i,l),H(o,i,null),b(i,r),H(a,i,null),w(S,u,C),w(S,f,C),w(S,c,C),w(S,d,C),w(S,h,C),H(m,S,C),w(S,g,C),H(_,S,C),y=!0},p(S,[C]){const T={};C&8201&&(T.$$scope={dirty:C,ctx:S}),s.$set(T);const $={};C&8197&&($.$$scope={dirty:C,ctx:S}),o.$set($);const M={};C&8195&&(M.$$scope={dirty:C,ctx:S}),a.$set(M);const O={};C&12289&&(O.$$scope={dirty:C,ctx:S}),m.$set(O);const D={};C&12289&&(D.$$scope={dirty:C,ctx:S}),_.$set(D)},i(S){y||(A(s.$$.fragment,S),A(o.$$.fragment,S),A(a.$$.fragment,S),A(m.$$.fragment,S),A(_.$$.fragment,S),y=!0)},o(S){L(s.$$.fragment,S),L(o.$$.fragment,S),L(a.$$.fragment,S),L(m.$$.fragment,S),L(_.$$.fragment,S),y=!1},d(S){S&&(k(e),k(t),k(i),k(u),k(f),k(c),k(d),k(h),k(g)),V(s),V(o),V(a),V(m,S),V(_,S)}}}function NM(n,e,t){let i,s,l,o;Ge(n,Mi,g=>t(4,o=g));let{collection:r}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(g){n.$$.not_equal(r.options.exceptEmailDomains,g)&&(r.options.exceptEmailDomains=g,t(0,r))}function c(g){n.$$.not_equal(r.options.onlyEmailDomains,g)&&(r.options.onlyEmailDomains=g,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function h(){r.options.minPasswordLength=yt(this.value),t(0,r)}function m(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=g=>{"collection"in g&&t(0,r=g.collection)},n.$$.update=()=>{var g,_,y,S;n.$$.dirty&1&&r.type==="auth"&&j.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!j.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.allowEmailAuth)||!j.isEmpty((_=o==null?void 0:o.options)==null?void 0:_.onlyEmailDomains)||!j.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!j.isEmpty((S=o==null?void 0:o.options)==null?void 0:S.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,h,m]}class FM extends be{constructor(e){super(),_e(this,e,NM,PM,me,{collection:0})}}function xd(n,e,t){const i=n.slice();return i[18]=e[t],i}function ep(n,e,t){const i=n.slice();return i[18]=e[t],i}function tp(n,e,t){const i=n.slice();return i[18]=e[t],i}function np(n){let e;return{c(){e=v("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 ip(n){let e,t,i,s,l=n[3]&&sp(n),o=!n[4]&&lp(n);return{c(){e=v("h6"),e.textContent="Changes:",t=E(),i=v("ul"),l&&l.c(),s=E(),o&&o.c(),p(i,"class","changes-list svelte-xqpcsf")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),l&&l.m(i,null),b(i,s),o&&o.m(i,null)},p(r,a){r[3]?l?l.p(r,a):(l=sp(r),l.c(),l.m(i,s)):l&&(l.d(1),l=null),r[4]?o&&(o.d(1),o=null):o?o.p(r,a):(o=lp(r),o.c(),o.m(i,null))},d(r){r&&(k(e),k(t),k(i)),l&&l.d(),o&&o.d()}}}function sp(n){var h,m;let e,t,i,s,l=((h=n[1])==null?void 0:h.name)+"",o,r,a,u,f,c=((m=n[2])==null?void 0:m.name)+"",d;return{c(){e=v("li"),t=v("div"),i=W(`Renamed collection `),s=v("strong"),o=W(l),r=E(),a=v("i"),u=E(),f=v("strong"),d=W(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"),p(e,"class","svelte-xqpcsf")},m(g,_){w(g,e,_),b(e,t),b(t,i),b(t,s),b(s,o),b(t,r),b(t,a),b(t,u),b(t,f),b(f,d)},p(g,_){var y,S;_&2&&l!==(l=((y=g[1])==null?void 0:y.name)+"")&&le(o,l),_&4&&c!==(c=((S=g[2])==null?void 0:S.name)+"")&&le(d,c)},d(g){g&&k(e)}}}function lp(n){let e,t,i,s=pe(n[6]),l=[];for(let f=0;f',i=E(),s=v("div"),l=v("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query, - you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=ye(),p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),u&&u.m(s,null),w(c,r,d),f&&f.m(c,d),w(c,a,d)},p(c,d){c[7].length?u||(u=np(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),c[9]?f?f.p(c,d):(f=ip(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&(k(e),k(r),k(a)),u&&u.d(),f&&f.d(c)}}}function qM(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function jM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Cancel',t=E(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[Y(e,"click",n[12]),Y(i,"click",n[13])],s=!0)},p:x,d(o){o&&(k(e),k(t),k(i)),s=!1,$e(l)}}}function HM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[jM],header:[qM],default:[RM]},$$scope:{ctx:n}};return e=new rn({props:i}),n[14](e),e.$on("hide",n[15]),e.$on("show",n[16]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&33555422&&(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[14](null),V(e,s)}}}function VM(n,e,t){let i,s,l,o,r,a;const u=pt();let f,c,d;async function h($,M){t(1,c=$),t(2,d=M),await ln(),i||l.length||o.length||r.length?f==null||f.show():g()}function m(){f==null||f.hide()}function g(){m(),u("confirm")}const _=()=>m(),y=()=>g();function S($){te[$?"unshift":"push"](()=>{f=$,t(5,f)})}function C($){Re.call(this,n,$)}function T($){Re.call(this,n,$)}return n.$$.update=()=>{var $,M,O;n.$$.dirty&6&&t(3,i=(c==null?void 0:c.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(4,s=(d==null?void 0:d.type)==="view"),n.$$.dirty&4&&t(8,l=(($=d==null?void 0:d.schema)==null?void 0:$.filter(D=>D.id&&!D.toDelete&&D.originalName!=D.name))||[]),n.$$.dirty&4&&t(7,o=((M=d==null?void 0:d.schema)==null?void 0:M.filter(D=>D.id&&D.toDelete))||[]),n.$$.dirty&6&&t(6,r=((O=d==null?void 0:d.schema)==null?void 0:O.filter(D=>{var N,P,F;const I=(N=c==null?void 0:c.schema)==null?void 0:N.find(R=>R.id==D.id);return I?((P=I.options)==null?void 0:P.maxSelect)!=1&&((F=D.options)==null?void 0:F.maxSelect)==1:!1}))||[]),n.$$.dirty&24&&t(9,a=!s||i)},[m,c,d,i,s,f,r,o,l,a,g,h,_,y,S,C,T]}class zM extends be{constructor(e){super(),_e(this,e,VM,HM,me,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function up(n,e,t){const i=n.slice();return i[49]=e[t][0],i[50]=e[t][1],i}function BM(n){let e,t,i;function s(o){n[35](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new Y$({props:l}),te.push(()=>he(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ve(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function UM(n){let e,t,i;function s(o){n[34](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new cM({props:l}),te.push(()=>he(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ve(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function fp(n){let e,t,i,s;function l(r){n[36](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new lM({props:o}),te.push(()=>he(t,"collection",l)),{c(){e=v("div"),z(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],ve(()=>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),V(t)}}}function cp(n){let e,t,i,s;function l(r){n[37](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new FM({props:o}),te.push(()=>he(t,"collection",l)),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===Ls)},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],ve(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&Q(e,"active",r[3]===Ls)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){L(t.$$.fragment,r),s=!1},d(r){r&&k(e),V(t)}}}function WM(n){let e,t,i,s,l,o,r;const a=[UM,BM],u=[];function f(h,m){return h[14]?0:1}i=f(n),s=u[i]=a[i](n);let c=n[3]===kl&&fp(n),d=n[15]&&cp(n);return{c(){e=v("div"),t=v("div"),s.c(),l=E(),c&&c.c(),o=E(),d&&d.c(),p(t,"class","tab-item"),Q(t,"active",n[3]===ji),p(e,"class","tabs-content svelte-12y0yzb")},m(h,m){w(h,e,m),b(e,t),u[i].m(t,null),b(e,l),c&&c.m(e,null),b(e,o),d&&d.m(e,null),r=!0},p(h,m){let g=i;i=f(h),i===g?u[i].p(h,m):(re(),L(u[g],1,1,()=>{u[g]=null}),ae(),s=u[i],s?s.p(h,m):(s=u[i]=a[i](h),s.c()),A(s,1),s.m(t,null)),(!r||m[0]&8)&&Q(t,"active",h[3]===ji),h[3]===kl?c?(c.p(h,m),m[0]&8&&A(c,1)):(c=fp(h),c.c(),A(c,1),c.m(e,o)):c&&(re(),L(c,1,1,()=>{c=null}),ae()),h[15]?d?(d.p(h,m),m[0]&32768&&A(d,1)):(d=cp(h),d.c(),A(d,1),d.m(e,null)):d&&(re(),L(d,1,1,()=>{d=null}),ae())},i(h){r||(A(s),A(c),A(d),r=!0)},o(h){L(s),L(c),L(d),r=!1},d(h){h&&k(e),u[i].d(),c&&c.d(),d&&d.d()}}}function dp(n){let e,t,i,s,l,o,r;return o=new Pn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[YM]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),i=v("button"),s=v("i"),l=E(),z(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"aria-label","More"),p(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),b(i,s),b(i,l),H(o,i,null),r=!0},p(a,u){const f={};u[1]&4194304&&(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),k(t),k(i)),V(o)}}}function YM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=' Duplicate',t=E(),i=v("button"),i.innerHTML=' Delete',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[Y(e,"click",n[26]),Y(i,"click",Sn(Ze(n[27])))],s=!0)},p:x,d(o){o&&(k(e),k(t),k(i)),s=!1,$e(l)}}}function pp(n){let e,t,i,s;return i=new Pn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[KM]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=E(),z(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){w(l,e,o),w(l,t,o),H(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&4194304&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&(k(e),k(t)),V(i,l)}}}function hp(n){let e,t,i,s,l,o=n[50]+"",r,a,u,f,c;function d(){return n[29](n[49])}return{c(){e=v("button"),t=v("i"),s=E(),l=v("span"),r=W(o),a=W(" collection"),u=E(),p(t,"class",i=ii(j.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),Q(e,"selected",n[49]==n[2].type)},m(h,m){w(h,e,m),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),b(e,u),f||(c=Y(e,"click",d),f=!0)},p(h,m){n=h,m[0]&64&&i!==(i=ii(j.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb")&&p(t,"class",i),m[0]&64&&o!==(o=n[50]+"")&&le(r,o),m[0]&68&&Q(e,"selected",n[49]==n[2].type)},d(h){h&&k(e),f=!1,c()}}}function KM(n){let e,t=pe(Object.entries(n[6])),i=[];for(let s=0;s{P=null}),ae()):P?(P.p(R,q),q[0]&4&&A(P,1)):(P=pp(R),P.c(),A(P,1),P.m(d,null)),(!D||q[0]&4&&T!==(T="btn btn-sm p-r-10 p-l-10 "+(R[2].id?"btn-transparent":"btn-outline")))&&p(d,"class",T),(!D||q[0]&4&&$!==($=!!R[2].id))&&(d.disabled=$),R[2].system?F||(F=mp(),F.c(),F.m(O.parentNode,O)):F&&(F.d(1),F=null)},i(R){D||(A(P),D=!0)},o(R){L(P),D=!1},d(R){R&&(k(e),k(s),k(l),k(f),k(c),k(M),k(O)),P&&P.d(),F&&F.d(R),I=!1,N()}}}function gp(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){w(r,e,a),s=!0,l||(o=Ce(t=Be.call(null,e,n[11])),l=!0)},p(r,a){t&&Et(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&xe(()=>{s&&(i||(i=He(e,Qt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=He(e,Qt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function _p(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function bp(n){var a,u,f;let e,t,i,s=!j.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&vp();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=E(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),Q(e,"active",n[3]===Ls)},m(c,d){w(c,e,d),b(e,t),b(e,i),r&&r.m(e,null),l||(o=Y(e,"click",n[33]),l=!0)},p(c,d){var h,m,g;d[0]&32&&(s=!j.isEmpty((h=c[5])==null?void 0:h.options)&&!((g=(m=c[5])==null?void 0:m.options)!=null&&g.manageRule)),s?r?d[0]&32&&A(r,1):(r=vp(),r.c(),A(r,1),r.m(e,null)):r&&(re(),L(r,1,1,()=>{r=null}),ae()),d[0]&8&&Q(e,"active",c[3]===Ls)},d(c){c&&k(e),r&&r.d(),l=!1,o()}}}function vp(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function GM(n){var B,Z,X,J,U,oe,ee;let e,t=n[2].id?"Edit collection":"New collection",i,s,l,o,r,a,u,f,c,d,h,m=n[14]?"Query":"Fields",g,_,y=!j.isEmpty(n[11]),S,C,T,$,M=!j.isEmpty((B=n[5])==null?void 0:B.listRule)||!j.isEmpty((Z=n[5])==null?void 0:Z.viewRule)||!j.isEmpty((X=n[5])==null?void 0:X.createRule)||!j.isEmpty((J=n[5])==null?void 0:J.updateRule)||!j.isEmpty((U=n[5])==null?void 0:U.deleteRule)||!j.isEmpty((ee=(oe=n[5])==null?void 0:oe.options)==null?void 0:ee.manageRule),O,D,I,N,P=!!n[2].id&&!n[2].system&&dp(n);r=new ge({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[JM,({uniqueId:se})=>({48:se}),({uniqueId:se})=>[0,se?131072:0]]},$$scope:{ctx:n}}});let F=y&&gp(n),R=M&&_p(),q=n[15]&&bp(n);return{c(){e=v("h4"),i=W(t),s=E(),P&&P.c(),l=E(),o=v("form"),z(r.$$.fragment),a=E(),u=v("input"),f=E(),c=v("div"),d=v("button"),h=v("span"),g=W(m),_=E(),F&&F.c(),S=E(),C=v("button"),T=v("span"),T.textContent="API Rules",$=E(),R&&R.c(),O=E(),q&&q.c(),p(e,"class","upsert-panel-title svelte-12y0yzb"),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),Q(d,"active",n[3]===ji),p(T,"class","txt"),p(C,"type","button"),p(C,"class","tab-item"),Q(C,"active",n[3]===kl),p(c,"class","tabs-header stretched")},m(se,Ee){w(se,e,Ee),b(e,i),w(se,s,Ee),P&&P.m(se,Ee),w(se,l,Ee),w(se,o,Ee),H(r,o,null),b(o,a),b(o,u),w(se,f,Ee),w(se,c,Ee),b(c,d),b(d,h),b(h,g),b(d,_),F&&F.m(d,null),b(c,S),b(c,C),b(C,T),b(C,$),R&&R.m(C,null),b(c,O),q&&q.m(c,null),D=!0,I||(N=[Y(o,"submit",Ze(n[30])),Y(d,"click",n[31]),Y(C,"click",n[32])],I=!0)},p(se,Ee){var Ve,We,ke,Me,Je,dt,Se;(!D||Ee[0]&4)&&t!==(t=se[2].id?"Edit collection":"New collection")&&le(i,t),se[2].id&&!se[2].system?P?(P.p(se,Ee),Ee[0]&4&&A(P,1)):(P=dp(se),P.c(),A(P,1),P.m(l.parentNode,l)):P&&(re(),L(P,1,1,()=>{P=null}),ae());const qe={};Ee[0]&8192&&(qe.class="form-field collection-field-name required m-b-0 "+(se[13]?"disabled":"")),Ee[0]&41028|Ee[1]&4325376&&(qe.$$scope={dirty:Ee,ctx:se}),r.$set(qe),(!D||Ee[0]&16384)&&m!==(m=se[14]?"Query":"Fields")&&le(g,m),Ee[0]&2048&&(y=!j.isEmpty(se[11])),y?F?(F.p(se,Ee),Ee[0]&2048&&A(F,1)):(F=gp(se),F.c(),A(F,1),F.m(d,null)):F&&(re(),L(F,1,1,()=>{F=null}),ae()),(!D||Ee[0]&8)&&Q(d,"active",se[3]===ji),Ee[0]&32&&(M=!j.isEmpty((Ve=se[5])==null?void 0:Ve.listRule)||!j.isEmpty((We=se[5])==null?void 0:We.viewRule)||!j.isEmpty((ke=se[5])==null?void 0:ke.createRule)||!j.isEmpty((Me=se[5])==null?void 0:Me.updateRule)||!j.isEmpty((Je=se[5])==null?void 0:Je.deleteRule)||!j.isEmpty((Se=(dt=se[5])==null?void 0:dt.options)==null?void 0:Se.manageRule)),M?R?Ee[0]&32&&A(R,1):(R=_p(),R.c(),A(R,1),R.m(C,null)):R&&(re(),L(R,1,1,()=>{R=null}),ae()),(!D||Ee[0]&8)&&Q(C,"active",se[3]===kl),se[15]?q?q.p(se,Ee):(q=bp(se),q.c(),q.m(c,null)):q&&(q.d(1),q=null)},i(se){D||(A(P),A(r.$$.fragment,se),A(F),A(R),D=!0)},o(se){L(P),L(r.$$.fragment,se),L(F),L(R),D=!1},d(se){se&&(k(e),k(s),k(l),k(o),k(f),k(c)),P&&P.d(se),V(r),F&&F.d(),R&&R.d(),q&&q.d(),I=!1,$e(N)}}}function ZM(n){let e,t,i,s,l,o=n[2].id?"Save changes":"Create",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),r=W(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],Q(s,"btn-loading",n[9])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(l,r),u||(f=[Y(e,"click",n[24]),Y(s,"click",n[25])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].id?"Save changes":"Create")&&le(r,o),d[0]&4608&&a!==(a=!c[12]||c[9])&&(s.disabled=a),d[0]&512&&Q(s,"btn-loading",c[9])},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function XM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[38],$$slots:{footer:[ZM],header:[GM],default:[WM]},$$scope:{ctx:n}};e=new rn({props:l}),n[39](e),e.$on("hide",n[40]),e.$on("show",n[41]);let o={};return i=new zM({props:o}),n[42](i),i.$on("confirm",n[43]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(r,a){H(e,r,a),w(r,t,a),H(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[38]),a[0]&64108|a[1]&4194304&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){L(e.$$.fragment,r),L(i.$$.fragment,r),s=!1},d(r){r&&k(t),n[39](null),V(e,r),n[42](null),V(i,r)}}}const ji="schema",kl="api_rules",Ls="options",QM="base",yp="auth",kp="view";function Rr(n){return JSON.stringify(n)}function xM(n,e,t){let i,s,l,o,r,a;Ge(n,Mi,ne=>t(5,a=ne));const u={};u[QM]="Base",u[kp]="View",u[yp]="Auth";const f=pt();let c,d,h=null,m=j.initCollection(),g=!1,_=!1,y=ji,S=Rr(m),C="";function T(ne){t(3,y=ne)}function $(ne){return O(ne),t(10,_=!0),T(ji),c==null?void 0:c.show()}function M(){return c==null?void 0:c.hide()}async function O(ne){on({}),typeof ne<"u"?(t(22,h=ne),t(2,m=structuredClone(ne))):(t(22,h=null),t(2,m=j.initCollection())),t(2,m.schema=m.schema||[],m),t(2,m.originalName=m.name||"",m),await ln(),t(23,S=Rr(m))}function D(){m.id?d==null||d.show(h,m):I()}function I(){if(g)return;t(9,g=!0);const ne=N();let Ne;m.id?Ne=ce.collections.update(m.id,ne):Ne=ce.collections.create(ne),Ne.then(Te=>{La(),ek(Te),t(10,_=!1),M(),zt(m.id?"Successfully updated collection.":"Successfully created collection."),f("save",{isNew:!m.id,collection:Te})}).catch(Te=>{ce.error(Te)}).finally(()=>{t(9,g=!1)})}function N(){const ne=Object.assign({},m);ne.schema=ne.schema.slice(0);for(let Ne=ne.schema.length-1;Ne>=0;Ne--)ne.schema[Ne].toDelete&&ne.schema.splice(Ne,1);return ne}function P(){h!=null&&h.id&&_n(`Do you really want to delete collection "${h.name}" and all its records?`,()=>ce.collections.delete(h.id).then(()=>{M(),zt(`Successfully deleted collection "${h.name}".`),f("delete",h),tk(h)}).catch(ne=>{ce.error(ne)}))}function F(ne){t(2,m.type=ne,m),pi("schema")}function R(){o?_n("You have unsaved changes. Do you really want to discard them?",()=>{q()}):q()}async function q(){const ne=h?structuredClone(h):null;if(ne){if(ne.id="",ne.created="",ne.updated="",ne.name+="_duplicate",!j.isEmpty(ne.schema))for(const Ne of ne.schema)Ne.id="";if(!j.isEmpty(ne.indexes))for(let Ne=0;NeM(),Z=()=>D(),X=()=>R(),J=()=>P(),U=ne=>{t(2,m.name=j.slugify(ne.target.value),m),ne.target.value=m.name},oe=ne=>F(ne),ee=()=>{r&&D()},se=()=>T(ji),Ee=()=>T(kl),qe=()=>T(Ls);function Ve(ne){m=ne,t(2,m),t(22,h)}function We(ne){m=ne,t(2,m),t(22,h)}function ke(ne){m=ne,t(2,m),t(22,h)}function Me(ne){m=ne,t(2,m),t(22,h)}const Je=()=>o&&_?(_n("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,_=!1),M()}),!1):!0;function dt(ne){te[ne?"unshift":"push"](()=>{c=ne,t(7,c)})}function Se(ne){Re.call(this,n,ne)}function we(ne){Re.call(this,n,ne)}function Ue(ne){te[ne?"unshift":"push"](()=>{d=ne,t(8,d)})}const nt=()=>I();return n.$$.update=()=>{var ne,Ne;n.$$.dirty[0]&4&&m.type==="view"&&(t(2,m.createRule=null,m),t(2,m.updateRule=null,m),t(2,m.deleteRule=null,m),t(2,m.indexes=[],m)),n.$$.dirty[0]&4194308&&m.name&&(h==null?void 0:h.name)!=m.name&&m.indexes.length>0&&t(2,m.indexes=(ne=m.indexes)==null?void 0:ne.map(Te=>j.replaceIndexTableName(Te,m.name)),m),n.$$.dirty[0]&4&&t(15,i=m.type===yp),n.$$.dirty[0]&4&&t(14,s=m.type===kp),n.$$.dirty[0]&32&&(a.schema||(Ne=a.options)!=null&&Ne.query?t(11,C=j.getNestedVal(a,"schema.message")||"Has errors"):t(11,C="")),n.$$.dirty[0]&4&&t(13,l=!!m.id&&m.system),n.$$.dirty[0]&8388612&&t(4,o=S!=Rr(m)),n.$$.dirty[0]&20&&t(12,r=!m.id||o),n.$$.dirty[0]&12&&y===Ls&&m.type!=="auth"&&T(ji)},[T,M,m,y,o,a,u,c,d,g,_,C,r,l,s,i,D,I,P,F,R,$,h,S,B,Z,X,J,U,oe,ee,se,Ee,qe,Ve,We,ke,Me,Je,dt,Se,we,Ue,nt]}class ru extends be{constructor(e){super(),_e(this,e,xM,XM,me,{changeTab:0,show:21,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[21]}get hide(){return this.$$.ctx[1]}}function e6(n){let e;return{c(){e=v("i"),p(e,"class","ri-pushpin-line m-l-auto svelte-1u3ag8h")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function t6(n){let e;return{c(){e=v("i"),p(e,"class","ri-unpin-line svelte-1u3ag8h")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function n6(n){let e,t,i,s,l,o=n[0].name+"",r,a,u,f,c,d,h,m;function g(S,C){return S[1]?t6:e6}let _=g(n),y=_(n);return{c(){var S;e=v("a"),t=v("i"),s=E(),l=v("span"),r=W(o),a=E(),u=v("span"),y.c(),p(t,"class",i=ii(j.getCollectionTypeIcon(n[0].type))+" svelte-1u3ag8h"),p(l,"class","txt m-r-auto"),p(u,"class","btn btn-xs btn-circle btn-hint btn-transparent pin-collection svelte-1u3ag8h"),p(u,"aria-label","Pin collection"),p(e,"href",c="/collections?collectionId="+n[0].id),p(e,"class","sidebar-list-item svelte-1u3ag8h"),p(e,"title",d=n[0].name),Q(e,"active",((S=n[2])==null?void 0:S.id)===n[0].id)},m(S,C){w(S,e,C),b(e,t),b(e,s),b(e,l),b(l,r),b(e,a),b(e,u),y.m(u,null),h||(m=[Ce(f=Be.call(null,u,{position:"right",text:(n[1]?"Unpin":"Pin")+" collection"})),Y(u,"click",Sn(Ze(n[5]))),Ce(dn.call(null,e))],h=!0)},p(S,[C]){var T;C&1&&i!==(i=ii(j.getCollectionTypeIcon(S[0].type))+" svelte-1u3ag8h")&&p(t,"class",i),C&1&&o!==(o=S[0].name+"")&&le(r,o),_!==(_=g(S))&&(y.d(1),y=_(S),y&&(y.c(),y.m(u,null))),f&&Et(f.update)&&C&2&&f.update.call(null,{position:"right",text:(S[1]?"Unpin":"Pin")+" collection"}),C&1&&c!==(c="/collections?collectionId="+S[0].id)&&p(e,"href",c),C&1&&d!==(d=S[0].name)&&p(e,"title",d),C&5&&Q(e,"active",((T=S[2])==null?void 0:T.id)===S[0].id)},i:x,o:x,d(S){S&&k(e),y.d(),h=!1,$e(m)}}}function i6(n,e,t){let i,s;Ge(n,hi,u=>t(2,s=u));let{collection:l}=e,{pinnedIds:o}=e;function r(u){o.includes(u.id)?j.removeByValue(o,u.id):o.push(u.id),t(4,o)}const a=()=>r(l);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection),"pinnedIds"in u&&t(4,o=u.pinnedIds)},n.$$.update=()=>{n.$$.dirty&17&&t(1,i=o.includes(l.id))},[l,i,s,r,o,a]}class B1 extends be{constructor(e){super(),_e(this,e,i6,n6,me,{collection:0,pinnedIds:4})}}function wp(n,e,t){const i=n.slice();return i[22]=e[t],i}function Sp(n,e,t){const i=n.slice();return i[22]=e[t],i}function Tp(n){let e,t,i=[],s=new Map,l,o,r=pe(n[6]);const a=u=>u[22].id;for(let u=0;uhe(i,"pinnedIds",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u&64&&(f.collection=e[22]),!s&&u&2&&(s=!0,f.pinnedIds=e[1],ve(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){L(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function $p(n){let e,t=[],i=new Map,s,l,o=n[6].length&&Mp(),r=pe(n[5]);const a=u=>u[22].id;for(let u=0;uhe(i,"pinnedIds",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u&32&&(f.collection=e[22]),!s&&u&2&&(s=!0,f.pinnedIds=e[1],ve(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){L(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function Ep(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Dp(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=' New collection',p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){w(l,e,o),b(e,t),i||(s=Y(t,"click",n[16]),i=!0)},p:x,d(l){l&&k(e),i=!1,s()}}}function s6(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S=n[6].length&&Tp(n),C=n[5].length&&$p(n),T=n[3].length&&!n[2].length&&Ep(),$=!n[9]&&Dp(n);return{c(){e=v("header"),t=v("div"),i=v("div"),s=v("button"),s.innerHTML='',l=E(),o=v("input"),r=E(),a=v("hr"),u=E(),f=v("div"),S&&S.c(),c=E(),C&&C.c(),d=E(),T&&T.c(),h=E(),$&&$.c(),m=ye(),p(s,"type","button"),p(s,"class","btn btn-xs btn-transparent btn-circle btn-clear"),Q(s,"hidden",!n[7]),p(i,"class","form-field-addon"),p(o,"type","text"),p(o,"placeholder","Search collections..."),p(o,"name","collections-search"),p(t,"class","form-field search"),Q(t,"active",n[7]),p(e,"class","sidebar-header"),p(a,"class","m-t-5 m-b-xs"),p(f,"class","sidebar-content"),Q(f,"fade",n[8]),Q(f,"sidebar-content-compact",n[2].length>20)},m(M,O){w(M,e,O),b(e,t),b(t,i),b(i,s),b(t,l),b(t,o),de(o,n[0]),w(M,r,O),w(M,a,O),w(M,u,O),w(M,f,O),S&&S.m(f,null),b(f,c),C&&C.m(f,null),b(f,d),T&&T.m(f,null),w(M,h,O),$&&$.m(M,O),w(M,m,O),g=!0,_||(y=[Y(s,"click",n[12]),Y(o,"input",n[13])],_=!0)},p(M,O){(!g||O&128)&&Q(s,"hidden",!M[7]),O&1&&o.value!==M[0]&&de(o,M[0]),(!g||O&128)&&Q(t,"active",M[7]),M[6].length?S?(S.p(M,O),O&64&&A(S,1)):(S=Tp(M),S.c(),A(S,1),S.m(f,c)):S&&(re(),L(S,1,1,()=>{S=null}),ae()),M[5].length?C?(C.p(M,O),O&32&&A(C,1)):(C=$p(M),C.c(),A(C,1),C.m(f,d)):C&&(re(),L(C,1,1,()=>{C=null}),ae()),M[3].length&&!M[2].length?T||(T=Ep(),T.c(),T.m(f,null)):T&&(T.d(1),T=null),(!g||O&256)&&Q(f,"fade",M[8]),(!g||O&4)&&Q(f,"sidebar-content-compact",M[2].length>20),M[9]?$&&($.d(1),$=null):$?$.p(M,O):($=Dp(M),$.c(),$.m(m.parentNode,m))},i(M){g||(A(S),A(C),g=!0)},o(M){L(S),L(C),g=!1},d(M){M&&(k(e),k(r),k(a),k(u),k(f),k(h),k(m)),S&&S.d(),C&&C.d(),T&&T.d(),$&&$.d(M),_=!1,$e(y)}}}function l6(n){let e,t,i,s;e=new R1({props:{class:"collection-sidebar",$$slots:{default:[s6]},$$scope:{ctx:n}}});let l={};return i=new ru({props:l}),n[17](i),i.$on("save",n[18]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(o,r){H(e,o,r),w(o,t,r),H(i,o,r),s=!0},p(o,[r]){const a={};r&134218751&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){L(e.$$.fragment,o),L(i.$$.fragment,o),s=!1},d(o){o&&k(t),V(e,o),n[17](null),V(i,o)}}}const Ap="@pinnedCollections";function o6(){setTimeout(()=>{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function r6(n,e,t){let i,s,l,o,r,a,u,f,c;Ge(n,Zn,I=>t(11,a=I)),Ge(n,hi,I=>t(19,u=I)),Ge(n,wo,I=>t(8,f=I)),Ge(n,Es,I=>t(9,c=I));let d,h="",m=[];_();function g(I){un(hi,u=I,u)}function _(){t(1,m=[]);try{const I=localStorage.getItem(Ap);I&&t(1,m=JSON.parse(I)||[])}catch{}}function y(){t(1,m=m.filter(I=>!!a.find(N=>N.id==I)))}const S=()=>t(0,h="");function C(){h=this.value,t(0,h)}function T(I){m=I,t(1,m)}function $(I){m=I,t(1,m)}const M=()=>d==null?void 0:d.show();function O(I){te[I?"unshift":"push"](()=>{d=I,t(4,d)})}const D=I=>{var N;(N=I.detail)!=null&&N.isNew&&I.detail.collection&&g(I.detail.collection)};return n.$$.update=()=>{n.$$.dirty&2048&&a&&(y(),o6()),n.$$.dirty&1&&t(3,i=h.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(7,s=h!==""),n.$$.dirty&2&&m&&localStorage.setItem(Ap,JSON.stringify(m)),n.$$.dirty&2057&&t(2,l=a.filter(I=>I.id==h||I.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&6&&t(6,o=l.filter(I=>m.includes(I.id))),n.$$.dirty&6&&t(5,r=l.filter(I=>!m.includes(I.id)))},[h,m,l,i,d,r,o,s,f,c,g,a,S,C,T,$,M,O,D]}class a6 extends be{constructor(e){super(),_e(this,e,r6,l6,me,{})}}function Ip(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Lp(n){n[18]=n[19].default}function Pp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Np(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Fp(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Np();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ye(),c&&c.c(),s=E(),l=v("button"),r=W(o),a=E(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(l,"active",e[5]===e[14]),this.first=t},m(h,m){w(h,t,m),c&&c.m(h,m),w(h,s,m),w(h,l,m),b(l,r),b(l,a),u||(f=Y(l,"click",d),u=!0)},p(h,m){e=h,m&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Np(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),m&8&&o!==(o=e[15].label+"")&&le(r,o),m&40&&Q(l,"active",e[5]===e[14])},d(h){h&&(k(t),k(s),k(l)),c&&c.d(h),u=!1,f()}}}function Rp(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:c6,then:f6,catch:u6,value:19,blocks:[,,,]};return hu(t=n[15].component,s),{c(){e=ye(),s.block.c()},m(l,o){w(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&hu(t,s)||S0(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];L(r)}i=!1},d(l){l&&k(e),s.block.d(l),s.token=null,s=null}}}function u6(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function f6(n){Lp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){z(e.$$.fragment),t=E()},m(s,l){H(e,s,l),w(s,t,l),i=!0},p(s,l){Lp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){L(e.$$.fragment,s),i=!1},d(s){s&&k(t),V(e,s)}}}function c6(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function qp(n,e){let t,i,s,l=e[5]===e[14]&&Rp(e);return{key:n,first:null,c(){t=ye(),l&&l.c(),i=ye(),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[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Rp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(l),s=!0)},o(o){L(l),s=!1},d(o){o&&(k(t),k(i)),l&&l.d(o)}}}function d6(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=pe(Object.entries(n[3]));const d=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function h6(n){let e,t,i={class:"docs-panel",$$slots:{footer:[p6],default:[d6]},$$scope:{ctx:n}};return e=new rn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[10](null),V(e,s)}}}function m6(n,e,t){const i={list:{label:"List/Search",component:ft(()=>import("./ListApiDocs-d3bbf1bc.js"),["./ListApiDocs-d3bbf1bc.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-d60af536.js","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:ft(()=>import("./ViewApiDocs-3b705221.js"),["./ViewApiDocs-3b705221.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-d60af536.js"],import.meta.url)},create:{label:"Create",component:ft(()=>import("./CreateApiDocs-746c5ba6.js"),["./CreateApiDocs-746c5ba6.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-d60af536.js"],import.meta.url)},update:{label:"Update",component:ft(()=>import("./UpdateApiDocs-7870aa42.js"),["./UpdateApiDocs-7870aa42.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-d60af536.js"],import.meta.url)},delete:{label:"Delete",component:ft(()=>import("./DeleteApiDocs-3ab8e763.js"),["./DeleteApiDocs-3ab8e763.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:ft(()=>import("./RealtimeApiDocs-d5c46b52.js"),["./RealtimeApiDocs-d5c46b52.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:ft(()=>import("./AuthWithPasswordDocs-84a31170.js"),["./AuthWithPasswordDocs-84a31170.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-d60af536.js"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:ft(()=>import("./AuthWithOAuth2Docs-bfb13a0d.js"),["./AuthWithOAuth2Docs-bfb13a0d.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-d60af536.js"],import.meta.url)},refresh:{label:"Auth refresh",component:ft(()=>import("./AuthRefreshDocs-8e47b2e1.js"),["./AuthRefreshDocs-8e47b2e1.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-d60af536.js"],import.meta.url)},"request-verification":{label:"Request verification",component:ft(()=>import("./RequestVerificationDocs-fef7a189.js"),["./RequestVerificationDocs-fef7a189.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:ft(()=>import("./ConfirmVerificationDocs-a322811f.js"),["./ConfirmVerificationDocs-a322811f.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:ft(()=>import("./RequestPasswordResetDocs-d70c75f0.js"),["./RequestPasswordResetDocs-d70c75f0.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:ft(()=>import("./ConfirmPasswordResetDocs-7cd4e484.js"),["./ConfirmPasswordResetDocs-7cd4e484.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:ft(()=>import("./RequestEmailChangeDocs-94638ec4.js"),["./RequestEmailChangeDocs-94638ec4.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:ft(()=>import("./ConfirmEmailChangeDocs-a76d5ec3.js"),["./ConfirmEmailChangeDocs-a76d5ec3.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:ft(()=>import("./AuthMethodsDocs-2487f0b0.js"),["./AuthMethodsDocs-2487f0b0.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-d60af536.js"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:ft(()=>import("./ListExternalAuthsDocs-0d778e72.js"),["./ListExternalAuthsDocs-0d778e72.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-d60af536.js"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:ft(()=>import("./UnlinkExternalAuthDocs-486a9a62.js"),["./UnlinkExternalAuthDocs-486a9a62.js","./SdkTabs-2f78bf19.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o={},r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),h=y=>c(y);function m(y){te[y?"unshift":"push"](()=>{l=y,t(4,l)})}function g(y){Re.call(this,n,y)}function _(y){Re.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.type==="auth"?(t(3,a=Object.assign({},i,s)),!o.options.allowUsernameAuth&&!o.options.allowEmailAuth&&delete a["auth-with-password"],o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):o.type==="view"?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,h,m,g,_]}class g6 extends be{constructor(e){super(),_e(this,e,m6,h6,me,{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 _6(n){let e,t,i,s;return{c(){e=v("i"),p(e,"class","ri-calendar-event-line txt-disabled")},m(l,o){w(l,e,o),i||(s=Ce(t=Be.call(null,e,{text:n[0].join(` + you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=ye(),p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),u&&u.m(s,null),w(c,r,d),f&&f.m(c,d),w(c,a,d)},p(c,d){c[7].length?u||(u=np(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),c[9]?f?f.p(c,d):(f=ip(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&(k(e),k(r),k(a)),u&&u.d(),f&&f.d(c)}}}function qM(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function jM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Cancel',t=E(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[Y(e,"click",n[12]),Y(i,"click",n[13])],s=!0)},p:x,d(o){o&&(k(e),k(t),k(i)),s=!1,$e(l)}}}function HM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[jM],header:[qM],default:[RM]},$$scope:{ctx:n}};return e=new rn({props:i}),n[14](e),e.$on("hide",n[15]),e.$on("show",n[16]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&33555422&&(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[14](null),V(e,s)}}}function VM(n,e,t){let i,s,l,o,r,a;const u=pt();let f,c,d;async function h($,M){t(1,c=$),t(2,d=M),await ln(),i||l.length||o.length||r.length?f==null||f.show():g()}function m(){f==null||f.hide()}function g(){m(),u("confirm")}const _=()=>m(),y=()=>g();function S($){te[$?"unshift":"push"](()=>{f=$,t(5,f)})}function C($){Re.call(this,n,$)}function T($){Re.call(this,n,$)}return n.$$.update=()=>{var $,M,O;n.$$.dirty&6&&t(3,i=(c==null?void 0:c.name)!=(d==null?void 0:d.name)),n.$$.dirty&4&&t(4,s=(d==null?void 0:d.type)==="view"),n.$$.dirty&4&&t(8,l=(($=d==null?void 0:d.schema)==null?void 0:$.filter(D=>D.id&&!D.toDelete&&D.originalName!=D.name))||[]),n.$$.dirty&4&&t(7,o=((M=d==null?void 0:d.schema)==null?void 0:M.filter(D=>D.id&&D.toDelete))||[]),n.$$.dirty&6&&t(6,r=((O=d==null?void 0:d.schema)==null?void 0:O.filter(D=>{var N,P,F;const I=(N=c==null?void 0:c.schema)==null?void 0:N.find(R=>R.id==D.id);return I?((P=I.options)==null?void 0:P.maxSelect)!=1&&((F=D.options)==null?void 0:F.maxSelect)==1:!1}))||[]),n.$$.dirty&24&&t(9,a=!s||i)},[m,c,d,i,s,f,r,o,l,a,g,h,_,y,S,C,T]}class zM extends be{constructor(e){super(),_e(this,e,VM,HM,me,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function up(n,e,t){const i=n.slice();return i[49]=e[t][0],i[50]=e[t][1],i}function BM(n){let e,t,i;function s(o){n[35](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new Y$({props:l}),te.push(()=>he(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ve(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function UM(n){let e,t,i;function s(o){n[34](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new cM({props:l}),te.push(()=>he(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){H(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],ve(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){L(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function fp(n){let e,t,i,s;function l(r){n[36](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new lM({props:o}),te.push(()=>he(t,"collection",l)),{c(){e=v("div"),z(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],ve(()=>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),V(t)}}}function cp(n){let e,t,i,s;function l(r){n[37](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new FM({props:o}),te.push(()=>he(t,"collection",l)),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===Ls)},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],ve(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&Q(e,"active",r[3]===Ls)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){L(t.$$.fragment,r),s=!1},d(r){r&&k(e),V(t)}}}function WM(n){let e,t,i,s,l,o,r;const a=[UM,BM],u=[];function f(h,m){return h[14]?0:1}i=f(n),s=u[i]=a[i](n);let c=n[3]===kl&&fp(n),d=n[15]&&cp(n);return{c(){e=v("div"),t=v("div"),s.c(),l=E(),c&&c.c(),o=E(),d&&d.c(),p(t,"class","tab-item"),Q(t,"active",n[3]===ji),p(e,"class","tabs-content svelte-12y0yzb")},m(h,m){w(h,e,m),b(e,t),u[i].m(t,null),b(e,l),c&&c.m(e,null),b(e,o),d&&d.m(e,null),r=!0},p(h,m){let g=i;i=f(h),i===g?u[i].p(h,m):(re(),L(u[g],1,1,()=>{u[g]=null}),ae(),s=u[i],s?s.p(h,m):(s=u[i]=a[i](h),s.c()),A(s,1),s.m(t,null)),(!r||m[0]&8)&&Q(t,"active",h[3]===ji),h[3]===kl?c?(c.p(h,m),m[0]&8&&A(c,1)):(c=fp(h),c.c(),A(c,1),c.m(e,o)):c&&(re(),L(c,1,1,()=>{c=null}),ae()),h[15]?d?(d.p(h,m),m[0]&32768&&A(d,1)):(d=cp(h),d.c(),A(d,1),d.m(e,null)):d&&(re(),L(d,1,1,()=>{d=null}),ae())},i(h){r||(A(s),A(c),A(d),r=!0)},o(h){L(s),L(c),L(d),r=!1},d(h){h&&k(e),u[i].d(),c&&c.d(),d&&d.d()}}}function dp(n){let e,t,i,s,l,o,r;return o=new Pn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[YM]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),i=v("button"),s=v("i"),l=E(),z(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"aria-label","More"),p(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),b(i,s),b(i,l),H(o,i,null),r=!0},p(a,u){const f={};u[1]&4194304&&(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),k(t),k(i)),V(o)}}}function YM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=' Duplicate',t=E(),i=v("button"),i.innerHTML=' Delete',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[Y(e,"click",n[26]),Y(i,"click",Sn(Ze(n[27])))],s=!0)},p:x,d(o){o&&(k(e),k(t),k(i)),s=!1,$e(l)}}}function pp(n){let e,t,i,s;return i=new Pn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[KM]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=E(),z(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){w(l,e,o),w(l,t,o),H(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&4194304&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){L(i.$$.fragment,l),s=!1},d(l){l&&(k(e),k(t)),V(i,l)}}}function hp(n){let e,t,i,s,l,o=n[50]+"",r,a,u,f,c;function d(){return n[29](n[49])}return{c(){e=v("button"),t=v("i"),s=E(),l=v("span"),r=W(o),a=W(" collection"),u=E(),p(t,"class",i=ii(j.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),Q(e,"selected",n[49]==n[2].type)},m(h,m){w(h,e,m),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),b(e,u),f||(c=Y(e,"click",d),f=!0)},p(h,m){n=h,m[0]&64&&i!==(i=ii(j.getCollectionTypeIcon(n[49]))+" svelte-12y0yzb")&&p(t,"class",i),m[0]&64&&o!==(o=n[50]+"")&&le(r,o),m[0]&68&&Q(e,"selected",n[49]==n[2].type)},d(h){h&&k(e),f=!1,c()}}}function KM(n){let e,t=pe(Object.entries(n[6])),i=[];for(let s=0;s{P=null}),ae()):P?(P.p(R,q),q[0]&4&&A(P,1)):(P=pp(R),P.c(),A(P,1),P.m(d,null)),(!D||q[0]&4&&T!==(T="btn btn-sm p-r-10 p-l-10 "+(R[2].id?"btn-transparent":"btn-outline")))&&p(d,"class",T),(!D||q[0]&4&&$!==($=!!R[2].id))&&(d.disabled=$),R[2].system?F||(F=mp(),F.c(),F.m(O.parentNode,O)):F&&(F.d(1),F=null)},i(R){D||(A(P),D=!0)},o(R){L(P),D=!1},d(R){R&&(k(e),k(s),k(l),k(f),k(c),k(M),k(O)),P&&P.d(),F&&F.d(R),I=!1,N()}}}function gp(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){w(r,e,a),s=!0,l||(o=Ce(t=Be.call(null,e,n[11])),l=!0)},p(r,a){t&&Et(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&xe(()=>{s&&(i||(i=He(e,Qt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=He(e,Qt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function _p(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function bp(n){var a,u,f;let e,t,i,s=!j.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&vp();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=E(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),Q(e,"active",n[3]===Ls)},m(c,d){w(c,e,d),b(e,t),b(e,i),r&&r.m(e,null),l||(o=Y(e,"click",n[33]),l=!0)},p(c,d){var h,m,g;d[0]&32&&(s=!j.isEmpty((h=c[5])==null?void 0:h.options)&&!((g=(m=c[5])==null?void 0:m.options)!=null&&g.manageRule)),s?r?d[0]&32&&A(r,1):(r=vp(),r.c(),A(r,1),r.m(e,null)):r&&(re(),L(r,1,1,()=>{r=null}),ae()),d[0]&8&&Q(e,"active",c[3]===Ls)},d(c){c&&k(e),r&&r.d(),l=!1,o()}}}function vp(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function GM(n){var B,Z,X,J,U,oe,ee;let e,t=n[2].id?"Edit collection":"New collection",i,s,l,o,r,a,u,f,c,d,h,m=n[14]?"Query":"Fields",g,_,y=!j.isEmpty(n[11]),S,C,T,$,M=!j.isEmpty((B=n[5])==null?void 0:B.listRule)||!j.isEmpty((Z=n[5])==null?void 0:Z.viewRule)||!j.isEmpty((X=n[5])==null?void 0:X.createRule)||!j.isEmpty((J=n[5])==null?void 0:J.updateRule)||!j.isEmpty((U=n[5])==null?void 0:U.deleteRule)||!j.isEmpty((ee=(oe=n[5])==null?void 0:oe.options)==null?void 0:ee.manageRule),O,D,I,N,P=!!n[2].id&&!n[2].system&&dp(n);r=new ge({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[JM,({uniqueId:se})=>({48:se}),({uniqueId:se})=>[0,se?131072:0]]},$$scope:{ctx:n}}});let F=y&&gp(n),R=M&&_p(),q=n[15]&&bp(n);return{c(){e=v("h4"),i=W(t),s=E(),P&&P.c(),l=E(),o=v("form"),z(r.$$.fragment),a=E(),u=v("input"),f=E(),c=v("div"),d=v("button"),h=v("span"),g=W(m),_=E(),F&&F.c(),S=E(),C=v("button"),T=v("span"),T.textContent="API Rules",$=E(),R&&R.c(),O=E(),q&&q.c(),p(e,"class","upsert-panel-title svelte-12y0yzb"),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),Q(d,"active",n[3]===ji),p(T,"class","txt"),p(C,"type","button"),p(C,"class","tab-item"),Q(C,"active",n[3]===kl),p(c,"class","tabs-header stretched")},m(se,Ee){w(se,e,Ee),b(e,i),w(se,s,Ee),P&&P.m(se,Ee),w(se,l,Ee),w(se,o,Ee),H(r,o,null),b(o,a),b(o,u),w(se,f,Ee),w(se,c,Ee),b(c,d),b(d,h),b(h,g),b(d,_),F&&F.m(d,null),b(c,S),b(c,C),b(C,T),b(C,$),R&&R.m(C,null),b(c,O),q&&q.m(c,null),D=!0,I||(N=[Y(o,"submit",Ze(n[30])),Y(d,"click",n[31]),Y(C,"click",n[32])],I=!0)},p(se,Ee){var Ve,We,ke,Me,Je,dt,Se;(!D||Ee[0]&4)&&t!==(t=se[2].id?"Edit collection":"New collection")&&le(i,t),se[2].id&&!se[2].system?P?(P.p(se,Ee),Ee[0]&4&&A(P,1)):(P=dp(se),P.c(),A(P,1),P.m(l.parentNode,l)):P&&(re(),L(P,1,1,()=>{P=null}),ae());const qe={};Ee[0]&8192&&(qe.class="form-field collection-field-name required m-b-0 "+(se[13]?"disabled":"")),Ee[0]&41028|Ee[1]&4325376&&(qe.$$scope={dirty:Ee,ctx:se}),r.$set(qe),(!D||Ee[0]&16384)&&m!==(m=se[14]?"Query":"Fields")&&le(g,m),Ee[0]&2048&&(y=!j.isEmpty(se[11])),y?F?(F.p(se,Ee),Ee[0]&2048&&A(F,1)):(F=gp(se),F.c(),A(F,1),F.m(d,null)):F&&(re(),L(F,1,1,()=>{F=null}),ae()),(!D||Ee[0]&8)&&Q(d,"active",se[3]===ji),Ee[0]&32&&(M=!j.isEmpty((Ve=se[5])==null?void 0:Ve.listRule)||!j.isEmpty((We=se[5])==null?void 0:We.viewRule)||!j.isEmpty((ke=se[5])==null?void 0:ke.createRule)||!j.isEmpty((Me=se[5])==null?void 0:Me.updateRule)||!j.isEmpty((Je=se[5])==null?void 0:Je.deleteRule)||!j.isEmpty((Se=(dt=se[5])==null?void 0:dt.options)==null?void 0:Se.manageRule)),M?R?Ee[0]&32&&A(R,1):(R=_p(),R.c(),A(R,1),R.m(C,null)):R&&(re(),L(R,1,1,()=>{R=null}),ae()),(!D||Ee[0]&8)&&Q(C,"active",se[3]===kl),se[15]?q?q.p(se,Ee):(q=bp(se),q.c(),q.m(c,null)):q&&(q.d(1),q=null)},i(se){D||(A(P),A(r.$$.fragment,se),A(F),A(R),D=!0)},o(se){L(P),L(r.$$.fragment,se),L(F),L(R),D=!1},d(se){se&&(k(e),k(s),k(l),k(o),k(f),k(c)),P&&P.d(se),V(r),F&&F.d(),R&&R.d(),q&&q.d(),I=!1,$e(N)}}}function ZM(n){let e,t,i,s,l,o=n[2].id?"Save changes":"Create",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),r=W(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],Q(s,"btn-loading",n[9])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(l,r),u||(f=[Y(e,"click",n[24]),Y(s,"click",n[25])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].id?"Save changes":"Create")&&le(r,o),d[0]&4608&&a!==(a=!c[12]||c[9])&&(s.disabled=a),d[0]&512&&Q(s,"btn-loading",c[9])},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function XM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[38],$$slots:{footer:[ZM],header:[GM],default:[WM]},$$scope:{ctx:n}};e=new rn({props:l}),n[39](e),e.$on("hide",n[40]),e.$on("show",n[41]);let o={};return i=new zM({props:o}),n[42](i),i.$on("confirm",n[43]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(r,a){H(e,r,a),w(r,t,a),H(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[38]),a[0]&64108|a[1]&4194304&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){L(e.$$.fragment,r),L(i.$$.fragment,r),s=!1},d(r){r&&k(t),n[39](null),V(e,r),n[42](null),V(i,r)}}}const ji="schema",kl="api_rules",Ls="options",QM="base",yp="auth",kp="view";function Rr(n){return JSON.stringify(n)}function xM(n,e,t){let i,s,l,o,r,a;Ge(n,Mi,ne=>t(5,a=ne));const u={};u[QM]="Base",u[kp]="View",u[yp]="Auth";const f=pt();let c,d,h=null,m=j.initCollection(),g=!1,_=!1,y=ji,S=Rr(m),C="";function T(ne){t(3,y=ne)}function $(ne){return O(ne),t(10,_=!0),T(ji),c==null?void 0:c.show()}function M(){return c==null?void 0:c.hide()}async function O(ne){on({}),typeof ne<"u"?(t(22,h=ne),t(2,m=structuredClone(ne))):(t(22,h=null),t(2,m=j.initCollection())),t(2,m.schema=m.schema||[],m),t(2,m.originalName=m.name||"",m),await ln(),t(23,S=Rr(m))}function D(){m.id?d==null||d.show(h,m):I()}function I(){if(g)return;t(9,g=!0);const ne=N();let Ne;m.id?Ne=ce.collections.update(m.id,ne):Ne=ce.collections.create(ne),Ne.then(Te=>{La(),ek(Te),t(10,_=!1),M(),zt(m.id?"Successfully updated collection.":"Successfully created collection."),f("save",{isNew:!m.id,collection:Te})}).catch(Te=>{ce.error(Te)}).finally(()=>{t(9,g=!1)})}function N(){const ne=Object.assign({},m);ne.schema=ne.schema.slice(0);for(let Ne=ne.schema.length-1;Ne>=0;Ne--)ne.schema[Ne].toDelete&&ne.schema.splice(Ne,1);return ne}function P(){h!=null&&h.id&&_n(`Do you really want to delete collection "${h.name}" and all its records?`,()=>ce.collections.delete(h.id).then(()=>{M(),zt(`Successfully deleted collection "${h.name}".`),f("delete",h),tk(h)}).catch(ne=>{ce.error(ne)}))}function F(ne){t(2,m.type=ne,m),pi("schema")}function R(){o?_n("You have unsaved changes. Do you really want to discard them?",()=>{q()}):q()}async function q(){const ne=h?structuredClone(h):null;if(ne){if(ne.id="",ne.created="",ne.updated="",ne.name+="_duplicate",!j.isEmpty(ne.schema))for(const Ne of ne.schema)Ne.id="";if(!j.isEmpty(ne.indexes))for(let Ne=0;NeM(),Z=()=>D(),X=()=>R(),J=()=>P(),U=ne=>{t(2,m.name=j.slugify(ne.target.value),m),ne.target.value=m.name},oe=ne=>F(ne),ee=()=>{r&&D()},se=()=>T(ji),Ee=()=>T(kl),qe=()=>T(Ls);function Ve(ne){m=ne,t(2,m),t(22,h)}function We(ne){m=ne,t(2,m),t(22,h)}function ke(ne){m=ne,t(2,m),t(22,h)}function Me(ne){m=ne,t(2,m),t(22,h)}const Je=()=>o&&_?(_n("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,_=!1),M()}),!1):!0;function dt(ne){te[ne?"unshift":"push"](()=>{c=ne,t(7,c)})}function Se(ne){Re.call(this,n,ne)}function we(ne){Re.call(this,n,ne)}function Ue(ne){te[ne?"unshift":"push"](()=>{d=ne,t(8,d)})}const nt=()=>I();return n.$$.update=()=>{var ne,Ne;n.$$.dirty[0]&4&&m.type==="view"&&(t(2,m.createRule=null,m),t(2,m.updateRule=null,m),t(2,m.deleteRule=null,m),t(2,m.indexes=[],m)),n.$$.dirty[0]&4194308&&m.name&&(h==null?void 0:h.name)!=m.name&&m.indexes.length>0&&t(2,m.indexes=(ne=m.indexes)==null?void 0:ne.map(Te=>j.replaceIndexTableName(Te,m.name)),m),n.$$.dirty[0]&4&&t(15,i=m.type===yp),n.$$.dirty[0]&4&&t(14,s=m.type===kp),n.$$.dirty[0]&32&&(a.schema||(Ne=a.options)!=null&&Ne.query?t(11,C=j.getNestedVal(a,"schema.message")||"Has errors"):t(11,C="")),n.$$.dirty[0]&4&&t(13,l=!!m.id&&m.system),n.$$.dirty[0]&8388612&&t(4,o=S!=Rr(m)),n.$$.dirty[0]&20&&t(12,r=!m.id||o),n.$$.dirty[0]&12&&y===Ls&&m.type!=="auth"&&T(ji)},[T,M,m,y,o,a,u,c,d,g,_,C,r,l,s,i,D,I,P,F,R,$,h,S,B,Z,X,J,U,oe,ee,se,Ee,qe,Ve,We,ke,Me,Je,dt,Se,we,Ue,nt]}class ru extends be{constructor(e){super(),_e(this,e,xM,XM,me,{changeTab:0,show:21,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[21]}get hide(){return this.$$.ctx[1]}}function e6(n){let e;return{c(){e=v("i"),p(e,"class","ri-pushpin-line m-l-auto svelte-1u3ag8h")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function t6(n){let e;return{c(){e=v("i"),p(e,"class","ri-unpin-line svelte-1u3ag8h")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function n6(n){let e,t,i,s,l,o=n[0].name+"",r,a,u,f,c,d,h,m;function g(S,C){return S[1]?t6:e6}let _=g(n),y=_(n);return{c(){var S;e=v("a"),t=v("i"),s=E(),l=v("span"),r=W(o),a=E(),u=v("span"),y.c(),p(t,"class",i=ii(j.getCollectionTypeIcon(n[0].type))+" svelte-1u3ag8h"),p(l,"class","txt m-r-auto"),p(u,"class","btn btn-xs btn-circle btn-hint btn-transparent pin-collection svelte-1u3ag8h"),p(u,"aria-label","Pin collection"),p(e,"href",c="/collections?collectionId="+n[0].id),p(e,"class","sidebar-list-item svelte-1u3ag8h"),p(e,"title",d=n[0].name),Q(e,"active",((S=n[2])==null?void 0:S.id)===n[0].id)},m(S,C){w(S,e,C),b(e,t),b(e,s),b(e,l),b(l,r),b(e,a),b(e,u),y.m(u,null),h||(m=[Ce(f=Be.call(null,u,{position:"right",text:(n[1]?"Unpin":"Pin")+" collection"})),Y(u,"click",Sn(Ze(n[5]))),Ce(dn.call(null,e))],h=!0)},p(S,[C]){var T;C&1&&i!==(i=ii(j.getCollectionTypeIcon(S[0].type))+" svelte-1u3ag8h")&&p(t,"class",i),C&1&&o!==(o=S[0].name+"")&&le(r,o),_!==(_=g(S))&&(y.d(1),y=_(S),y&&(y.c(),y.m(u,null))),f&&Et(f.update)&&C&2&&f.update.call(null,{position:"right",text:(S[1]?"Unpin":"Pin")+" collection"}),C&1&&c!==(c="/collections?collectionId="+S[0].id)&&p(e,"href",c),C&1&&d!==(d=S[0].name)&&p(e,"title",d),C&5&&Q(e,"active",((T=S[2])==null?void 0:T.id)===S[0].id)},i:x,o:x,d(S){S&&k(e),y.d(),h=!1,$e(m)}}}function i6(n,e,t){let i,s;Ge(n,hi,u=>t(2,s=u));let{collection:l}=e,{pinnedIds:o}=e;function r(u){o.includes(u.id)?j.removeByValue(o,u.id):o.push(u.id),t(4,o)}const a=()=>r(l);return n.$$set=u=>{"collection"in u&&t(0,l=u.collection),"pinnedIds"in u&&t(4,o=u.pinnedIds)},n.$$.update=()=>{n.$$.dirty&17&&t(1,i=o.includes(l.id))},[l,i,s,r,o,a]}class B1 extends be{constructor(e){super(),_e(this,e,i6,n6,me,{collection:0,pinnedIds:4})}}function wp(n,e,t){const i=n.slice();return i[22]=e[t],i}function Sp(n,e,t){const i=n.slice();return i[22]=e[t],i}function Tp(n){let e,t,i=[],s=new Map,l,o,r=pe(n[6]);const a=u=>u[22].id;for(let u=0;uhe(i,"pinnedIds",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u&64&&(f.collection=e[22]),!s&&u&2&&(s=!0,f.pinnedIds=e[1],ve(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){L(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function $p(n){let e,t=[],i=new Map,s,l,o=n[6].length&&Mp(),r=pe(n[5]);const a=u=>u[22].id;for(let u=0;uhe(i,"pinnedIds",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u&32&&(f.collection=e[22]),!s&&u&2&&(s=!0,f.pinnedIds=e[1],ve(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){L(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function Ep(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Dp(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=' New collection',p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){w(l,e,o),b(e,t),i||(s=Y(t,"click",n[16]),i=!0)},p:x,d(l){l&&k(e),i=!1,s()}}}function s6(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S=n[6].length&&Tp(n),C=n[5].length&&$p(n),T=n[3].length&&!n[2].length&&Ep(),$=!n[9]&&Dp(n);return{c(){e=v("header"),t=v("div"),i=v("div"),s=v("button"),s.innerHTML='',l=E(),o=v("input"),r=E(),a=v("hr"),u=E(),f=v("div"),S&&S.c(),c=E(),C&&C.c(),d=E(),T&&T.c(),h=E(),$&&$.c(),m=ye(),p(s,"type","button"),p(s,"class","btn btn-xs btn-transparent btn-circle btn-clear"),Q(s,"hidden",!n[7]),p(i,"class","form-field-addon"),p(o,"type","text"),p(o,"placeholder","Search collections..."),p(o,"name","collections-search"),p(t,"class","form-field search"),Q(t,"active",n[7]),p(e,"class","sidebar-header"),p(a,"class","m-t-5 m-b-xs"),p(f,"class","sidebar-content"),Q(f,"fade",n[8]),Q(f,"sidebar-content-compact",n[2].length>20)},m(M,O){w(M,e,O),b(e,t),b(t,i),b(i,s),b(t,l),b(t,o),de(o,n[0]),w(M,r,O),w(M,a,O),w(M,u,O),w(M,f,O),S&&S.m(f,null),b(f,c),C&&C.m(f,null),b(f,d),T&&T.m(f,null),w(M,h,O),$&&$.m(M,O),w(M,m,O),g=!0,_||(y=[Y(s,"click",n[12]),Y(o,"input",n[13])],_=!0)},p(M,O){(!g||O&128)&&Q(s,"hidden",!M[7]),O&1&&o.value!==M[0]&&de(o,M[0]),(!g||O&128)&&Q(t,"active",M[7]),M[6].length?S?(S.p(M,O),O&64&&A(S,1)):(S=Tp(M),S.c(),A(S,1),S.m(f,c)):S&&(re(),L(S,1,1,()=>{S=null}),ae()),M[5].length?C?(C.p(M,O),O&32&&A(C,1)):(C=$p(M),C.c(),A(C,1),C.m(f,d)):C&&(re(),L(C,1,1,()=>{C=null}),ae()),M[3].length&&!M[2].length?T||(T=Ep(),T.c(),T.m(f,null)):T&&(T.d(1),T=null),(!g||O&256)&&Q(f,"fade",M[8]),(!g||O&4)&&Q(f,"sidebar-content-compact",M[2].length>20),M[9]?$&&($.d(1),$=null):$?$.p(M,O):($=Dp(M),$.c(),$.m(m.parentNode,m))},i(M){g||(A(S),A(C),g=!0)},o(M){L(S),L(C),g=!1},d(M){M&&(k(e),k(r),k(a),k(u),k(f),k(h),k(m)),S&&S.d(),C&&C.d(),T&&T.d(),$&&$.d(M),_=!1,$e(y)}}}function l6(n){let e,t,i,s;e=new R1({props:{class:"collection-sidebar",$$slots:{default:[s6]},$$scope:{ctx:n}}});let l={};return i=new ru({props:l}),n[17](i),i.$on("save",n[18]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(o,r){H(e,o,r),w(o,t,r),H(i,o,r),s=!0},p(o,[r]){const a={};r&134218751&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){L(e.$$.fragment,o),L(i.$$.fragment,o),s=!1},d(o){o&&k(t),V(e,o),n[17](null),V(i,o)}}}const Ap="@pinnedCollections";function o6(){setTimeout(()=>{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function r6(n,e,t){let i,s,l,o,r,a,u,f,c;Ge(n,Zn,I=>t(11,a=I)),Ge(n,hi,I=>t(19,u=I)),Ge(n,wo,I=>t(8,f=I)),Ge(n,Es,I=>t(9,c=I));let d,h="",m=[];_();function g(I){un(hi,u=I,u)}function _(){t(1,m=[]);try{const I=localStorage.getItem(Ap);I&&t(1,m=JSON.parse(I)||[])}catch{}}function y(){t(1,m=m.filter(I=>!!a.find(N=>N.id==I)))}const S=()=>t(0,h="");function C(){h=this.value,t(0,h)}function T(I){m=I,t(1,m)}function $(I){m=I,t(1,m)}const M=()=>d==null?void 0:d.show();function O(I){te[I?"unshift":"push"](()=>{d=I,t(4,d)})}const D=I=>{var N;(N=I.detail)!=null&&N.isNew&&I.detail.collection&&g(I.detail.collection)};return n.$$.update=()=>{n.$$.dirty&2048&&a&&(y(),o6()),n.$$.dirty&1&&t(3,i=h.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(7,s=h!==""),n.$$.dirty&2&&m&&localStorage.setItem(Ap,JSON.stringify(m)),n.$$.dirty&2057&&t(2,l=a.filter(I=>I.id==h||I.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&6&&t(6,o=l.filter(I=>m.includes(I.id))),n.$$.dirty&6&&t(5,r=l.filter(I=>!m.includes(I.id)))},[h,m,l,i,d,r,o,s,f,c,g,a,S,C,T,$,M,O,D]}class a6 extends be{constructor(e){super(),_e(this,e,r6,l6,me,{})}}function Ip(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Lp(n){n[18]=n[19].default}function Pp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Np(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Fp(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Np();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ye(),c&&c.c(),s=E(),l=v("button"),r=W(o),a=E(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(l,"active",e[5]===e[14]),this.first=t},m(h,m){w(h,t,m),c&&c.m(h,m),w(h,s,m),w(h,l,m),b(l,r),b(l,a),u||(f=Y(l,"click",d),u=!0)},p(h,m){e=h,m&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Np(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),m&8&&o!==(o=e[15].label+"")&&le(r,o),m&40&&Q(l,"active",e[5]===e[14])},d(h){h&&(k(t),k(s),k(l)),c&&c.d(h),u=!1,f()}}}function Rp(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:c6,then:f6,catch:u6,value:19,blocks:[,,,]};return hu(t=n[15].component,s),{c(){e=ye(),s.block.c()},m(l,o){w(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&hu(t,s)||S0(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];L(r)}i=!1},d(l){l&&k(e),s.block.d(l),s.token=null,s=null}}}function u6(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function f6(n){Lp(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){z(e.$$.fragment),t=E()},m(s,l){H(e,s,l),w(s,t,l),i=!0},p(s,l){Lp(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){L(e.$$.fragment,s),i=!1},d(s){s&&k(t),V(e,s)}}}function c6(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function qp(n,e){let t,i,s,l=e[5]===e[14]&&Rp(e);return{key:n,first:null,c(){t=ye(),l&&l.c(),i=ye(),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[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Rp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(re(),L(l,1,1,()=>{l=null}),ae())},i(o){s||(A(l),s=!0)},o(o){L(l),s=!1},d(o){o&&(k(t),k(i)),l&&l.d(o)}}}function d6(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=pe(Object.entries(n[3]));const d=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function h6(n){let e,t,i={class:"docs-panel",$$slots:{footer:[p6],default:[d6]},$$scope:{ctx:n}};return e=new rn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[10](null),V(e,s)}}}function m6(n,e,t){const i={list:{label:"List/Search",component:ft(()=>import("./ListApiDocs-3cd045c1.js"),["./ListApiDocs-3cd045c1.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-f6b769d1.js","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:ft(()=>import("./ViewApiDocs-7f75b66b.js"),["./ViewApiDocs-7f75b66b.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-f6b769d1.js"],import.meta.url)},create:{label:"Create",component:ft(()=>import("./CreateApiDocs-0d934784.js"),["./CreateApiDocs-0d934784.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-f6b769d1.js"],import.meta.url)},update:{label:"Update",component:ft(()=>import("./UpdateApiDocs-ae87c615.js"),["./UpdateApiDocs-ae87c615.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-f6b769d1.js"],import.meta.url)},delete:{label:"Delete",component:ft(()=>import("./DeleteApiDocs-fd29a801.js"),["./DeleteApiDocs-fd29a801.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:ft(()=>import("./RealtimeApiDocs-531c981c.js"),["./RealtimeApiDocs-531c981c.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:ft(()=>import("./AuthWithPasswordDocs-107160ee.js"),["./AuthWithPasswordDocs-107160ee.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-f6b769d1.js"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:ft(()=>import("./AuthWithOAuth2Docs-a6296efb.js"),["./AuthWithOAuth2Docs-a6296efb.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-f6b769d1.js"],import.meta.url)},refresh:{label:"Auth refresh",component:ft(()=>import("./AuthRefreshDocs-335aea06.js"),["./AuthRefreshDocs-335aea06.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-f6b769d1.js"],import.meta.url)},"request-verification":{label:"Request verification",component:ft(()=>import("./RequestVerificationDocs-7606398a.js"),["./RequestVerificationDocs-7606398a.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:ft(()=>import("./ConfirmVerificationDocs-a6b36296.js"),["./ConfirmVerificationDocs-a6b36296.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:ft(()=>import("./RequestPasswordResetDocs-c6b478f9.js"),["./RequestPasswordResetDocs-c6b478f9.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:ft(()=>import("./ConfirmPasswordResetDocs-ea85ce68.js"),["./ConfirmPasswordResetDocs-ea85ce68.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:ft(()=>import("./RequestEmailChangeDocs-67bd3d32.js"),["./RequestEmailChangeDocs-67bd3d32.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:ft(()=>import("./ConfirmEmailChangeDocs-0dc32323.js"),["./ConfirmEmailChangeDocs-0dc32323.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:ft(()=>import("./AuthMethodsDocs-33f5e9f2.js"),["./AuthMethodsDocs-33f5e9f2.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-f6b769d1.js"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:ft(()=>import("./ListExternalAuthsDocs-2258a5ea.js"),["./ListExternalAuthsDocs-2258a5ea.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-f6b769d1.js"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:ft(()=>import("./UnlinkExternalAuthDocs-d7bb55bc.js"),["./UnlinkExternalAuthDocs-d7bb55bc.js","./SdkTabs-f0532e58.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o={},r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),h=y=>c(y);function m(y){te[y?"unshift":"push"](()=>{l=y,t(4,l)})}function g(y){Re.call(this,n,y)}function _(y){Re.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.type==="auth"?(t(3,a=Object.assign({},i,s)),!o.options.allowUsernameAuth&&!o.options.allowEmailAuth&&delete a["auth-with-password"],o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):o.type==="view"?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,h,m,g,_]}class g6 extends be{constructor(e){super(),_e(this,e,m6,h6,me,{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 _6(n){let e,t,i,s;return{c(){e=v("i"),p(e,"class","ri-calendar-event-line txt-disabled")},m(l,o){w(l,e,o),i||(s=Ce(t=Be.call(null,e,{text:n[0].join(` `),position:"left"})),i=!0)},p(l,[o]){t&&Et(t.update)&&o&1&&t.update.call(null,{text:l[0].join(` -`),position:"left"})},i:x,o:x,d(l){l&&k(e),i=!1,s()}}}const jp="yyyy-MM-dd HH:mm:ss.SSS";function b6(n,e,t){let{model:i}=e,s=[];function l(){t(0,s=[]),i.created&&s.push("Created: "+j.formatToLocalDate(i.created,jp)+" Local"),i.updated&&s.push("Updated: "+j.formatToLocalDate(i.updated,jp)+" Local")}return n.$$set=o=>{"model"in o&&t(1,i=o.model)},n.$$.update=()=>{n.$$.dirty&2&&i&&l()},[s,i]}class U1 extends be{constructor(e){super(),_e(this,e,b6,_6,me,{model:1})}}function v6(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0]),p(e,"aria-label","Copy")},m(o,r){w(o,e,r),s||(l=[Ce(i=Be.call(null,e,n[2]?"":"Copy")),Y(e,"click",Sn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&Et(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:x,o:x,d(o){o&&k(e),s=!1,$e(l)}}}function y6(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(j.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return Kt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class js extends be{constructor(e){super(),_e(this,e,y6,v6,me,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function k6(n){let e,t,i,s,l,o,r,a,u,f;return l=new js({props:{value:n[1]}}),{c(){e=v("div"),t=v("span"),i=W(n[1]),s=E(),z(l.$$.fragment),o=E(),r=v("i"),p(t,"class","secret svelte-1md8247"),p(r,"class","ri-refresh-line txt-sm link-hint"),p(r,"aria-label","Refresh"),p(e,"class","flex flex-gap-5 p-5")},m(c,d){w(c,e,d),b(e,t),b(t,i),n[6](t),b(e,s),H(l,e,null),b(e,o),b(e,r),a=!0,u||(f=[Ce(Be.call(null,r,"Refresh")),Y(r,"click",n[4])],u=!0)},p(c,d){(!a||d&2)&&le(i,c[1]);const h={};d&2&&(h.value=c[1]),l.$set(h)},i(c){a||(A(l.$$.fragment,c),a=!0)},o(c){L(l.$$.fragment,c),a=!1},d(c){c&&k(e),n[6](null),V(l),u=!1,$e(f)}}}function w6(n){let e,t,i,s,l,o,r,a,u,f;function c(h){n[7](h)}let d={class:"dropdown dropdown-upside dropdown-center dropdown-nowrap",$$slots:{default:[k6]},$$scope:{ctx:n}};return n[3]!==void 0&&(d.active=n[3]),s=new Pn({props:d}),te.push(()=>he(s,"active",c)),s.$on("show",n[4]),{c(){e=v("button"),t=v("i"),i=E(),z(s.$$.fragment),p(t,"class","ri-sparkling-line"),p(e,"tabindex","-1"),p(e,"type","button"),p(e,"aria-label","Generate"),p(e,"class",o="btn btn-circle "+n[0]+" svelte-1md8247")},m(h,m){w(h,e,m),b(e,t),b(e,i),H(s,e,null),a=!0,u||(f=Ce(r=Be.call(null,e,n[3]?"":"Generate")),u=!0)},p(h,[m]){const g={};m&518&&(g.$$scope={dirty:m,ctx:h}),!l&&m&8&&(l=!0,g.active=h[3],ve(()=>l=!1)),s.$set(g),(!a||m&1&&o!==(o="btn btn-circle "+h[0]+" svelte-1md8247"))&&p(e,"class",o),r&&Et(r.update)&&m&8&&r.update.call(null,h[3]?"":"Generate")},i(h){a||(A(s.$$.fragment,h),a=!0)},o(h){L(s.$$.fragment,h),a=!1},d(h){h&&k(e),V(s),u=!1,f()}}}function S6(n,e,t){const i=pt();let{class:s="btn-sm btn-hint btn-transparent"}=e,{length:l=32}=e,o="",r,a=!1;async function u(){if(t(1,o=j.randomSecret(l)),i("generate",o),await ln(),r){let d=document.createRange();d.selectNode(r),window.getSelection().removeAllRanges(),window.getSelection().addRange(d)}}function f(d){te[d?"unshift":"push"](()=>{r=d,t(2,r)})}function c(d){a=d,t(3,a)}return n.$$set=d=>{"class"in d&&t(0,s=d.class),"length"in d&&t(5,l=d.length)},[s,o,r,a,u,l,f,c]}class W1 extends be{constructor(e){super(),_e(this,e,S6,w6,me,{class:0,length:5})}}function T6(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Username",o=E(),r=v("input"),p(t,"class",j.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","text"),p(r,"requried",a=!n[2]),p(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),p(r,"id",f=n[13])},m(h,m){w(h,e,m),b(e,t),b(e,i),b(e,s),w(h,o,m),w(h,r,m),de(r,n[0].username),c||(d=Y(r,"input",n[5]),c=!0)},p(h,m){m&8192&&l!==(l=h[13])&&p(e,"for",l),m&4&&a!==(a=!h[2])&&p(r,"requried",a),m&4&&u!==(u=h[2]?"Leave empty to auto generate...":h[4])&&p(r,"placeholder",u),m&8192&&f!==(f=h[13])&&p(r,"id",f),m&1&&r.value!==h[0].username&&de(r,h[0].username)},d(h){h&&(k(e),k(o),k(r)),c=!1,d()}}}function C6(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,h,m,g,_,y,S,C;return{c(){var T;e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Email",o=E(),r=v("div"),a=v("button"),u=v("span"),f=W("Public: "),d=W(c),m=E(),g=v("input"),p(t,"class",j.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[13]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",h="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(g,"type","email"),g.autofocus=n[2],p(g,"autocomplete","off"),p(g,"id",_=n[13]),g.required=y=(T=n[1].options)==null?void 0:T.requireEmail,p(g,"class","svelte-1751a4d")},m(T,$){w(T,e,$),b(e,t),b(e,i),b(e,s),w(T,o,$),w(T,r,$),b(r,a),b(a,u),b(u,f),b(u,d),w(T,m,$),w(T,g,$),de(g,n[0].email),n[2]&&g.focus(),S||(C=[Ce(Be.call(null,a,{text:"Make email public or private",position:"top-right"})),Y(a,"click",Ze(n[6])),Y(g,"input",n[7])],S=!0)},p(T,$){var M;$&8192&&l!==(l=T[13])&&p(e,"for",l),$&1&&c!==(c=T[0].emailVisibility?"On":"Off")&&le(d,c),$&1&&h!==(h="btn btn-sm btn-transparent "+(T[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",h),$&4&&(g.autofocus=T[2]),$&8192&&_!==(_=T[13])&&p(g,"id",_),$&2&&y!==(y=(M=T[1].options)==null?void 0:M.requireEmail)&&(g.required=y),$&1&&g.value!==T[0].email&&de(g,T[0].email)},d(T){T&&(k(e),k(o),k(r),k(m),k(g)),S=!1,$e(C)}}}function Hp(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[$6,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&24584&&(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){V(e,i)}}}function $6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Vp(n){let e,t,i,s,l,o,r,a,u;return s=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[M6,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[O6,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),Q(t,"p-t-xs",n[3]),p(e,"class","block")},m(f,c){w(f,e,c),b(e,t),b(t,i),H(s,i,null),b(t,l),b(t,o),H(r,o,null),u=!0},p(f,c){const d={};c&24577&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c&24577&&(h.$$scope={dirty:c,ctx:f}),r.$set(h),(!u||c&8)&&Q(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&xe(()=>{u&&(a||(a=He(e,lt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){L(s.$$.fragment,f),L(r.$$.fragment,f),f&&(a||(a=He(e,lt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),V(s),V(r),f&&a&&a.end()}}}function M6(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m;return c=new W1({props:{length:15}}),{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password",o=E(),r=v("input"),u=E(),f=v("div"),z(c.$$.fragment),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0,p(f,"class","form-field-addon")},m(g,_){w(g,e,_),b(e,t),b(e,i),b(e,s),w(g,o,_),w(g,r,_),de(r,n[0].password),w(g,u,_),w(g,f,_),H(c,f,null),d=!0,h||(m=Y(r,"input",n[9]),h=!0)},p(g,_){(!d||_&8192&&l!==(l=g[13]))&&p(e,"for",l),(!d||_&8192&&a!==(a=g[13]))&&p(r,"id",a),_&1&&r.value!==g[0].password&&de(r,g[0].password)},i(g){d||(A(c.$$.fragment,g),d=!0)},o(g){L(c.$$.fragment,g),d=!1},d(g){g&&(k(e),k(o),k(r),k(u),k(f)),V(c),h=!1,m()}}}function O6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password confirm",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),de(r,n[0].passwordConfirm),u||(f=Y(r,"input",n[10]),u=!0)},p(c,d){d&8192&&l!==(l=c[13])&&p(e,"for",l),d&8192&&a!==(a=c[13])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&de(r,c[0].passwordConfirm)},d(c){c&&(k(e),k(o),k(r)),u=!1,f()}}}function E6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[0].verified,w(u,i,f),w(u,s,f),b(s,l),r||(a=[Y(e,"change",n[11]),Y(e,"change",Ze(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,$e(a)}}}function D6(n){var _;let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new ge({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[T6,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+((_=n[1].options)!=null&&_.requireEmail?"required":""),name:"email",$$slots:{default:[C6,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}});let m=!n[2]&&Hp(n),g=(n[2]||n[3])&&Vp(n);return d=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[E6,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),m&&m.c(),u=E(),g&&g.c(),f=E(),c=v("div"),z(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,S){w(y,e,S),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),b(e,r),b(e,a),m&&m.m(a,null),b(a,u),g&&g.m(a,null),b(e,f),b(e,c),H(d,c,null),h=!0},p(y,[S]){var M;const C={};S&4&&(C.class="form-field "+(y[2]?"":"required")),S&24581&&(C.$$scope={dirty:S,ctx:y}),i.$set(C);const T={};S&2&&(T.class="form-field "+((M=y[1].options)!=null&&M.requireEmail?"required":"")),S&24583&&(T.$$scope={dirty:S,ctx:y}),o.$set(T),y[2]?m&&(re(),L(m,1,1,()=>{m=null}),ae()):m?(m.p(y,S),S&4&&A(m,1)):(m=Hp(y),m.c(),A(m,1),m.m(a,u)),y[2]||y[3]?g?(g.p(y,S),S&12&&A(g,1)):(g=Vp(y),g.c(),A(g,1),g.m(a,null)):g&&(re(),L(g,1,1,()=>{g=null}),ae());const $={};S&24581&&($.$$scope={dirty:S,ctx:y}),d.$set($)},i(y){h||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(m),A(g),A(d.$$.fragment,y),h=!0)},o(y){L(i.$$.fragment,y),L(o.$$.fragment,y),L(m),L(g),L(d.$$.fragment,y),h=!1},d(y){y&&k(e),V(i),V(o),m&&m.d(),g&&g.d(),V(d)}}}function A6(n,e,t){let{record:i}=e,{collection:s}=e,{isNew:l=!(i!=null&&i.id)}=e,o=i.username||null,r=!1;function a(){i.username=this.value,t(0,i),t(3,r)}const u=()=>t(0,i.emailVisibility=!i.emailVisibility,i);function f(){i.email=this.value,t(0,i),t(3,r)}function c(){r=this.checked,t(3,r)}function d(){i.password=this.value,t(0,i),t(3,r)}function h(){i.passwordConfirm=this.value,t(0,i),t(3,r)}function m(){i.verified=this.checked,t(0,i),t(3,r)}const g=_=>{l||_n("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,i.verified=!_.target.checked,i)})};return n.$$set=_=>{"record"in _&&t(0,i=_.record),"collection"in _&&t(1,s=_.collection),"isNew"in _&&t(2,l=_.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!i.username&&i.username!==null&&t(0,i.username=null,i),n.$$.dirty&8&&(r||(t(0,i.password=null,i),t(0,i.passwordConfirm=null,i),pi("password"),pi("passwordConfirm")))},[i,s,l,r,o,a,u,f,c,d,h,m,g]}class I6 extends be{constructor(e){super(),_e(this,e,A6,D6,me,{record:0,collection:1,isNew:2})}}function L6(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)&&!(h!=null&&h.isComposing)){h.preventDefault();const m=r.closest("form");m!=null&&m.requestSubmit&&m.requestSubmit()}}Kt(()=>(u(),()=>clearTimeout(a)));function c(h){te[h?"unshift":"push"](()=>{r=h,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(3,s=tt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,o=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class N6 extends be{constructor(e){super(),_e(this,e,P6,L6,me,{value:0,maxHeight:4})}}function F6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(g){n[2](g)}let m={id:n[3],required:n[1].required};return n[0]!==void 0&&(m.value=n[0]),f=new N6({props:m}),te.push(()=>he(f,"value",h)),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),z(f.$$.fragment),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,_){w(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(g,u,_),H(f,g,_),d=!0},p(g,_){(!d||_&2&&i!==(i=j.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||_&2)&&o!==(o=g[1].name+"")&&le(r,o),(!d||_&8&&a!==(a=g[3]))&&p(e,"for",a);const y={};_&8&&(y.id=g[3]),_&2&&(y.required=g[1].required),!c&&_&1&&(c=!0,y.value=g[0],ve(()=>c=!1)),f.$set(y)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){L(f.$$.fragment,g),d=!1},d(g){g&&(k(e),k(u)),V(f,g)}}}function R6(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[F6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function q6(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class j6 extends be{constructor(e){super(),_e(this,e,q6,R6,me,{field:1,value:0})}}function H6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,g,_;return{c(){var y,S;e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),f=v("input"),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",h=(y=n[1].options)==null?void 0:y.min),p(f,"max",m=(S=n[1].options)==null?void 0:S.max),p(f,"step","any")},m(y,S){w(y,e,S),b(e,t),b(e,s),b(e,l),b(l,r),w(y,u,S),w(y,f,S),de(f,n[0]),g||(_=Y(f,"input",n[2]),g=!0)},p(y,S){var C,T;S&2&&i!==(i=j.getFieldTypeIcon(y[1].type))&&p(t,"class",i),S&2&&o!==(o=y[1].name+"")&&le(r,o),S&8&&a!==(a=y[3])&&p(e,"for",a),S&8&&c!==(c=y[3])&&p(f,"id",c),S&2&&d!==(d=y[1].required)&&(f.required=d),S&2&&h!==(h=(C=y[1].options)==null?void 0:C.min)&&p(f,"min",h),S&2&&m!==(m=(T=y[1].options)==null?void 0:T.max)&&p(f,"max",m),S&1&&yt(f.value)!==y[0]&&de(f,y[0])},d(y){y&&(k(e),k(u),k(f)),g=!1,_()}}}function V6(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[H6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function z6(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=yt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class B6 extends be{constructor(e){super(),_e(this,e,z6,V6,me,{field:1,value:0})}}function U6(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=E(),s=v("label"),o=W(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){w(f,e,c),e.checked=n[0],w(f,i,c),w(f,s,c),b(s,o),a||(u=Y(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&le(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&(k(e),k(i),k(s)),a=!1,u()}}}function W6(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[U6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Y6(n,e,t){let{field:i}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class K6 extends be{constructor(e){super(),_e(this,e,Y6,W6,me,{field:1,value:0})}}function J6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),f=v("input"),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,_){w(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(g,u,_),w(g,f,_),de(f,n[0]),h||(m=Y(f,"input",n[2]),h=!0)},p(g,_){_&2&&i!==(i=j.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&le(r,o),_&8&&a!==(a=g[3])&&p(e,"for",a),_&8&&c!==(c=g[3])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&1&&f.value!==g[0]&&de(f,g[0])},d(g){g&&(k(e),k(u),k(f)),h=!1,m()}}}function G6(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[J6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Z6(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class X6 extends be{constructor(e){super(),_e(this,e,Z6,G6,me,{field:1,value:0})}}function Q6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),f=v("input"),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,_){w(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(g,u,_),w(g,f,_),de(f,n[0]),h||(m=Y(f,"input",n[2]),h=!0)},p(g,_){_&2&&i!==(i=j.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&le(r,o),_&8&&a!==(a=g[3])&&p(e,"for",a),_&8&&c!==(c=g[3])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&1&&f.value!==g[0]&&de(f,g[0])},d(g){g&&(k(e),k(u),k(f)),h=!1,m()}}}function x6(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[Q6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function e5(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class t5 extends be{constructor(e){super(),_e(this,e,e5,x6,me,{field:1,value:0})}}function zp(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){w(l,e,o),b(e,t),i||(s=[Ce(Be.call(null,t,"Clear")),Y(t,"click",n[5])],i=!0)},p:x,d(l){l&&k(e),i=!1,$e(s)}}}function n5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,g,_=n[0]&&!n[1].required&&zp(n);function y(T){n[6](T)}function S(T){n[7](T)}let C={id:n[8],options:j.defaultFlatpickrOptions()};return n[2]!==void 0&&(C.value=n[2]),n[0]!==void 0&&(C.formattedValue=n[0]),d=new ou({props:C}),te.push(()=>he(d,"value",y)),te.push(()=>he(d,"formattedValue",S)),d.$on("close",n[3]),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),a=W(" (UTC)"),f=E(),_&&_.c(),c=E(),z(d.$$.fragment),p(t,"class",i=ii(j.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[8])},m(T,$){w(T,e,$),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),w(T,f,$),_&&_.m(T,$),w(T,c,$),H(d,T,$),g=!0},p(T,$){(!g||$&2&&i!==(i=ii(j.getFieldTypeIcon(T[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!g||$&2)&&o!==(o=T[1].name+"")&&le(r,o),(!g||$&256&&u!==(u=T[8]))&&p(e,"for",u),T[0]&&!T[1].required?_?_.p(T,$):(_=zp(T),_.c(),_.m(c.parentNode,c)):_&&(_.d(1),_=null);const M={};$&256&&(M.id=T[8]),!h&&$&4&&(h=!0,M.value=T[2],ve(()=>h=!1)),!m&&$&1&&(m=!0,M.formattedValue=T[0],ve(()=>m=!1)),d.$set(M)},i(T){g||(A(d.$$.fragment,T),g=!0)},o(T){L(d.$$.fragment,T),g=!1},d(T){T&&(k(e),k(f),k(c)),_&&_.d(T),V(d,T)}}}function i5(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[n5,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function s5(n,e,t){let{field:i}=e,{value:s=void 0}=e,l=s;function o(c){c.detail&&c.detail.length==3&&t(0,s=c.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(c){l=c,t(2,l),t(0,s)}function f(c){s=c,t(0,s)}return n.$$set=c=>{"field"in c&&t(1,i=c.field),"value"in c&&t(0,s=c.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class l5 extends be{constructor(e){super(),_e(this,e,s5,i5,me,{field:1,value:0})}}function Bp(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=W("Select up to "),s=W(i),l=W(" items."),p(e,"class","help-block")},m(o,r){w(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&le(s,i)},d(o){o&&k(e)}}}function o5(n){var S,C,T,$,M,O;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function g(D){n[3](D)}let _={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||((S=n[0])==null?void 0:S.length)>=((C=n[1].options)==null?void 0:C.maxSelect),items:(T=n[1].options)==null?void 0:T.values,searchable:((M=($=n[1].options)==null?void 0:$.values)==null?void 0:M.length)>5};n[0]!==void 0&&(_.selected=n[0]),f=new z1({props:_}),te.push(()=>he(f,"selected",g));let y=((O=n[1].options)==null?void 0:O.maxSelect)>1&&Bp(n);return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),z(f.$$.fragment),d=E(),y&&y.c(),h=ye(),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(D,I){w(D,e,I),b(e,t),b(e,s),b(e,l),b(l,r),w(D,u,I),H(f,D,I),w(D,d,I),y&&y.m(D,I),w(D,h,I),m=!0},p(D,I){var P,F,R,q,B,Z;(!m||I&2&&i!==(i=j.getFieldTypeIcon(D[1].type)))&&p(t,"class",i),(!m||I&2)&&o!==(o=D[1].name+"")&&le(r,o),(!m||I&16&&a!==(a=D[4]))&&p(e,"for",a);const N={};I&16&&(N.id=D[4]),I&6&&(N.toggle=!D[1].required||D[2]),I&4&&(N.multiple=D[2]),I&7&&(N.closable=!D[2]||((P=D[0])==null?void 0:P.length)>=((F=D[1].options)==null?void 0:F.maxSelect)),I&2&&(N.items=(R=D[1].options)==null?void 0:R.values),I&2&&(N.searchable=((B=(q=D[1].options)==null?void 0:q.values)==null?void 0:B.length)>5),!c&&I&1&&(c=!0,N.selected=D[0],ve(()=>c=!1)),f.$set(N),((Z=D[1].options)==null?void 0:Z.maxSelect)>1?y?y.p(D,I):(y=Bp(D),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(D){m||(A(f.$$.fragment,D),m=!0)},o(D){L(f.$$.fragment,D),m=!1},d(D){D&&(k(e),k(u),k(d),k(h)),V(f,D),y&&y.d(D)}}}function r5(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[o5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function a5(n,e,t){let i,{field:s}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class u5 extends be{constructor(e){super(),_e(this,e,a5,r5,me,{field:1,value:0})}}function f5(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function c5(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function d5(n){let e;return{c(){e=v("input"),p(e,"type","text"),p(e,"class","txt-mono"),e.value="Loading...",e.disabled=!0},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function p5(n){let e,t,i;var s=n[3];function l(o,r){return{props:{id:o[6],maxHeight:"500",language:"json",value:o[2]}}}return s&&(e=Nt(s,l(n)),e.$on("change",n[5])),{c(){e&&z(e.$$.fragment),t=ye()},m(o,r){e&&H(e,o,r),w(o,t,r),i=!0},p(o,r){if(r&8&&s!==(s=o[3])){if(e){re();const a=e;L(a.$$.fragment,1,0,()=>{V(a,1)}),ae()}s?(e=Nt(s,l(o)),e.$on("change",o[5]),z(e.$$.fragment),A(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else if(s){const a={};r&64&&(a.id=o[6]),r&4&&(a.value=o[2]),e.$set(a)}},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&L(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&V(e,o)}}}function h5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,g,_,y,S;function C(I,N){return I[4]?c5:f5}let T=C(n),$=T(n);const M=[p5,d5],O=[];function D(I,N){return I[3]?0:1}return h=D(n),m=O[h]=M[h](n),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),a=E(),u=v("span"),$.c(),d=E(),m.c(),g=ye(),p(t,"class",i=ii(j.getFieldTypeIcon(n[1].type))+" svelte-p6ecb8"),p(l,"class","txt"),p(u,"class","json-state svelte-p6ecb8"),p(e,"for",c=n[6])},m(I,N){w(I,e,N),b(e,t),b(e,s),b(e,l),b(l,r),b(e,a),b(e,u),$.m(u,null),w(I,d,N),O[h].m(I,N),w(I,g,N),_=!0,y||(S=Ce(f=Be.call(null,u,{position:"left",text:n[4]?"Valid JSON":"Invalid JSON"})),y=!0)},p(I,N){(!_||N&2&&i!==(i=ii(j.getFieldTypeIcon(I[1].type))+" svelte-p6ecb8"))&&p(t,"class",i),(!_||N&2)&&o!==(o=I[1].name+"")&&le(r,o),T!==(T=C(I))&&($.d(1),$=T(I),$&&($.c(),$.m(u,null))),f&&Et(f.update)&&N&16&&f.update.call(null,{position:"left",text:I[4]?"Valid JSON":"Invalid JSON"}),(!_||N&64&&c!==(c=I[6]))&&p(e,"for",c);let P=h;h=D(I),h===P?O[h].p(I,N):(re(),L(O[P],1,1,()=>{O[P]=null}),ae(),m=O[h],m?m.p(I,N):(m=O[h]=M[h](I),m.c()),A(m,1),m.m(g.parentNode,g))},i(I){_||(A(m),_=!0)},o(I){L(m),_=!1},d(I){I&&(k(e),k(d),k(g)),$.d(),O[h].d(I),y=!1,S()}}}function m5(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[h5,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&223&&(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){V(e,i)}}}function Up(n){return JSON.stringify(typeof n>"u"?null:n,null,2)}function g5(n){try{return JSON.parse(n===""?null:n),!0}catch{}return!1}function _5(n,e,t){let i,{field:s}=e,{value:l=void 0}=e,o,r=Up(l);Kt(async()=>{try{t(3,o=(await ft(()=>import("./CodeEditor-c7cce7e3.js"),["./CodeEditor-c7cce7e3.js","./index-30dee195.js"],import.meta.url)).default)}catch(u){console.warn(u)}});const a=u=>{t(2,r=u.detail),t(0,l=r.trim())};return n.$$set=u=>{"field"in u&&t(1,s=u.field),"value"in u&&t(0,l=u.value)},n.$$.update=()=>{n.$$.dirty&5&&l!==(r==null?void 0:r.trim())&&(t(2,r=Up(l)),t(0,l=r)),n.$$.dirty&4&&t(4,i=g5(r))},[l,s,r,o,i,a]}class b5 extends be{constructor(e){super(),_e(this,e,_5,m5,me,{field:1,value:0})}}function v5(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function y5(n){let e,t,i;return{c(){e=v("img"),p(e,"draggable",!1),fn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!fn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function k5(n){let e;function t(l,o){return l[2]?y5:v5}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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:x,o:x,d(l){l&&k(e),s.d(l)}}}function w5(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){j.hasImageExtension(s==null?void 0:s.name)?j.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{t(2,i=""),console.warn("Unable to generate thumb: ",r)}):t(2,i="")}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class S5 extends be{constructor(e){super(),_e(this,e,w5,k5,me,{file:0,size:1})}}function Wp(n){let e;function t(l,o){return l[4]==="image"?C5:T5}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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){l&&k(e),s.d(l)}}}function T5(n){let e,t;return{c(){e=v("object"),t=W("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){w(i,e,s),b(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&k(e)}}}function C5(n){let e,t,i;return{c(){e=v("img"),fn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){w(s,e,l)},p(s,l){l&2&&!fn(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&k(e)}}}function $5(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Wp(n);return{c(){i&&i.c(),t=ye()},m(l,o){i&&i.m(l,o),w(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Wp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){l&&k(t),i&&i.d(l)}}}function M5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Ze(n[0])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function O5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("a"),t=W(n[2]),i=E(),s=v("i"),l=E(),o=v("div"),r=E(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,l,d),w(c,o,d),w(c,r,d),w(c,a,d),u||(f=Y(a,"click",n[0]),u=!0)},p(c,d){d&4&&le(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&(k(e),k(l),k(o),k(r),k(a)),u=!1,f()}}}function E5(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[O5],header:[M5],default:[$5]},$$scope:{ctx:n}};return e=new rn({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(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[7](null),V(e,s)}}}function D5(n,e,t){let i,s,l,o,r="";function a(h){h!==""&&(t(1,r=h),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(h){te[h?"unshift":"push"](()=>{o=h,t(3,o)})}function c(h){Re.call(this,n,h)}function d(h){Re.call(this,n,h)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=j.getFileType(s))},[u,r,s,o,l,a,i,f,c,d]}class A5 extends be{constructor(e){super(),_e(this,e,D5,E5,me,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function I5(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?F5:u[3]==="video"||u[3]==="audio"?N5:P5}let r=o(n),a=r(n);return{c(){e=v("a"),a.c(),p(e,"draggable",!1),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){w(u,e,f),a.m(e,null),s||(l=Y(e,"click",Sn(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&p(e,"class",t),f&64&&p(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&p(e,"title",i)},d(u){u&&k(e),a.d(),s=!1,l()}}}function L5(n){let e,t;return{c(){e=v("div"),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){w(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&p(e,"class",t)},d(i){i&&k(e)}}}function P5(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function N5(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function F5(n){let e,t,i,s,l;return{c(){e=v("img"),p(e,"draggable",!1),fn(e.src,t=n[5])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),p(e,"loading","lazy")},m(o,r){w(o,e,r),s||(l=Y(e,"error",n[8]),s=!0)},p(o,r){r&32&&!fn(e.src,t=o[5])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&k(e),s=!1,l()}}}function Yp(n){let e,t,i={};return e=new A5({props:i}),n[12](e),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[12](null),V(e,s)}}}function R5(n){let e,t,i;function s(a,u){return a[2]?L5:I5}let l=s(n),o=l(n),r=n[7]&&Yp(n);return{c(){o.c(),e=E(),r&&r.c(),t=ye()},m(a,u){o.m(a,u),w(a,e,u),r&&r.m(a,u),w(a,t,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e))),a[7]?r?(r.p(a,u),u&128&&A(r,1)):(r=Yp(a),r.c(),A(r,1),r.m(t.parentNode,t)):r&&(re(),L(r,1,1,()=>{r=null}),ae())},i(a){i||(A(r),i=!0)},o(a){L(r),i=!1},d(a){a&&(k(e),k(t)),o.d(a),r&&r.d(a)}}}function q5(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",c="",d=!0;h();async function h(){t(2,d=!0);try{t(10,c=await ce.getAdminFileToken(l.collectionId))}catch(y){console.warn("File token failure:",y)}t(2,d=!1)}function m(){t(5,u="")}const g=y=>{s&&(y.preventDefault(),a==null||a.show(f))};function _(y){te[y?"unshift":"push"](()=>{a=y,t(4,a)})}return n.$$set=y=>{"record"in y&&t(9,l=y.record),"filename"in y&&t(0,o=y.filename),"size"in y&&t(1,r=y.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=j.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=d?"":ce.files.getUrl(l,o,{token:c})),n.$$.dirty&1541&&t(5,u=d?"":ce.files.getUrl(l,o,{thumb:"100x100",token:c}))},[o,r,d,i,a,u,f,s,m,l,c,g,_]}class au extends be{constructor(e){super(),_e(this,e,q5,R5,me,{record:9,filename:0,size:1})}}function Kp(n,e,t){const i=n.slice();return i[29]=e[t],i[31]=t,i}function Jp(n,e,t){const i=n.slice();i[34]=e[t],i[31]=t;const s=i[2].includes(i[34]);return i[35]=s,i}function j5(n){let e,t,i;function s(){return n[17](n[34])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){w(l,e,o),t||(i=[Ce(Be.call(null,e,"Remove file")),Y(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,$e(i)}}}function H5(n){let e,t,i;function s(){return n[16](n[34])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){w(l,e,o),t||(i=Y(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,i()}}}function V5(n){let e,t,i,s,l,o,r=n[34]+"",a,u,f,c,d,h;i=new au({props:{record:n[3],filename:n[34]}});function m(y,S){return y[35]?H5:j5}let g=m(n),_=g(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),o=v("a"),a=W(r),c=E(),d=v("div"),_.c(),Q(t,"fade",n[35]),p(o,"draggable",!1),p(o,"href",u=ce.files.getUrl(n[3],n[34],{token:n[10]})),p(o,"class",f="txt-ellipsis "+(n[35]?"txt-strikethrough txt-hint":"link-primary")),p(o,"title","Download"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),p(l,"class","content"),p(d,"class","actions"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(y,S){w(y,e,S),b(e,t),H(i,t,null),b(e,s),b(e,l),b(l,o),b(o,a),b(e,c),b(e,d),_.m(d,null),h=!0},p(y,S){const C={};S[0]&8&&(C.record=y[3]),S[0]&32&&(C.filename=y[34]),i.$set(C),(!h||S[0]&36)&&Q(t,"fade",y[35]),(!h||S[0]&32)&&r!==(r=y[34]+"")&&le(a,r),(!h||S[0]&1064&&u!==(u=ce.files.getUrl(y[3],y[34],{token:y[10]})))&&p(o,"href",u),(!h||S[0]&36&&f!==(f="txt-ellipsis "+(y[35]?"txt-strikethrough txt-hint":"link-primary")))&&p(o,"class",f),g===(g=m(y))&&_?_.p(y,S):(_.d(1),_=g(y),_&&(_.c(),_.m(d,null))),(!h||S[1]&2)&&Q(e,"dragging",y[32]),(!h||S[1]&4)&&Q(e,"dragover",y[33])},i(y){h||(A(i.$$.fragment,y),h=!0)},o(y){L(i.$$.fragment,y),h=!1},d(y){y&&k(e),V(i),_.d()}}}function Gp(n,e){let t,i,s,l;function o(a){e[18](a)}let r={group:e[4].name+"_uploaded",index:e[31],disabled:!e[6],$$slots:{default:[V5,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.list=e[0]),i=new Fl({props:r}),te.push(()=>he(i,"list",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_uploaded"),u[0]&32&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&1068|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.list=e[0],ve(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){L(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function z5(n){let e,t,i,s,l,o,r,a,u=n[29].name+"",f,c,d,h,m,g,_;i=new S5({props:{file:n[29]}});function y(){return n[19](n[31])}return{c(){e=v("div"),t=v("figure"),z(i.$$.fragment),s=E(),l=v("div"),o=v("small"),o.textContent="New",r=E(),a=v("span"),f=W(u),d=E(),h=v("button"),h.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename m-r-auto"),p(l,"title",c=n[29].name),p(h,"type","button"),p(h,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(S,C){w(S,e,C),b(e,t),H(i,t,null),b(e,s),b(e,l),b(l,o),b(l,r),b(l,a),b(a,f),b(e,d),b(e,h),m=!0,g||(_=[Ce(Be.call(null,h,"Remove file")),Y(h,"click",y)],g=!0)},p(S,C){n=S;const T={};C[0]&2&&(T.file=n[29]),i.$set(T),(!m||C[0]&2)&&u!==(u=n[29].name+"")&&le(f,u),(!m||C[0]&2&&c!==(c=n[29].name))&&p(l,"title",c),(!m||C[1]&2)&&Q(e,"dragging",n[32]),(!m||C[1]&4)&&Q(e,"dragover",n[33])},i(S){m||(A(i.$$.fragment,S),m=!0)},o(S){L(i.$$.fragment,S),m=!1},d(S){S&&k(e),V(i),g=!1,$e(_)}}}function Zp(n,e){let t,i,s,l;function o(a){e[20](a)}let r={group:e[4].name+"_new",index:e[31],disabled:!e[6],$$slots:{default:[z5,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[1]!==void 0&&(r.list=e[1]),i=new Fl({props:r}),te.push(()=>he(i,"list",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_new"),u[0]&2&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&2|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&2&&(s=!0,f.list=e[1],ve(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){L(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function B5(n){let e,t,i,s,l,o=n[4].name+"",r,a,u,f,c=[],d=new Map,h,m=[],g=new Map,_,y,S,C,T,$,M,O,D,I,N,P,F=pe(n[5]);const R=Z=>Z[34]+Z[3].id;for(let Z=0;ZZ[29].name+Z[31];for(let Z=0;Z{"model"in o&&t(1,i=o.model)},n.$$.update=()=>{n.$$.dirty&2&&i&&l()},[s,i]}class U1 extends be{constructor(e){super(),_e(this,e,b6,_6,me,{model:1})}}function v6(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0]),p(e,"aria-label","Copy")},m(o,r){w(o,e,r),s||(l=[Ce(i=Be.call(null,e,n[2]?"":"Copy")),Y(e,"click",Sn(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&Et(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:x,o:x,d(o){o&&k(e),s=!1,$e(l)}}}function y6(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(j.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return Kt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class js extends be{constructor(e){super(),_e(this,e,y6,v6,me,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function k6(n){let e,t,i,s,l,o,r,a,u,f;return l=new js({props:{value:n[1]}}),{c(){e=v("div"),t=v("span"),i=W(n[1]),s=E(),z(l.$$.fragment),o=E(),r=v("i"),p(t,"class","secret svelte-1md8247"),p(r,"class","ri-refresh-line txt-sm link-hint"),p(r,"aria-label","Refresh"),p(e,"class","flex flex-gap-5 p-5")},m(c,d){w(c,e,d),b(e,t),b(t,i),n[6](t),b(e,s),H(l,e,null),b(e,o),b(e,r),a=!0,u||(f=[Ce(Be.call(null,r,"Refresh")),Y(r,"click",n[4])],u=!0)},p(c,d){(!a||d&2)&&le(i,c[1]);const h={};d&2&&(h.value=c[1]),l.$set(h)},i(c){a||(A(l.$$.fragment,c),a=!0)},o(c){L(l.$$.fragment,c),a=!1},d(c){c&&k(e),n[6](null),V(l),u=!1,$e(f)}}}function w6(n){let e,t,i,s,l,o,r,a,u,f;function c(h){n[7](h)}let d={class:"dropdown dropdown-upside dropdown-center dropdown-nowrap",$$slots:{default:[k6]},$$scope:{ctx:n}};return n[3]!==void 0&&(d.active=n[3]),s=new Pn({props:d}),te.push(()=>he(s,"active",c)),s.$on("show",n[4]),{c(){e=v("button"),t=v("i"),i=E(),z(s.$$.fragment),p(t,"class","ri-sparkling-line"),p(e,"tabindex","-1"),p(e,"type","button"),p(e,"aria-label","Generate"),p(e,"class",o="btn btn-circle "+n[0]+" svelte-1md8247")},m(h,m){w(h,e,m),b(e,t),b(e,i),H(s,e,null),a=!0,u||(f=Ce(r=Be.call(null,e,n[3]?"":"Generate")),u=!0)},p(h,[m]){const g={};m&518&&(g.$$scope={dirty:m,ctx:h}),!l&&m&8&&(l=!0,g.active=h[3],ve(()=>l=!1)),s.$set(g),(!a||m&1&&o!==(o="btn btn-circle "+h[0]+" svelte-1md8247"))&&p(e,"class",o),r&&Et(r.update)&&m&8&&r.update.call(null,h[3]?"":"Generate")},i(h){a||(A(s.$$.fragment,h),a=!0)},o(h){L(s.$$.fragment,h),a=!1},d(h){h&&k(e),V(s),u=!1,f()}}}function S6(n,e,t){const i=pt();let{class:s="btn-sm btn-hint btn-transparent"}=e,{length:l=32}=e,o="",r,a=!1;async function u(){if(t(1,o=j.randomSecret(l)),i("generate",o),await ln(),r){let d=document.createRange();d.selectNode(r),window.getSelection().removeAllRanges(),window.getSelection().addRange(d)}}function f(d){te[d?"unshift":"push"](()=>{r=d,t(2,r)})}function c(d){a=d,t(3,a)}return n.$$set=d=>{"class"in d&&t(0,s=d.class),"length"in d&&t(5,l=d.length)},[s,o,r,a,u,l,f,c]}class W1 extends be{constructor(e){super(),_e(this,e,S6,w6,me,{class:0,length:5})}}function T6(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Username",o=E(),r=v("input"),p(t,"class",j.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","text"),p(r,"requried",a=!n[2]),p(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),p(r,"id",f=n[13])},m(h,m){w(h,e,m),b(e,t),b(e,i),b(e,s),w(h,o,m),w(h,r,m),de(r,n[0].username),c||(d=Y(r,"input",n[5]),c=!0)},p(h,m){m&8192&&l!==(l=h[13])&&p(e,"for",l),m&4&&a!==(a=!h[2])&&p(r,"requried",a),m&4&&u!==(u=h[2]?"Leave empty to auto generate...":h[4])&&p(r,"placeholder",u),m&8192&&f!==(f=h[13])&&p(r,"id",f),m&1&&r.value!==h[0].username&&de(r,h[0].username)},d(h){h&&(k(e),k(o),k(r)),c=!1,d()}}}function C6(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,h,m,g,_,y,S,C;return{c(){var T;e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Email",o=E(),r=v("div"),a=v("button"),u=v("span"),f=W("Public: "),d=W(c),m=E(),g=v("input"),p(t,"class",j.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[13]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",h="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(g,"type","email"),g.autofocus=n[2],p(g,"autocomplete","off"),p(g,"id",_=n[13]),g.required=y=(T=n[1].options)==null?void 0:T.requireEmail,p(g,"class","svelte-1751a4d")},m(T,$){w(T,e,$),b(e,t),b(e,i),b(e,s),w(T,o,$),w(T,r,$),b(r,a),b(a,u),b(u,f),b(u,d),w(T,m,$),w(T,g,$),de(g,n[0].email),n[2]&&g.focus(),S||(C=[Ce(Be.call(null,a,{text:"Make email public or private",position:"top-right"})),Y(a,"click",Ze(n[6])),Y(g,"input",n[7])],S=!0)},p(T,$){var M;$&8192&&l!==(l=T[13])&&p(e,"for",l),$&1&&c!==(c=T[0].emailVisibility?"On":"Off")&&le(d,c),$&1&&h!==(h="btn btn-sm btn-transparent "+(T[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",h),$&4&&(g.autofocus=T[2]),$&8192&&_!==(_=T[13])&&p(g,"id",_),$&2&&y!==(y=(M=T[1].options)==null?void 0:M.requireEmail)&&(g.required=y),$&1&&g.value!==T[0].email&&de(g,T[0].email)},d(T){T&&(k(e),k(o),k(r),k(m),k(g)),S=!1,$e(C)}}}function Hp(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[$6,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,s){const l={};s&24584&&(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){V(e,i)}}}function $6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function Vp(n){let e,t,i,s,l,o,r,a,u;return s=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[M6,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[O6,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),Q(t,"p-t-xs",n[3]),p(e,"class","block")},m(f,c){w(f,e,c),b(e,t),b(t,i),H(s,i,null),b(t,l),b(t,o),H(r,o,null),u=!0},p(f,c){const d={};c&24577&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c&24577&&(h.$$scope={dirty:c,ctx:f}),r.$set(h),(!u||c&8)&&Q(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&xe(()=>{u&&(a||(a=He(e,lt,{duration:150},!0)),a.run(1))}),u=!0)},o(f){L(s.$$.fragment,f),L(r.$$.fragment,f),f&&(a||(a=He(e,lt,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),V(s),V(r),f&&a&&a.end()}}}function M6(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m;return c=new W1({props:{length:15}}),{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password",o=E(),r=v("input"),u=E(),f=v("div"),z(c.$$.fragment),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0,p(f,"class","form-field-addon")},m(g,_){w(g,e,_),b(e,t),b(e,i),b(e,s),w(g,o,_),w(g,r,_),de(r,n[0].password),w(g,u,_),w(g,f,_),H(c,f,null),d=!0,h||(m=Y(r,"input",n[9]),h=!0)},p(g,_){(!d||_&8192&&l!==(l=g[13]))&&p(e,"for",l),(!d||_&8192&&a!==(a=g[13]))&&p(r,"id",a),_&1&&r.value!==g[0].password&&de(r,g[0].password)},i(g){d||(A(c.$$.fragment,g),d=!0)},o(g){L(c.$$.fragment,g),d=!1},d(g){g&&(k(e),k(o),k(r),k(u),k(f)),V(c),h=!1,m()}}}function O6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password confirm",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),de(r,n[0].passwordConfirm),u||(f=Y(r,"input",n[10]),u=!0)},p(c,d){d&8192&&l!==(l=c[13])&&p(e,"for",l),d&8192&&a!==(a=c[13])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&de(r,c[0].passwordConfirm)},d(c){c&&(k(e),k(o),k(r)),u=!1,f()}}}function E6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[0].verified,w(u,i,f),w(u,s,f),b(s,l),r||(a=[Y(e,"change",n[11]),Y(e,"change",Ze(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,$e(a)}}}function D6(n){var _;let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new ge({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[T6,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+((_=n[1].options)!=null&&_.requireEmail?"required":""),name:"email",$$slots:{default:[C6,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}});let m=!n[2]&&Hp(n),g=(n[2]||n[3])&&Vp(n);return d=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[E6,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),m&&m.c(),u=E(),g&&g.c(),f=E(),c=v("div"),z(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,S){w(y,e,S),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),b(e,r),b(e,a),m&&m.m(a,null),b(a,u),g&&g.m(a,null),b(e,f),b(e,c),H(d,c,null),h=!0},p(y,[S]){var M;const C={};S&4&&(C.class="form-field "+(y[2]?"":"required")),S&24581&&(C.$$scope={dirty:S,ctx:y}),i.$set(C);const T={};S&2&&(T.class="form-field "+((M=y[1].options)!=null&&M.requireEmail?"required":"")),S&24583&&(T.$$scope={dirty:S,ctx:y}),o.$set(T),y[2]?m&&(re(),L(m,1,1,()=>{m=null}),ae()):m?(m.p(y,S),S&4&&A(m,1)):(m=Hp(y),m.c(),A(m,1),m.m(a,u)),y[2]||y[3]?g?(g.p(y,S),S&12&&A(g,1)):(g=Vp(y),g.c(),A(g,1),g.m(a,null)):g&&(re(),L(g,1,1,()=>{g=null}),ae());const $={};S&24581&&($.$$scope={dirty:S,ctx:y}),d.$set($)},i(y){h||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(m),A(g),A(d.$$.fragment,y),h=!0)},o(y){L(i.$$.fragment,y),L(o.$$.fragment,y),L(m),L(g),L(d.$$.fragment,y),h=!1},d(y){y&&k(e),V(i),V(o),m&&m.d(),g&&g.d(),V(d)}}}function A6(n,e,t){let{record:i}=e,{collection:s}=e,{isNew:l=!(i!=null&&i.id)}=e,o=i.username||null,r=!1;function a(){i.username=this.value,t(0,i),t(3,r)}const u=()=>t(0,i.emailVisibility=!i.emailVisibility,i);function f(){i.email=this.value,t(0,i),t(3,r)}function c(){r=this.checked,t(3,r)}function d(){i.password=this.value,t(0,i),t(3,r)}function h(){i.passwordConfirm=this.value,t(0,i),t(3,r)}function m(){i.verified=this.checked,t(0,i),t(3,r)}const g=_=>{l||_n("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,i.verified=!_.target.checked,i)})};return n.$$set=_=>{"record"in _&&t(0,i=_.record),"collection"in _&&t(1,s=_.collection),"isNew"in _&&t(2,l=_.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!i.username&&i.username!==null&&t(0,i.username=null,i),n.$$.dirty&8&&(r||(t(0,i.password=null,i),t(0,i.passwordConfirm=null,i),pi("password"),pi("passwordConfirm")))},[i,s,l,r,o,a,u,f,c,d,h,m,g]}class I6 extends be{constructor(e){super(),_e(this,e,A6,D6,me,{record:0,collection:1,isNew:2})}}function L6(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)&&!(h!=null&&h.isComposing)){h.preventDefault();const m=r.closest("form");m!=null&&m.requestSubmit&&m.requestSubmit()}}Kt(()=>(u(),()=>clearTimeout(a)));function c(h){te[h?"unshift":"push"](()=>{r=h,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=je(je({},e),xt(h)),t(3,s=tt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,o=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class N6 extends be{constructor(e){super(),_e(this,e,P6,L6,me,{value:0,maxHeight:4})}}function F6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(g){n[2](g)}let m={id:n[3],required:n[1].required};return n[0]!==void 0&&(m.value=n[0]),f=new N6({props:m}),te.push(()=>he(f,"value",h)),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),z(f.$$.fragment),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,_){w(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(g,u,_),H(f,g,_),d=!0},p(g,_){(!d||_&2&&i!==(i=j.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||_&2)&&o!==(o=g[1].name+"")&&le(r,o),(!d||_&8&&a!==(a=g[3]))&&p(e,"for",a);const y={};_&8&&(y.id=g[3]),_&2&&(y.required=g[1].required),!c&&_&1&&(c=!0,y.value=g[0],ve(()=>c=!1)),f.$set(y)},i(g){d||(A(f.$$.fragment,g),d=!0)},o(g){L(f.$$.fragment,g),d=!1},d(g){g&&(k(e),k(u)),V(f,g)}}}function R6(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[F6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function q6(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class j6 extends be{constructor(e){super(),_e(this,e,q6,R6,me,{field:1,value:0})}}function H6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,g,_;return{c(){var y,S;e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),f=v("input"),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",h=(y=n[1].options)==null?void 0:y.min),p(f,"max",m=(S=n[1].options)==null?void 0:S.max),p(f,"step","any")},m(y,S){w(y,e,S),b(e,t),b(e,s),b(e,l),b(l,r),w(y,u,S),w(y,f,S),de(f,n[0]),g||(_=Y(f,"input",n[2]),g=!0)},p(y,S){var C,T;S&2&&i!==(i=j.getFieldTypeIcon(y[1].type))&&p(t,"class",i),S&2&&o!==(o=y[1].name+"")&&le(r,o),S&8&&a!==(a=y[3])&&p(e,"for",a),S&8&&c!==(c=y[3])&&p(f,"id",c),S&2&&d!==(d=y[1].required)&&(f.required=d),S&2&&h!==(h=(C=y[1].options)==null?void 0:C.min)&&p(f,"min",h),S&2&&m!==(m=(T=y[1].options)==null?void 0:T.max)&&p(f,"max",m),S&1&&yt(f.value)!==y[0]&&de(f,y[0])},d(y){y&&(k(e),k(u),k(f)),g=!1,_()}}}function V6(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[H6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function z6(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=yt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class B6 extends be{constructor(e){super(),_e(this,e,z6,V6,me,{field:1,value:0})}}function U6(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=E(),s=v("label"),o=W(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){w(f,e,c),e.checked=n[0],w(f,i,c),w(f,s,c),b(s,o),a||(u=Y(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&le(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&(k(e),k(i),k(s)),a=!1,u()}}}function W6(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[U6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Y6(n,e,t){let{field:i}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class K6 extends be{constructor(e){super(),_e(this,e,Y6,W6,me,{field:1,value:0})}}function J6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),f=v("input"),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,_){w(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(g,u,_),w(g,f,_),de(f,n[0]),h||(m=Y(f,"input",n[2]),h=!0)},p(g,_){_&2&&i!==(i=j.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&le(r,o),_&8&&a!==(a=g[3])&&p(e,"for",a),_&8&&c!==(c=g[3])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&1&&f.value!==g[0]&&de(f,g[0])},d(g){g&&(k(e),k(u),k(f)),h=!1,m()}}}function G6(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[J6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Z6(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class X6 extends be{constructor(e){super(),_e(this,e,Z6,G6,me,{field:1,value:0})}}function Q6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),f=v("input"),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,_){w(g,e,_),b(e,t),b(e,s),b(e,l),b(l,r),w(g,u,_),w(g,f,_),de(f,n[0]),h||(m=Y(f,"input",n[2]),h=!0)},p(g,_){_&2&&i!==(i=j.getFieldTypeIcon(g[1].type))&&p(t,"class",i),_&2&&o!==(o=g[1].name+"")&&le(r,o),_&8&&a!==(a=g[3])&&p(e,"for",a),_&8&&c!==(c=g[3])&&p(f,"id",c),_&2&&d!==(d=g[1].required)&&(f.required=d),_&1&&f.value!==g[0]&&de(f,g[0])},d(g){g&&(k(e),k(u),k(f)),h=!1,m()}}}function x6(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[Q6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function e5(n,e,t){let{field:i}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class t5 extends be{constructor(e){super(),_e(this,e,e5,x6,me,{field:1,value:0})}}function zp(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){w(l,e,o),b(e,t),i||(s=[Ce(Be.call(null,t,"Clear")),Y(t,"click",n[5])],i=!0)},p:x,d(l){l&&k(e),i=!1,$e(s)}}}function n5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,g,_=n[0]&&!n[1].required&&zp(n);function y(T){n[6](T)}function S(T){n[7](T)}let C={id:n[8],options:j.defaultFlatpickrOptions()};return n[2]!==void 0&&(C.value=n[2]),n[0]!==void 0&&(C.formattedValue=n[0]),d=new ou({props:C}),te.push(()=>he(d,"value",y)),te.push(()=>he(d,"formattedValue",S)),d.$on("close",n[3]),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),a=W(" (UTC)"),f=E(),_&&_.c(),c=E(),z(d.$$.fragment),p(t,"class",i=ii(j.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[8])},m(T,$){w(T,e,$),b(e,t),b(e,s),b(e,l),b(l,r),b(l,a),w(T,f,$),_&&_.m(T,$),w(T,c,$),H(d,T,$),g=!0},p(T,$){(!g||$&2&&i!==(i=ii(j.getFieldTypeIcon(T[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!g||$&2)&&o!==(o=T[1].name+"")&&le(r,o),(!g||$&256&&u!==(u=T[8]))&&p(e,"for",u),T[0]&&!T[1].required?_?_.p(T,$):(_=zp(T),_.c(),_.m(c.parentNode,c)):_&&(_.d(1),_=null);const M={};$&256&&(M.id=T[8]),!h&&$&4&&(h=!0,M.value=T[2],ve(()=>h=!1)),!m&&$&1&&(m=!0,M.formattedValue=T[0],ve(()=>m=!1)),d.$set(M)},i(T){g||(A(d.$$.fragment,T),g=!0)},o(T){L(d.$$.fragment,T),g=!1},d(T){T&&(k(e),k(f),k(c)),_&&_.d(T),V(d,T)}}}function i5(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[n5,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function s5(n,e,t){let{field:i}=e,{value:s=void 0}=e,l=s;function o(c){c.detail&&c.detail.length==3&&t(0,s=c.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(c){l=c,t(2,l),t(0,s)}function f(c){s=c,t(0,s)}return n.$$set=c=>{"field"in c&&t(1,i=c.field),"value"in c&&t(0,s=c.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class l5 extends be{constructor(e){super(),_e(this,e,s5,i5,me,{field:1,value:0})}}function Bp(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=W("Select up to "),s=W(i),l=W(" items."),p(e,"class","help-block")},m(o,r){w(o,e,r),b(e,t),b(e,s),b(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&le(s,i)},d(o){o&&k(e)}}}function o5(n){var S,C,T,$,M,O;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function g(D){n[3](D)}let _={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||((S=n[0])==null?void 0:S.length)>=((C=n[1].options)==null?void 0:C.maxSelect),items:(T=n[1].options)==null?void 0:T.values,searchable:((M=($=n[1].options)==null?void 0:$.values)==null?void 0:M.length)>5};n[0]!==void 0&&(_.selected=n[0]),f=new z1({props:_}),te.push(()=>he(f,"selected",g));let y=((O=n[1].options)==null?void 0:O.maxSelect)>1&&Bp(n);return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),u=E(),z(f.$$.fragment),d=E(),y&&y.c(),h=ye(),p(t,"class",i=j.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(D,I){w(D,e,I),b(e,t),b(e,s),b(e,l),b(l,r),w(D,u,I),H(f,D,I),w(D,d,I),y&&y.m(D,I),w(D,h,I),m=!0},p(D,I){var P,F,R,q,B,Z;(!m||I&2&&i!==(i=j.getFieldTypeIcon(D[1].type)))&&p(t,"class",i),(!m||I&2)&&o!==(o=D[1].name+"")&&le(r,o),(!m||I&16&&a!==(a=D[4]))&&p(e,"for",a);const N={};I&16&&(N.id=D[4]),I&6&&(N.toggle=!D[1].required||D[2]),I&4&&(N.multiple=D[2]),I&7&&(N.closable=!D[2]||((P=D[0])==null?void 0:P.length)>=((F=D[1].options)==null?void 0:F.maxSelect)),I&2&&(N.items=(R=D[1].options)==null?void 0:R.values),I&2&&(N.searchable=((B=(q=D[1].options)==null?void 0:q.values)==null?void 0:B.length)>5),!c&&I&1&&(c=!0,N.selected=D[0],ve(()=>c=!1)),f.$set(N),((Z=D[1].options)==null?void 0:Z.maxSelect)>1?y?y.p(D,I):(y=Bp(D),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(D){m||(A(f.$$.fragment,D),m=!0)},o(D){L(f.$$.fragment,D),m=!1},d(D){D&&(k(e),k(u),k(d),k(h)),V(f,D),y&&y.d(D)}}}function r5(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[o5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){L(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function a5(n,e,t){let i,{field:s}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class u5 extends be{constructor(e){super(),_e(this,e,a5,r5,me,{field:1,value:0})}}function f5(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function c5(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function d5(n){let e;return{c(){e=v("input"),p(e,"type","text"),p(e,"class","txt-mono"),e.value="Loading...",e.disabled=!0},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function p5(n){let e,t,i;var s=n[3];function l(o,r){return{props:{id:o[6],maxHeight:"500",language:"json",value:o[2]}}}return s&&(e=Nt(s,l(n)),e.$on("change",n[5])),{c(){e&&z(e.$$.fragment),t=ye()},m(o,r){e&&H(e,o,r),w(o,t,r),i=!0},p(o,r){if(r&8&&s!==(s=o[3])){if(e){re();const a=e;L(a.$$.fragment,1,0,()=>{V(a,1)}),ae()}s?(e=Nt(s,l(o)),e.$on("change",o[5]),z(e.$$.fragment),A(e.$$.fragment,1),H(e,t.parentNode,t)):e=null}else if(s){const a={};r&64&&(a.id=o[6]),r&4&&(a.value=o[2]),e.$set(a)}},i(o){i||(e&&A(e.$$.fragment,o),i=!0)},o(o){e&&L(e.$$.fragment,o),i=!1},d(o){o&&k(t),e&&V(e,o)}}}function h5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,g,_,y,S;function C(I,N){return I[4]?c5:f5}let T=C(n),$=T(n);const M=[p5,d5],O=[];function D(I,N){return I[3]?0:1}return h=D(n),m=O[h]=M[h](n),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=W(o),a=E(),u=v("span"),$.c(),d=E(),m.c(),g=ye(),p(t,"class",i=ii(j.getFieldTypeIcon(n[1].type))+" svelte-p6ecb8"),p(l,"class","txt"),p(u,"class","json-state svelte-p6ecb8"),p(e,"for",c=n[6])},m(I,N){w(I,e,N),b(e,t),b(e,s),b(e,l),b(l,r),b(e,a),b(e,u),$.m(u,null),w(I,d,N),O[h].m(I,N),w(I,g,N),_=!0,y||(S=Ce(f=Be.call(null,u,{position:"left",text:n[4]?"Valid JSON":"Invalid JSON"})),y=!0)},p(I,N){(!_||N&2&&i!==(i=ii(j.getFieldTypeIcon(I[1].type))+" svelte-p6ecb8"))&&p(t,"class",i),(!_||N&2)&&o!==(o=I[1].name+"")&&le(r,o),T!==(T=C(I))&&($.d(1),$=T(I),$&&($.c(),$.m(u,null))),f&&Et(f.update)&&N&16&&f.update.call(null,{position:"left",text:I[4]?"Valid JSON":"Invalid JSON"}),(!_||N&64&&c!==(c=I[6]))&&p(e,"for",c);let P=h;h=D(I),h===P?O[h].p(I,N):(re(),L(O[P],1,1,()=>{O[P]=null}),ae(),m=O[h],m?m.p(I,N):(m=O[h]=M[h](I),m.c()),A(m,1),m.m(g.parentNode,g))},i(I){_||(A(m),_=!0)},o(I){L(m),_=!1},d(I){I&&(k(e),k(d),k(g)),$.d(),O[h].d(I),y=!1,S()}}}function m5(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[h5,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){H(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&223&&(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){V(e,i)}}}function Up(n){return JSON.stringify(typeof n>"u"?null:n,null,2)}function g5(n){try{return JSON.parse(n===""?null:n),!0}catch{}return!1}function _5(n,e,t){let i,{field:s}=e,{value:l=void 0}=e,o,r=Up(l);Kt(async()=>{try{t(3,o=(await ft(()=>import("./CodeEditor-c648ece6.js"),["./CodeEditor-c648ece6.js","./index-30dee195.js"],import.meta.url)).default)}catch(u){console.warn(u)}});const a=u=>{t(2,r=u.detail),t(0,l=r.trim())};return n.$$set=u=>{"field"in u&&t(1,s=u.field),"value"in u&&t(0,l=u.value)},n.$$.update=()=>{n.$$.dirty&5&&l!==(r==null?void 0:r.trim())&&(t(2,r=Up(l)),t(0,l=r)),n.$$.dirty&4&&t(4,i=g5(r))},[l,s,r,o,i,a]}class b5 extends be{constructor(e){super(),_e(this,e,_5,m5,me,{field:1,value:0})}}function v5(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function y5(n){let e,t,i;return{c(){e=v("img"),p(e,"draggable",!1),fn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!fn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function k5(n){let e;function t(l,o){return l[2]?y5:v5}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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:x,o:x,d(l){l&&k(e),s.d(l)}}}function w5(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){j.hasImageExtension(s==null?void 0:s.name)?j.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{t(2,i=""),console.warn("Unable to generate thumb: ",r)}):t(2,i="")}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class S5 extends be{constructor(e){super(),_e(this,e,w5,k5,me,{file:0,size:1})}}function Wp(n){let e;function t(l,o){return l[4]==="image"?C5:T5}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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){l&&k(e),s.d(l)}}}function T5(n){let e,t;return{c(){e=v("object"),t=W("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){w(i,e,s),b(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&k(e)}}}function C5(n){let e,t,i;return{c(){e=v("img"),fn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){w(s,e,l)},p(s,l){l&2&&!fn(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&k(e)}}}function $5(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&Wp(n);return{c(){i&&i.c(),t=ye()},m(l,o){i&&i.m(l,o),w(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=Wp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){l&&k(t),i&&i.d(l)}}}function M5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=Y(e,"click",Ze(n[0])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function O5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("a"),t=W(n[2]),i=E(),s=v("i"),l=E(),o=v("div"),r=E(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,l,d),w(c,o,d),w(c,r,d),w(c,a,d),u||(f=Y(a,"click",n[0]),u=!0)},p(c,d){d&4&&le(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&(k(e),k(l),k(o),k(r),k(a)),u=!1,f()}}}function E5(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[O5],header:[M5],default:[$5]},$$scope:{ctx:n}};return e=new rn({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(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[7](null),V(e,s)}}}function D5(n,e,t){let i,s,l,o,r="";function a(h){h!==""&&(t(1,r=h),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(h){te[h?"unshift":"push"](()=>{o=h,t(3,o)})}function c(h){Re.call(this,n,h)}function d(h){Re.call(this,n,h)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=j.getFileType(s))},[u,r,s,o,l,a,i,f,c,d]}class A5 extends be{constructor(e){super(),_e(this,e,D5,E5,me,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function I5(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?F5:u[3]==="video"||u[3]==="audio"?N5:P5}let r=o(n),a=r(n);return{c(){e=v("a"),a.c(),p(e,"draggable",!1),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){w(u,e,f),a.m(e,null),s||(l=Y(e,"click",Sn(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&p(e,"class",t),f&64&&p(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&p(e,"title",i)},d(u){u&&k(e),a.d(),s=!1,l()}}}function L5(n){let e,t;return{c(){e=v("div"),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){w(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&p(e,"class",t)},d(i){i&&k(e)}}}function P5(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function N5(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function F5(n){let e,t,i,s,l;return{c(){e=v("img"),p(e,"draggable",!1),fn(e.src,t=n[5])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),p(e,"loading","lazy")},m(o,r){w(o,e,r),s||(l=Y(e,"error",n[8]),s=!0)},p(o,r){r&32&&!fn(e.src,t=o[5])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&k(e),s=!1,l()}}}function Yp(n){let e,t,i={};return e=new A5({props:i}),n[12](e),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,l){const o={};e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[12](null),V(e,s)}}}function R5(n){let e,t,i;function s(a,u){return a[2]?L5:I5}let l=s(n),o=l(n),r=n[7]&&Yp(n);return{c(){o.c(),e=E(),r&&r.c(),t=ye()},m(a,u){o.m(a,u),w(a,e,u),r&&r.m(a,u),w(a,t,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e))),a[7]?r?(r.p(a,u),u&128&&A(r,1)):(r=Yp(a),r.c(),A(r,1),r.m(t.parentNode,t)):r&&(re(),L(r,1,1,()=>{r=null}),ae())},i(a){i||(A(r),i=!0)},o(a){L(r),i=!1},d(a){a&&(k(e),k(t)),o.d(a),r&&r.d(a)}}}function q5(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",c="",d=!0;h();async function h(){t(2,d=!0);try{t(10,c=await ce.getAdminFileToken(l.collectionId))}catch(y){console.warn("File token failure:",y)}t(2,d=!1)}function m(){t(5,u="")}const g=y=>{s&&(y.preventDefault(),a==null||a.show(f))};function _(y){te[y?"unshift":"push"](()=>{a=y,t(4,a)})}return n.$$set=y=>{"record"in y&&t(9,l=y.record),"filename"in y&&t(0,o=y.filename),"size"in y&&t(1,r=y.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=j.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=d?"":ce.files.getUrl(l,o,{token:c})),n.$$.dirty&1541&&t(5,u=d?"":ce.files.getUrl(l,o,{thumb:"100x100",token:c}))},[o,r,d,i,a,u,f,s,m,l,c,g,_]}class au extends be{constructor(e){super(),_e(this,e,q5,R5,me,{record:9,filename:0,size:1})}}function Kp(n,e,t){const i=n.slice();return i[29]=e[t],i[31]=t,i}function Jp(n,e,t){const i=n.slice();i[34]=e[t],i[31]=t;const s=i[2].includes(i[34]);return i[35]=s,i}function j5(n){let e,t,i;function s(){return n[17](n[34])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){w(l,e,o),t||(i=[Ce(Be.call(null,e,"Remove file")),Y(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,$e(i)}}}function H5(n){let e,t,i;function s(){return n[16](n[34])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){w(l,e,o),t||(i=Y(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,i()}}}function V5(n){let e,t,i,s,l,o,r=n[34]+"",a,u,f,c,d,h;i=new au({props:{record:n[3],filename:n[34]}});function m(y,S){return y[35]?H5:j5}let g=m(n),_=g(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),o=v("a"),a=W(r),c=E(),d=v("div"),_.c(),Q(t,"fade",n[35]),p(o,"draggable",!1),p(o,"href",u=ce.files.getUrl(n[3],n[34],{token:n[10]})),p(o,"class",f="txt-ellipsis "+(n[35]?"txt-strikethrough txt-hint":"link-primary")),p(o,"title","Download"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),p(l,"class","content"),p(d,"class","actions"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(y,S){w(y,e,S),b(e,t),H(i,t,null),b(e,s),b(e,l),b(l,o),b(o,a),b(e,c),b(e,d),_.m(d,null),h=!0},p(y,S){const C={};S[0]&8&&(C.record=y[3]),S[0]&32&&(C.filename=y[34]),i.$set(C),(!h||S[0]&36)&&Q(t,"fade",y[35]),(!h||S[0]&32)&&r!==(r=y[34]+"")&&le(a,r),(!h||S[0]&1064&&u!==(u=ce.files.getUrl(y[3],y[34],{token:y[10]})))&&p(o,"href",u),(!h||S[0]&36&&f!==(f="txt-ellipsis "+(y[35]?"txt-strikethrough txt-hint":"link-primary")))&&p(o,"class",f),g===(g=m(y))&&_?_.p(y,S):(_.d(1),_=g(y),_&&(_.c(),_.m(d,null))),(!h||S[1]&2)&&Q(e,"dragging",y[32]),(!h||S[1]&4)&&Q(e,"dragover",y[33])},i(y){h||(A(i.$$.fragment,y),h=!0)},o(y){L(i.$$.fragment,y),h=!1},d(y){y&&k(e),V(i),_.d()}}}function Gp(n,e){let t,i,s,l;function o(a){e[18](a)}let r={group:e[4].name+"_uploaded",index:e[31],disabled:!e[6],$$slots:{default:[V5,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.list=e[0]),i=new Fl({props:r}),te.push(()=>he(i,"list",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_uploaded"),u[0]&32&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&1068|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.list=e[0],ve(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){L(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function z5(n){let e,t,i,s,l,o,r,a,u=n[29].name+"",f,c,d,h,m,g,_;i=new S5({props:{file:n[29]}});function y(){return n[19](n[31])}return{c(){e=v("div"),t=v("figure"),z(i.$$.fragment),s=E(),l=v("div"),o=v("small"),o.textContent="New",r=E(),a=v("span"),f=W(u),d=E(),h=v("button"),h.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename m-r-auto"),p(l,"title",c=n[29].name),p(h,"type","button"),p(h,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(S,C){w(S,e,C),b(e,t),H(i,t,null),b(e,s),b(e,l),b(l,o),b(l,r),b(l,a),b(a,f),b(e,d),b(e,h),m=!0,g||(_=[Ce(Be.call(null,h,"Remove file")),Y(h,"click",y)],g=!0)},p(S,C){n=S;const T={};C[0]&2&&(T.file=n[29]),i.$set(T),(!m||C[0]&2)&&u!==(u=n[29].name+"")&&le(f,u),(!m||C[0]&2&&c!==(c=n[29].name))&&p(l,"title",c),(!m||C[1]&2)&&Q(e,"dragging",n[32]),(!m||C[1]&4)&&Q(e,"dragover",n[33])},i(S){m||(A(i.$$.fragment,S),m=!0)},o(S){L(i.$$.fragment,S),m=!1},d(S){S&&k(e),V(i),g=!1,$e(_)}}}function Zp(n,e){let t,i,s,l;function o(a){e[20](a)}let r={group:e[4].name+"_new",index:e[31],disabled:!e[6],$$slots:{default:[z5,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[1]!==void 0&&(r.list=e[1]),i=new Fl({props:r}),te.push(()=>he(i,"list",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),H(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_new"),u[0]&2&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&2|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&2&&(s=!0,f.list=e[1],ve(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){L(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function B5(n){let e,t,i,s,l,o=n[4].name+"",r,a,u,f,c=[],d=new Map,h,m=[],g=new Map,_,y,S,C,T,$,M,O,D,I,N,P,F=pe(n[5]);const R=Z=>Z[34]+Z[3].id;for(let Z=0;ZZ[29].name+Z[31];for(let Z=0;Z{M[N]=null}),ae(),o=M[l],o?o.p(D,I):(o=M[l]=$[l](D),o.c()),A(o,1),o.m(r.parentNode,r))},i(D){S||(A(o),S=!0)},o(D){L(o),S=!1},d(D){D&&(k(e),k(s),k(r),k(a)),M[l].d(D),C=!1,$e(T)}}}function KA(n){let e,t,i,s,l,o;return e=new ge({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[zA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new ge({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[BA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new ge({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[YA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(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){r&&(k(t),k(s)),V(e,r),V(i,r),V(l,r)}}}function Gm(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function JA(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Gm();return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),l=W(n[2]),o=E(),r=v("div"),a=E(),f&&f.c(),u=ye(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),w(c,o,d),w(c,r,d),w(c,a,d),f&&f.m(c,d),w(c,u,d)},p(c,d){d[0]&4&&le(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Gm(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(o),k(r),k(a),k(u)),f&&f.d(c)}}}function GA(n){let e,t;const i=[n[8]];let s={$$slots:{header:[JA],default:[KA]},$$scope:{ctx:n}};for(let l=0;lt(12,o=U));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Zm,d=!1;function h(){f==null||f.expand()}function m(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function _(){c||d||(t(5,d=!0),t(4,c=(await ft(()=>import("./CodeEditor-c7cce7e3.js"),["./CodeEditor-c7cce7e3.js","./index-30dee195.js"],import.meta.url)).default),Zm=c,t(5,d=!1))}function y(U){j.copyToClipboard(U),ko(`Copied ${U} to clipboard`,2e3)}_();function S(){u.subject=this.value,t(0,u)}const C=()=>y("{APP_NAME}"),T=()=>y("{APP_URL}");function $(){u.actionUrl=this.value,t(0,u)}const M=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),D=()=>y("{TOKEN}");function I(U){n.$$.not_equal(u.body,U)&&(u.body=U,t(0,u))}function N(){u.body=this.value,t(0,u)}const P=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),R=()=>y("{TOKEN}"),q=()=>y("{ACTION_URL}");function B(U){te[U?"unshift":"push"](()=>{f=U,t(3,f)})}function Z(U){Re.call(this,n,U)}function X(U){Re.call(this,n,U)}function J(U){Re.call(this,n,U)}return n.$$set=U=>{e=je(je({},e),xt(U)),t(8,l=tt(e,s)),"key"in U&&t(1,r=U.key),"title"in U&&t(2,a=U.title),"config"in U&&t(0,u=U.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!j.isEmpty(j.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||pi(r))},[u,r,a,f,c,d,i,y,l,h,m,g,o,S,C,T,$,M,O,D,I,N,P,F,R,q,B,Z,X,J]}class jr extends be{constructor(e){super(),_e(this,e,ZA,GA,me,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Xm(n,e,t){const i=n.slice();return i[21]=e[t],i}function Qm(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,c,d,h;return c=p0(e[11][0]),{key:n,first:null,c(){t=v("div"),i=v("input"),l=E(),o=v("label"),a=W(r),f=E(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,de(i,i.__value),p(o,"for",u=e[20]+e[21].value),p(t,"class","form-field-block"),c.p(i),this.first=t},m(m,g){w(m,t,g),b(t,i),i.checked=i.__value===e[2],b(t,l),b(t,o),b(o,a),b(t,f),d||(h=Y(i,"change",e[10]),d=!0)},p(m,g){e=m,g&1048576&&s!==(s=e[20]+e[21].value)&&p(i,"id",s),g&4&&(i.checked=i.__value===e[2]),g&1048576&&u!==(u=e[20]+e[21].value)&&p(o,"for",u)},d(m){m&&k(t),c.r(),d=!1,h()}}}function XA(n){let e=[],t=new Map,i,s=pe(n[7]);const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new ge({props:{class:"form-field required m-0",name:"email",$$slots:{default:[QA,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),z(t.$$.fragment),i=E(),z(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){w(a,e,u),H(t,e,null),b(e,i),H(s,e,null),l=!0,o||(r=Y(e,"submit",Ze(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&17825794&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){L(t.$$.fragment,a),L(s.$$.fragment,a),l=!1},d(a){a&&k(e),V(t),V(s),o=!1,r()}}}function e8(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function t8(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=W("Close"),i=E(),s=v("button"),l=v("i"),o=E(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=Y(e,"click",n[0]),u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&Q(s,"btn-loading",c[4])},d(c){c&&(k(e),k(i),k(s)),u=!1,f()}}}function n8(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[t8],header:[e8],default:[xA]},$$scope:{ctx:n}};return e=new rn({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[14]),l&16777270&&(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[15](null),V(e,s)}}}const Hr="last_email_test",xm="email_test_request";function i8(n,e,t){let i;const s=pt(),l="email_test_"+j.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Hr),u=o[0].value,f=!1,c=null;function d(O="",D=""){t(1,a=O||localStorage.getItem(Hr)),t(2,u=D||o[0].value),on({}),r==null||r.show()}function h(){return clearTimeout(c),r==null?void 0:r.hide()}async function m(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Hr,a),clearTimeout(c),c=setTimeout(()=>{ce.cancelRequest(xm),Ci("Test email send timeout.")},3e4);try{await ce.settings.testEmail(a,u,{$cancelKey:xm}),zt("Successfully sent test email."),s("submit"),t(4,f=!1),await ln(),h()}catch(O){t(4,f=!1),ce.error(O)}clearTimeout(c)}}const g=[[]];function _(){u=this.__value,t(2,u)}function y(){a=this.value,t(1,a)}const S=()=>m(),C=()=>!f;function T(O){te[O?"unshift":"push"](()=>{r=O,t(3,r)})}function $(O){Re.call(this,n,O)}function M(O){Re.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,m,d,_,g,y,S,C,T,$,M]}class s8 extends be{constructor(e){super(),_e(this,e,i8,n8,me,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function l8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M,O,D,I,N;i=new ge({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[r8,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[a8,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}});function P(ee){n[15](ee)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new jr({props:F}),te.push(()=>he(u,"config",P));function R(ee){n[16](ee)}let q={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(q.config=n[0].meta.resetPasswordTemplate),d=new jr({props:q}),te.push(()=>he(d,"config",R));function B(ee){n[17](ee)}let Z={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(Z.config=n[0].meta.confirmEmailChangeTemplate),g=new jr({props:Z}),te.push(()=>he(g,"config",B)),T=new ge({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[u8,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}});let X=n[0].smtp.enabled&&eg(n);function J(ee,se){return ee[5]?y8:v8}let U=J(n),oe=U(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),c=E(),z(d.$$.fragment),m=E(),z(g.$$.fragment),y=E(),S=v("hr"),C=E(),z(T.$$.fragment),$=E(),X&&X.c(),M=E(),O=v("div"),D=v("div"),I=E(),oe.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(D,"class","flex-fill"),p(O,"class","flex")},m(ee,se){w(ee,e,se),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),w(ee,r,se),w(ee,a,se),H(u,a,null),b(a,c),H(d,a,null),b(a,m),H(g,a,null),w(ee,y,se),w(ee,S,se),w(ee,C,se),H(T,ee,se),w(ee,$,se),X&&X.m(ee,se),w(ee,M,se),w(ee,O,se),b(O,D),b(O,I),oe.m(O,null),N=!0},p(ee,se){const Ee={};se[0]&1|se[1]&24&&(Ee.$$scope={dirty:se,ctx:ee}),i.$set(Ee);const qe={};se[0]&1|se[1]&24&&(qe.$$scope={dirty:se,ctx:ee}),o.$set(qe);const Ve={};!f&&se[0]&1&&(f=!0,Ve.config=ee[0].meta.verificationTemplate,ve(()=>f=!1)),u.$set(Ve);const We={};!h&&se[0]&1&&(h=!0,We.config=ee[0].meta.resetPasswordTemplate,ve(()=>h=!1)),d.$set(We);const ke={};!_&&se[0]&1&&(_=!0,ke.config=ee[0].meta.confirmEmailChangeTemplate,ve(()=>_=!1)),g.$set(ke);const Me={};se[0]&1|se[1]&24&&(Me.$$scope={dirty:se,ctx:ee}),T.$set(Me),ee[0].smtp.enabled?X?(X.p(ee,se),se[0]&1&&A(X,1)):(X=eg(ee),X.c(),A(X,1),X.m(M.parentNode,M)):X&&(re(),L(X,1,1,()=>{X=null}),ae()),U===(U=J(ee))&&oe?oe.p(ee,se):(oe.d(1),oe=U(ee),oe&&(oe.c(),oe.m(O,null)))},i(ee){N||(A(i.$$.fragment,ee),A(o.$$.fragment,ee),A(u.$$.fragment,ee),A(d.$$.fragment,ee),A(g.$$.fragment,ee),A(T.$$.fragment,ee),A(X),N=!0)},o(ee){L(i.$$.fragment,ee),L(o.$$.fragment,ee),L(u.$$.fragment,ee),L(d.$$.fragment,ee),L(g.$$.fragment,ee),L(T.$$.fragment,ee),L(X),N=!1},d(ee){ee&&(k(e),k(r),k(a),k(y),k(S),k(C),k($),k(M),k(O)),V(i),V(o),V(u),V(d),V(g),V(T,ee),X&&X.d(ee),oe.d()}}}function o8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function r8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Sender name"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].meta.senderName),r||(a=Y(l,"input",n[13]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&de(l,u[0].meta.senderName)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function a8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Sender address"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","email"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].meta.senderAddress),r||(a=Y(l,"input",n[14]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&de(l,u[0].meta.senderAddress)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function u8(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[34])},m(c,d){w(c,e,d),e.checked=n[0].smtp.enabled,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[18]),Ce(Be.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&8&&t!==(t=c[34])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&8&&a!==(a=c[34])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function eg(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T;s=new ge({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[f8,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[c8,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),f=new ge({props:{class:"form-field",name:"smtp.username",$$slots:{default:[d8,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),h=new ge({props:{class:"form-field",name:"smtp.password",$$slots:{default:[p8,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}});function $(I,N){return I[4]?m8:h8}let M=$(n),O=M(n),D=n[4]&&tg(n);return{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),a=E(),u=v("div"),z(f.$$.fragment),c=E(),d=v("div"),z(h.$$.fragment),m=E(),g=v("button"),O.c(),_=E(),D&&D.c(),p(i,"class","col-lg-4"),p(o,"class","col-lg-2"),p(u,"class","col-lg-3"),p(d,"class","col-lg-3"),p(t,"class","grid"),p(g,"type","button"),p(g,"class","btn btn-sm btn-secondary m-t-sm m-b-sm")},m(I,N){w(I,e,N),b(e,t),b(t,i),H(s,i,null),b(t,l),b(t,o),H(r,o,null),b(t,a),b(t,u),H(f,u,null),b(t,c),b(t,d),H(h,d,null),b(e,m),b(e,g),O.m(g,null),b(e,_),D&&D.m(e,null),S=!0,C||(T=Y(g,"click",Ze(n[23])),C=!0)},p(I,N){const P={};N[0]&1|N[1]&24&&(P.$$scope={dirty:N,ctx:I}),s.$set(P);const F={};N[0]&1|N[1]&24&&(F.$$scope={dirty:N,ctx:I}),r.$set(F);const R={};N[0]&1|N[1]&24&&(R.$$scope={dirty:N,ctx:I}),f.$set(R);const q={};N[0]&1|N[1]&24&&(q.$$scope={dirty:N,ctx:I}),h.$set(q),M!==(M=$(I))&&(O.d(1),O=M(I),O&&(O.c(),O.m(g,null))),I[4]?D?(D.p(I,N),N[0]&16&&A(D,1)):(D=tg(I),D.c(),A(D,1),D.m(e,null)):D&&(re(),L(D,1,1,()=>{D=null}),ae())},i(I){S||(A(s.$$.fragment,I),A(r.$$.fragment,I),A(f.$$.fragment,I),A(h.$$.fragment,I),A(D),I&&xe(()=>{S&&(y||(y=He(e,lt,{duration:150},!0)),y.run(1))}),S=!0)},o(I){L(s.$$.fragment,I),L(r.$$.fragment,I),L(f.$$.fragment,I),L(h.$$.fragment,I),L(D),I&&(y||(y=He(e,lt,{duration:150},!1)),y.run(0)),S=!1},d(I){I&&k(e),V(s),V(r),V(f),V(h),O.d(),D&&D.d(),I&&y&&y.end(),C=!1,T()}}}function f8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("SMTP server host"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].smtp.host),r||(a=Y(l,"input",n[19]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&de(l,u[0].smtp.host)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function c8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Port"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","number"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].smtp.port),r||(a=Y(l,"input",n[20]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&yt(l.value)!==u[0].smtp.port&&de(l,u[0].smtp.port)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function d8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Username"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34])},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].smtp.username),r||(a=Y(l,"input",n[21]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&de(l,u[0].smtp.username)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function p8(n){let e,t,i,s,l,o,r;function a(f){n[22](f)}let u={id:n[34]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new cu({props:u}),te.push(()=>he(l,"value",a)),{c(){e=v("label"),t=W("Password"),s=E(),z(l.$$.fragment),p(e,"for",i=n[34])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&8&&i!==(i=f[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=f[34]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,ve(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),V(l,f)}}}function h8(n){let e,t,i;return{c(){e=v("span"),e.textContent="Show more options",t=E(),i=v("i"),p(e,"class","txt"),p(i,"class","ri-arrow-down-s-line")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&(k(e),k(t),k(i))}}}function m8(n){let e,t,i;return{c(){e=v("span"),e.textContent="Hide more options",t=E(),i=v("i"),p(e,"class","txt"),p(i,"class","ri-arrow-up-s-line")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&(k(e),k(t),k(i))}}}function tg(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new ge({props:{class:"form-field",name:"smtp.tls",$$slots:{default:[g8,({uniqueId:m})=>({34:m}),({uniqueId:m})=>[0,m?8:0]]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[_8,({uniqueId:m})=>({34:m}),({uniqueId:m})=>[0,m?8:0]]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"smtp.localName",$$slots:{default:[b8,({uniqueId:m})=>({34:m}),({uniqueId:m})=>[0,m?8:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),f=E(),c=v("div"),p(t,"class","col-lg-3"),p(l,"class","col-lg-3"),p(a,"class","col-lg-6"),p(c,"class","col-lg-12"),p(e,"class","grid")},m(m,g){w(m,e,g),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),b(e,r),b(e,a),H(u,a,null),b(e,f),b(e,c),h=!0},p(m,g){const _={};g[0]&1|g[1]&24&&(_.$$scope={dirty:g,ctx:m}),i.$set(_);const y={};g[0]&1|g[1]&24&&(y.$$scope={dirty:g,ctx:m}),o.$set(y);const S={};g[0]&1|g[1]&24&&(S.$$scope={dirty:g,ctx:m}),u.$set(S)},i(m){h||(A(i.$$.fragment,m),A(o.$$.fragment,m),A(u.$$.fragment,m),m&&xe(()=>{h&&(d||(d=He(e,lt,{duration:150},!0)),d.run(1))}),h=!0)},o(m){L(i.$$.fragment,m),L(o.$$.fragment,m),L(u.$$.fragment,m),m&&(d||(d=He(e,lt,{duration:150},!1)),d.run(0)),h=!1},d(m){m&&k(e),V(i),V(o),V(u),m&&d&&d.end()}}}function g8(n){let e,t,i,s,l,o,r;function a(f){n[24](f)}let u={id:n[34],items:n[7]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Ei({props:u}),te.push(()=>he(l,"keyOfSelected",a)),{c(){e=v("label"),t=W("TLS encryption"),s=E(),z(l.$$.fragment),p(e,"for",i=n[34])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&8&&i!==(i=f[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=f[34]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,ve(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),V(l,f)}}}function _8(n){let e,t,i,s,l,o,r;function a(f){n[25](f)}let u={id:n[34],items:n[8]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Ei({props:u}),te.push(()=>he(l,"keyOfSelected",a)),{c(){e=v("label"),t=W("AUTH method"),s=E(),z(l.$$.fragment),p(e,"for",i=n[34])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&8&&i!==(i=f[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=f[34]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,ve(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),V(l,f)}}}function b8(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="EHLO/HELO domain",i=E(),s=v("i"),o=E(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[34]),p(r,"type","text"),p(r,"id",a=n[34]),p(r,"placeholder","Default to localhost")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),de(r,n[0].smtp.localName),u||(f=[Ce(Be.call(null,s,{text:"Some SMTP servers, such as the Gmail SMTP-relay, requires a proper domain name in the inital EHLO/HELO exchange and will reject attempts to use localhost.",position:"top"})),Y(r,"input",n[26])],u=!0)},p(c,d){d[1]&8&&l!==(l=c[34])&&p(e,"for",l),d[1]&8&&a!==(a=c[34])&&p(r,"id",a),d[0]&1&&r.value!==c[0].smtp.localName&&de(r,c[0].smtp.localName)},d(c){c&&(k(e),k(o),k(r)),u=!1,$e(f)}}}function v8(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' Send test email',p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[29]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function y8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[3],Q(s,"btn-loading",n[3])},m(u,f){w(u,e,f),b(e,t),w(u,i,f),w(u,s,f),b(s,l),r||(a=[Y(e,"click",n[27]),Y(s,"click",n[28])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&40&&o!==(o=!u[5]||u[3])&&(s.disabled=o),f[0]&8&&Q(s,"btn-loading",u[3])},d(u){u&&(k(e),k(i),k(s)),r=!1,$e(a)}}}function k8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_;const y=[o8,l8],S=[];function C(T,$){return T[2]?0:1}return d=C(n),h=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=W(n[6]),r=E(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=E(),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(T,$){w(T,e,$),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(T,r,$),w(T,a,$),b(a,u),b(u,f),b(u,c),S[d].m(u,null),m=!0,g||(_=Y(u,"submit",Ze(n[30])),g=!0)},p(T,$){(!m||$[0]&64)&&le(o,T[6]);let M=d;d=C(T),d===M?S[d].p(T,$):(re(),L(S[M],1,1,()=>{S[M]=null}),ae(),h=S[d],h?h.p(T,$):(h=S[d]=y[d](T),h.c()),A(h,1),h.m(u,null))},i(T){m||(A(h),m=!0)},o(T){L(h),m=!1},d(T){T&&(k(e),k(r),k(a)),S[d].d(),g=!1,_()}}}function w8(n){let e,t,i,s,l,o;e=new Di({}),i=new Tn({props:{$$slots:{default:[k8]},$$scope:{ctx:n}}});let r={};return l=new s8({props:r}),n[31](l),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(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]&127|u[1]&16&&(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){a&&(k(t),k(s)),V(e,a),V(i,a),n[31](null),V(l,a)}}}function S8(n,e,t){let i,s,l;Ge(n,Ft,ee=>t(6,l=ee));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];un(Ft,l="Mail settings",l);let a,u={},f={},c=!1,d=!1,h=!1;m();async function m(){t(2,c=!0);try{const ee=await ce.settings.getAll()||{};_(ee)}catch(ee){ce.error(ee)}t(2,c=!1)}async function g(){if(!(d||!s)){t(3,d=!0);try{const ee=await ce.settings.update(j.filterRedactedProps(f));_(ee),on({}),zt("Successfully saved mail settings.")}catch(ee){ce.error(ee)}t(3,d=!1)}}function _(ee={}){t(0,f={meta:(ee==null?void 0:ee.meta)||{},smtp:(ee==null?void 0:ee.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(11,u=JSON.parse(JSON.stringify(f)))}function y(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function S(){f.meta.senderName=this.value,t(0,f)}function C(){f.meta.senderAddress=this.value,t(0,f)}function T(ee){n.$$.not_equal(f.meta.verificationTemplate,ee)&&(f.meta.verificationTemplate=ee,t(0,f))}function $(ee){n.$$.not_equal(f.meta.resetPasswordTemplate,ee)&&(f.meta.resetPasswordTemplate=ee,t(0,f))}function M(ee){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,ee)&&(f.meta.confirmEmailChangeTemplate=ee,t(0,f))}function O(){f.smtp.enabled=this.checked,t(0,f)}function D(){f.smtp.host=this.value,t(0,f)}function I(){f.smtp.port=yt(this.value),t(0,f)}function N(){f.smtp.username=this.value,t(0,f)}function P(ee){n.$$.not_equal(f.smtp.password,ee)&&(f.smtp.password=ee,t(0,f))}const F=()=>{t(4,h=!h)};function R(ee){n.$$.not_equal(f.smtp.tls,ee)&&(f.smtp.tls=ee,t(0,f))}function q(ee){n.$$.not_equal(f.smtp.authMethod,ee)&&(f.smtp.authMethod=ee,t(0,f))}function B(){f.smtp.localName=this.value,t(0,f)}const Z=()=>y(),X=()=>g(),J=()=>a==null?void 0:a.show(),U=()=>g();function oe(ee){te[ee?"unshift":"push"](()=>{a=ee,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&2048&&t(12,i=JSON.stringify(u)),n.$$.dirty[0]&4097&&t(5,s=i!=JSON.stringify(f))},[f,a,c,d,h,s,l,o,r,g,y,u,i,S,C,T,$,M,O,D,I,N,P,F,R,q,B,Z,X,J,U,oe]}class T8 extends be{constructor(e){super(),_e(this,e,S8,w8,me,{},null,[-1,-1])}}const C8=n=>({isTesting:n&4,testError:n&2,enabled:n&1}),ng=n=>({isTesting:n[2],testError:n[1],enabled:n[0].enabled});function $8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W(n[4]),p(e,"type","checkbox"),p(e,"id",t=n[20]),e.required=!0,p(s,"for",o=n[20])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&16&&le(l,u[4]),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function ig(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M;return i=new ge({props:{class:"form-field required",name:n[3]+".endpoint",$$slots:{default:[M8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:n[3]+".bucket",$$slots:{default:[O8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field required",name:n[3]+".region",$$slots:{default:[E8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field required",name:n[3]+".accessKey",$$slots:{default:[D8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),g=new ge({props:{class:"form-field required",name:n[3]+".secret",$$slots:{default:[A8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),S=new ge({props:{class:"form-field",name:n[3]+".forcePathStyle",$$slots:{default:[I8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),f=E(),c=v("div"),z(d.$$.fragment),h=E(),m=v("div"),z(g.$$.fragment),_=E(),y=v("div"),z(S.$$.fragment),C=E(),T=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(m,"class","col-lg-6"),p(y,"class","col-lg-12"),p(T,"class","col-lg-12"),p(e,"class","grid")},m(O,D){w(O,e,D),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),b(e,r),b(e,a),H(u,a,null),b(e,f),b(e,c),H(d,c,null),b(e,h),b(e,m),H(g,m,null),b(e,_),b(e,y),H(S,y,null),b(e,C),b(e,T),M=!0},p(O,D){const I={};D&8&&(I.name=O[3]+".endpoint"),D&1081345&&(I.$$scope={dirty:D,ctx:O}),i.$set(I);const N={};D&8&&(N.name=O[3]+".bucket"),D&1081345&&(N.$$scope={dirty:D,ctx:O}),o.$set(N);const P={};D&8&&(P.name=O[3]+".region"),D&1081345&&(P.$$scope={dirty:D,ctx:O}),u.$set(P);const F={};D&8&&(F.name=O[3]+".accessKey"),D&1081345&&(F.$$scope={dirty:D,ctx:O}),d.$set(F);const R={};D&8&&(R.name=O[3]+".secret"),D&1081345&&(R.$$scope={dirty:D,ctx:O}),g.$set(R);const q={};D&8&&(q.name=O[3]+".forcePathStyle"),D&1081345&&(q.$$scope={dirty:D,ctx:O}),S.$set(q)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(S.$$.fragment,O),O&&xe(()=>{M&&($||($=He(e,lt,{duration:150},!0)),$.run(1))}),M=!0)},o(O){L(i.$$.fragment,O),L(o.$$.fragment,O),L(u.$$.fragment,O),L(d.$$.fragment,O),L(g.$$.fragment,O),L(S.$$.fragment,O),O&&($||($=He(e,lt,{duration:150},!1)),$.run(0)),M=!1},d(O){O&&k(e),V(i),V(o),V(u),V(d),V(g),V(S),O&&$&&$.end()}}}function M8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Endpoint"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].endpoint),r||(a=Y(l,"input",n[9]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].endpoint&&de(l,u[0].endpoint)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function O8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Bucket"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].bucket),r||(a=Y(l,"input",n[10]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].bucket&&de(l,u[0].bucket)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function E8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Region"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].region),r||(a=Y(l,"input",n[11]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].region&&de(l,u[0].region)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function D8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Access key"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].accessKey),r||(a=Y(l,"input",n[12]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].accessKey&&de(l,u[0].accessKey)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function A8(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:!0};return n[0].secret!==void 0&&(u.value=n[0].secret),l=new cu({props:u}),te.push(()=>he(l,"value",a)),{c(){e=v("label"),t=W("Secret"),s=E(),z(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].secret,ve(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),V(l,f)}}}function I8(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[20])},m(c,d){w(c,e,d),e.checked=n[0].forcePathStyle,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[14]),Ce(Be.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&1048576&&t!==(t=c[20])&&p(e,"id",t),d&1&&(e.checked=c[0].forcePathStyle),d&1048576&&a!==(a=c[20])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function L8(n){let e,t,i,s,l;e=new ge({props:{class:"form-field form-field-toggle",$$slots:{default:[$8,({uniqueId:u})=>({20:u}),({uniqueId:u})=>u?1048576:0]},$$scope:{ctx:n}}});const o=n[7].default,r=Tt(o,n,n[15],ng);let a=n[0].enabled&&ig(n);return{c(){z(e.$$.fragment),t=E(),r&&r.c(),i=E(),a&&a.c(),s=ye()},m(u,f){H(e,u,f),w(u,t,f),r&&r.m(u,f),w(u,i,f),a&&a.m(u,f),w(u,s,f),l=!0},p(u,[f]){const c={};f&1081361&&(c.$$scope={dirty:f,ctx:u}),e.$set(c),r&&r.p&&(!l||f&32775)&&$t(r,o,u,u[15],l?Ct(o,u[15],f,C8):Mt(u[15]),ng),u[0].enabled?a?(a.p(u,f),f&1&&A(a,1)):(a=ig(u),a.c(),A(a,1),a.m(s.parentNode,s)):a&&(re(),L(a,1,1,()=>{a=null}),ae())},i(u){l||(A(e.$$.fragment,u),A(r,u),A(a),l=!0)},o(u){L(e.$$.fragment,u),L(r,u),L(a),l=!1},d(u){u&&(k(t),k(i),k(s)),V(e,u),r&&r.d(u),a&&a.d(u)}}}const Vr="s3_test_request";function P8(n,e,t){let{$$slots:i={},$$scope:s}=e,{originalConfig:l={}}=e,{config:o={}}=e,{configKey:r="s3"}=e,{toggleLabel:a="Enable S3"}=e,{testFilesystem:u="storage"}=e,{testError:f=null}=e,{isTesting:c=!1}=e,d=null,h=null;function m(O){t(2,c=!0),clearTimeout(h),h=setTimeout(()=>{g()},O)}async function g(){if(t(1,f=null),!o.enabled)return t(2,c=!1),f;ce.cancelRequest(Vr),clearTimeout(d),d=setTimeout(()=>{ce.cancelRequest(Vr),t(1,f=new Error("S3 test connection timeout.")),t(2,c=!1)},3e4),t(2,c=!0);let O;try{await ce.settings.testS3(u,{$cancelKey:Vr})}catch(D){O=D}return O!=null&&O.isAbort||(t(1,f=O),t(2,c=!1),clearTimeout(d)),f}Kt(()=>()=>{clearTimeout(d),clearTimeout(h)});function _(){o.enabled=this.checked,t(0,o)}function y(){o.endpoint=this.value,t(0,o)}function S(){o.bucket=this.value,t(0,o)}function C(){o.region=this.value,t(0,o)}function T(){o.accessKey=this.value,t(0,o)}function $(O){n.$$.not_equal(o.secret,O)&&(o.secret=O,t(0,o))}function M(){o.forcePathStyle=this.checked,t(0,o)}return n.$$set=O=>{"originalConfig"in O&&t(5,l=O.originalConfig),"config"in O&&t(0,o=O.config),"configKey"in O&&t(3,r=O.configKey),"toggleLabel"in O&&t(4,a=O.toggleLabel),"testFilesystem"in O&&t(6,u=O.testFilesystem),"testError"in O&&t(1,f=O.testError),"isTesting"in O&&t(2,c=O.isTesting),"$$scope"in O&&t(15,s=O.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&l!=null&&l.enabled&&m(100),n.$$.dirty&9&&(o.enabled||pi(r))},[o,f,c,r,a,l,u,i,_,y,S,C,T,$,M,s]}class K1 extends be{constructor(e){super(),_e(this,e,P8,L8,me,{originalConfig:5,config:0,configKey:3,toggleLabel:4,testFilesystem:6,testError:1,isTesting:2})}}function N8(n){var O;let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_;function y(D){n[11](D)}function S(D){n[12](D)}function C(D){n[13](D)}let T={toggleLabel:"Use S3 storage",originalConfig:n[0].s3,$$slots:{default:[R8]},$$scope:{ctx:n}};n[1].s3!==void 0&&(T.config=n[1].s3),n[4]!==void 0&&(T.isTesting=n[4]),n[5]!==void 0&&(T.testError=n[5]),e=new K1({props:T}),te.push(()=>he(e,"config",y)),te.push(()=>he(e,"isTesting",S)),te.push(()=>he(e,"testError",C));let $=((O=n[1].s3)==null?void 0:O.enabled)&&!n[6]&&!n[3]&&lg(n),M=n[6]&&og(n);return{c(){z(e.$$.fragment),l=E(),o=v("div"),r=v("div"),a=E(),$&&$.c(),u=E(),M&&M.c(),f=E(),c=v("button"),d=v("span"),d.textContent="Save changes",p(r,"class","flex-fill"),p(d,"class","txt"),p(c,"type","submit"),p(c,"class","btn btn-expanded"),c.disabled=h=!n[6]||n[3],Q(c,"btn-loading",n[3]),p(o,"class","flex")},m(D,I){H(e,D,I),w(D,l,I),w(D,o,I),b(o,r),b(o,a),$&&$.m(o,null),b(o,u),M&&M.m(o,null),b(o,f),b(o,c),b(c,d),m=!0,g||(_=Y(c,"click",n[15]),g=!0)},p(D,I){var P;const N={};I&1&&(N.originalConfig=D[0].s3),I&524291&&(N.$$scope={dirty:I,ctx:D}),!t&&I&2&&(t=!0,N.config=D[1].s3,ve(()=>t=!1)),!i&&I&16&&(i=!0,N.isTesting=D[4],ve(()=>i=!1)),!s&&I&32&&(s=!0,N.testError=D[5],ve(()=>s=!1)),e.$set(N),(P=D[1].s3)!=null&&P.enabled&&!D[6]&&!D[3]?$?$.p(D,I):($=lg(D),$.c(),$.m(o,u)):$&&($.d(1),$=null),D[6]?M?M.p(D,I):(M=og(D),M.c(),M.m(o,f)):M&&(M.d(1),M=null),(!m||I&72&&h!==(h=!D[6]||D[3]))&&(c.disabled=h),(!m||I&8)&&Q(c,"btn-loading",D[3])},i(D){m||(A(e.$$.fragment,D),m=!0)},o(D){L(e.$$.fragment,D),m=!1},d(D){D&&(k(l),k(o)),V(e,D),$&&$.d(),M&&M.d(),g=!1,_()}}}function F8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function sg(n){var I;let e,t,i,s,l,o,r,a=(I=n[0].s3)!=null&&I.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",h,m,g,_,y,S,C,T,$,M,O,D;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=E(),l=v("div"),o=W(`If you have existing uploaded files, you'll have to migrate them manually + `),_=v("button"),_.textContent="{ACTION_URL} ",y=W("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"type","button"),p(m,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(_,"title","Required parameter"),p(a,"class","help-block")},m(D,I){w(D,e,I),b(e,t),w(D,s,I),M[l].m(D,I),w(D,r,I),w(D,a,I),b(a,u),b(a,f),b(a,c),b(a,d),b(a,h),b(a,m),b(a,g),b(a,_),b(a,y),S=!0,C||(T=[Y(f,"click",n[22]),Y(d,"click",n[23]),Y(m,"click",n[24]),Y(_,"click",n[25])],C=!0)},p(D,I){(!S||I[1]&1&&i!==(i=D[31]))&&p(e,"for",i);let N=l;l=O(D),l===N?M[l].p(D,I):(re(),L(M[N],1,1,()=>{M[N]=null}),ae(),o=M[l],o?o.p(D,I):(o=M[l]=$[l](D),o.c()),A(o,1),o.m(r.parentNode,r))},i(D){S||(A(o),S=!0)},o(D){L(o),S=!1},d(D){D&&(k(e),k(s),k(r),k(a)),M[l].d(D),C=!1,$e(T)}}}function KA(n){let e,t,i,s,l,o;return e=new ge({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[zA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new ge({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[BA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new ge({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[YA,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(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){r&&(k(t),k(s)),V(e,r),V(i,r),V(l,r)}}}function Gm(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Ce(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{i&&(t||(t=He(e,Qt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=He(e,Qt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function JA(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Gm();return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),l=W(n[2]),o=E(),r=v("div"),a=E(),f&&f.c(),u=ye(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),b(s,l),w(c,o,d),w(c,r,d),w(c,a,d),f&&f.m(c,d),w(c,u,d)},p(c,d){d[0]&4&&le(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Gm(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(re(),L(f,1,1,()=>{f=null}),ae())},d(c){c&&(k(e),k(o),k(r),k(a),k(u)),f&&f.d(c)}}}function GA(n){let e,t;const i=[n[8]];let s={$$slots:{header:[JA],default:[KA]},$$scope:{ctx:n}};for(let l=0;lt(12,o=U));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Zm,d=!1;function h(){f==null||f.expand()}function m(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function _(){c||d||(t(5,d=!0),t(4,c=(await ft(()=>import("./CodeEditor-c648ece6.js"),["./CodeEditor-c648ece6.js","./index-30dee195.js"],import.meta.url)).default),Zm=c,t(5,d=!1))}function y(U){j.copyToClipboard(U),ko(`Copied ${U} to clipboard`,2e3)}_();function S(){u.subject=this.value,t(0,u)}const C=()=>y("{APP_NAME}"),T=()=>y("{APP_URL}");function $(){u.actionUrl=this.value,t(0,u)}const M=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),D=()=>y("{TOKEN}");function I(U){n.$$.not_equal(u.body,U)&&(u.body=U,t(0,u))}function N(){u.body=this.value,t(0,u)}const P=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),R=()=>y("{TOKEN}"),q=()=>y("{ACTION_URL}");function B(U){te[U?"unshift":"push"](()=>{f=U,t(3,f)})}function Z(U){Re.call(this,n,U)}function X(U){Re.call(this,n,U)}function J(U){Re.call(this,n,U)}return n.$$set=U=>{e=je(je({},e),xt(U)),t(8,l=tt(e,s)),"key"in U&&t(1,r=U.key),"title"in U&&t(2,a=U.title),"config"in U&&t(0,u=U.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!j.isEmpty(j.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||pi(r))},[u,r,a,f,c,d,i,y,l,h,m,g,o,S,C,T,$,M,O,D,I,N,P,F,R,q,B,Z,X,J]}class jr extends be{constructor(e){super(),_e(this,e,ZA,GA,me,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Xm(n,e,t){const i=n.slice();return i[21]=e[t],i}function Qm(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,c,d,h;return c=p0(e[11][0]),{key:n,first:null,c(){t=v("div"),i=v("input"),l=E(),o=v("label"),a=W(r),f=E(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,de(i,i.__value),p(o,"for",u=e[20]+e[21].value),p(t,"class","form-field-block"),c.p(i),this.first=t},m(m,g){w(m,t,g),b(t,i),i.checked=i.__value===e[2],b(t,l),b(t,o),b(o,a),b(t,f),d||(h=Y(i,"change",e[10]),d=!0)},p(m,g){e=m,g&1048576&&s!==(s=e[20]+e[21].value)&&p(i,"id",s),g&4&&(i.checked=i.__value===e[2]),g&1048576&&u!==(u=e[20]+e[21].value)&&p(o,"for",u)},d(m){m&&k(t),c.r(),d=!1,h()}}}function XA(n){let e=[],t=new Map,i,s=pe(n[7]);const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new ge({props:{class:"form-field required m-0",name:"email",$$slots:{default:[QA,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),z(t.$$.fragment),i=E(),z(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){w(a,e,u),H(t,e,null),b(e,i),H(s,e,null),l=!0,o||(r=Y(e,"submit",Ze(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&17825794&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){L(t.$$.fragment,a),L(s.$$.fragment,a),l=!1},d(a){a&&k(e),V(t),V(s),o=!1,r()}}}function e8(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function t8(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=W("Close"),i=E(),s=v("button"),l=v("i"),o=E(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(c,d){w(c,e,d),b(e,t),w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=Y(e,"click",n[0]),u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&Q(s,"btn-loading",c[4])},d(c){c&&(k(e),k(i),k(s)),u=!1,f()}}}function n8(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[t8],header:[e8],default:[xA]},$$scope:{ctx:n}};return e=new rn({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[14]),l&16777270&&(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[15](null),V(e,s)}}}const Hr="last_email_test",xm="email_test_request";function i8(n,e,t){let i;const s=pt(),l="email_test_"+j.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Hr),u=o[0].value,f=!1,c=null;function d(O="",D=""){t(1,a=O||localStorage.getItem(Hr)),t(2,u=D||o[0].value),on({}),r==null||r.show()}function h(){return clearTimeout(c),r==null?void 0:r.hide()}async function m(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Hr,a),clearTimeout(c),c=setTimeout(()=>{ce.cancelRequest(xm),Ci("Test email send timeout.")},3e4);try{await ce.settings.testEmail(a,u,{$cancelKey:xm}),zt("Successfully sent test email."),s("submit"),t(4,f=!1),await ln(),h()}catch(O){t(4,f=!1),ce.error(O)}clearTimeout(c)}}const g=[[]];function _(){u=this.__value,t(2,u)}function y(){a=this.value,t(1,a)}const S=()=>m(),C=()=>!f;function T(O){te[O?"unshift":"push"](()=>{r=O,t(3,r)})}function $(O){Re.call(this,n,O)}function M(O){Re.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,m,d,_,g,y,S,C,T,$,M]}class s8 extends be{constructor(e){super(),_e(this,e,i8,n8,me,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function l8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M,O,D,I,N;i=new ge({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[r8,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[a8,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}});function P(ee){n[15](ee)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new jr({props:F}),te.push(()=>he(u,"config",P));function R(ee){n[16](ee)}let q={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(q.config=n[0].meta.resetPasswordTemplate),d=new jr({props:q}),te.push(()=>he(d,"config",R));function B(ee){n[17](ee)}let Z={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(Z.config=n[0].meta.confirmEmailChangeTemplate),g=new jr({props:Z}),te.push(()=>he(g,"config",B)),T=new ge({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[u8,({uniqueId:ee})=>({34:ee}),({uniqueId:ee})=>[0,ee?8:0]]},$$scope:{ctx:n}}});let X=n[0].smtp.enabled&&eg(n);function J(ee,se){return ee[5]?y8:v8}let U=J(n),oe=U(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),c=E(),z(d.$$.fragment),m=E(),z(g.$$.fragment),y=E(),S=v("hr"),C=E(),z(T.$$.fragment),$=E(),X&&X.c(),M=E(),O=v("div"),D=v("div"),I=E(),oe.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(D,"class","flex-fill"),p(O,"class","flex")},m(ee,se){w(ee,e,se),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),w(ee,r,se),w(ee,a,se),H(u,a,null),b(a,c),H(d,a,null),b(a,m),H(g,a,null),w(ee,y,se),w(ee,S,se),w(ee,C,se),H(T,ee,se),w(ee,$,se),X&&X.m(ee,se),w(ee,M,se),w(ee,O,se),b(O,D),b(O,I),oe.m(O,null),N=!0},p(ee,se){const Ee={};se[0]&1|se[1]&24&&(Ee.$$scope={dirty:se,ctx:ee}),i.$set(Ee);const qe={};se[0]&1|se[1]&24&&(qe.$$scope={dirty:se,ctx:ee}),o.$set(qe);const Ve={};!f&&se[0]&1&&(f=!0,Ve.config=ee[0].meta.verificationTemplate,ve(()=>f=!1)),u.$set(Ve);const We={};!h&&se[0]&1&&(h=!0,We.config=ee[0].meta.resetPasswordTemplate,ve(()=>h=!1)),d.$set(We);const ke={};!_&&se[0]&1&&(_=!0,ke.config=ee[0].meta.confirmEmailChangeTemplate,ve(()=>_=!1)),g.$set(ke);const Me={};se[0]&1|se[1]&24&&(Me.$$scope={dirty:se,ctx:ee}),T.$set(Me),ee[0].smtp.enabled?X?(X.p(ee,se),se[0]&1&&A(X,1)):(X=eg(ee),X.c(),A(X,1),X.m(M.parentNode,M)):X&&(re(),L(X,1,1,()=>{X=null}),ae()),U===(U=J(ee))&&oe?oe.p(ee,se):(oe.d(1),oe=U(ee),oe&&(oe.c(),oe.m(O,null)))},i(ee){N||(A(i.$$.fragment,ee),A(o.$$.fragment,ee),A(u.$$.fragment,ee),A(d.$$.fragment,ee),A(g.$$.fragment,ee),A(T.$$.fragment,ee),A(X),N=!0)},o(ee){L(i.$$.fragment,ee),L(o.$$.fragment,ee),L(u.$$.fragment,ee),L(d.$$.fragment,ee),L(g.$$.fragment,ee),L(T.$$.fragment,ee),L(X),N=!1},d(ee){ee&&(k(e),k(r),k(a),k(y),k(S),k(C),k($),k(M),k(O)),V(i),V(o),V(u),V(d),V(g),V(T,ee),X&&X.d(ee),oe.d()}}}function o8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function r8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Sender name"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].meta.senderName),r||(a=Y(l,"input",n[13]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&de(l,u[0].meta.senderName)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function a8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Sender address"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","email"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].meta.senderAddress),r||(a=Y(l,"input",n[14]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&de(l,u[0].meta.senderAddress)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function u8(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[34]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[34])},m(c,d){w(c,e,d),e.checked=n[0].smtp.enabled,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[18]),Ce(Be.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&8&&t!==(t=c[34])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&8&&a!==(a=c[34])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function eg(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T;s=new ge({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[f8,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[c8,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),f=new ge({props:{class:"form-field",name:"smtp.username",$$slots:{default:[d8,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}}),h=new ge({props:{class:"form-field",name:"smtp.password",$$slots:{default:[p8,({uniqueId:I})=>({34:I}),({uniqueId:I})=>[0,I?8:0]]},$$scope:{ctx:n}}});function $(I,N){return I[4]?m8:h8}let M=$(n),O=M(n),D=n[4]&&tg(n);return{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),a=E(),u=v("div"),z(f.$$.fragment),c=E(),d=v("div"),z(h.$$.fragment),m=E(),g=v("button"),O.c(),_=E(),D&&D.c(),p(i,"class","col-lg-4"),p(o,"class","col-lg-2"),p(u,"class","col-lg-3"),p(d,"class","col-lg-3"),p(t,"class","grid"),p(g,"type","button"),p(g,"class","btn btn-sm btn-secondary m-t-sm m-b-sm")},m(I,N){w(I,e,N),b(e,t),b(t,i),H(s,i,null),b(t,l),b(t,o),H(r,o,null),b(t,a),b(t,u),H(f,u,null),b(t,c),b(t,d),H(h,d,null),b(e,m),b(e,g),O.m(g,null),b(e,_),D&&D.m(e,null),S=!0,C||(T=Y(g,"click",Ze(n[23])),C=!0)},p(I,N){const P={};N[0]&1|N[1]&24&&(P.$$scope={dirty:N,ctx:I}),s.$set(P);const F={};N[0]&1|N[1]&24&&(F.$$scope={dirty:N,ctx:I}),r.$set(F);const R={};N[0]&1|N[1]&24&&(R.$$scope={dirty:N,ctx:I}),f.$set(R);const q={};N[0]&1|N[1]&24&&(q.$$scope={dirty:N,ctx:I}),h.$set(q),M!==(M=$(I))&&(O.d(1),O=M(I),O&&(O.c(),O.m(g,null))),I[4]?D?(D.p(I,N),N[0]&16&&A(D,1)):(D=tg(I),D.c(),A(D,1),D.m(e,null)):D&&(re(),L(D,1,1,()=>{D=null}),ae())},i(I){S||(A(s.$$.fragment,I),A(r.$$.fragment,I),A(f.$$.fragment,I),A(h.$$.fragment,I),A(D),I&&xe(()=>{S&&(y||(y=He(e,lt,{duration:150},!0)),y.run(1))}),S=!0)},o(I){L(s.$$.fragment,I),L(r.$$.fragment,I),L(f.$$.fragment,I),L(h.$$.fragment,I),L(D),I&&(y||(y=He(e,lt,{duration:150},!1)),y.run(0)),S=!1},d(I){I&&k(e),V(s),V(r),V(f),V(h),O.d(),D&&D.d(),I&&y&&y.end(),C=!1,T()}}}function f8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("SMTP server host"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].smtp.host),r||(a=Y(l,"input",n[19]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&de(l,u[0].smtp.host)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function c8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Port"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","number"),p(l,"id",o=n[34]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].smtp.port),r||(a=Y(l,"input",n[20]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&yt(l.value)!==u[0].smtp.port&&de(l,u[0].smtp.port)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function d8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Username"),s=E(),l=v("input"),p(e,"for",i=n[34]),p(l,"type","text"),p(l,"id",o=n[34])},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].smtp.username),r||(a=Y(l,"input",n[21]),r=!0)},p(u,f){f[1]&8&&i!==(i=u[34])&&p(e,"for",i),f[1]&8&&o!==(o=u[34])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&de(l,u[0].smtp.username)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function p8(n){let e,t,i,s,l,o,r;function a(f){n[22](f)}let u={id:n[34]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new cu({props:u}),te.push(()=>he(l,"value",a)),{c(){e=v("label"),t=W("Password"),s=E(),z(l.$$.fragment),p(e,"for",i=n[34])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&8&&i!==(i=f[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=f[34]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,ve(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),V(l,f)}}}function h8(n){let e,t,i;return{c(){e=v("span"),e.textContent="Show more options",t=E(),i=v("i"),p(e,"class","txt"),p(i,"class","ri-arrow-down-s-line")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&(k(e),k(t),k(i))}}}function m8(n){let e,t,i;return{c(){e=v("span"),e.textContent="Hide more options",t=E(),i=v("i"),p(e,"class","txt"),p(i,"class","ri-arrow-up-s-line")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&(k(e),k(t),k(i))}}}function tg(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new ge({props:{class:"form-field",name:"smtp.tls",$$slots:{default:[g8,({uniqueId:m})=>({34:m}),({uniqueId:m})=>[0,m?8:0]]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[_8,({uniqueId:m})=>({34:m}),({uniqueId:m})=>[0,m?8:0]]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"smtp.localName",$$slots:{default:[b8,({uniqueId:m})=>({34:m}),({uniqueId:m})=>[0,m?8:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),f=E(),c=v("div"),p(t,"class","col-lg-3"),p(l,"class","col-lg-3"),p(a,"class","col-lg-6"),p(c,"class","col-lg-12"),p(e,"class","grid")},m(m,g){w(m,e,g),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),b(e,r),b(e,a),H(u,a,null),b(e,f),b(e,c),h=!0},p(m,g){const _={};g[0]&1|g[1]&24&&(_.$$scope={dirty:g,ctx:m}),i.$set(_);const y={};g[0]&1|g[1]&24&&(y.$$scope={dirty:g,ctx:m}),o.$set(y);const S={};g[0]&1|g[1]&24&&(S.$$scope={dirty:g,ctx:m}),u.$set(S)},i(m){h||(A(i.$$.fragment,m),A(o.$$.fragment,m),A(u.$$.fragment,m),m&&xe(()=>{h&&(d||(d=He(e,lt,{duration:150},!0)),d.run(1))}),h=!0)},o(m){L(i.$$.fragment,m),L(o.$$.fragment,m),L(u.$$.fragment,m),m&&(d||(d=He(e,lt,{duration:150},!1)),d.run(0)),h=!1},d(m){m&&k(e),V(i),V(o),V(u),m&&d&&d.end()}}}function g8(n){let e,t,i,s,l,o,r;function a(f){n[24](f)}let u={id:n[34],items:n[7]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Ei({props:u}),te.push(()=>he(l,"keyOfSelected",a)),{c(){e=v("label"),t=W("TLS encryption"),s=E(),z(l.$$.fragment),p(e,"for",i=n[34])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&8&&i!==(i=f[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=f[34]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,ve(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),V(l,f)}}}function _8(n){let e,t,i,s,l,o,r;function a(f){n[25](f)}let u={id:n[34],items:n[8]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Ei({props:u}),te.push(()=>he(l,"keyOfSelected",a)),{c(){e=v("label"),t=W("AUTH method"),s=E(),z(l.$$.fragment),p(e,"for",i=n[34])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c[1]&8&&i!==(i=f[34]))&&p(e,"for",i);const d={};c[1]&8&&(d.id=f[34]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,ve(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),V(l,f)}}}function b8(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="EHLO/HELO domain",i=E(),s=v("i"),o=E(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[34]),p(r,"type","text"),p(r,"id",a=n[34]),p(r,"placeholder","Default to localhost")},m(c,d){w(c,e,d),b(e,t),b(e,i),b(e,s),w(c,o,d),w(c,r,d),de(r,n[0].smtp.localName),u||(f=[Ce(Be.call(null,s,{text:"Some SMTP servers, such as the Gmail SMTP-relay, requires a proper domain name in the inital EHLO/HELO exchange and will reject attempts to use localhost.",position:"top"})),Y(r,"input",n[26])],u=!0)},p(c,d){d[1]&8&&l!==(l=c[34])&&p(e,"for",l),d[1]&8&&a!==(a=c[34])&&p(r,"id",a),d[0]&1&&r.value!==c[0].smtp.localName&&de(r,c[0].smtp.localName)},d(c){c&&(k(e),k(o),k(r)),u=!1,$e(f)}}}function v8(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=' Send test email',p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){w(s,e,l),t||(i=Y(e,"click",n[29]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function y8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[3],Q(s,"btn-loading",n[3])},m(u,f){w(u,e,f),b(e,t),w(u,i,f),w(u,s,f),b(s,l),r||(a=[Y(e,"click",n[27]),Y(s,"click",n[28])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&40&&o!==(o=!u[5]||u[3])&&(s.disabled=o),f[0]&8&&Q(s,"btn-loading",u[3])},d(u){u&&(k(e),k(i),k(s)),r=!1,$e(a)}}}function k8(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_;const y=[o8,l8],S=[];function C(T,$){return T[2]?0:1}return d=C(n),h=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=W(n[6]),r=E(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=E(),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(T,$){w(T,e,$),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(T,r,$),w(T,a,$),b(a,u),b(u,f),b(u,c),S[d].m(u,null),m=!0,g||(_=Y(u,"submit",Ze(n[30])),g=!0)},p(T,$){(!m||$[0]&64)&&le(o,T[6]);let M=d;d=C(T),d===M?S[d].p(T,$):(re(),L(S[M],1,1,()=>{S[M]=null}),ae(),h=S[d],h?h.p(T,$):(h=S[d]=y[d](T),h.c()),A(h,1),h.m(u,null))},i(T){m||(A(h),m=!0)},o(T){L(h),m=!1},d(T){T&&(k(e),k(r),k(a)),S[d].d(),g=!1,_()}}}function w8(n){let e,t,i,s,l,o;e=new Di({}),i=new Tn({props:{$$slots:{default:[k8]},$$scope:{ctx:n}}});let r={};return l=new s8({props:r}),n[31](l),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(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]&127|u[1]&16&&(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){a&&(k(t),k(s)),V(e,a),V(i,a),n[31](null),V(l,a)}}}function S8(n,e,t){let i,s,l;Ge(n,Ft,ee=>t(6,l=ee));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];un(Ft,l="Mail settings",l);let a,u={},f={},c=!1,d=!1,h=!1;m();async function m(){t(2,c=!0);try{const ee=await ce.settings.getAll()||{};_(ee)}catch(ee){ce.error(ee)}t(2,c=!1)}async function g(){if(!(d||!s)){t(3,d=!0);try{const ee=await ce.settings.update(j.filterRedactedProps(f));_(ee),on({}),zt("Successfully saved mail settings.")}catch(ee){ce.error(ee)}t(3,d=!1)}}function _(ee={}){t(0,f={meta:(ee==null?void 0:ee.meta)||{},smtp:(ee==null?void 0:ee.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(11,u=JSON.parse(JSON.stringify(f)))}function y(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function S(){f.meta.senderName=this.value,t(0,f)}function C(){f.meta.senderAddress=this.value,t(0,f)}function T(ee){n.$$.not_equal(f.meta.verificationTemplate,ee)&&(f.meta.verificationTemplate=ee,t(0,f))}function $(ee){n.$$.not_equal(f.meta.resetPasswordTemplate,ee)&&(f.meta.resetPasswordTemplate=ee,t(0,f))}function M(ee){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,ee)&&(f.meta.confirmEmailChangeTemplate=ee,t(0,f))}function O(){f.smtp.enabled=this.checked,t(0,f)}function D(){f.smtp.host=this.value,t(0,f)}function I(){f.smtp.port=yt(this.value),t(0,f)}function N(){f.smtp.username=this.value,t(0,f)}function P(ee){n.$$.not_equal(f.smtp.password,ee)&&(f.smtp.password=ee,t(0,f))}const F=()=>{t(4,h=!h)};function R(ee){n.$$.not_equal(f.smtp.tls,ee)&&(f.smtp.tls=ee,t(0,f))}function q(ee){n.$$.not_equal(f.smtp.authMethod,ee)&&(f.smtp.authMethod=ee,t(0,f))}function B(){f.smtp.localName=this.value,t(0,f)}const Z=()=>y(),X=()=>g(),J=()=>a==null?void 0:a.show(),U=()=>g();function oe(ee){te[ee?"unshift":"push"](()=>{a=ee,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&2048&&t(12,i=JSON.stringify(u)),n.$$.dirty[0]&4097&&t(5,s=i!=JSON.stringify(f))},[f,a,c,d,h,s,l,o,r,g,y,u,i,S,C,T,$,M,O,D,I,N,P,F,R,q,B,Z,X,J,U,oe]}class T8 extends be{constructor(e){super(),_e(this,e,S8,w8,me,{},null,[-1,-1])}}const C8=n=>({isTesting:n&4,testError:n&2,enabled:n&1}),ng=n=>({isTesting:n[2],testError:n[1],enabled:n[0].enabled});function $8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=W(n[4]),p(e,"type","checkbox"),p(e,"id",t=n[20]),e.required=!0,p(s,"for",o=n[20])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),b(s,l),r||(a=Y(e,"change",n[8]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&16&&le(l,u[4]),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&(k(e),k(i),k(s)),r=!1,a()}}}function ig(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M;return i=new ge({props:{class:"form-field required",name:n[3]+".endpoint",$$slots:{default:[M8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:n[3]+".bucket",$$slots:{default:[O8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field required",name:n[3]+".region",$$slots:{default:[E8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field required",name:n[3]+".accessKey",$$slots:{default:[D8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),g=new ge({props:{class:"form-field required",name:n[3]+".secret",$$slots:{default:[A8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),S=new ge({props:{class:"form-field",name:n[3]+".forcePathStyle",$$slots:{default:[I8,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),f=E(),c=v("div"),z(d.$$.fragment),h=E(),m=v("div"),z(g.$$.fragment),_=E(),y=v("div"),z(S.$$.fragment),C=E(),T=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(m,"class","col-lg-6"),p(y,"class","col-lg-12"),p(T,"class","col-lg-12"),p(e,"class","grid")},m(O,D){w(O,e,D),b(e,t),H(i,t,null),b(e,s),b(e,l),H(o,l,null),b(e,r),b(e,a),H(u,a,null),b(e,f),b(e,c),H(d,c,null),b(e,h),b(e,m),H(g,m,null),b(e,_),b(e,y),H(S,y,null),b(e,C),b(e,T),M=!0},p(O,D){const I={};D&8&&(I.name=O[3]+".endpoint"),D&1081345&&(I.$$scope={dirty:D,ctx:O}),i.$set(I);const N={};D&8&&(N.name=O[3]+".bucket"),D&1081345&&(N.$$scope={dirty:D,ctx:O}),o.$set(N);const P={};D&8&&(P.name=O[3]+".region"),D&1081345&&(P.$$scope={dirty:D,ctx:O}),u.$set(P);const F={};D&8&&(F.name=O[3]+".accessKey"),D&1081345&&(F.$$scope={dirty:D,ctx:O}),d.$set(F);const R={};D&8&&(R.name=O[3]+".secret"),D&1081345&&(R.$$scope={dirty:D,ctx:O}),g.$set(R);const q={};D&8&&(q.name=O[3]+".forcePathStyle"),D&1081345&&(q.$$scope={dirty:D,ctx:O}),S.$set(q)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(g.$$.fragment,O),A(S.$$.fragment,O),O&&xe(()=>{M&&($||($=He(e,lt,{duration:150},!0)),$.run(1))}),M=!0)},o(O){L(i.$$.fragment,O),L(o.$$.fragment,O),L(u.$$.fragment,O),L(d.$$.fragment,O),L(g.$$.fragment,O),L(S.$$.fragment,O),O&&($||($=He(e,lt,{duration:150},!1)),$.run(0)),M=!1},d(O){O&&k(e),V(i),V(o),V(u),V(d),V(g),V(S),O&&$&&$.end()}}}function M8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Endpoint"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].endpoint),r||(a=Y(l,"input",n[9]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].endpoint&&de(l,u[0].endpoint)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function O8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Bucket"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].bucket),r||(a=Y(l,"input",n[10]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].bucket&&de(l,u[0].bucket)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function E8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Region"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].region),r||(a=Y(l,"input",n[11]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].region&&de(l,u[0].region)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function D8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Access key"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[0].accessKey),r||(a=Y(l,"input",n[12]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].accessKey&&de(l,u[0].accessKey)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function A8(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:!0};return n[0].secret!==void 0&&(u.value=n[0].secret),l=new cu({props:u}),te.push(()=>he(l,"value",a)),{c(){e=v("label"),t=W("Secret"),s=E(),z(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){w(f,e,c),b(e,t),w(f,s,c),H(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].secret,ve(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){L(l.$$.fragment,f),r=!1},d(f){f&&(k(e),k(s)),V(l,f)}}}function I8(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[20])},m(c,d){w(c,e,d),e.checked=n[0].forcePathStyle,w(c,i,d),w(c,s,d),b(s,l),b(s,o),b(s,r),u||(f=[Y(e,"change",n[14]),Ce(Be.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&1048576&&t!==(t=c[20])&&p(e,"id",t),d&1&&(e.checked=c[0].forcePathStyle),d&1048576&&a!==(a=c[20])&&p(s,"for",a)},d(c){c&&(k(e),k(i),k(s)),u=!1,$e(f)}}}function L8(n){let e,t,i,s,l;e=new ge({props:{class:"form-field form-field-toggle",$$slots:{default:[$8,({uniqueId:u})=>({20:u}),({uniqueId:u})=>u?1048576:0]},$$scope:{ctx:n}}});const o=n[7].default,r=Tt(o,n,n[15],ng);let a=n[0].enabled&&ig(n);return{c(){z(e.$$.fragment),t=E(),r&&r.c(),i=E(),a&&a.c(),s=ye()},m(u,f){H(e,u,f),w(u,t,f),r&&r.m(u,f),w(u,i,f),a&&a.m(u,f),w(u,s,f),l=!0},p(u,[f]){const c={};f&1081361&&(c.$$scope={dirty:f,ctx:u}),e.$set(c),r&&r.p&&(!l||f&32775)&&$t(r,o,u,u[15],l?Ct(o,u[15],f,C8):Mt(u[15]),ng),u[0].enabled?a?(a.p(u,f),f&1&&A(a,1)):(a=ig(u),a.c(),A(a,1),a.m(s.parentNode,s)):a&&(re(),L(a,1,1,()=>{a=null}),ae())},i(u){l||(A(e.$$.fragment,u),A(r,u),A(a),l=!0)},o(u){L(e.$$.fragment,u),L(r,u),L(a),l=!1},d(u){u&&(k(t),k(i),k(s)),V(e,u),r&&r.d(u),a&&a.d(u)}}}const Vr="s3_test_request";function P8(n,e,t){let{$$slots:i={},$$scope:s}=e,{originalConfig:l={}}=e,{config:o={}}=e,{configKey:r="s3"}=e,{toggleLabel:a="Enable S3"}=e,{testFilesystem:u="storage"}=e,{testError:f=null}=e,{isTesting:c=!1}=e,d=null,h=null;function m(O){t(2,c=!0),clearTimeout(h),h=setTimeout(()=>{g()},O)}async function g(){if(t(1,f=null),!o.enabled)return t(2,c=!1),f;ce.cancelRequest(Vr),clearTimeout(d),d=setTimeout(()=>{ce.cancelRequest(Vr),t(1,f=new Error("S3 test connection timeout.")),t(2,c=!1)},3e4),t(2,c=!0);let O;try{await ce.settings.testS3(u,{$cancelKey:Vr})}catch(D){O=D}return O!=null&&O.isAbort||(t(1,f=O),t(2,c=!1),clearTimeout(d)),f}Kt(()=>()=>{clearTimeout(d),clearTimeout(h)});function _(){o.enabled=this.checked,t(0,o)}function y(){o.endpoint=this.value,t(0,o)}function S(){o.bucket=this.value,t(0,o)}function C(){o.region=this.value,t(0,o)}function T(){o.accessKey=this.value,t(0,o)}function $(O){n.$$.not_equal(o.secret,O)&&(o.secret=O,t(0,o))}function M(){o.forcePathStyle=this.checked,t(0,o)}return n.$$set=O=>{"originalConfig"in O&&t(5,l=O.originalConfig),"config"in O&&t(0,o=O.config),"configKey"in O&&t(3,r=O.configKey),"toggleLabel"in O&&t(4,a=O.toggleLabel),"testFilesystem"in O&&t(6,u=O.testFilesystem),"testError"in O&&t(1,f=O.testError),"isTesting"in O&&t(2,c=O.isTesting),"$$scope"in O&&t(15,s=O.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&l!=null&&l.enabled&&m(100),n.$$.dirty&9&&(o.enabled||pi(r))},[o,f,c,r,a,l,u,i,_,y,S,C,T,$,M,s]}class K1 extends be{constructor(e){super(),_e(this,e,P8,L8,me,{originalConfig:5,config:0,configKey:3,toggleLabel:4,testFilesystem:6,testError:1,isTesting:2})}}function N8(n){var O;let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_;function y(D){n[11](D)}function S(D){n[12](D)}function C(D){n[13](D)}let T={toggleLabel:"Use S3 storage",originalConfig:n[0].s3,$$slots:{default:[R8]},$$scope:{ctx:n}};n[1].s3!==void 0&&(T.config=n[1].s3),n[4]!==void 0&&(T.isTesting=n[4]),n[5]!==void 0&&(T.testError=n[5]),e=new K1({props:T}),te.push(()=>he(e,"config",y)),te.push(()=>he(e,"isTesting",S)),te.push(()=>he(e,"testError",C));let $=((O=n[1].s3)==null?void 0:O.enabled)&&!n[6]&&!n[3]&&lg(n),M=n[6]&&og(n);return{c(){z(e.$$.fragment),l=E(),o=v("div"),r=v("div"),a=E(),$&&$.c(),u=E(),M&&M.c(),f=E(),c=v("button"),d=v("span"),d.textContent="Save changes",p(r,"class","flex-fill"),p(d,"class","txt"),p(c,"type","submit"),p(c,"class","btn btn-expanded"),c.disabled=h=!n[6]||n[3],Q(c,"btn-loading",n[3]),p(o,"class","flex")},m(D,I){H(e,D,I),w(D,l,I),w(D,o,I),b(o,r),b(o,a),$&&$.m(o,null),b(o,u),M&&M.m(o,null),b(o,f),b(o,c),b(c,d),m=!0,g||(_=Y(c,"click",n[15]),g=!0)},p(D,I){var P;const N={};I&1&&(N.originalConfig=D[0].s3),I&524291&&(N.$$scope={dirty:I,ctx:D}),!t&&I&2&&(t=!0,N.config=D[1].s3,ve(()=>t=!1)),!i&&I&16&&(i=!0,N.isTesting=D[4],ve(()=>i=!1)),!s&&I&32&&(s=!0,N.testError=D[5],ve(()=>s=!1)),e.$set(N),(P=D[1].s3)!=null&&P.enabled&&!D[6]&&!D[3]?$?$.p(D,I):($=lg(D),$.c(),$.m(o,u)):$&&($.d(1),$=null),D[6]?M?M.p(D,I):(M=og(D),M.c(),M.m(o,f)):M&&(M.d(1),M=null),(!m||I&72&&h!==(h=!D[6]||D[3]))&&(c.disabled=h),(!m||I&8)&&Q(c,"btn-loading",D[3])},i(D){m||(A(e.$$.fragment,D),m=!0)},o(D){L(e.$$.fragment,D),m=!1},d(D){D&&(k(l),k(o)),V(e,D),$&&$.d(),M&&M.d(),g=!1,_()}}}function F8(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function sg(n){var I;let e,t,i,s,l,o,r,a=(I=n[0].s3)!=null&&I.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",h,m,g,_,y,S,C,T,$,M,O,D;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=E(),l=v("div"),o=W(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=v("strong"),u=W(a),f=W(` to the @@ -157,4 +157,4 @@ Also note that some OAuth2 providers (like Twitter), don't return an email and t @weekly @daily @midnight -@hourly`))],I=!0)},p(P,F){var q,B;(!D||F[1]&1&&i!==(i=P[31]))&&p(e,"for",i),(!D||F[1]&1&&o!==(o=P[31]))&&p(l,"id",o),(!D||F[0]&1&&r!==(r=!((B=(q=P[0])==null?void 0:q.backups)!=null&&B.cron)))&&(l.autofocus=r),F[0]&2&&l.value!==P[1].backups.cron&&de(l,P[1].backups.cron);const R={};F[0]&2|F[1]&2&&(R.$$scope={dirty:F,ctx:P}),g.$set(R)},i(P){D||(A(g.$$.fragment,P),D=!0)},o(P){L(g.$$.fragment,P),D=!1},d(P){P&&(k(e),k(s),k(l),k(a),k(u),k(_),k(y)),V(g),I=!1,$e(N)}}}function bL(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Max @auto backups to keep"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),p(l,"min","1")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[1].backups.cronMaxKeep),r||(a=Y(l,"input",n[23]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&2&&yt(l.value)!==u[1].backups.cronMaxKeep&&de(l,u[1].backups.cronMaxKeep)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function d_(n){let e;function t(l,o){return l[7]?kL:l[8]?yL:vL}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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){l&&k(e),s.d(l)}}}function vL(n){let e;return{c(){e=v("div"),e.innerHTML=' S3 connected successfully',p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function yL(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=' Failed to establish S3 connection',p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Ce(t=Be.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Et(t.update)&&o[0]&256&&t.update.call(null,(r=l[8].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function kL(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function p_(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","submit"),p(e,"class","btn btn-hint btn-transparent"),e.disabled=i=!n[9]||n[5]},m(o,r){w(o,e,r),b(e,t),s||(l=Y(e,"click",n[27]),s=!0)},p(o,r){r[0]&544&&i!==(i=!o[9]||o[5])&&(e.disabled=i)},d(o){o&&k(e),s=!1,l()}}}function wL(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M,O,D,I,N,P;h=new Jo({props:{class:"btn-sm",tooltip:"Refresh"}}),h.$on("refresh",n[13]),g=new dL({props:{class:"btn-sm"}}),g.$on("success",n[13]);let F={};y=new uL({props:F}),n[15](y);function R(X,J){return X[6]?hL:pL}let q=R(n),B=q(n),Z=n[6]&&!n[4]&&f_(n);return{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=W(n[10]),r=E(),a=v("div"),u=v("div"),f=v("div"),c=v("span"),c.textContent="Backup and restore your PocketBase data",d=E(),z(h.$$.fragment),m=E(),z(g.$$.fragment),_=E(),z(y.$$.fragment),S=E(),C=v("hr"),T=E(),$=v("button"),M=v("span"),M.textContent="Backups options",O=E(),B.c(),D=E(),Z&&Z.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(c,"class","txt-xl"),p(f,"class","flex m-b-sm flex-gap-10"),p(M,"class","txt"),p($,"type","button"),p($,"class","btn btn-secondary"),$.disabled=n[4],Q($,"btn-loading",n[4]),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(X,J){w(X,e,J),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(X,r,J),w(X,a,J),b(a,u),b(u,f),b(f,c),b(f,d),H(h,f,null),b(f,m),H(g,f,null),b(u,_),H(y,u,null),b(u,S),b(u,C),b(u,T),b(u,$),b($,M),b($,O),B.m($,null),b(u,D),Z&&Z.m(u,null),I=!0,N||(P=[Y($,"click",n[16]),Y(u,"submit",Ze(n[11]))],N=!0)},p(X,J){(!I||J[0]&1024)&&le(o,X[10]);const U={};y.$set(U),q!==(q=R(X))&&(B.d(1),B=q(X),B&&(B.c(),B.m($,null))),(!I||J[0]&16)&&($.disabled=X[4]),(!I||J[0]&16)&&Q($,"btn-loading",X[4]),X[6]&&!X[4]?Z?(Z.p(X,J),J[0]&80&&A(Z,1)):(Z=f_(X),Z.c(),A(Z,1),Z.m(u,null)):Z&&(re(),L(Z,1,1,()=>{Z=null}),ae())},i(X){I||(A(h.$$.fragment,X),A(g.$$.fragment,X),A(y.$$.fragment,X),A(Z),I=!0)},o(X){L(h.$$.fragment,X),L(g.$$.fragment,X),L(y.$$.fragment,X),L(Z),I=!1},d(X){X&&(k(e),k(r),k(a)),V(h),V(g),n[15](null),V(y),B.d(),Z&&Z.d(),N=!1,$e(P)}}}function SL(n){let e,t,i,s;return e=new Di({}),i=new Tn({props:{$$slots:{default:[wL]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(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[0]&2047|o[1]&2&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){l&&k(t),V(e,l),V(i,l)}}}function TL(n,e,t){let i,s;Ge(n,Ft,J=>t(10,s=J)),un(Ft,s="Backups",s);let l,o={},r={},a=!1,u=!1,f="",c=!1,d=!1,h=!1,m=null;g();async function g(){t(4,a=!0);try{const J=await ce.settings.getAll()||{};y(J)}catch(J){ce.error(J)}t(4,a=!1)}async function _(){if(!(u||!i)){t(5,u=!0);try{const J=await ce.settings.update(j.filterRedactedProps(r));await C(),y(J),zt("Successfully saved application settings.")}catch(J){ce.error(J)}t(5,u=!1)}}function y(J={}){t(1,r={backups:(J==null?void 0:J.backups)||{}}),t(2,c=r.backups.cron!=""),t(0,o=JSON.parse(JSON.stringify(r)))}function S(){t(1,r=JSON.parse(JSON.stringify(o||{backups:{}}))),t(2,c=r.backups.cron!="")}async function C(){return l==null?void 0:l.loadBackups()}function T(J){te[J?"unshift":"push"](()=>{l=J,t(3,l)})}const $=()=>t(6,d=!d);function M(){c=this.checked,t(2,c)}function O(){r.backups.cron=this.value,t(1,r),t(2,c)}const D=()=>{t(1,r.backups.cron="0 0 * * *",r)},I=()=>{t(1,r.backups.cron="0 0 * * 0",r)},N=()=>{t(1,r.backups.cron="0 0 * * 1,3",r)},P=()=>{t(1,r.backups.cron="0 0 1 * *",r)};function F(){r.backups.cronMaxKeep=yt(this.value),t(1,r),t(2,c)}function R(J){n.$$.not_equal(r.backups.s3,J)&&(r.backups.s3=J,t(1,r),t(2,c))}function q(J){h=J,t(7,h)}function B(J){m=J,t(8,m)}const Z=()=>S(),X=()=>_();return n.$$.update=()=>{var J;n.$$.dirty[0]&1&&t(14,f=JSON.stringify(o)),n.$$.dirty[0]&6&&!c&&(J=r==null?void 0:r.backups)!=null&&J.cron&&(pi("backups.cron"),t(1,r.backups.cron="",r)),n.$$.dirty[0]&16386&&t(9,i=f!=JSON.stringify(r))},[o,r,c,l,a,u,d,h,m,i,s,_,S,C,f,T,$,M,O,D,I,N,P,F,R,q,B,Z,X]}class CL extends be{constructor(e){super(),_e(this,e,TL,SL,me,{},null,[-1,-1])}}const Wt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?us("/"):!0}],$L={"/login":jt({component:MA,conditions:Wt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":jt({asyncComponent:()=>ft(()=>import("./PageAdminRequestPasswordReset-f0ee3c1c.js"),[],import.meta.url),conditions:Wt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":jt({asyncComponent:()=>ft(()=>import("./PageAdminConfirmPasswordReset-06419df4.js"),[],import.meta.url),conditions:Wt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":jt({component:GD,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":jt({component:sT,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":jt({component:RA,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":jt({component:kA,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":jt({component:T8,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":jt({component:W8,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":jt({component:aI,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":jt({component:_I,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":jt({component:SI,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":jt({component:zI,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/backups":jt({component:CL,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-1ef02618.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-1ef02618.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-0e91615d.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-0e91615d.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-55d6b993.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-55d6b993.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":jt({asyncComponent:()=>ft(()=>import("./PageOAuth2Redirect-7e9ec082.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"*":jt({component:Ck,userData:{showAppSidebar:!1}})};function ML(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=Ko}=i;return{delay:f,duration:Et(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,m)=>{const g=m*a,_=m*u,y=h+m*e.width/t.width,S=h+m*e.height/t.height;return`transform: ${l} translate(${g}px, ${_}px) scale(${y}, ${S});`}}}function h_(n,e,t){const i=n.slice();return i[2]=e[t],i}function OL(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function EL(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function DL(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function AL(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function m_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,h,m=x,g,_,y;function S(M,O){return M[2].type==="info"?AL:M[2].type==="success"?DL:M[2].type==="warning"?EL:OL}let C=S(e),T=C(e);function $(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),T.c(),s=E(),l=v("div"),r=W(o),a=E(),u=v("button"),u.innerHTML='',f=E(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,O){w(M,t,O),b(t,i),T.m(i,null),b(t,s),b(t,l),b(l,r),b(t,a),b(t,u),b(t,f),g=!0,_||(y=Y(u,"click",Ze($)),_=!0)},p(M,O){e=M,C!==(C=S(e))&&(T.d(1),T=C(e),T&&(T.c(),T.m(i,null))),(!g||O&1)&&o!==(o=e[2].message+"")&&le(r,o),(!g||O&1)&&Q(t,"alert-info",e[2].type=="info"),(!g||O&1)&&Q(t,"alert-success",e[2].type=="success"),(!g||O&1)&&Q(t,"alert-danger",e[2].type=="error"),(!g||O&1)&&Q(t,"alert-warning",e[2].type=="warning")},r(){h=t.getBoundingClientRect()},f(){v0(t),m(),T_(t,h)},a(){m(),m=b0(t,h,ML,{duration:150})},i(M){g||(M&&xe(()=>{g&&(d&&d.end(1),c=M_(t,lt,{duration:150}),c.start())}),g=!0)},o(M){c&&c.invalidate(),M&&(d=ka(t,hl,{duration:150})),g=!1},d(M){M&&k(t),T.d(),M&&d&&d.end(),_=!1,y()}}}function IL(n){let e,t=[],i=new Map,s,l=pe(n[0]);const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>Lb(l)]}class PL extends be{constructor(e){super(),_e(this,e,LL,IL,me,{})}}function NL(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=W(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){w(l,e,o),b(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&le(i,t)},d(l){l&&k(e)}}}function FL(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=E(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],Q(s,"btn-loading",n[2])},m(a,u){w(a,e,u),b(e,t),w(a,i,u),w(a,s,u),b(s,l),e.focus(),o||(r=[Y(e,"click",n[4]),Y(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&Q(s,"btn-loading",a[2])},d(a){a&&(k(e),k(i),k(s)),o=!1,$e(r)}}}function RL(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[FL],header:[NL]},$$scope:{ctx:n}};return e=new rn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[6](null),V(e,s)}}}function qL(n,e,t){let i;Ge(n,lu,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){te[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await ln(),t(3,o=!1),q1()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class jL extends be{constructor(e){super(),_e(this,e,qL,RL,me,{})}}function g_(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S;return g=new Pn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[HL]},$$scope:{ctx:n}}}),{c(){var C;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=E(),s=v("nav"),l=v("a"),l.innerHTML='',o=E(),r=v("a"),r.innerHTML='',a=E(),u=v("a"),u.innerHTML='',f=E(),c=v("figure"),d=v("img"),m=E(),z(g.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),fn(d.src,h="./images/avatars/avatar"+(((C=n[0])==null?void 0:C.avatar)||0)+".svg")||p(d,"src",h),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(C,T){w(C,e,T),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(e,f),b(e,c),b(c,d),b(c,m),H(g,c,null),_=!0,y||(S=[Ce(dn.call(null,t)),Ce(dn.call(null,l)),Ce(zn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ce(Be.call(null,l,{text:"Collections",position:"right"})),Ce(dn.call(null,r)),Ce(zn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ce(Be.call(null,r,{text:"Logs",position:"right"})),Ce(dn.call(null,u)),Ce(zn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ce(Be.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p(C,T){var M;(!_||T&1&&!fn(d.src,h="./images/avatars/avatar"+(((M=C[0])==null?void 0:M.avatar)||0)+".svg"))&&p(d,"src",h);const $={};T&4096&&($.$$scope={dirty:T,ctx:C}),g.$set($)},i(C){_||(A(g.$$.fragment,C),_=!0)},o(C){L(g.$$.fragment,C),_=!1},d(C){C&&k(e),V(g),y=!1,$e(S)}}}function HL(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=' Manage admins',t=E(),i=v("hr"),s=E(),l=v("button"),l.innerHTML=' Logout',p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),o||(r=[Ce(dn.call(null,e)),Y(l,"click",n[7])],o=!0)},p:x,d(a){a&&(k(e),k(t),k(i),k(s),k(l)),o=!1,$e(r)}}}function __(n){let e,t,i;return t=new uu({props:{conf:j.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(s,l){w(s,e,l),H(t,e,null),i=!0},p:x,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function VL(n){var _;let e,t,i,s,l,o,r,a,u,f,c,d,h;document.title=e=j.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let m=((_=n[0])==null?void 0:_.id)&&n[1]&&g_(n);o=new L0({props:{routes:$L}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new PL({}),f=new jL({});let g=n[1]&&!n[2]&&__(n);return{c(){t=E(),i=v("div"),m&&m.c(),s=E(),l=v("div"),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),z(f.$$.fragment),c=E(),g&&g.c(),d=ye(),p(l,"class","app-body"),p(i,"class","app-layout")},m(y,S){w(y,t,S),w(y,i,S),m&&m.m(i,null),b(i,s),b(i,l),H(o,l,null),b(l,r),H(a,l,null),w(y,u,S),H(f,y,S),w(y,c,S),g&&g.m(y,S),w(y,d,S),h=!0},p(y,[S]){var C;(!h||S&24)&&e!==(e=j.joinNonEmpty([y[4],y[3],"PocketBase"]," - "))&&(document.title=e),(C=y[0])!=null&&C.id&&y[1]?m?(m.p(y,S),S&3&&A(m,1)):(m=g_(y),m.c(),A(m,1),m.m(i,s)):m&&(re(),L(m,1,1,()=>{m=null}),ae()),y[1]&&!y[2]?g?(g.p(y,S),S&6&&A(g,1)):(g=__(y),g.c(),A(g,1),g.m(d.parentNode,d)):g&&(re(),L(g,1,1,()=>{g=null}),ae())},i(y){h||(A(m),A(o.$$.fragment,y),A(a.$$.fragment,y),A(f.$$.fragment,y),A(g),h=!0)},o(y){L(m),L(o.$$.fragment,y),L(a.$$.fragment,y),L(f.$$.fragment,y),L(g),h=!1},d(y){y&&(k(t),k(i),k(u),k(c),k(d)),m&&m.d(),V(o),V(a),V(f,y),g&&g.d(y)}}}function zL(n,e,t){let i,s,l,o;Ge(n,Es,g=>t(10,i=g)),Ge(n,To,g=>t(3,s=g)),Ge(n,Na,g=>t(0,l=g)),Ge(n,Ft,g=>t(4,o=g));let r,a=!1,u=!1;function f(g){var _,y,S,C;((_=g==null?void 0:g.detail)==null?void 0:_.location)!==r&&(t(1,a=!!((S=(y=g==null?void 0:g.detail)==null?void 0:y.userData)!=null&&S.showAppSidebar)),r=(C=g==null?void 0:g.detail)==null?void 0:C.location,un(Ft,o="",o),on({}),q1())}function c(){us("/")}async function d(){var g,_;if(l!=null&&l.id)try{const y=await ce.settings.getAll({$cancelKey:"initialAppSettings"});un(To,s=((g=y==null?void 0:y.meta)==null?void 0:g.appName)||"",s),un(Es,i=!!((_=y==null?void 0:y.meta)!=null&&_.hideControls),i)}catch(y){y!=null&&y.isAbort||console.warn("Failed to load app settings.",y)}}function h(){ce.logout()}const m=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&d()},[l,a,u,s,o,f,c,h,m]}class BL extends be{constructor(e){super(),_e(this,e,zL,VL,me,{})}}new BL({target:document.getElementById("app")});export{$e as A,zt as B,j as C,us as D,ye as E,Nb as F,Vo as G,ao as H,Kt as I,Ge as J,Zn as K,pt as L,te as M,N1 as N,pe as O,gt as P,Ui as Q,qt as R,be as S,vt as T,zr as U,L as a,E as b,z as c,V as d,v as e,p as f,w as g,b as h,_e as i,Ce as j,re as k,dn as l,H as m,ae as n,k as o,ce as p,ge as q,Q as r,me as s,A as t,Y as u,Ze as v,W as w,le as x,x as y,de as z}; +@hourly`))],I=!0)},p(P,F){var q,B;(!D||F[1]&1&&i!==(i=P[31]))&&p(e,"for",i),(!D||F[1]&1&&o!==(o=P[31]))&&p(l,"id",o),(!D||F[0]&1&&r!==(r=!((B=(q=P[0])==null?void 0:q.backups)!=null&&B.cron)))&&(l.autofocus=r),F[0]&2&&l.value!==P[1].backups.cron&&de(l,P[1].backups.cron);const R={};F[0]&2|F[1]&2&&(R.$$scope={dirty:F,ctx:P}),g.$set(R)},i(P){D||(A(g.$$.fragment,P),D=!0)},o(P){L(g.$$.fragment,P),D=!1},d(P){P&&(k(e),k(s),k(l),k(a),k(u),k(_),k(y)),V(g),I=!1,$e(N)}}}function bL(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=W("Max @auto backups to keep"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),p(l,"min","1")},m(u,f){w(u,e,f),b(e,t),w(u,s,f),w(u,l,f),de(l,n[1].backups.cronMaxKeep),r||(a=Y(l,"input",n[23]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&2&&yt(l.value)!==u[1].backups.cronMaxKeep&&de(l,u[1].backups.cronMaxKeep)},d(u){u&&(k(e),k(s),k(l)),r=!1,a()}}}function d_(n){let e;function t(l,o){return l[7]?kL:l[8]?yL:vL}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},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){l&&k(e),s.d(l)}}}function vL(n){let e;return{c(){e=v("div"),e.innerHTML=' S3 connected successfully',p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function yL(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=' Failed to establish S3 connection',p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Ce(t=Be.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Et(t.update)&&o[0]&256&&t.update.call(null,(r=l[8].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function kL(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function p_(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","submit"),p(e,"class","btn btn-hint btn-transparent"),e.disabled=i=!n[9]||n[5]},m(o,r){w(o,e,r),b(e,t),s||(l=Y(e,"click",n[27]),s=!0)},p(o,r){r[0]&544&&i!==(i=!o[9]||o[5])&&(e.disabled=i)},d(o){o&&k(e),s=!1,l()}}}function wL(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S,C,T,$,M,O,D,I,N,P;h=new Jo({props:{class:"btn-sm",tooltip:"Refresh"}}),h.$on("refresh",n[13]),g=new dL({props:{class:"btn-sm"}}),g.$on("success",n[13]);let F={};y=new uL({props:F}),n[15](y);function R(X,J){return X[6]?hL:pL}let q=R(n),B=q(n),Z=n[6]&&!n[4]&&f_(n);return{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=W(n[10]),r=E(),a=v("div"),u=v("div"),f=v("div"),c=v("span"),c.textContent="Backup and restore your PocketBase data",d=E(),z(h.$$.fragment),m=E(),z(g.$$.fragment),_=E(),z(y.$$.fragment),S=E(),C=v("hr"),T=E(),$=v("button"),M=v("span"),M.textContent="Backups options",O=E(),B.c(),D=E(),Z&&Z.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(c,"class","txt-xl"),p(f,"class","flex m-b-sm flex-gap-10"),p(M,"class","txt"),p($,"type","button"),p($,"class","btn btn-secondary"),$.disabled=n[4],Q($,"btn-loading",n[4]),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(X,J){w(X,e,J),b(e,t),b(t,i),b(t,s),b(t,l),b(l,o),w(X,r,J),w(X,a,J),b(a,u),b(u,f),b(f,c),b(f,d),H(h,f,null),b(f,m),H(g,f,null),b(u,_),H(y,u,null),b(u,S),b(u,C),b(u,T),b(u,$),b($,M),b($,O),B.m($,null),b(u,D),Z&&Z.m(u,null),I=!0,N||(P=[Y($,"click",n[16]),Y(u,"submit",Ze(n[11]))],N=!0)},p(X,J){(!I||J[0]&1024)&&le(o,X[10]);const U={};y.$set(U),q!==(q=R(X))&&(B.d(1),B=q(X),B&&(B.c(),B.m($,null))),(!I||J[0]&16)&&($.disabled=X[4]),(!I||J[0]&16)&&Q($,"btn-loading",X[4]),X[6]&&!X[4]?Z?(Z.p(X,J),J[0]&80&&A(Z,1)):(Z=f_(X),Z.c(),A(Z,1),Z.m(u,null)):Z&&(re(),L(Z,1,1,()=>{Z=null}),ae())},i(X){I||(A(h.$$.fragment,X),A(g.$$.fragment,X),A(y.$$.fragment,X),A(Z),I=!0)},o(X){L(h.$$.fragment,X),L(g.$$.fragment,X),L(y.$$.fragment,X),L(Z),I=!1},d(X){X&&(k(e),k(r),k(a)),V(h),V(g),n[15](null),V(y),B.d(),Z&&Z.d(),N=!1,$e(P)}}}function SL(n){let e,t,i,s;return e=new Di({}),i=new Tn({props:{$$slots:{default:[wL]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(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[0]&2047|o[1]&2&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){L(e.$$.fragment,l),L(i.$$.fragment,l),s=!1},d(l){l&&k(t),V(e,l),V(i,l)}}}function TL(n,e,t){let i,s;Ge(n,Ft,J=>t(10,s=J)),un(Ft,s="Backups",s);let l,o={},r={},a=!1,u=!1,f="",c=!1,d=!1,h=!1,m=null;g();async function g(){t(4,a=!0);try{const J=await ce.settings.getAll()||{};y(J)}catch(J){ce.error(J)}t(4,a=!1)}async function _(){if(!(u||!i)){t(5,u=!0);try{const J=await ce.settings.update(j.filterRedactedProps(r));await C(),y(J),zt("Successfully saved application settings.")}catch(J){ce.error(J)}t(5,u=!1)}}function y(J={}){t(1,r={backups:(J==null?void 0:J.backups)||{}}),t(2,c=r.backups.cron!=""),t(0,o=JSON.parse(JSON.stringify(r)))}function S(){t(1,r=JSON.parse(JSON.stringify(o||{backups:{}}))),t(2,c=r.backups.cron!="")}async function C(){return l==null?void 0:l.loadBackups()}function T(J){te[J?"unshift":"push"](()=>{l=J,t(3,l)})}const $=()=>t(6,d=!d);function M(){c=this.checked,t(2,c)}function O(){r.backups.cron=this.value,t(1,r),t(2,c)}const D=()=>{t(1,r.backups.cron="0 0 * * *",r)},I=()=>{t(1,r.backups.cron="0 0 * * 0",r)},N=()=>{t(1,r.backups.cron="0 0 * * 1,3",r)},P=()=>{t(1,r.backups.cron="0 0 1 * *",r)};function F(){r.backups.cronMaxKeep=yt(this.value),t(1,r),t(2,c)}function R(J){n.$$.not_equal(r.backups.s3,J)&&(r.backups.s3=J,t(1,r),t(2,c))}function q(J){h=J,t(7,h)}function B(J){m=J,t(8,m)}const Z=()=>S(),X=()=>_();return n.$$.update=()=>{var J;n.$$.dirty[0]&1&&t(14,f=JSON.stringify(o)),n.$$.dirty[0]&6&&!c&&(J=r==null?void 0:r.backups)!=null&&J.cron&&(pi("backups.cron"),t(1,r.backups.cron="",r)),n.$$.dirty[0]&16386&&t(9,i=f!=JSON.stringify(r))},[o,r,c,l,a,u,d,h,m,i,s,_,S,C,f,T,$,M,O,D,I,N,P,F,R,q,B,Z,X]}class CL extends be{constructor(e){super(),_e(this,e,TL,SL,me,{},null,[-1,-1])}}const Wt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?us("/"):!0}],$L={"/login":jt({component:MA,conditions:Wt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":jt({asyncComponent:()=>ft(()=>import("./PageAdminRequestPasswordReset-9bb5b8fc.js"),[],import.meta.url),conditions:Wt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":jt({asyncComponent:()=>ft(()=>import("./PageAdminConfirmPasswordReset-8e3ad9f6.js"),[],import.meta.url),conditions:Wt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":jt({component:GD,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":jt({component:sT,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":jt({component:RA,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":jt({component:kA,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":jt({component:T8,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":jt({component:W8,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":jt({component:aI,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":jt({component:_I,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":jt({component:SI,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":jt({component:zI,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/backups":jt({component:CL,conditions:Wt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-bfd8a556.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmPasswordReset-bfd8a556.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-44fc3c9e.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmVerification-44fc3c9e.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-9d9126f6.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":jt({asyncComponent:()=>ft(()=>import("./PageRecordConfirmEmailChange-9d9126f6.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":jt({asyncComponent:()=>ft(()=>import("./PageOAuth2Redirect-42a9e5c9.js"),[],import.meta.url),conditions:Wt,userData:{showAppSidebar:!1}}),"*":jt({component:Ck,userData:{showAppSidebar:!1}})};function ML(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=Ko}=i;return{delay:f,duration:Et(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,m)=>{const g=m*a,_=m*u,y=h+m*e.width/t.width,S=h+m*e.height/t.height;return`transform: ${l} translate(${g}px, ${_}px) scale(${y}, ${S});`}}}function h_(n,e,t){const i=n.slice();return i[2]=e[t],i}function OL(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function EL(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function DL(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function AL(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function m_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,h,m=x,g,_,y;function S(M,O){return M[2].type==="info"?AL:M[2].type==="success"?DL:M[2].type==="warning"?EL:OL}let C=S(e),T=C(e);function $(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),T.c(),s=E(),l=v("div"),r=W(o),a=E(),u=v("button"),u.innerHTML='',f=E(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,O){w(M,t,O),b(t,i),T.m(i,null),b(t,s),b(t,l),b(l,r),b(t,a),b(t,u),b(t,f),g=!0,_||(y=Y(u,"click",Ze($)),_=!0)},p(M,O){e=M,C!==(C=S(e))&&(T.d(1),T=C(e),T&&(T.c(),T.m(i,null))),(!g||O&1)&&o!==(o=e[2].message+"")&&le(r,o),(!g||O&1)&&Q(t,"alert-info",e[2].type=="info"),(!g||O&1)&&Q(t,"alert-success",e[2].type=="success"),(!g||O&1)&&Q(t,"alert-danger",e[2].type=="error"),(!g||O&1)&&Q(t,"alert-warning",e[2].type=="warning")},r(){h=t.getBoundingClientRect()},f(){v0(t),m(),T_(t,h)},a(){m(),m=b0(t,h,ML,{duration:150})},i(M){g||(M&&xe(()=>{g&&(d&&d.end(1),c=M_(t,lt,{duration:150}),c.start())}),g=!0)},o(M){c&&c.invalidate(),M&&(d=ka(t,hl,{duration:150})),g=!1},d(M){M&&k(t),T.d(),M&&d&&d.end(),_=!1,y()}}}function IL(n){let e,t=[],i=new Map,s,l=pe(n[0]);const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>Lb(l)]}class PL extends be{constructor(e){super(),_e(this,e,LL,IL,me,{})}}function NL(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=W(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){w(l,e,o),b(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&le(i,t)},d(l){l&&k(e)}}}function FL(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=E(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],Q(s,"btn-loading",n[2])},m(a,u){w(a,e,u),b(e,t),w(a,i,u),w(a,s,u),b(s,l),e.focus(),o||(r=[Y(e,"click",n[4]),Y(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&Q(s,"btn-loading",a[2])},d(a){a&&(k(e),k(i),k(s)),o=!1,$e(r)}}}function RL(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[FL],header:[NL]},$$scope:{ctx:n}};return e=new rn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){z(e.$$.fragment)},m(s,l){H(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){L(e.$$.fragment,s),t=!1},d(s){n[6](null),V(e,s)}}}function qL(n,e,t){let i;Ge(n,lu,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){te[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await ln(),t(3,o=!1),q1()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class jL extends be{constructor(e){super(),_e(this,e,qL,RL,me,{})}}function g_(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,_,y,S;return g=new Pn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[HL]},$$scope:{ctx:n}}}),{c(){var C;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=E(),s=v("nav"),l=v("a"),l.innerHTML='',o=E(),r=v("a"),r.innerHTML='',a=E(),u=v("a"),u.innerHTML='',f=E(),c=v("figure"),d=v("img"),m=E(),z(g.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),fn(d.src,h="./images/avatars/avatar"+(((C=n[0])==null?void 0:C.avatar)||0)+".svg")||p(d,"src",h),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(C,T){w(C,e,T),b(e,t),b(e,i),b(e,s),b(s,l),b(s,o),b(s,r),b(s,a),b(s,u),b(e,f),b(e,c),b(c,d),b(c,m),H(g,c,null),_=!0,y||(S=[Ce(dn.call(null,t)),Ce(dn.call(null,l)),Ce(zn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ce(Be.call(null,l,{text:"Collections",position:"right"})),Ce(dn.call(null,r)),Ce(zn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ce(Be.call(null,r,{text:"Logs",position:"right"})),Ce(dn.call(null,u)),Ce(zn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ce(Be.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p(C,T){var M;(!_||T&1&&!fn(d.src,h="./images/avatars/avatar"+(((M=C[0])==null?void 0:M.avatar)||0)+".svg"))&&p(d,"src",h);const $={};T&4096&&($.$$scope={dirty:T,ctx:C}),g.$set($)},i(C){_||(A(g.$$.fragment,C),_=!0)},o(C){L(g.$$.fragment,C),_=!1},d(C){C&&k(e),V(g),y=!1,$e(S)}}}function HL(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=' Manage admins',t=E(),i=v("hr"),s=E(),l=v("button"),l.innerHTML=' Logout',p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),o||(r=[Ce(dn.call(null,e)),Y(l,"click",n[7])],o=!0)},p:x,d(a){a&&(k(e),k(t),k(i),k(s),k(l)),o=!1,$e(r)}}}function __(n){let e,t,i;return t=new uu({props:{conf:j.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(s,l){w(s,e,l),H(t,e,null),i=!0},p:x,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){L(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function VL(n){var _;let e,t,i,s,l,o,r,a,u,f,c,d,h;document.title=e=j.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let m=((_=n[0])==null?void 0:_.id)&&n[1]&&g_(n);o=new L0({props:{routes:$L}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new PL({}),f=new jL({});let g=n[1]&&!n[2]&&__(n);return{c(){t=E(),i=v("div"),m&&m.c(),s=E(),l=v("div"),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),z(f.$$.fragment),c=E(),g&&g.c(),d=ye(),p(l,"class","app-body"),p(i,"class","app-layout")},m(y,S){w(y,t,S),w(y,i,S),m&&m.m(i,null),b(i,s),b(i,l),H(o,l,null),b(l,r),H(a,l,null),w(y,u,S),H(f,y,S),w(y,c,S),g&&g.m(y,S),w(y,d,S),h=!0},p(y,[S]){var C;(!h||S&24)&&e!==(e=j.joinNonEmpty([y[4],y[3],"PocketBase"]," - "))&&(document.title=e),(C=y[0])!=null&&C.id&&y[1]?m?(m.p(y,S),S&3&&A(m,1)):(m=g_(y),m.c(),A(m,1),m.m(i,s)):m&&(re(),L(m,1,1,()=>{m=null}),ae()),y[1]&&!y[2]?g?(g.p(y,S),S&6&&A(g,1)):(g=__(y),g.c(),A(g,1),g.m(d.parentNode,d)):g&&(re(),L(g,1,1,()=>{g=null}),ae())},i(y){h||(A(m),A(o.$$.fragment,y),A(a.$$.fragment,y),A(f.$$.fragment,y),A(g),h=!0)},o(y){L(m),L(o.$$.fragment,y),L(a.$$.fragment,y),L(f.$$.fragment,y),L(g),h=!1},d(y){y&&(k(t),k(i),k(u),k(c),k(d)),m&&m.d(),V(o),V(a),V(f,y),g&&g.d(y)}}}function zL(n,e,t){let i,s,l,o;Ge(n,Es,g=>t(10,i=g)),Ge(n,To,g=>t(3,s=g)),Ge(n,Na,g=>t(0,l=g)),Ge(n,Ft,g=>t(4,o=g));let r,a=!1,u=!1;function f(g){var _,y,S,C;((_=g==null?void 0:g.detail)==null?void 0:_.location)!==r&&(t(1,a=!!((S=(y=g==null?void 0:g.detail)==null?void 0:y.userData)!=null&&S.showAppSidebar)),r=(C=g==null?void 0:g.detail)==null?void 0:C.location,un(Ft,o="",o),on({}),q1())}function c(){us("/")}async function d(){var g,_;if(l!=null&&l.id)try{const y=await ce.settings.getAll({$cancelKey:"initialAppSettings"});un(To,s=((g=y==null?void 0:y.meta)==null?void 0:g.appName)||"",s),un(Es,i=!!((_=y==null?void 0:y.meta)!=null&&_.hideControls),i)}catch(y){y!=null&&y.isAbort||console.warn("Failed to load app settings.",y)}}function h(){ce.logout()}const m=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&d()},[l,a,u,s,o,f,c,h,m]}class BL extends be{constructor(e){super(),_e(this,e,zL,VL,me,{})}}new BL({target:document.getElementById("app")});export{$e as A,zt as B,j as C,us as D,ye as E,Nb as F,Vo as G,ao as H,Kt as I,Ge as J,Zn as K,pt as L,te as M,N1 as N,pe as O,gt as P,Ui as Q,qt as R,be as S,vt as T,zr as U,L as a,E as b,z as c,V as d,v as e,p as f,w as g,b as h,_e as i,Ce as j,re as k,dn as l,H as m,ae as n,k as o,ce as p,ge as q,Q as r,me as s,A as t,Y as u,Ze as v,W as w,le as x,x as y,de as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 9c22b6ca..358ffa42 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -45,7 +45,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - +