diff --git a/apis/realtime.go b/apis/realtime.go index a4c066a8..91191292 100644 --- a/apis/realtime.go +++ b/apis/realtime.go @@ -251,7 +251,7 @@ func (api *realtimeApi) canAccessRecord(client subscriptions.Client, record *mod } // emulate request data - requestData := &models.FilterRequestData{ + requestData := &models.RequestData{ Method: "GET", } requestData.AuthRecord, _ = client.Get(ContextAuthRecordKey).(*models.Record) diff --git a/apis/record_auth.go b/apis/record_auth.go index a11c0a84..3f48ead2 100644 --- a/apis/record_auth.go +++ b/apis/record_auth.go @@ -72,7 +72,7 @@ func (api *recordAuthApi) authResponse(c echo.Context, authRecord *models.Record expands := strings.Split(c.QueryParam(expandQueryParam), ",") if len(expands) > 0 { // create a copy of the cached request data and adjust it to the current auth record - requestData := *GetRequestData(e.HttpContext) + requestData := *RequestData(e.HttpContext) requestData.Admin = nil requestData.AuthRecord = e.Record failed := api.app.Dao().ExpandRecord( @@ -204,7 +204,7 @@ func (api *recordAuthApi) authWithOAuth2(c echo.Context) error { record, authData, submitErr := form.Submit(func(createForm *forms.RecordUpsert, authRecord *models.Record, authUser *auth.AuthUser) error { return createForm.DrySubmit(func(txDao *daos.Dao) error { - requestData := GetRequestData(c) + requestData := RequestData(c) requestData.Data = form.CreateData createRuleFunc := func(q *dbx.SelectQuery) error { diff --git a/apis/record_crud.go b/apis/record_crud.go index fb22fe29..42585ac2 100644 --- a/apis/record_crud.go +++ b/apis/record_crud.go @@ -51,7 +51,7 @@ func (api *recordApi) list(c echo.Context) error { return err } - requestData := GetRequestData(c) + requestData := RequestData(c) if requestData.Admin == nil && collection.ListRule == nil { // only admins can access if the rule is nil @@ -110,7 +110,7 @@ func (api *recordApi) view(c echo.Context) error { return NewNotFoundError("", nil) } - requestData := GetRequestData(c) + requestData := RequestData(c) if requestData.Admin == nil && collection.ViewRule == nil { // only admins can access if the rule is nil @@ -155,7 +155,7 @@ func (api *recordApi) create(c echo.Context) error { return NewNotFoundError("", "Missing collection context.") } - requestData := GetRequestData(c) + requestData := RequestData(c) if requestData.Admin == nil && collection.CreateRule == nil { // only admins can access if the rule is nil @@ -251,7 +251,7 @@ func (api *recordApi) update(c echo.Context) error { return NewNotFoundError("", nil) } - requestData := GetRequestData(c) + requestData := RequestData(c) if requestData.Admin == nil && collection.UpdateRule == nil { // only admins can access if the rule is nil @@ -325,7 +325,7 @@ func (api *recordApi) delete(c echo.Context) error { return NewNotFoundError("", nil) } - requestData := GetRequestData(c) + requestData := RequestData(c) if requestData.Admin == nil && collection.DeleteRule == nil { // only admins can access if the rule is nil diff --git a/apis/record_helpers.go b/apis/record_helpers.go index 2beddcff..c9be32ce 100644 --- a/apis/record_helpers.go +++ b/apis/record_helpers.go @@ -15,17 +15,22 @@ import ( const ContextRequestDataKey = "requestData" -// GetRequestData exports common request data fields +// Deprecated: Will be removed after v0.9. Use apis.RequestData(c) instead. +func GetRequestData(c echo.Context) *models.RequestData { + return RequestData(c) +} + +// RequestData exports cached common request data fields // (query, body, logged auth state, etc.) from the provided context. -func GetRequestData(c echo.Context) *models.FilterRequestData { - // return cached to avoid reading the body multiple times +func RequestData(c echo.Context) *models.RequestData { + // return cached to avoid copying the body multiple times if v := c.Get(ContextRequestDataKey); v != nil { - if data, ok := v.(*models.FilterRequestData); ok { + if data, ok := v.(*models.RequestData); ok { return data } } - result := &models.FilterRequestData{ + result := &models.RequestData{ Method: c.Request().Method, Query: map[string]any{}, Data: map[string]any{}, @@ -54,7 +59,7 @@ func EnrichRecord(c echo.Context, dao *daos.Dao, record *models.Record, defaultE // - ensures that the emails of the auth records and their expanded auth relations // are visibe only for the current logged admin, record owner or record with manage access func EnrichRecords(c echo.Context, dao *daos.Dao, records []*models.Record, defaultExpands ...string) error { - requestData := GetRequestData(c) + requestData := RequestData(c) if err := autoIgnoreAuthRecordsEmailVisibility(dao, records, requestData); err != nil { return fmt.Errorf("Failed to resolve email visibility: %v", err) @@ -77,7 +82,7 @@ func EnrichRecords(c echo.Context, dao *daos.Dao, records []*models.Record, defa // expandFetch is the records fetch function that is used to expand related records. func expandFetch( dao *daos.Dao, - requestData *models.FilterRequestData, + requestData *models.RequestData, ) daos.ExpandFetchFunc { return func(relCollection *models.Collection, relIds []string) ([]*models.Record, error) { records, err := dao.FindRecordsByIds(relCollection.Id, relIds, func(q *dbx.SelectQuery) error { @@ -117,7 +122,7 @@ func expandFetch( func autoIgnoreAuthRecordsEmailVisibility( dao *daos.Dao, records []*models.Record, - requestData *models.FilterRequestData, + requestData *models.RequestData, ) error { if len(records) == 0 || !records[0].Collection().IsAuth() { return nil // nothing to check @@ -185,7 +190,7 @@ func autoIgnoreAuthRecordsEmailVisibility( func hasAuthManageAccess( dao *daos.Dao, record *models.Record, - requestData *models.FilterRequestData, + requestData *models.RequestData, ) bool { if !record.Collection().IsAuth() { return false diff --git a/apis/record_helpers_test.go b/apis/record_helpers_test.go index 9aa5a30b..a147c491 100644 --- a/apis/record_helpers_test.go +++ b/apis/record_helpers_test.go @@ -13,7 +13,7 @@ import ( "github.com/pocketbase/pocketbase/tests" ) -func TestGetRequestData(t *testing.T) { +func TestRequestData(t *testing.T) { e := echo.New() req := httptest.NewRequest(http.MethodPost, "/?test=123", strings.NewReader(`{"test":456}`)) req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON) @@ -28,10 +28,10 @@ func TestGetRequestData(t *testing.T) { dummyAdmin.Id = "id2" c.Set(apis.ContextAdminKey, dummyAdmin) - result := apis.GetRequestData(c) + result := apis.RequestData(c) if result == nil { - t.Fatal("Expected *models.FilterRequestData instance, got nil") + t.Fatal("Expected *models.RequestData instance, got nil") } if result.Method != http.MethodPost { diff --git a/daos/collection.go b/daos/collection.go index a2952a23..aa4ffdf5 100644 --- a/daos/collection.go +++ b/daos/collection.go @@ -54,7 +54,7 @@ func (dao *Dao) FindCollectionByNameOrId(nameOrId string) (*models.Collection, e // IsCollectionNameUnique checks that there is no existing collection // with the provided name (case insensitive!). // -// Note: case sensitive check because the name is used also as a table name for the records. +// Note: case insensitive check because the name is used also as a table name for the records. func (dao *Dao) IsCollectionNameUnique(name string, excludeIds ...string) bool { if name == "" { return false diff --git a/models/base.go b/models/base.go index b4fb8788..f542ac30 100644 --- a/models/base.go +++ b/models/base.go @@ -1,4 +1,4 @@ -// Package models implements all PocketBase DB models. +// Package models implements all PocketBase DB models and DTOs. package models import ( diff --git a/models/filter_request_data.go b/models/request_data.go similarity index 73% rename from models/filter_request_data.go rename to models/request_data.go index fa6adc2a..a129c8e7 100644 --- a/models/filter_request_data.go +++ b/models/request_data.go @@ -1,8 +1,8 @@ package models -// FilterRequestData defines a HTTP request data struct, usually used +// RequestData defines a HTTP request data struct, usually used // as part of the `@request.*` filter resolver. -type FilterRequestData struct { +type RequestData struct { Method string `json:"method"` Query map[string]any `json:"query"` Data map[string]any `json:"data"` diff --git a/resolvers/record_field_resolver.go b/resolvers/record_field_resolver.go index 4276094d..2ab8b04a 100644 --- a/resolvers/record_field_resolver.go +++ b/resolvers/record_field_resolver.go @@ -55,7 +55,7 @@ type RecordFieldResolver struct { loadedCollections []*models.Collection joins []join // we cannot use a map because the insertion order is not preserved exprs []dbx.Expression - requestData *models.FilterRequestData + requestData *models.RequestData staticRequestData map[string]any } @@ -67,7 +67,7 @@ type RecordFieldResolver struct { func NewRecordFieldResolver( dao *daos.Dao, baseCollection *models.Collection, - requestData *models.FilterRequestData, + requestData *models.RequestData, allowHiddenFields bool, ) *RecordFieldResolver { r := &RecordFieldResolver{ diff --git a/resolvers/record_field_resolver_test.go b/resolvers/record_field_resolver_test.go index 7d63f6de..04b8a953 100644 --- a/resolvers/record_field_resolver_test.go +++ b/resolvers/record_field_resolver_test.go @@ -20,7 +20,7 @@ func TestRecordFieldResolverUpdateQuery(t *testing.T) { t.Fatal(err) } - requestData := &models.FilterRequestData{ + requestData := &models.RequestData{ AuthRecord: authRecord, } @@ -182,7 +182,7 @@ func TestRecordFieldResolverResolveSchemaFields(t *testing.T) { t.Fatal(err) } - requestData := &models.FilterRequestData{ + requestData := &models.RequestData{ AuthRecord: authRecord, } @@ -263,7 +263,7 @@ func TestRecordFieldResolverResolveStaticRequestDataFields(t *testing.T) { t.Fatal(err) } - requestData := &models.FilterRequestData{ + requestData := &models.RequestData{ Method: "get", Query: map[string]any{ "a": 123, diff --git a/ui/dist/assets/AuthMethodsDocs.91bd4123.js b/ui/dist/assets/AuthMethodsDocs.e9abbcf9.js similarity index 77% rename from ui/dist/assets/AuthMethodsDocs.91bd4123.js rename to ui/dist/assets/AuthMethodsDocs.e9abbcf9.js index 2f25a458..e15930d4 100644 --- a/ui/dist/assets/AuthMethodsDocs.91bd4123.js +++ b/ui/dist/assets/AuthMethodsDocs.e9abbcf9.js @@ -1,4 +1,4 @@ -import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n,m as me,x as G,P as re,Q as we,k as ve,R as Ce,n as Pe,t as J,a as Y,o as _,d as pe,L as Me,C as Se,p as $e,r as H,u as je,O as Ae}from"./index.786ddc4b.js";import{S as Be}from"./SdkTabs.af9891cd.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(m,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(J(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,K=a[0].name+"",U,R,q,P,D,j,W,M,N,X,Q,A,Z,V,y=a[0].name+"",I,x,L,B,E,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` +import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n,m as me,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as _,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index.27866c98.js";import{S as Be}from"./SdkTabs.22a960f8.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(m,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",I,x,E,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); @@ -14,7 +14,7 @@ import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n ... final result = await pb.collection('${(ne=a[0])==null?void 0:ne.name}').listAuthMethods(); - `}});let z=a[2];const oe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;ee[5].code;for(let e=0;ee[5].code;for(let e=0;eo(1,f=d.code);return a.$$set=d=>{"collection"in d&&o(0,m=d.collection)},o(3,s=Se.getApiExampleUrl($e.baseUrl)),o(2,i=[{code:200,body:` + `),P.$set(c),(!$||t&1)&&y!==(y=e[0].name+"")&&G(I,y),t&6&&(z=e[2],w=re(w,t,oe,1,e,z,ee,O,we,fe,null,de)),t&6&&(N=e[2],ve(),p=re(p,t,se,1,e,N,le,T,Ce,he,null,ue),Pe())},i(e){if(!$){L(P.$$.fragment,e);for(let t=0;to(1,f=d.code);return a.$$set=d=>{"collection"in d&&o(0,m=d.collection)},o(3,s=Se.getApiExampleUrl($e.baseUrl)),o(2,i=[{code:200,body:` { "usernamePassword": true, "emailPassword": true, @@ -61,4 +61,4 @@ import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n } ] } - `}]),[m,f,i,s,u]}class Ne extends ke{constructor(l){super(),be(this,l,Te,Oe,ge,{collection:0})}}export{Ne as default}; + `}]),[m,f,i,s,u]}class Ke extends ke{constructor(l){super(),be(this,l,Te,Oe,ge,{collection:0})}}export{Ke as default}; diff --git a/ui/dist/assets/AuthRefreshDocs.5e592318.js b/ui/dist/assets/AuthRefreshDocs.3fc44b55.js similarity index 78% rename from ui/dist/assets/AuthRefreshDocs.5e592318.js rename to ui/dist/assets/AuthRefreshDocs.3fc44b55.js index f35e2df5..d8d93810 100644 --- a/ui/dist/assets/AuthRefreshDocs.5e592318.js +++ b/ui/dist/assets/AuthRefreshDocs.3fc44b55.js @@ -1,4 +1,4 @@ -import{S as Ne,i as Ue,s as je,O as ze,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,P as qe,Q as xe,k as Ie,R as Je,n as Ke,t as U,a as j,o as d,d as ie,L as Qe,C as He,p as We,r as x,u as Ge}from"./index.786ddc4b.js";import{S as Xe}from"./SdkTabs.af9891cd.js";function Le(r,l,s){const n=r.slice();return n[5]=l[s],n}function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ve(r,l){let s,n,m,_;return n=new ze({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,I,S,E,ce,F,M,de,J,V=r[0].name+"",K,ue,pe,z,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:` +import{S as ze,i as Ue,s as je,N as Ve,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,O as qe,P as xe,k as Ie,Q as Je,n as Ke,t as U,a as j,o as d,d as ie,R as Qe,C as He,p as We,r as x,u as Ge}from"./index.27866c98.js";import{S as Xe}from"./SdkTabs.22a960f8.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,I,S,F,ce,L,M,de,J,N=r[0].name+"",K,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); @@ -24,10 +24,10 @@ import{S as Ne,i as Ue,s as je,O as ze,e as a,w as k,b as p,c as ae,f as b,g as print(pb.authStore.isValid); print(pb.authStore.token); print(pb.authStore.model.id); - `}}),P=new ze({props:{content:"?expand=relField1,relField2.subRelField"}});let N=r[2];const Pe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eReturns a new auth response (token and record data) for an + `}}),P=new Ve({props:{content:"?expand=relField1,relField2.subRelField"}});let z=r[2];const Pe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eReturns a new auth response (token and record data) for an already authenticated record.

This method is usually called by users on page/screen reload to ensure that the previously stored - data in pb.authStore is still valid and up-to-date.

`,v=p(),ae(g.$$.fragment),w=p(),B=a("h6"),B.textContent="API details",I=p(),S=a("div"),E=a("strong"),E.textContent="POST",ce=p(),F=a("div"),M=a("p"),de=k("/api/collections/"),J=a("strong"),K=k(V),ue=k("/auth-refresh"),pe=p(),z=a("p"),z.innerHTML="Requires record Authorization:TOKEN header",Q=p(),D=a("div"),D.textContent="Query parameters",W=p(),T=a("table"),G=a("thead"),G.innerHTML=`Param + data in pb.authStore is still valid and up-to-date.

`,v=p(),ae(g.$$.fragment),w=p(),B=a("h6"),B.textContent="API details",I=p(),S=a("div"),F=a("strong"),F.textContent="POST",ce=p(),L=a("div"),M=a("p"),de=k("/api/collections/"),J=a("strong"),K=k(N),ue=k("/auth-refresh"),pe=p(),V=a("p"),V.innerHTML="Requires record Authorization:TOKEN header",Q=p(),D=a("div"),D.textContent="Query parameters",W=p(),T=a("table"),G=a("thead"),G.innerHTML=`Param Type Description`,fe=p(),X=a("tbody"),C=a("tr"),Y=a("td"),Y.textContent="expand",he=p(),Z=a("td"),Z.innerHTML='String',be=p(),h=a("td"),me=k(`Auto expand record relations. Ex.: `),ae(P.$$.fragment),_e=k(` @@ -35,7 +35,7 @@ import{S as Ne,i as Ue,s as je,O as ze,e as a,w as k,b as p,c as ae,f as b,g as The expanded relations will be appended to the record under the `),ee=a("code"),ee.textContent="expand",ge=k(" property (eg. "),te=a("code"),te.textContent='"expand": {"relField1": {...}, ...}',ye=k(`). `),Se=a("br"),$e=k(` - Only the relations to which the request user has permissions to `),oe=a("strong"),oe.textContent="view",we=k(" will be expanded."),le=p(),O=a("div"),O.textContent="Responses",se=p(),R=a("div"),q=a("div");for(let e=0;e<$.length;e+=1)$[e].c();Ce=p(),H=a("div");for(let e=0;es(1,_=v.code);return r.$$set=v=>{"collection"in v&&s(0,m=v.collection)},r.$$.update=()=>{r.$$.dirty&1&&s(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:He.dummyCollectionRecord(m)},null,2)},{code:401,body:` + `),g.$set(u),(!A||t&1)&&N!==(N=e[0].name+"")&&re(K,N),t&6&&(z=e[2],$=qe($,t,Pe,1,e,z,Te,q,xe,Le,null,Fe)),t&6&&(E=e[2],Ie(),y=qe(y,t,Ae,1,e,E,Re,H,Je,Ne,null,Ee),Ke())},i(e){if(!A){U(g.$$.fragment,e),U(P.$$.fragment,e);for(let t=0;ts(1,_=v.code);return r.$$set=v=>{"collection"in v&&s(0,m=v.collection)},r.$$.update=()=>{r.$$.dirty&1&&s(2,i=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:He.dummyCollectionRecord(m)},null,2)},{code:401,body:` { "code": 401, "message": "The request requires valid record authorization token to be set.", @@ -79,4 +79,4 @@ import{S as Ne,i as Ue,s as je,O as ze,e as a,w as k,b as p,c as ae,f as b,g as "message": "Missing auth record context.", "data": {} } - `}])},s(3,n=He.getApiExampleUrl(We.baseUrl)),[m,_,i,n,f]}class ot extends Ne{constructor(l){super(),Ue(this,l,Ze,Ye,je,{collection:0})}}export{ot as default}; + `}])},s(3,n=He.getApiExampleUrl(We.baseUrl)),[m,_,i,n,f]}class ot extends ze{constructor(l){super(),Ue(this,l,Ze,Ye,je,{collection:0})}}export{ot as default}; diff --git a/ui/dist/assets/AuthWithOAuth2Docs.6075be31.js b/ui/dist/assets/AuthWithOAuth2Docs.ade12b1d.js similarity index 82% rename from ui/dist/assets/AuthWithOAuth2Docs.6075be31.js rename to ui/dist/assets/AuthWithOAuth2Docs.ade12b1d.js index 252393b9..41e3c858 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs.6075be31.js +++ b/ui/dist/assets/AuthWithOAuth2Docs.ade12b1d.js @@ -1,4 +1,4 @@ -import{S as je,i as He,s as Je,O as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,P as Ue,Q as Ne,k as Qe,R as ze,n as Ke,t as j,a as H,o as c,d as ue,L as Ye,C as Ve,p as Ge,r as J,u as Xe}from"./index.786ddc4b.js";import{S as Ze}from"./SdkTabs.af9891cd.js";function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,F,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,L,ie,A,U,S=[],Ae=new Map,Ee,V,w=[],Te=new Map,T;k=new Ze({props:{js:` +import{S as je,i as He,s as Je,N as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,O as Ve,P as Ne,k as Qe,Q as ze,n as Ke,t as j,a as H,o as c,d as ue,R as Ye,C as Be,p as Ge,r as J,u as Xe}from"./index.27866c98.js";import{S as Ze}from"./SdkTabs.22a960f8.js";function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function Le(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,L,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,U,ie,A,V,S=[],Ae=new Map,Ee,B,w=[],Te=new Map,T;k=new Ze({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); @@ -48,11 +48,11 @@ import{S as je,i as He,s as Je,O as We,e as s,w as v,b as p,c as re,f as h,g as // "logout" the last authenticated account pb.authStore.clear(); - `}}),E=new We({props:{content:"?expand=relField1,relField2.subRelField"}});let W=i[2];const Ce=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthenticate with an OAuth2 provider and returns a new auth token and record data.

+ `}}),E=new We({props:{content:"?expand=relField1,relField2.subRelField"}});let W=i[2];const Ce=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthenticate with an OAuth2 provider and returns a new auth token and record data.

This action usually should be called right after the provider login page redirect.

You could also check the OAuth2 web integration example - .

`,g=p(),re(k.$$.fragment),R=p(),C=s("h6"),C.textContent="API details",N=p(),y=s("div"),F=s("strong"),F.textContent="POST",pe=p(),x=s("div"),D=s("p"),he=v("/api/collections/"),Q=s("strong"),z=v(M),be=v("/auth-with-oauth2"),K=p(),q=s("div"),q.textContent="Body Parameters",Y=p(),I=s("table"),I.innerHTML=`Param + .

`,g=p(),re(k.$$.fragment),R=p(),C=s("h6"),C.textContent="API details",N=p(),y=s("div"),L=s("strong"),L.textContent="POST",pe=p(),x=s("div"),D=s("p"),he=v("/api/collections/"),Q=s("strong"),z=v(M),be=v("/auth-with-oauth2"),K=p(),q=s("div"),q.textContent="Body Parameters",Y=p(),I=s("table"),I.innerHTML=`Param Type Description
Required @@ -87,7 +87,7 @@ import{S as je,i as He,s as Je,O as We,e as s,w as v,b as p,c as re,f as h,g as The expanded relations will be appended to the record under the `),le=s("code"),le.textContent="expand",Se=v(" property (eg. "),oe=s("code"),oe.textContent='"expand": {"relField1": {...}, ...}',Re=v(`). `),ye=s("br"),Oe=v(` - Only the relations to which the request user has permissions to `),se=s("strong"),se.textContent="view",$e=v(" will be expanded."),ne=p(),L=s("div"),L.textContent="Responses",ie=p(),A=s("div"),U=s("div");for(let e=0;eo(1,_=g.code);return i.$$set=g=>{"collection"in g&&o(0,m=g.collection)},i.$$.update=()=>{i.$$.dirty&1&&o(2,d=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:Ve.dummyCollectionRecord(m),meta:{id:"abc123",name:"John Doe",username:"john.doe",email:"test@example.com",avatarUrl:"https://example.com/avatar.png"}},null,2)},{code:400,body:` + `),k.$set(u),(!T||t&1)&&M!==(M=e[0].name+"")&&de(z,M),t&6&&(W=e[2],S=Ve(S,t,Ce,1,e,W,Ae,V,Ne,xe,null,Le)),t&6&&(F=e[2],Qe(),w=Ve(w,t,De,1,e,F,Te,B,ze,Me,null,Fe),Ke())},i(e){if(!T){j(k.$$.fragment,e),j(E.$$.fragment,e);for(let t=0;to(1,_=g.code);return i.$$set=g=>{"collection"in g&&o(0,m=g.collection)},i.$$.update=()=>{i.$$.dirty&1&&o(2,d=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:Be.dummyCollectionRecord(m),meta:{id:"abc123",name:"John Doe",username:"john.doe",email:"test@example.com",avatarUrl:"https://example.com/avatar.png"}},null,2)},{code:400,body:` { "code": 400, "message": "An error occurred while submitting the form.", @@ -148,4 +148,4 @@ import{S as je,i as He,s as Je,O as We,e as s,w as v,b as p,c as re,f as h,g as } } } - `}])},o(3,n=Ve.getApiExampleUrl(Ge.baseUrl)),[m,_,d,n,b]}class ot extends je{constructor(l){super(),He(this,l,tt,et,Je,{collection:0})}}export{ot as default}; + `}])},o(3,n=Be.getApiExampleUrl(Ge.baseUrl)),[m,_,d,n,b]}class ot extends je{constructor(l){super(),He(this,l,tt,et,Je,{collection:0})}}export{ot as default}; diff --git a/ui/dist/assets/AuthWithPasswordDocs.e5c37e44.js b/ui/dist/assets/AuthWithPasswordDocs.67606692.js similarity index 88% rename from ui/dist/assets/AuthWithPasswordDocs.e5c37e44.js rename to ui/dist/assets/AuthWithPasswordDocs.67606692.js index 1ceaf509..42dbdf6f 100644 --- a/ui/dist/assets/AuthWithPasswordDocs.e5c37e44.js +++ b/ui/dist/assets/AuthWithPasswordDocs.67606692.js @@ -1,4 +1,4 @@ -import{S as Se,i as ve,s as we,O as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,P as ce,Q as ye,k as ge,R as Pe,n as Re,t as tt,a as et,o as c,d as Ut,L as $e,C as de,p as Ce,r as lt,u as Oe}from"./index.786ddc4b.js";import{S as Ae}from"./SdkTabs.af9891cd.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,I,Et,nt,Z=n[0].name+"",it,Lt,rt,N,ct,M,dt,Wt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,L,wt,It,yt,Nt,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,W,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` +import{S as Se,i as ve,s as we,N as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,O as ce,P as ye,k as ge,Q as Pe,n as Re,t as tt,a as et,o as c,d as Ut,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index.27866c98.js";import{S as Ae}from"./SdkTabs.22a960f8.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,I,Et,nt,Z=n[0].name+"",it,Wt,rt,N,ct,M,dt,Lt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,It,yt,Nt,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); @@ -38,9 +38,9 @@ import{S as Se,i as ve,s as we,O as ke,e as s,w as f,b as u,c as Ot,f as h,g as pb.authStore.clear(); `}});let v=n[1]&&pe(),w=n[1]&&n[2]&&be(),y=n[2]&&me();H=new ke({props:{content:"?expand=relField1,relField2.subRelField"}});let x=n[4];const oe=t=>t[8].code;for(let t=0;tt[8].code;for(let t=0;tParam + and `),B=s("strong"),B.textContent="password",Mt=f("."),ot=u(),Ot(T.$$.fragment),at=u(),F=s("h6"),F.textContent="API details",st=u(),U=s("div"),G=s("strong"),G.textContent="POST",Dt=u(),X=s("div"),I=s("p"),Et=f("/api/collections/"),nt=s("strong"),it=f(Z),Wt=f("/auth-with-password"),rt=u(),N=s("div"),N.textContent="Body Parameters",ct=u(),M=s("table"),dt=s("thead"),dt.innerHTML=`Param Type - Description`,Wt=u(),V=s("tbody"),D=s("tr"),ut=s("td"),ut.innerHTML=`
Required + Description`,Lt=u(),V=s("tbody"),D=s("tr"),ut=s("td"),ut.innerHTML=`
Required identity
`,Bt=u(),ft=s("td"),ft.innerHTML='String',Ht=u(),g=s("td"),Yt=f(`The `),v&&v.c(),pt=u(),w&&w.c(),bt=u(),y&&y.c(),mt=f(` of the record to authenticate.`),qt=u(),ht=s("tr"),ht.innerHTML=`
Required @@ -48,13 +48,13 @@ import{S as Se,i as ve,s as we,O as ke,e as s,w as f,b as u,c as Ot,f as h,g as String The auth record password.`,_t=u(),j=s("div"),j.textContent="Query parameters",kt=u(),E=s("table"),St=s("thead"),St.innerHTML=`Param Type - Description`,Ft=u(),vt=s("tbody"),L=s("tr"),wt=s("td"),wt.textContent="expand",It=u(),yt=s("td"),yt.innerHTML='String',Nt=u(),k=s("td"),Vt=f(`Auto expand record relations. Ex.: + Description`,Ft=u(),vt=s("tbody"),W=s("tr"),wt=s("td"),wt.textContent="expand",It=u(),yt=s("td"),yt.innerHTML='String',Nt=u(),k=s("td"),Vt=f(`Auto expand record relations. Ex.: `),Ot(H.$$.fragment),jt=f(` Supports up to 6-levels depth nested relations expansion. `),Jt=s("br"),Qt=f(` The expanded relations will be appended to the record under the `),gt=s("code"),gt.textContent="expand",Kt=f(" property (eg. "),Pt=s("code"),Pt.textContent='"expand": {"relField1": {...}, ...}',zt=f(`). `),Gt=s("br"),Xt=f(` - Only the relations to which the request user has permissions to `),Rt=s("strong"),Rt.textContent="view",Zt=f(" will be expanded."),$t=u(),J=s("div"),J.textContent="Responses",Ct=u(),W=s("div"),Q=s("div");for(let t=0;tl(3,_=O.code);return n.$$set=O=>{"collection"in O&&l(0,d=O.collection)},n.$$.update=()=>{var O,B;n.$$.dirty&1&&l(2,S=(O=d==null?void 0:d.options)==null?void 0:O.allowEmailAuth),n.$$.dirty&1&&l(1,m=(B=d==null?void 0:d.options)==null?void 0:B.allowUsernameAuth),n.$$.dirty&6&&l(5,p=m&&S?"YOUR_USERNAME_OR_EMAIL":m?"YOUR_USERNAME":"YOUR_EMAIL"),n.$$.dirty&1&&l(4,$=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:de.dummyCollectionRecord(d)},null,2)},{code:400,body:` + `),T.$set(b),(!Y||a&1)&&Z!==(Z=t[0].name+"")&&Tt(it,Z),t[1]?v||(v=pe(),v.c(),v.m(g,pt)):v&&(v.d(1),v=null),t[1]&&t[2]?w||(w=be(),w.c(),w.m(g,bt)):w&&(w.d(1),w=null),t[2]?y||(y=me(),y.c(),y.m(g,mt)):y&&(y.d(1),y=null),a&24&&(x=t[4],A=ce(A,a,oe,1,t,x,xt,Q,ye,he,null,fe)),a&24&&(z=t[4],ge(),P=ce(P,a,ae,1,t,z,ee,K,Pe,_e,null,ue),Re())},i(t){if(!Y){tt(T.$$.fragment,t),tt(H.$$.fragment,t);for(let a=0;al(3,_=O.code);return n.$$set=O=>{"collection"in O&&l(0,d=O.collection)},n.$$.update=()=>{var O,B;n.$$.dirty&1&&l(2,S=(O=d==null?void 0:d.options)==null?void 0:O.allowEmailAuth),n.$$.dirty&1&&l(1,m=(B=d==null?void 0:d.options)==null?void 0:B.allowUsernameAuth),n.$$.dirty&6&&l(5,p=m&&S?"YOUR_USERNAME_OR_EMAIL":m?"YOUR_USERNAME":"YOUR_EMAIL"),n.$$.dirty&1&&l(4,$=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:de.dummyCollectionRecord(d)},null,2)},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/CodeEditor.07a02f98.js b/ui/dist/assets/CodeEditor.d4833e13.js similarity index 99% rename from ui/dist/assets/CodeEditor.07a02f98.js rename to ui/dist/assets/CodeEditor.d4833e13.js index 363810a8..cae3d4df 100644 --- a/ui/dist/assets/CodeEditor.07a02f98.js +++ b/ui/dist/assets/CodeEditor.d4833e13.js @@ -1,4 +1,4 @@ -import{S as Ze,i as Te,s as be,e as ke,f as Xe,T as gO,g as ye,y as ZO,o as xe,K as _e,M as we,N as Re}from"./index.786ddc4b.js";import{P as qe,N as ve,u as We,D as Ye,v as oO,T as j,I as KO,w as QO,x as l,y as Ve,L as cO,z as hO,A as U,B as dO,F as HO,G as uO,H as V,J as Ce,K as ze,E as y,M as Y,O as Ge,Q as je,R as P,U as Ue,a as q,h as Ae,b as Ie,c as De,d as Be,e as Ee,s as Ne,f as Me,g as Le,i as Je,r as Fe,j as Ke,k as He,l as Ot,m as et,n as tt,o as at,p as it,q as rt,t as TO,C}from"./index.30b22912.js";class B{constructor(O,t,a,i,r,s,n,Q,c,h=0,o){this.p=O,this.stack=t,this.state=a,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=Q,this.curContext=c,this.lookAhead=h,this.parent=o}toString(){return`[${this.stack.filter((O,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,t,a=0){let i=O.parser.context;return new B(O,[],t,a,a,0,[],0,i?new bO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let t=O>>19,a=O&65535,{parser:i}=this.p,r=i.dynamicPrecedence(a);if(r&&(this.score+=r),t==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),as;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,t,a,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(t==a)return;if(s.buffer[n-2]>=t){s.buffer[n-2]=a;return}}}if(!r||this.pos==a)this.buffer.push(O,t,a,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>a;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=t,this.buffer[s+2]=a,this.buffer[s+3]=i}}shift(O,t,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if((O&262144)==0){let r=O,{parser:s}=this.p;(a>this.pos||t<=s.maxNode)&&(this.pos=a,s.stateFlag(r,1)||(this.reducePos=a)),this.pushState(r,i),this.shiftContext(t,i),t<=s.maxNode&&this.buffer.push(t,i,a,4)}else this.pos=a,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,a,4)}apply(O,t,a){O&65536?this.reduce(O):this.shift(O,t,a)}useNode(O,t){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(t,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,t=O.buffer.length;for(;t>0&&O.buffer[t-2]>O.reducePos;)t-=4;let a=O.buffer.slice(t),i=O.bufferBase+t;for(;O&&i==O.bufferBase;)O=O.parent;return new B(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,t){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,t,4),this.storeNode(0,this.pos,t,a?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(O){for(let t=new st(this);;){let a=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,O);if(a==0)return!1;if((a&65536)==0)return!0;t.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;rQ&1&&n==s)||i.push(t[r],s)}t=i}let a=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-a*3;if(r<0||t.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class bO{constructor(O,t){this.tracker=O,this.context=t,this.hash=O.strict?O.hash(t):0}}var kO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth"})(kO||(kO={}));class st{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let t=O&65535,a=O>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class E{constructor(O,t,a){this.stack=O,this.pos=t,this.index=a,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,t=O.bufferBase+O.buffer.length){return new E(O,t,t-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new E(this.stack,this.pos,this.index)}}class A{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const XO=new A;class nt{constructor(O,t){this.input=O,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=XO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(O,t){let a=this.range,i=this.rangeIndex,r=this.pos+O;for(;ra.to:r>=a.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-a.to,a=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,t.from);return this.end}peek(O){let t=this.chunkOff+O,a,i;if(t>=0&&t=this.chunk2Pos&&an.to&&(this.chunk2=this.chunk2.slice(0,n.to-a)),i=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),i}acceptToken(O,t=0){let a=t?this.resolveOffset(t,-1):this.pos;if(a==null||a=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,t){if(t?(this.token=t,t.start=O,t.lookAhead=O+1,t.value=t.extended=-1):this.token=XO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,t-this.chunkPos);if(O>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,t-this.chunk2Pos);if(O>=this.range.from&&t<=this.range.to)return this.input.read(O,t);let a="";for(let i of this.ranges){if(i.from>=t)break;i.to>O&&(a+=this.input.read(Math.max(i.from,O),Math.min(i.to,t)))}return a}}class I{constructor(O,t){this.data=O,this.id=t}token(O,t){lt(this.data,O,t,this.id)}}I.prototype.contextual=I.prototype.fallback=I.prototype.extend=!1;class Z{constructor(O,t={}){this.token=O,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function lt(e,O,t,a){let i=0,r=1<0){let f=e[u];if(n.allows(f)&&(O.token.value==-1||O.token.value==f||s.overrides(f,O.token.value))){O.acceptToken(f);break}}let c=O.next,h=0,o=e[i+2];if(O.next<0&&o>h&&e[Q+o*3-3]==65535&&e[Q+o*3-3]==65535){i=e[Q+o*3-1];continue O}for(;h>1,f=Q+u+(u<<1),p=e[f],T=e[f+1]||65536;if(c=T)h=u+1;else{i=e[f+2],O.advance();continue O}}break}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let t=null;for(let a=0,i=0;a=92&&s--,s>=34&&s--;let Q=s-32;if(Q>=46&&(Q-=46,n=!0),r+=Q,n)break;r*=46}t?t[i++]=r:t=new O(r)}return t}const g=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let F=null;var yO;(function(e){e[e.Margin=25]="Margin"})(yO||(yO={}));function xO(e,O,t){let a=e.cursor(KO.IncludeAnonymous);for(a.moveTo(O);;)if(!(t<0?a.childBefore(O):a.childAfter(O)))for(;;){if((t<0?a.toO)&&!a.type.isError)return t<0?Math.max(0,Math.min(a.to-1,O-25)):Math.min(e.length,Math.max(a.from+1,O+25));if(t<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return t<0?0:e.length}}class ot{constructor(O,t){this.fragments=O,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?xO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?xO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=s,null;if(r instanceof j){if(s==O){if(s=Math.max(this.safeFrom,O)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+r.length}}}class Qt{constructor(O,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(a=>new A)}getActions(O){let t=0,a=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,Q=0;for(let c=0;co.end+25&&(Q=Math.max(o.lookAhead,Q)),o.value!=0)){let u=t;if(o.extended>-1&&(t=this.addActions(O,o.extended,o.end,t)),t=this.addActions(O,o.value,o.end,t),!h.extend&&(a=o,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return Q&&O.setLookAhead(Q),!a&&O.pos==this.stream.end&&(a=new A,a.value=O.p.parser.eofTerm,a.start=a.end=O.pos,t=this.addActions(O,a.value,a.end,t)),this.mainToken=a,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let t=new A,{pos:a,p:i}=O;return t.start=a,t.end=Math.min(a+1,i.stream.end),t.value=a==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(O,t,a){let i=this.stream.clipPos(a.pos);if(t.token(this.stream.reset(i,O),a),O.value>-1){let{parser:r}=a.p;for(let s=0;s=0&&a.p.parser.dialect.allows(n>>1)){(n&1)==0?O.value=n>>1:O.extended=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,t,a,i){for(let r=0;rO.bufferLength*4?new ot(a,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,t=this.minStackPos,a=this.stacks=[],i,r;for(let s=0;st)a.push(n);else{if(this.advanceStack(n,a,O))continue;{i||(i=[],r=[]),i.push(n);let Q=this.tokens.getMainToken(n);r.push(Q.value,Q.end)}}break}}if(!a.length){let s=i&&dt(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,a);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(a.length>s)for(a.sort((n,Q)=>Q.score-n.score);a.length>s;)a.pop();a.some(n=>n.reducePos>t)&&this.recovering--}else if(a.length>1){O:for(let s=0;s500&&c.buffer.length>500)if((n.score-c.score||n.buffer.length-c.buffer.length)>0)a.splice(Q--,1);else{a.splice(s--,1);continue O}}}}this.minStackPos=a[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let c=O.curContext&&O.curContext.tracker.strict,h=c?O.curContext.hash:0;for(let o=this.fragments.nodeAt(i);o;){let u=this.parser.nodeSet.types[o.type.id]==o.type?r.getGoto(O.state,o.type.id):-1;if(u>-1&&o.length&&(!c||(o.prop(oO.contextHash)||0)==h))return O.useNode(o,u),g&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(o.type.id)})`),!0;if(!(o instanceof j)||o.children.length==0||o.positions[0]>0)break;let f=o.children[0];if(f instanceof j&&o.positions[0]==0)o=f;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),g&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let Q=this.tokens.getActions(O);for(let c=0;ci?t.push(p):a.push(p)}return!1}advanceFully(O,t){let a=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>a)return wO(O,t),!0}}runRecovery(O,t,a){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),g&&console.log(h+this.stackID(n)+" (restarted)"),this.advanceFully(n,a))))continue;let o=n.split(),u=h;for(let f=0;o.forceReduce()&&f<10&&(g&&console.log(u+this.stackID(o)+" (via force-reduce)"),!this.advanceFully(o,a));f++)g&&(u=this.stackID(o)+" -> ");for(let f of n.recoverByInsert(Q))g&&console.log(h+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,a);this.stream.end>n.pos?(c==n.pos&&(c++,Q=0),n.recoverByDelete(Q,c),g&&console.log(h+this.stackID(n)+` (via recover-delete ${this.parser.getName(Q)})`),wO(n,a)):(!i||i.scoree;class Oe{constructor(O){this.start=O.start,this.shift=O.shift||K,this.reduce=O.reduce||K,this.reuse=O.reuse||K,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class x extends qe{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let t=O.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(h,Q,n[c++]);else{let o=n[c+-h];for(let u=-h;u>0;u--)r(n[c++],Q,o);c++}}}this.nodeSet=new ve(t.map((n,Q)=>We.define({name:Q>=this.minRepeatTerm?void 0:n,id:Q,props:i[Q],top:a.indexOf(Q)>-1,error:Q==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(Q)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Ye;let s=z(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new I(s,n):n),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,t,a){let i=new ct(this,O,t,a);for(let r of this.wrappers)i=r(i,O,t,a);return i}getGoto(O,t,a=!1){let i=this.goto;if(t>=i[0])return-1;for(let r=i[t+1];;){let s=i[r++],n=s&1,Q=i[r++];if(n&&a)return Q;for(let c=r+(s>>1);r0}validAction(O,t){if(t==this.stateSlot(O,4))return!0;for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=b(this.data,a+2);else return!1;if(t==b(this.data,a+1))return!0}}nextStates(O){let t=[];for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=b(this.data,a+2);else break;if((this.data[a+2]&1)==0){let i=this.data[a+1];t.some((r,s)=>s&1&&r==i)||t.push(this.data[a],i)}}return t}overrides(O,t){let a=RO(this.data,this.tokenPrecTable,t);return a<0||RO(this.data,this.tokenPrecTable,O){let i=O.tokenizers.find(r=>r.from==a);return i?i.to:a})),O.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((a,i)=>{let r=O.specializers.find(n=>n.from==a.external);if(!r)return a;let s=Object.assign(Object.assign({},a),{external:r.to});return t.specializers[i]=qO(s),s})),O.contextTracker&&(t.context=O.contextTracker),O.dialect&&(t.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(t.strict=O.strict),O.wrap&&(t.wrappers=t.wrappers.concat(O.wrap)),O.bufferLength!=null&&(t.bufferLength=O.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let t=this.dynamicPrecedences;return t==null?0:t[O]||0}parseDialect(O){let t=Object.keys(this.dialects),a=t.map(()=>!1);if(O)for(let r of O.split(" ")){let s=t.indexOf(r);s>=0&&(a[s]=!0)}let i=null;for(let r=0;ra)&&t.p.parser.stateFlag(t.state,2)&&(!O||O.scoree.external(t,a)<<1|O}return e.get}const ut=54,ft=1,pt=55,$t=2,St=56,mt=3,N=4,ee=5,te=6,ae=7,ie=8,Pt=9,gt=10,Zt=11,H=57,Tt=12,vO=58,bt=18,kt=27,Xt=30,yt=33,xt=35,_t=0,wt={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},Rt={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},WO={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 qt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function re(e){return e==9||e==10||e==13||e==32}let YO=null,VO=null,CO=0;function sO(e,O){let t=e.pos+O;if(CO==t&&VO==e)return YO;let a=e.peek(O);for(;re(a);)a=e.peek(++O);let i="";for(;qt(a);)i+=String.fromCharCode(a),a=e.peek(++O);return VO=e,CO=t,YO=i?i.toLowerCase():a==vt||a==Wt?void 0:null}const se=60,ne=62,le=47,vt=63,Wt=33,Yt=45;function zO(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let t=0;t-1?new zO(sO(a,1)||"",e):e},reduce(e,O){return O==bt&&e?e.parent:e},reuse(e,O,t,a){let i=O.type.id;return i==N||i==xt?new zO(sO(a,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),zt=new Z((e,O)=>{if(e.next!=se){e.next<0&&O.context&&e.acceptToken(H);return}e.advance();let t=e.next==le;t&&e.advance();let a=sO(e,0);if(a===void 0)return;if(!a)return e.acceptToken(t?Tt:N);let i=O.context?O.context.name:null;if(t){if(a==i)return e.acceptToken(Pt);if(i&&Rt[i])return e.acceptToken(H,-2);if(O.dialectEnabled(_t))return e.acceptToken(gt);for(let r=O.context;r;r=r.parent)if(r.name==a)return;e.acceptToken(Zt)}else{if(a=="script")return e.acceptToken(ee);if(a=="style")return e.acceptToken(te);if(a=="textarea")return e.acceptToken(ae);if(wt.hasOwnProperty(a))return e.acceptToken(ie);i&&WO[i]&&WO[i][a]?e.acceptToken(H,-1):e.acceptToken(N)}},{contextual:!0}),Gt=new Z(e=>{for(let O=0,t=0;;t++){if(e.next<0){t&&e.acceptToken(vO);break}if(e.next==Yt)O++;else if(e.next==ne&&O>=2){t>3&&e.acceptToken(vO,-2);break}else O=0;e.advance()}});function fO(e,O,t){let a=2+e.length;return new Z(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==se||r==1&&i.next==le||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(t,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const jt=fO("script",ut,ft),Ut=fO("style",pt,$t),At=fO("textarea",St,mt),It=QO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),Dt=x.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DTO$tQ!bO'#DVO$yQ!bO'#DWOOOW'#Dk'#DkOOOW'#DY'#DYQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%sQ#tO,59mOOOX'#D^'#D^O%{OXO'#CwO&WOXO,59YOOOY'#D_'#D_O&`OYO'#CzO&kOYO,59YOOO['#D`'#D`O&sO[O'#C}O'OO[O,59YOOOW'#Da'#DaO'WOxO,59YO'_Q!bO'#DQOOOW,59Y,59YOOO`'#Db'#DbO'dO!rO,59oOOOW,59o,59oO'lQ!bO,59qO'qQ!bO,59rOOOW-E7W-E7WO'vQ#tO'#CqOOQO'#DZ'#DZO(UQ#tO1G.uOOOX1G.u1G.uO(^Q#tO1G/POOOY1G/P1G/PO(fQ#tO1G/SOOO[1G/S1G/SO(nQ#tO1G/VOOOW1G/V1G/VOOOW1G/X1G/XO(yQ#tO1G/XOOOX-E7[-E7[O)RQ!bO'#CxOOOW1G.t1G.tOOOY-E7]-E7]O)WQ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PPPPPPPPPPP!a!gP!mPP!yPP!|#P#S#Y#]#`#f#i#l#r#xP!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ct,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,39,40,41,42,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag",38,"StartTag"]],propSources:[It],skippedNodes:[0],repeatNodeCount:9,tokenData:"#'z!aR!YOX$qXY,ZYZ,ZZ]$q]^,Z^p$qpq,Zqr-hrs4ysv-hvw5iwxJWx}-h}!OJy!O!P-h!P!Q! r!Q![-h![!]!#h!]!^-h!^!_!'s!_!`#&[!`!a#'S!a!c-h!c!}!#h!}#R-h#R#S!#h#S#T-h#T#o!#h#o#s-h#s$f$q$f$g3V$g%W-h%W%o!#h%o%p-h%p&a!#h&a&b-h&b1p!#h1p4U-h4U4d!#h4d4e-h4e$IS!#h$IS$I`-h$I`$Ib!#h$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];'S;=`*y<%lO*]!R# {P;=`<%l!HzT#!TbfSOq!J]qr#!Ors!J]sw#!Owx!J]x!P#!O!P!Q!J]!Q!_#!O!_!a!J]!a!b##]!b#s#!O#s$f!J]$f;'S#!O;'S;=`#$j<%l?Ah#!O?Ah?BY!J]?BY?Mn#!O?MnO!J]T##bbfSOq!J]qr#!Ors!J]sw#!Owx!J]x!P#!O!P!Q!J]!Q!_#!O!_!`!J]!`!a!KR!a#s#!O#s$f!J]$f;'S#!O;'S;=`#$j<%l?Ah#!O?Ah?BY!J]?BY?Mn#!O?MnO!J]T#$mP;=`<%l#!O!V#$ycfS!a`!cpOq!Hzqr!Gfrs!Iqsv!Gfvw#!Owx!Lcx!P!Gf!P!Q!Hz!Q!_!Gf!_!`!Hz!`!a# Y!a#s!Gf#s$f!Hz$f;'S!Gf;'S;=`#&U<%l?Ah!Gf?Ah?BY!Hz?BY?Mn!Gf?MnO!Hz!V#&XP;=`<%l!Gf!V#&gXgS^P!a`!cpOr&_rs'Tsv&_wx(zx!^&_!^!_*]!_;'S&_;'S;=`+P<%lO&_!X#'_X^P!a`!cpjUOr&_rs'Tsv&_wx(zx!^&_!^!_*]!_;'S&_;'S;=`+P<%lO&_",tokenizers:[jt,Ut,At,zt,Gt,0,1,2,3,4,5],topRules:{Document:[0,13]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function Bt(e,O){let t=Object.create(null);for(let a of e.firstChild.getChildren("Attribute")){let i=a.getChild("AttributeName"),r=a.getChild("AttributeValue")||a.getChild("UnquotedAttributeValue");i&&(t[O.read(i.from,i.to)]=r?r.name=="AttributeValue"?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return t}function OO(e,O,t){let a;for(let i of t)if(!i.attrs||i.attrs(a||(a=Bt(e.node.parent,O))))return{parser:i.parser};return null}function Et(e){let O=[],t=[],a=[];for(let i of e){let r=i.tag=="script"?O:i.tag=="style"?t:i.tag=="textarea"?a:null;if(!r)throw new RangeError("Only script, style, and textarea tags can host nested parsers");r.push(i)}return Ve((i,r)=>{let s=i.type.id;return s==kt?OO(i,r,O):s==Xt?OO(i,r,t):s==yt?OO(i,r,a):null})}const Nt=93,GO=1,Mt=94,Lt=95,jO=2,oe=[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],Jt=58,Ft=40,Qe=95,Kt=91,D=45,Ht=46,Oa=35,ea=37;function M(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function ta(e){return e>=48&&e<=57}const aa=new Z((e,O)=>{for(let t=!1,a=0,i=0;;i++){let{next:r}=e;if(M(r)||r==D||r==Qe||t&&ta(r))!t&&(r!=D||i>0)&&(t=!0),a===i&&r==D&&a++,e.advance();else{t&&e.acceptToken(r==Ft?Mt:a==2&&O.canShift(jO)?jO:Lt);break}}}),ia=new Z(e=>{if(oe.includes(e.peek(-1))){let{next:O}=e;(M(O)||O==Qe||O==Oa||O==Ht||O==Kt||O==Jt||O==D)&&e.acceptToken(Nt)}}),ra=new Z(e=>{if(!oe.includes(e.peek(-1))){let{next:O}=e;if(O==ea&&(e.advance(),e.acceptToken(GO)),M(O)){do e.advance();while(M(e.next));e.acceptToken(GO)}}}),sa=QO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),na={__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},la={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},oa={__proto__:null,not:128,only:128,from:158,to:160},Qa=x.deserialize({version:14,states:"7WOYQ[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO!ZQ[O'#CfO!}QXO'#CaO#UQ[O'#ChO#aQ[O'#DPO#fQ[O'#DTOOQP'#Ec'#EcO#kQdO'#DeO$VQ[O'#DrO#kQdO'#DtO$hQ[O'#DvO$sQ[O'#DyO$xQ[O'#EPO%WQ[O'#EROOQS'#Eb'#EbOOQS'#ES'#ESQYQ[OOOOQP'#Cg'#CgOOQP,59Q,59QO!ZQ[O,59QO%_Q[O'#EVO%yQWO,58{O&RQ[O,59SO#aQ[O,59kO#fQ[O,59oO%_Q[O,59sO%_Q[O,59uO%_Q[O,59vO'bQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO'iQWO,59SO'nQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO'sQ`O,59oOOQS'#Cp'#CpO#kQdO'#CqO'{QvO'#CsO)VQtO,5:POOQO'#Cx'#CxO'nQWO'#CwO)kQWO'#CyOOQS'#Ef'#EfOOQO'#Dh'#DhO)pQ[O'#DoO*OQWO'#EiO$xQ[O'#DmO*^QWO'#DpOOQO'#Ej'#EjO%|QWO,5:^O*cQpO,5:`OOQS'#Dx'#DxO*kQWO,5:bO*pQ[O,5:bOOQO'#D{'#D{O*xQWO,5:eO*}QWO,5:kO+VQWO,5:mOOQS-E8Q-E8QOOQP1G.l1G.lO+yQXO,5:qOOQO-E8T-E8TOOQS1G.g1G.gOOQP1G.n1G.nO'iQWO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@WSoWOy%Qz#W%Q#W#X@d#X~%QX@kQ!`PoWOy%Qz~%QX@tSOy%Qz#f%Q#f#g@d#g~%QXAVQ!RPOy%Qz~%Q_AbQ!QVOy%Qz~%QZAmS!PPOy%Qz!_%Q!_!`2e!`~%Q",tokenizers:[ia,ra,aa,0,1,2,3],topRules:{StyleSheet:[0,4]},specialized:[{term:94,get:e=>na[e]||-1},{term:56,get:e=>la[e]||-1},{term:95,get:e=>oa[e]||-1}],tokenPrec:1078});let eO=null;function tO(){if(!eO&&typeof document=="object"&&document.body){let e=[];for(let O in document.body.style)/[A-Z]|^-|^(item|length)$/.test(O)||e.push(O);eO=e.sort().map(O=>({type:"property",label:O}))}return eO||[]}const UO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),AO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),ca=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),k=/^[\w-]*/,ha=e=>{let{state:O,pos:t}=e,a=V(O).resolveInner(t,-1);if(a.name=="PropertyName")return{from:a.from,options:tO(),validFor:k};if(a.name=="ValueName")return{from:a.from,options:AO,validFor:k};if(a.name=="PseudoClassName")return{from:a.from,options:UO,validFor:k};if(a.name=="TagName"){for(let{parent:s}=a;s;s=s.parent)if(s.name=="Block")return{from:a.from,options:tO(),validFor:k};return{from:a.from,options:ca,validFor:k}}if(!e.explicit)return null;let i=a.resolve(t),r=i.childBefore(t);return r&&r.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:UO,validFor:k}:r&&r.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:AO,validFor:k}:i.name=="Block"?{from:t,options:tO(),validFor:k}:null},nO=cO.define({name:"css",parser:Qa.configure({props:[hO.add({Declaration:U()}),dO.add({Block:HO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function da(){return new uO(nO,nO.data.of({autocomplete:ha}))}const ua=1,IO=287,DO=2,fa=3,G=288,pa=4,$a=289,BO=290,Sa=292,ma=293,Pa=5,ga=6,Za=1,Ta=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],ce=125,ba=123,ka=59,EO=47,Xa=42,ya=43,xa=45,_a=36,wa=96,Ra=92,qa=new Oe({start:!1,shift(e,O){return O==Pa||O==ga||O==Sa?e:O==ma},strict:!1}),va=new Z((e,O)=>{let{next:t}=e;(t==ce||t==-1||O.context)&&O.canShift(BO)&&e.acceptToken(BO)},{contextual:!0,fallback:!0}),Wa=new Z((e,O)=>{let{next:t}=e,a;Ta.indexOf(t)>-1||t==EO&&((a=e.peek(1))==EO||a==Xa)||t!=ce&&t!=ka&&t!=-1&&!O.context&&O.canShift(IO)&&e.acceptToken(IO)},{contextual:!0}),Ya=new Z((e,O)=>{let{next:t}=e;if((t==ya||t==xa)&&(e.advance(),t==e.next)){e.advance();let a=!O.context&&O.canShift(DO);e.acceptToken(a?DO:fa)}},{contextual:!0}),Va=new Z(e=>{for(let O=!1,t=0;;t++){let{next:a}=e;if(a<0){t&&e.acceptToken(G);break}else if(a==wa){t?e.acceptToken(G):e.acceptToken($a,1);break}else if(a==ba&&O){t==1?e.acceptToken(pa,1):e.acceptToken(G,-1);break}else if(a==10&&t){e.advance(),e.acceptToken(G);break}else a==Ra&&e.advance();O=a==_a,e.advance()}}),Ca=new Z((e,O)=>{if(!(e.next!=101||!O.dialectEnabled(Za))){e.advance();for(let t=0;t<6;t++){if(e.next!="xtends".charCodeAt(t))return;e.advance()}e.next>=57&&e.next<=65||e.next>=48&&e.next<=90||e.next==95||e.next>=97&&e.next<=122||e.next>160||e.acceptToken(ua)}}),za=QO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Ga={__proto__:null,export:18,as:23,from:29,default:32,async:37,function:38,this:50,true:58,false:58,null:68,void:72,typeof:76,super:92,new:126,await:143,yield:145,delete:146,class:156,extends:158,public:203,private:203,protected:203,readonly:205,instanceof:226,satisfies:229,in:230,const:232,import:264,keyof:319,unique:323,infer:329,is:363,abstract:383,implements:385,type:387,let:390,var:392,interface:399,enum:403,namespace:409,module:411,declare:415,global:419,for:440,of:449,while:452,with:456,do:460,if:464,else:466,switch:470,case:476,try:482,catch:486,finally:490,return:494,throw:498,break:502,continue:506,debugger:510},ja={__proto__:null,async:113,get:115,set:117,public:165,private:165,protected:165,static:167,abstract:169,override:171,readonly:177,accessor:179,new:367},Ua={__proto__:null,"<":133},Aa=x.deserialize({version:14,states:"$:vO`QdOOO'TQ(C|O'#ChO'[OWO'#DYO)gQdO'#D_O)wQdO'#DjO*OQdO'#DtO-{QdO'#DzOOQO'#E`'#E`O.`Q`O'#E_O.eQ`O'#E_OOQ(C['#Ei'#EiO0gQ(C|O'#IyO3QQ(C|O'#IzO3nQ`O'#FOO3sQ!bO'#FgOOQ(C['#FW'#FWO4OO#tO'#FWO4^Q&jO'#FnO5qQ`O'#FmOOQ(C['#Iz'#IzOOQ(CW'#Iy'#IyOOQS'#Jc'#JcO5vQ`O'#HvO5{Q(ChO'#HwOOQS'#In'#InOOQS'#Hx'#HxQ`QdOOO*OQdO'#DlO6TQ`O'#GbO6YQ&jO'#CmO6hQ`O'#E^O6sQ`O'#EjO6xQ,UO'#FVO7dQ`O'#GbO7iQ`O'#GfO7tQ`O'#GfO8SQ`O'#GiO8SQ`O'#GjO8SQ`O'#GlO6TQ`O'#GoO8sQ`O'#GrO:RQ`O'#CdO:cQ`O'#HPO:kQ`O'#HVO:kQ`O'#HXO`QdO'#HZO:kQ`O'#H]O:kQ`O'#H`O:pQ`O'#HfO:uQ(CjO'#HlO*OQdO'#HnO;QQ(CjO'#HpO;]Q(CjO'#HrO5{Q(ChO'#HtO*OQdO'#DZOOOW'#Hz'#HzO;hOWO,59tOOQ(C[,59t,59tO=|QtO'#ChO>WQdO'#H{O>kQ`O'#I{O@mQtO'#I{O'gQdO'#I{O@tQ`O,59yO@yQ7[O'#DdOBPQ`O'#E`OB^Q`O'#JWOBiQ`O'#JVOBiQ`O'#JVOBqQ`O,5:|OBvQ`O'#JUOB}QaO'#D{O6YQ&jO'#E^OC]Q`O'#E^O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pression . ?. PropertyName [ TemplateString Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression PrivatePropertyName 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 CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement",maxTerm:337,context:qa,nodeProps:[["closedBy",4,"InterpolationEnd",43,"]",53,"}",68,")",136,"JSXSelfCloseEndTag JSXEndTag",152,"JSXEndTag"],["group",-26,8,15,17,60,190,194,197,198,200,203,206,217,219,225,227,229,231,234,240,246,248,250,252,254,256,257,"Statement",-30,12,13,25,28,29,34,44,46,47,49,54,62,70,76,77,94,95,104,106,123,126,128,129,130,131,133,134,154,155,157,"Expression",-23,24,26,30,33,35,37,158,160,162,163,165,166,167,169,170,171,173,174,175,184,186,188,189,"Type",-3,81,87,93,"ClassItem"],["openedBy",31,"InterpolationStart",48,"[",52,"{",67,"(",135,"JSXStartTag",147,"JSXStartTag JSXStartCloseTag"]],propSources:[za],skippedNodes:[0,5,6],repeatNodeCount:28,tokenData:"#2T~R!bOX%ZXY%uYZ'kZ[%u[]%Z]^'k^p%Zpq%uqr(Rrs)mst7]tu9guvlxyJcyzJyz{Ka{|Lm|}MW}!OLm!O!PMn!P!Q!$v!Q!R!Er!R![!G_![!]!Nc!]!^!N{!^!_# c!_!`#!`!`!a##d!a!b#%s!b!c%Z!c!}9g!}#O#'h#O#P%Z#P#Q#(O#Q#R#(f#R#S9g#S#T#)P#T#o#)g#o#p#,a#p#q#,f#q#r#-S#r#s#-l#s$f%Z$f$g%u$g#BY9g#BY#BZ#.S#BZ$IS9g$IS$I_#.S$I_$I|9g$I|$I}#0q$I}$JO#0q$JO$JT9g$JT$JU#.S$JU$KV9g$KV$KW#.S$KW&FU9g&FU&FV#.S&FV;'S9g;'S;=`Rw!^%Z!_!`YU$[W#m#vO!^%Z!_!`s]$[W]#eOY>lYZ?lZw>lwx,jx!^>l!^!_@|!_#O>l#O#PE_#P#o>l#o#p@|#p;'S>l;'S;=`J]<%lO>l&r?qX$[WOw?lwx+_x!^?l!^!_@^!_#o?l#o#p@^#p;'S?l;'S;=`@v<%lO?l&j@aTOw@^wx,Xx;'S@^;'S;=`@p<%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!?i<%lO!;l7Z!q#P#Q!-n#Q#o!;l#o#p!6|#p;'S!;l;'S;=`!?i<%lO!;l7Z!={[$[WU7ROY!+TYZ%ZZ!^!+T!^!_!)o!_#O!+T#O#P!,O#P#Q!&V#Q#o!+T#o#p!)o#p;'S!+T;'S;=`!,p<%lO!+T7Z!>vZ$[WOY!;lYZ!.wZz!;lz{!Ga[e]||-1},{term:304,get:e=>ja[e]||-1},{term:65,get:e=>Ua[e]||-1}],tokenPrec:12475}),Ia=[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 Ze,i as Te,s as be,e as ke,f as Xe,T as gO,g as ye,y as ZO,o as xe,K as _e,L as we,M as Re}from"./index.27866c98.js";import{P as qe,N as ve,u as We,D as Ye,v as oO,T as j,I as KO,w as QO,x as l,y as Ve,L as cO,z as hO,A as U,B as dO,F as HO,G as uO,H as V,J as Ce,K as ze,E as y,M as Y,O as Ge,Q as je,R as P,U as Ue,a as q,h as Ae,b as Ie,c as De,d as Be,e as Ee,s as Ne,f as Me,g as Le,i as Je,r as Fe,j as Ke,k as He,l as Ot,m as et,n as tt,o as at,p as it,q as rt,t as TO,C}from"./index.30b22912.js";class B{constructor(O,t,a,i,r,s,n,Q,c,h=0,o){this.p=O,this.stack=t,this.state=a,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=Q,this.curContext=c,this.lookAhead=h,this.parent=o}toString(){return`[${this.stack.filter((O,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,t,a=0){let i=O.parser.context;return new B(O,[],t,a,a,0,[],0,i?new bO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let t=O>>19,a=O&65535,{parser:i}=this.p,r=i.dynamicPrecedence(a);if(r&&(this.score+=r),t==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),as;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,t,a,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(t==a)return;if(s.buffer[n-2]>=t){s.buffer[n-2]=a;return}}}if(!r||this.pos==a)this.buffer.push(O,t,a,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>a;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=t,this.buffer[s+2]=a,this.buffer[s+3]=i}}shift(O,t,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if((O&262144)==0){let r=O,{parser:s}=this.p;(a>this.pos||t<=s.maxNode)&&(this.pos=a,s.stateFlag(r,1)||(this.reducePos=a)),this.pushState(r,i),this.shiftContext(t,i),t<=s.maxNode&&this.buffer.push(t,i,a,4)}else this.pos=a,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,a,4)}apply(O,t,a){O&65536?this.reduce(O):this.shift(O,t,a)}useNode(O,t){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(t,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,t=O.buffer.length;for(;t>0&&O.buffer[t-2]>O.reducePos;)t-=4;let a=O.buffer.slice(t),i=O.bufferBase+t;for(;O&&i==O.bufferBase;)O=O.parent;return new B(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,t){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,t,4),this.storeNode(0,this.pos,t,a?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(O){for(let t=new st(this);;){let a=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,O);if(a==0)return!1;if((a&65536)==0)return!0;t.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;rQ&1&&n==s)||i.push(t[r],s)}t=i}let a=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-a*3;if(r<0||t.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class bO{constructor(O,t){this.tracker=O,this.context=t,this.hash=O.strict?O.hash(t):0}}var kO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth"})(kO||(kO={}));class st{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let t=O&65535,a=O>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class E{constructor(O,t,a){this.stack=O,this.pos=t,this.index=a,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,t=O.bufferBase+O.buffer.length){return new E(O,t,t-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new E(this.stack,this.pos,this.index)}}class A{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const XO=new A;class nt{constructor(O,t){this.input=O,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=XO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(O,t){let a=this.range,i=this.rangeIndex,r=this.pos+O;for(;ra.to:r>=a.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-a.to,a=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,t.from);return this.end}peek(O){let t=this.chunkOff+O,a,i;if(t>=0&&t=this.chunk2Pos&&an.to&&(this.chunk2=this.chunk2.slice(0,n.to-a)),i=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),i}acceptToken(O,t=0){let a=t?this.resolveOffset(t,-1):this.pos;if(a==null||a=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,t){if(t?(this.token=t,t.start=O,t.lookAhead=O+1,t.value=t.extended=-1):this.token=XO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,t-this.chunkPos);if(O>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,t-this.chunk2Pos);if(O>=this.range.from&&t<=this.range.to)return this.input.read(O,t);let a="";for(let i of this.ranges){if(i.from>=t)break;i.to>O&&(a+=this.input.read(Math.max(i.from,O),Math.min(i.to,t)))}return a}}class I{constructor(O,t){this.data=O,this.id=t}token(O,t){lt(this.data,O,t,this.id)}}I.prototype.contextual=I.prototype.fallback=I.prototype.extend=!1;class Z{constructor(O,t={}){this.token=O,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function lt(e,O,t,a){let i=0,r=1<0){let f=e[u];if(n.allows(f)&&(O.token.value==-1||O.token.value==f||s.overrides(f,O.token.value))){O.acceptToken(f);break}}let c=O.next,h=0,o=e[i+2];if(O.next<0&&o>h&&e[Q+o*3-3]==65535&&e[Q+o*3-3]==65535){i=e[Q+o*3-1];continue O}for(;h>1,f=Q+u+(u<<1),p=e[f],T=e[f+1]||65536;if(c=T)h=u+1;else{i=e[f+2],O.advance();continue O}}break}}function z(e,O=Uint16Array){if(typeof e!="string")return e;let t=null;for(let a=0,i=0;a=92&&s--,s>=34&&s--;let Q=s-32;if(Q>=46&&(Q-=46,n=!0),r+=Q,n)break;r*=46}t?t[i++]=r:t=new O(r)}return t}const g=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let F=null;var yO;(function(e){e[e.Margin=25]="Margin"})(yO||(yO={}));function xO(e,O,t){let a=e.cursor(KO.IncludeAnonymous);for(a.moveTo(O);;)if(!(t<0?a.childBefore(O):a.childAfter(O)))for(;;){if((t<0?a.toO)&&!a.type.isError)return t<0?Math.max(0,Math.min(a.to-1,O-25)):Math.min(e.length,Math.max(a.from+1,O+25));if(t<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return t<0?0:e.length}}class ot{constructor(O,t){this.fragments=O,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?xO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?xO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=s,null;if(r instanceof j){if(s==O){if(s=Math.max(this.safeFrom,O)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+r.length}}}class Qt{constructor(O,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(a=>new A)}getActions(O){let t=0,a=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,Q=0;for(let c=0;co.end+25&&(Q=Math.max(o.lookAhead,Q)),o.value!=0)){let u=t;if(o.extended>-1&&(t=this.addActions(O,o.extended,o.end,t)),t=this.addActions(O,o.value,o.end,t),!h.extend&&(a=o,t>u))break}}for(;this.actions.length>t;)this.actions.pop();return Q&&O.setLookAhead(Q),!a&&O.pos==this.stream.end&&(a=new A,a.value=O.p.parser.eofTerm,a.start=a.end=O.pos,t=this.addActions(O,a.value,a.end,t)),this.mainToken=a,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let t=new A,{pos:a,p:i}=O;return t.start=a,t.end=Math.min(a+1,i.stream.end),t.value=a==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(O,t,a){let i=this.stream.clipPos(a.pos);if(t.token(this.stream.reset(i,O),a),O.value>-1){let{parser:r}=a.p;for(let s=0;s=0&&a.p.parser.dialect.allows(n>>1)){(n&1)==0?O.value=n>>1:O.extended=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,t,a,i){for(let r=0;rO.bufferLength*4?new ot(a,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,t=this.minStackPos,a=this.stacks=[],i,r;for(let s=0;st)a.push(n);else{if(this.advanceStack(n,a,O))continue;{i||(i=[],r=[]),i.push(n);let Q=this.tokens.getMainToken(n);r.push(Q.value,Q.end)}}break}}if(!a.length){let s=i&&dt(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,a);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(a.length>s)for(a.sort((n,Q)=>Q.score-n.score);a.length>s;)a.pop();a.some(n=>n.reducePos>t)&&this.recovering--}else if(a.length>1){O:for(let s=0;s500&&c.buffer.length>500)if((n.score-c.score||n.buffer.length-c.buffer.length)>0)a.splice(Q--,1);else{a.splice(s--,1);continue O}}}}this.minStackPos=a[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let c=O.curContext&&O.curContext.tracker.strict,h=c?O.curContext.hash:0;for(let o=this.fragments.nodeAt(i);o;){let u=this.parser.nodeSet.types[o.type.id]==o.type?r.getGoto(O.state,o.type.id):-1;if(u>-1&&o.length&&(!c||(o.prop(oO.contextHash)||0)==h))return O.useNode(o,u),g&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(o.type.id)})`),!0;if(!(o instanceof j)||o.children.length==0||o.positions[0]>0)break;let f=o.children[0];if(f instanceof j&&o.positions[0]==0)o=f;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),g&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let Q=this.tokens.getActions(O);for(let c=0;ci?t.push(p):a.push(p)}return!1}advanceFully(O,t){let a=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>a)return wO(O,t),!0}}runRecovery(O,t,a){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),g&&console.log(h+this.stackID(n)+" (restarted)"),this.advanceFully(n,a))))continue;let o=n.split(),u=h;for(let f=0;o.forceReduce()&&f<10&&(g&&console.log(u+this.stackID(o)+" (via force-reduce)"),!this.advanceFully(o,a));f++)g&&(u=this.stackID(o)+" -> ");for(let f of n.recoverByInsert(Q))g&&console.log(h+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,a);this.stream.end>n.pos?(c==n.pos&&(c++,Q=0),n.recoverByDelete(Q,c),g&&console.log(h+this.stackID(n)+` (via recover-delete ${this.parser.getName(Q)})`),wO(n,a)):(!i||i.scoree;class Oe{constructor(O){this.start=O.start,this.shift=O.shift||K,this.reduce=O.reduce||K,this.reuse=O.reuse||K,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class x extends qe{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let t=O.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(h,Q,n[c++]);else{let o=n[c+-h];for(let u=-h;u>0;u--)r(n[c++],Q,o);c++}}}this.nodeSet=new ve(t.map((n,Q)=>We.define({name:Q>=this.minRepeatTerm?void 0:n,id:Q,props:i[Q],top:a.indexOf(Q)>-1,error:Q==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(Q)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=Ye;let s=z(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new I(s,n):n),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,t,a){let i=new ct(this,O,t,a);for(let r of this.wrappers)i=r(i,O,t,a);return i}getGoto(O,t,a=!1){let i=this.goto;if(t>=i[0])return-1;for(let r=i[t+1];;){let s=i[r++],n=s&1,Q=i[r++];if(n&&a)return Q;for(let c=r+(s>>1);r0}validAction(O,t){if(t==this.stateSlot(O,4))return!0;for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=b(this.data,a+2);else return!1;if(t==b(this.data,a+1))return!0}}nextStates(O){let t=[];for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=b(this.data,a+2);else break;if((this.data[a+2]&1)==0){let i=this.data[a+1];t.some((r,s)=>s&1&&r==i)||t.push(this.data[a],i)}}return t}overrides(O,t){let a=RO(this.data,this.tokenPrecTable,t);return a<0||RO(this.data,this.tokenPrecTable,O){let i=O.tokenizers.find(r=>r.from==a);return i?i.to:a})),O.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((a,i)=>{let r=O.specializers.find(n=>n.from==a.external);if(!r)return a;let s=Object.assign(Object.assign({},a),{external:r.to});return t.specializers[i]=qO(s),s})),O.contextTracker&&(t.context=O.contextTracker),O.dialect&&(t.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(t.strict=O.strict),O.wrap&&(t.wrappers=t.wrappers.concat(O.wrap)),O.bufferLength!=null&&(t.bufferLength=O.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let t=this.dynamicPrecedences;return t==null?0:t[O]||0}parseDialect(O){let t=Object.keys(this.dialects),a=t.map(()=>!1);if(O)for(let r of O.split(" ")){let s=t.indexOf(r);s>=0&&(a[s]=!0)}let i=null;for(let r=0;ra)&&t.p.parser.stateFlag(t.state,2)&&(!O||O.scoree.external(t,a)<<1|O}return e.get}const ut=54,ft=1,pt=55,$t=2,St=56,mt=3,N=4,ee=5,te=6,ae=7,ie=8,Pt=9,gt=10,Zt=11,H=57,Tt=12,vO=58,bt=18,kt=27,Xt=30,yt=33,xt=35,_t=0,wt={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},Rt={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},WO={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 qt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function re(e){return e==9||e==10||e==13||e==32}let YO=null,VO=null,CO=0;function sO(e,O){let t=e.pos+O;if(CO==t&&VO==e)return YO;let a=e.peek(O);for(;re(a);)a=e.peek(++O);let i="";for(;qt(a);)i+=String.fromCharCode(a),a=e.peek(++O);return VO=e,CO=t,YO=i?i.toLowerCase():a==vt||a==Wt?void 0:null}const se=60,ne=62,le=47,vt=63,Wt=33,Yt=45;function zO(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let t=0;t-1?new zO(sO(a,1)||"",e):e},reduce(e,O){return O==bt&&e?e.parent:e},reuse(e,O,t,a){let i=O.type.id;return i==N||i==xt?new zO(sO(a,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),zt=new Z((e,O)=>{if(e.next!=se){e.next<0&&O.context&&e.acceptToken(H);return}e.advance();let t=e.next==le;t&&e.advance();let a=sO(e,0);if(a===void 0)return;if(!a)return e.acceptToken(t?Tt:N);let i=O.context?O.context.name:null;if(t){if(a==i)return e.acceptToken(Pt);if(i&&Rt[i])return e.acceptToken(H,-2);if(O.dialectEnabled(_t))return e.acceptToken(gt);for(let r=O.context;r;r=r.parent)if(r.name==a)return;e.acceptToken(Zt)}else{if(a=="script")return e.acceptToken(ee);if(a=="style")return e.acceptToken(te);if(a=="textarea")return e.acceptToken(ae);if(wt.hasOwnProperty(a))return e.acceptToken(ie);i&&WO[i]&&WO[i][a]?e.acceptToken(H,-1):e.acceptToken(N)}},{contextual:!0}),Gt=new Z(e=>{for(let O=0,t=0;;t++){if(e.next<0){t&&e.acceptToken(vO);break}if(e.next==Yt)O++;else if(e.next==ne&&O>=2){t>3&&e.acceptToken(vO,-2);break}else O=0;e.advance()}});function fO(e,O,t){let a=2+e.length;return new Z(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==se||r==1&&i.next==le||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(t,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const jt=fO("script",ut,ft),Ut=fO("style",pt,$t),At=fO("textarea",St,mt),It=QO({"Text RawText":l.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":l.angleBracket,TagName:l.tagName,"MismatchedCloseTag/TagName":[l.tagName,l.invalid],AttributeName:l.attributeName,"AttributeValue UnquotedAttributeValue":l.attributeValue,Is:l.definitionOperator,"EntityReference CharacterReference":l.character,Comment:l.blockComment,ProcessingInst:l.processingInstruction,DoctypeDecl:l.documentMeta}),Dt=x.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DTO$tQ!bO'#DVO$yQ!bO'#DWOOOW'#Dk'#DkOOOW'#DY'#DYQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%sQ#tO,59mOOOX'#D^'#D^O%{OXO'#CwO&WOXO,59YOOOY'#D_'#D_O&`OYO'#CzO&kOYO,59YOOO['#D`'#D`O&sO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O~O!YlORqX!ZqX~OR!]O!Z!XO~O!Z!XO~P#dOd!_O~O![sO!e!aO~Oj!bO~Oj!cO~Og!dOfeXjeXveX~OfyOj!fO~OfyOj!gO~OfyOj!hO~OfyOj!iOv!jO~OfyOj!jO~Od!kO~Od!lO~Od!mO~Oj!nO~Oi!qO!`!oO!b!pO~Oj!rO~Oj!sO~Oj!tO~O_!uO`!uOa!uO!`!wO!a!uO~O_!xO`!xOa!xO!b!wO!c!xO~O_!uO`!uOa!uO!`!{O!a!uO~O_!xO`!xOa!xO!b!{O!c!xO~Ov~vj`!dx{_a_~",goto:"%p!`PPPPPPPPPPPPPPPPPP!a!gP!mPP!yPP!|#P#S#Y#]#`#f#i#l#r#xP!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ct,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,39,40,41,42,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34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bt(e,O){let t=Object.create(null);for(let a of e.firstChild.getChildren("Attribute")){let i=a.getChild("AttributeName"),r=a.getChild("AttributeValue")||a.getChild("UnquotedAttributeValue");i&&(t[O.read(i.from,i.to)]=r?r.name=="AttributeValue"?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return t}function OO(e,O,t){let a;for(let i of t)if(!i.attrs||i.attrs(a||(a=Bt(e.node.parent,O))))return{parser:i.parser};return null}function Et(e){let O=[],t=[],a=[];for(let i of e){let r=i.tag=="script"?O:i.tag=="style"?t:i.tag=="textarea"?a:null;if(!r)throw new RangeError("Only script, style, and textarea tags can host nested parsers");r.push(i)}return Ve((i,r)=>{let s=i.type.id;return s==kt?OO(i,r,O):s==Xt?OO(i,r,t):s==yt?OO(i,r,a):null})}const Nt=93,GO=1,Mt=94,Lt=95,jO=2,oe=[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],Jt=58,Ft=40,Qe=95,Kt=91,D=45,Ht=46,Oa=35,ea=37;function M(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function ta(e){return e>=48&&e<=57}const aa=new Z((e,O)=>{for(let t=!1,a=0,i=0;;i++){let{next:r}=e;if(M(r)||r==D||r==Qe||t&&ta(r))!t&&(r!=D||i>0)&&(t=!0),a===i&&r==D&&a++,e.advance();else{t&&e.acceptToken(r==Ft?Mt:a==2&&O.canShift(jO)?jO:Lt);break}}}),ia=new Z(e=>{if(oe.includes(e.peek(-1))){let{next:O}=e;(M(O)||O==Qe||O==Oa||O==Ht||O==Kt||O==Jt||O==D)&&e.acceptToken(Nt)}}),ra=new Z(e=>{if(!oe.includes(e.peek(-1))){let{next:O}=e;if(O==ea&&(e.advance(),e.acceptToken(GO)),M(O)){do e.advance();while(M(e.next));e.acceptToken(GO)}}}),sa=QO({"AtKeyword import charset namespace keyframes media supports":l.definitionKeyword,"from to selector":l.keyword,NamespaceName:l.namespace,KeyframeName:l.labelName,TagName:l.tagName,ClassName:l.className,PseudoClassName:l.constant(l.className),IdName:l.labelName,"FeatureName PropertyName":l.propertyName,AttributeName:l.attributeName,NumberLiteral:l.number,KeywordQuery:l.keyword,UnaryQueryOp:l.operatorKeyword,"CallTag ValueName":l.atom,VariableName:l.variableName,Callee:l.operatorKeyword,Unit:l.unit,"UniversalSelector NestingSelector":l.definitionOperator,MatchOp:l.compareOperator,"ChildOp SiblingOp, LogicOp":l.logicOperator,BinOp:l.arithmeticOperator,Important:l.modifier,Comment:l.blockComment,ParenthesizedContent:l.special(l.name),ColorLiteral:l.color,StringLiteral:l.string,":":l.punctuation,"PseudoOp #":l.derefOperator,"; ,":l.separator,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace}),na={__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},la={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},oa={__proto__:null,not:128,only:128,from:158,to:160},Qa=x.deserialize({version:14,states:"7WOYQ[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO!ZQ[O'#CfO!}QXO'#CaO#UQ[O'#ChO#aQ[O'#DPO#fQ[O'#DTOOQP'#Ec'#EcO#kQdO'#DeO$VQ[O'#DrO#kQdO'#DtO$hQ[O'#DvO$sQ[O'#DyO$xQ[O'#EPO%WQ[O'#EROOQS'#Eb'#EbOOQS'#ES'#ESQYQ[OOOOQP'#Cg'#CgOOQP,59Q,59QO!ZQ[O,59QO%_Q[O'#EVO%yQWO,58{O&RQ[O,59SO#aQ[O,59kO#fQ[O,59oO%_Q[O,59sO%_Q[O,59uO%_Q[O,59vO'bQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO'iQWO,59SO'nQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO'sQ`O,59oOOQS'#C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j!Q~9z~:oOR~~:tUoWOy9iyz9zz{:o{!P9i!P!Q;W!Q~9i~;_QoWR~Oy%Qz~%Q^;jY#ZUOy%Qz!O%Q!O!P5Z!P!Q%Q!Q![7_![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%QX<_S]POy%Qz![%Q![!]RUOy%Qz!c%Q!c!}>e!}#T%Q#T#o>e#o~%QX>lY!YPoWOy%Qz}%Q}!O>e!O!Q%Q!Q![>e![!c%Q!c!}>e!}#T%Q#T#o>e#o~%QX?aQxPOy%Qz~%Q^?lQvUOy%Qz~%QX?uSOy%Qz#b%Q#b#c@R#c~%QX@WSoWOy%Qz#W%Q#W#X@d#X~%QX@kQ!`PoWOy%Qz~%QX@tSOy%Qz#f%Q#f#g@d#g~%QXAVQ!RPOy%Qz~%Q_AbQ!QVOy%Qz~%QZAmS!PPOy%Qz!_%Q!_!`2e!`~%Q",tokenizers:[ia,ra,aa,0,1,2,3],topRules:{StyleSheet:[0,4]},specialized:[{term:94,get:e=>na[e]||-1},{term:56,get:e=>la[e]||-1},{term:95,get:e=>oa[e]||-1}],tokenPrec:1078});let eO=null;function tO(){if(!eO&&typeof document=="object"&&document.body){let e=[];for(let O in document.body.style)/[A-Z]|^-|^(item|length)$/.test(O)||e.push(O);eO=e.sort().map(O=>({type:"property",label:O}))}return eO||[]}const UO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),AO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),ca=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),k=/^[\w-]*/,ha=e=>{let{state:O,pos:t}=e,a=V(O).resolveInner(t,-1);if(a.name=="PropertyName")return{from:a.from,options:tO(),validFor:k};if(a.name=="ValueName")return{from:a.from,options:AO,validFor:k};if(a.name=="PseudoClassName")return{from:a.from,options:UO,validFor:k};if(a.name=="TagName"){for(let{parent:s}=a;s;s=s.parent)if(s.name=="Block")return{from:a.from,options:tO(),validFor:k};return{from:a.from,options:ca,validFor:k}}if(!e.explicit)return null;let i=a.resolve(t),r=i.childBefore(t);return r&&r.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:UO,validFor:k}:r&&r.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:AO,validFor:k}:i.name=="Block"?{from:t,options:tO(),validFor:k}:null},nO=cO.define({name:"css",parser:Qa.configure({props:[hO.add({Declaration:U()}),dO.add({Block:HO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function da(){return new uO(nO,nO.data.of({autocomplete:ha}))}const ua=1,IO=287,DO=2,fa=3,G=288,pa=4,$a=289,BO=290,Sa=292,ma=293,Pa=5,ga=6,Za=1,Ta=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],ce=125,ba=123,ka=59,EO=47,Xa=42,ya=43,xa=45,_a=36,wa=96,Ra=92,qa=new Oe({start:!1,shift(e,O){return O==Pa||O==ga||O==Sa?e:O==ma},strict:!1}),va=new Z((e,O)=>{let{next:t}=e;(t==ce||t==-1||O.context)&&O.canShift(BO)&&e.acceptToken(BO)},{contextual:!0,fallback:!0}),Wa=new Z((e,O)=>{let{next:t}=e,a;Ta.indexOf(t)>-1||t==EO&&((a=e.peek(1))==EO||a==Xa)||t!=ce&&t!=ka&&t!=-1&&!O.context&&O.canShift(IO)&&e.acceptToken(IO)},{contextual:!0}),Ya=new Z((e,O)=>{let{next:t}=e;if((t==ya||t==xa)&&(e.advance(),t==e.next)){e.advance();let a=!O.context&&O.canShift(DO);e.acceptToken(a?DO:fa)}},{contextual:!0}),Va=new Z(e=>{for(let O=!1,t=0;;t++){let{next:a}=e;if(a<0){t&&e.acceptToken(G);break}else if(a==wa){t?e.acceptToken(G):e.acceptToken($a,1);break}else if(a==ba&&O){t==1?e.acceptToken(pa,1):e.acceptToken(G,-1);break}else if(a==10&&t){e.advance(),e.acceptToken(G);break}else a==Ra&&e.advance();O=a==_a,e.advance()}}),Ca=new Z((e,O)=>{if(!(e.next!=101||!O.dialectEnabled(Za))){e.advance();for(let t=0;t<6;t++){if(e.next!="xtends".charCodeAt(t))return;e.advance()}e.next>=57&&e.next<=65||e.next>=48&&e.next<=90||e.next==95||e.next>=97&&e.next<=122||e.next>160||e.acceptToken(ua)}}),za=QO({"get set async static":l.modifier,"for while do if else switch try catch finally return throw break continue default case":l.controlKeyword,"in of await yield void typeof delete instanceof":l.operatorKeyword,"let var const function class extends":l.definitionKeyword,"import export from":l.moduleKeyword,"with debugger as new":l.keyword,TemplateString:l.special(l.string),super:l.atom,BooleanLiteral:l.bool,this:l.self,null:l.null,Star:l.modifier,VariableName:l.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":l.function(l.variableName),VariableDefinition:l.definition(l.variableName),Label:l.labelName,PropertyName:l.propertyName,PrivatePropertyName:l.special(l.propertyName),"CallExpression/MemberExpression/PropertyName":l.function(l.propertyName),"FunctionDeclaration/VariableDefinition":l.function(l.definition(l.variableName)),"ClassDeclaration/VariableDefinition":l.definition(l.className),PropertyDefinition:l.definition(l.propertyName),PrivatePropertyDefinition:l.definition(l.special(l.propertyName)),UpdateOp:l.updateOperator,LineComment:l.lineComment,BlockComment:l.blockComment,Number:l.number,String:l.string,ArithOp:l.arithmeticOperator,LogicOp:l.logicOperator,BitOp:l.bitwiseOperator,CompareOp:l.compareOperator,RegExp:l.regexp,Equals:l.definitionOperator,Arrow:l.function(l.punctuation),": Spread":l.punctuation,"( )":l.paren,"[ ]":l.squareBracket,"{ }":l.brace,"InterpolationStart InterpolationEnd":l.special(l.brace),".":l.derefOperator,", ;":l.separator,TypeName:l.typeName,TypeDefinition:l.definition(l.typeName),"type enum interface implements namespace module declare":l.definitionKeyword,"abstract global Privacy readonly override":l.modifier,"is keyof unique infer":l.operatorKeyword,JSXAttributeValue:l.attributeValue,JSXText:l.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":l.angleBracket,"JSXIdentifier JSXNameSpacedName":l.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":l.attributeName,"JSXBuiltin/JSXIdentifier":l.standard(l.tagName)}),Ga={__proto__:null,export:18,as:23,from:29,default:32,async:37,function:38,this:50,true:58,false:58,null:68,void:72,typeof:76,super:92,new:126,await:143,yield:145,delete:146,class:156,extends:158,public:203,private:203,protected:203,readonly:205,instanceof:226,satisfies:229,in:230,const:232,import:264,keyof:319,unique:323,infer:329,is:363,abstract:383,implements:385,type:387,let:390,var:392,interface:399,enum:403,namespace:409,module:411,declare:415,global:419,for:440,of:449,while:452,with:456,do:460,if:464,else:466,switch:470,case:476,try:482,catch:486,finally:490,return:494,throw:498,break:502,continue:506,debugger:510},ja={__proto__:null,async:113,get:115,set:117,public:165,private:165,protected:165,static:167,abstract:169,override:171,readonly:177,accessor:179,new:367},Ua={__proto__:null,"<":133},Aa=x.deserialize({version:14,states:"$:vO`QdOOO'TQ(C|O'#ChO'[OWO'#DYO)gQdO'#D_O)wQdO'#DjO*OQdO'#DtO-{QdO'#DzOOQO'#E`'#E`O.`Q`O'#E_O.eQ`O'#E_OOQ(C['#Ei'#EiO0gQ(C|O'#IyO3QQ(C|O'#IzO3nQ`O'#FOO3sQ!bO'#FgOOQ(C['#FW'#FWO4OO#tO'#FWO4^Q&jO'#FnO5qQ`O'#FmOOQ(C['#Iz'#IzOOQ(CW'#Iy'#IyOOQS'#Jc'#JcO5vQ`O'#HvO5{Q(ChO'#HwOOQS'#In'#InOOQS'#Hx'#HxQ`QdOOO*OQdO'#DlO6TQ`O'#GbO6YQ&jO'#CmO6hQ`O'#E^O6sQ`O'#EjO6xQ,UO'#FVO7dQ`O'#GbO7iQ`O'#GfO7tQ`O'#GfO8SQ`O'#GiO8SQ`O'#GjO8SQ`O'#GlO6TQ`O'#GoO8sQ`O'#GrO:RQ`O'#CdO:cQ`O'#HPO:kQ`O'#HVO:kQ`O'#HXO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X~O_+uO!Y+xO!Z+tO![+tO!t+|O!u+zO!v+{O!w+yO!z+}O!{+}O'd$iO'l(qO't+rO~O!U+wO~P!AhOP,SO!V&iO!q,RO~O#O,YO!T'wa!e'wa_'wa'^'wa~O!_!wO~P!BuO!T&yO!e'va~O{$zO!S,]O!V${O#X,_O#Y,]O'c$gO!T&vX!e&vX~O_#Ri!T#Ri'^#Ri!Q#Ri!e#Rio#Ri!V#Ri%W#Ri!_#Ri~P!+lOP TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression PrivatePropertyName 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 CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement",maxTerm:337,context:qa,nodeProps:[["closedBy",4,"InterpolationEnd",43,"]",53,"}",68,")",136,"JSXSelfCloseEndTag JSXEndTag",152,"JSXEndTag"],["group",-26,8,15,17,60,190,194,197,198,200,203,206,217,219,225,227,229,231,234,240,246,248,250,252,254,256,257,"Statement",-30,12,13,25,28,29,34,44,46,47,49,54,62,70,76,77,94,95,104,106,123,126,128,129,130,131,133,134,154,155,157,"Expression",-23,24,26,30,33,35,37,158,160,162,163,165,166,167,169,170,171,173,174,175,184,186,188,189,"Type",-3,81,87,93,"ClassItem"],["openedBy",31,"InterpolationStart",48,"[",52,"{",67,"(",135,"JSXStartTag",147,"JSXStartTag JSXStartCloseTag"]],propSources:[za],skippedNodes:[0,5,6],repeatNodeCount:28,tokenData:"#2T~R!bOX%ZXY%uYZ'kZ[%u[]%Z]^'k^p%Zpq%uqr(Rrs)mst7]tu9guvlxyJcyzJyz{Ka{|Lm|}MW}!OLm!O!PMn!P!Q!$v!Q!R!Er!R![!G_![!]!Nc!]!^!N{!^!_# c!_!`#!`!`!a##d!a!b#%s!b!c%Z!c!}9g!}#O#'h#O#P%Z#P#Q#(O#Q#R#(f#R#S9g#S#T#)P#T#o#)g#o#p#,a#p#q#,f#q#r#-S#r#s#-l#s$f%Z$f$g%u$g#BY9g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lBt<%lOGU#mHxX]#eOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%lGU<%lOBt#mIhP;=`<%lGU)XIpX]#eOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%l>l<%lOBt)XJ`P;=`<%l>l&iJjT!f&a$[WO!^%Z!_#o%Z#p;'S%Z;'S;=`%o<%lO%ZkKQT!ec$[WO!^%Z!_#o%Z#p;'S%Z;'S;=`%o<%lO%Z7VKjW'd4V#b#v$[WOz%Zz{LS{!^%Z!_!`q#P#Q!-n#Q#o!;l#o#p!6|#p;'S!;l;'S;=`!?i<%lO!;l7Z!q#P#Q!-n#Q#o!;l#o#p!6|#p;'S!;l;'S;=`!?i<%lO!;l7Z!={[$[WU7ROY!+TYZ%ZZ!^!+T!^!_!)o!_#O!+T#O#P!,O#P#Q!&V#Q#o!+T#o#p!)o#p;'S!+T;'S;=`!,p<%lO!+T7Z!>vZ$[WOY!;lYZ!.wZz!;lz{!Ga[e]||-1},{term:304,get:e=>ja[e]||-1},{term:65,get:e=>Ua[e]||-1}],tokenPrec:12475}),Ia=[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.f7cb3c2a.js b/ui/dist/assets/ConfirmEmailChangeDocs.831201b5.js similarity index 82% rename from ui/dist/assets/ConfirmEmailChangeDocs.f7cb3c2a.js rename to ui/dist/assets/ConfirmEmailChangeDocs.831201b5.js index d1dcb855..4e59d851 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs.f7cb3c2a.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs.831201b5.js @@ -1,4 +1,4 @@ -import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,P as pe,Q as Pe,k as Se,R as Oe,n as Re,t as Z,a as x,o as f,d as ge,L as Te,C as Ee,p as ye,r as j,u as Be,O as qe}from"./index.786ddc4b.js";import{S as Ae}from"./SdkTabs.af9891cd.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,I,w,L,R,F,P,K,te,M,T,le,Q,N=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` +import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,O as pe,P as Pe,k as Se,Q as Oe,n as Re,t as Z,a as x,o as f,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,N as qe}from"./index.27866c98.js";import{S as Ae}from"./SdkTabs.22a960f8.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,I,w,F,R,L,P,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); @@ -20,7 +20,7 @@ import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n 'TOKEN', 'YOUR_PASSWORD', ); - `}});let W=o[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam + `}});let W=o[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required @@ -30,7 +30,7 @@ import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n
Required password
String - The account password to confirm the email change.`,V=h(),B=c("div"),B.textContent="Responses",X=h(),S=c("div"),q=c("div");for(let e=0;eThe account password to confirm the email change.`,V=h(),B=c("div"),B.textContent="Responses",X=h(),S=c("div"),q=c("div");for(let e=0;es(1,u=p.code);return o.$$set=p=>{"collection"in p&&s(0,_=p.collection)},s(3,a=Ee.getApiExampleUrl(ye.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` + `),w.$set(m),(!O||t&1)&&M!==(M=e[0].name+"")&&Y(z,M),t&6&&(W=e[2],g=pe(g,t,ie,1,e,W,ae,q,Pe,_e,null,be)),t&6&&(U=e[2],Se(),k=pe(k,t,ce,1,e,U,ne,A,Oe,ke,null,ue),Re())},i(e){if(!O){Z(w.$$.fragment,e);for(let t=0;ts(1,u=p.code);return o.$$set=p=>{"collection"in p&&s(0,_=p.collection)},s(3,a=Ee.getApiExampleUrl(ye.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", @@ -63,4 +63,4 @@ import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n } } } - `}]),[_,u,i,a,d]}class Ne extends Ce{constructor(l){super(),$e(this,l,De,Ue,we,{collection:0})}}export{Ne as default}; + `}]),[_,u,i,a,d]}class Me extends Ce{constructor(l){super(),$e(this,l,De,Ue,we,{collection:0})}}export{Me as default}; diff --git a/ui/dist/assets/ConfirmPasswordResetDocs.d539b4c2.js b/ui/dist/assets/ConfirmPasswordResetDocs.b11f6237.js similarity index 82% rename from ui/dist/assets/ConfirmPasswordResetDocs.d539b4c2.js rename to ui/dist/assets/ConfirmPasswordResetDocs.b11f6237.js index 251512ea..d87e8858 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs.d539b4c2.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs.b11f6237.js @@ -1,4 +1,4 @@ -import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,P as me,Q as Oe,k as Ce,R as Ne,n as We,t as Z,a as x,o as d,d as Pe,L as $e,C as Ee,p as Te,r as U,u as ge,O as Ae}from"./index.786ddc4b.js";import{S as De}from"./SdkTabs.af9891cd.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,I=o[0].name+"",G,le,J,E,V,T,X,g,Y,C,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,N;R=new De({props:{js:` +import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as d,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,N as Ae}from"./index.27866c98.js";import{S as De}from"./SdkTabs.22a960f8.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,I=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); @@ -36,7 +36,7 @@ import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as
Required passwordConfirm
String - The new password confirmation.`,X=v(),g=c("div"),g.textContent="Responses",Y=v(),C=c("div"),A=c("div");for(let e=0;eThe new password confirmation.`,X=v(),g=c("div"),g.textContent="Responses",Y=v(),N=c("div"),A=c("div");for(let e=0;el(1,u=m.code);return o.$$set=m=>{"collection"in m&&l(0,_=m.collection)},l(3,a=Ee.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` + `),R.$set(f),(!C||t&1)&&I!==(I=e[0].name+"")&&K(G,I),t&6&&(F=e[2],P=me(P,t,ie,1,e,F,ae,A,Oe,_e,null,be)),t&6&&(y=e[2],Ne(),k=me(k,t,ce,1,e,y,ne,D,Ce,ke,null,ue),We())},i(e){if(!C){Z(R.$$.fragment,e);for(let t=0;tl(1,u=m.code);return o.$$set=m=>{"collection"in m&&l(0,_=m.collection)},l(3,a=Ee.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/ConfirmVerificationDocs.e5345b01.js b/ui/dist/assets/ConfirmVerificationDocs.72bb2bc9.js similarity index 69% rename from ui/dist/assets/ConfirmVerificationDocs.e5345b01.js rename to ui/dist/assets/ConfirmVerificationDocs.72bb2bc9.js index 3f2a12bf..fcde0d2d 100644 --- a/ui/dist/assets/ConfirmVerificationDocs.e5345b01.js +++ b/ui/dist/assets/ConfirmVerificationDocs.72bb2bc9.js @@ -1,4 +1,4 @@ -import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,P as de,Q as Te,k as ge,R as ye,n as Be,t as Z,a as x,o as f,d as $e,L as qe,C as Oe,p as Se,r as H,u as Ee,O as Ve}from"./index.786ddc4b.js";import{S as Ke}from"./SdkTabs.af9891cd.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ve({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Me(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,N=i[0].name+"",I,ee,L,P,F,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,V,$=[],oe=new Map,ie,K,k=[],ne=new Map,y;P=new Ke({props:{js:` +import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,O as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as f,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,N as Ne}from"./index.27866c98.js";import{S as Ve}from"./SdkTabs.22a960f8.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Ke(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,M=i[0].name+"",I,ee,F,P,L,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,N,$=[],oe=new Map,ie,V,k=[],ne=new Map,y;P=new Ve({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); @@ -14,13 +14,13 @@ import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n ... await pb.collection('${(fe=i[0])==null?void 0:fe.name}').confirmVerification('TOKEN'); - `}});let j=i[2];const ae=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam + `}});let j=i[2];const ae=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required token
String - The token from the verification request email.`,X=v(),E=c("div"),E.textContent="Responses",Y=v(),g=c("div"),V=c("div");for(let e=0;e<$.length;e+=1)$[e].c();ie=v(),K=c("div");for(let e=0;eThe token from the verification request email.`,X=v(),E=c("div"),E.textContent="Responses",Y=v(),g=c("div"),N=c("div");for(let e=0;e<$.length;e+=1)$[e].c();ie=v(),V=c("div");for(let e=0;es(1,u=d.code);return i.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Oe.getApiExampleUrl(Se.baseUrl)),s(2,a=[{code:204,body:"null"},{code:400,body:` + `),P.$set(m),(!y||t&1)&&U!==(U=e[0].name+"")&&D(G,U),t&6&&(j=e[2],$=de($,t,ae,1,e,j,oe,N,Te,_e,null,be)),t&6&&(K=e[2],ge(),k=de(k,t,ce,1,e,K,ne,V,ye,ke,null,ue),Be())},i(e){if(!y){Z(P.$$.fragment,e);for(let t=0;ts(1,u=d.code);return i.$$set=d=>{"collection"in d&&s(0,_=d.collection)},s(3,o=Oe.getApiExampleUrl(Se.baseUrl)),s(2,a=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", @@ -47,4 +47,4 @@ import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n } } } - `}]),[_,u,a,o,p]}class Ue extends we{constructor(l){super(),Ce(this,l,Ne,Me,Pe,{collection:0})}}export{Ue as default}; + `}]),[_,u,a,o,p]}class Ue extends we{constructor(l){super(),Ce(this,l,Me,Ke,Pe,{collection:0})}}export{Ue as default}; diff --git a/ui/dist/assets/CreateApiDocs.73fcce8d.js b/ui/dist/assets/CreateApiDocs.476c4e78.js similarity index 87% rename from ui/dist/assets/CreateApiDocs.73fcce8d.js rename to ui/dist/assets/CreateApiDocs.476c4e78.js index 77fdec73..9b3b34fb 100644 --- a/ui/dist/assets/CreateApiDocs.73fcce8d.js +++ b/ui/dist/assets/CreateApiDocs.476c4e78.js @@ -1,9 +1,9 @@ -import{S as Lt,i as Ht,s as Pt,C as Q,O as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,P as He,Q as ht,k as Rt,R as gt,n as Bt,t as fe,a as pe,o as d,d as ge,L as Ft,p as jt,r as ue,u as Dt,y as le}from"./index.786ddc4b.js";import{S as Nt}from"./SdkTabs.af9891cd.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,F,D,V,H,I,j,g,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?It:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional +import{S as Ht,i as Lt,s as Pt,C as Q,N as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,O as Le,P as ht,k as Rt,Q as gt,n as Bt,t as fe,a as pe,o as d,d as ge,R as Ft,p as jt,r as ue,u as Dt,y as le}from"./index.27866c98.js";import{S as Nt}from"./SdkTabs.22a960f8.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,F,D,V,L,I,j,g,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?It:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional username
String The username of the auth record.
- If not set, it will be auto generated.`,b=m(),p=a("tr"),c=a("td"),f=a("div"),P.c(),y=m(),T=a("span"),T.textContent="email",w=m(),O=a("td"),O.innerHTML='String',F=m(),D=a("td"),D.textContent="Auth record email address.",V=m(),H=a("tr"),H.innerHTML=`
Optional + If not set, it will be auto generated.`,b=m(),p=a("tr"),c=a("td"),f=a("div"),P.c(),y=m(),T=a("span"),T.textContent="email",w=m(),O=a("td"),O.innerHTML='String',F=m(),D=a("td"),D.textContent="Auth record email address.",V=m(),L=a("tr"),L.innerHTML=`
Optional emailVisibility
Boolean Whether to show/hide the auth record email when fetching the record data.`,I=m(),j=a("tr"),j.innerHTML=`
Required @@ -17,8 +17,8 @@ import{S as Lt,i as Ht,s as Pt,C as Q,O as At,e as a,w as k,b as m,c as Pe,f as Boolean Indicates whether the auth record is verified or not.
- This field can be set only by admins or auth records with "Manage" access.`,C=m(),_=a("tr"),_.innerHTML='Schema fields',h(f,"class","inline-flex")},m(u,$){r(u,e,$),r(u,l,$),r(u,s,$),r(u,b,$),r(u,p,$),n(p,c),n(c,f),P.m(f,null),n(f,y),n(f,T),n(p,w),n(p,O),n(p,F),n(p,D),r(u,V,$),r(u,H,$),r(u,I,$),r(u,j,$),r(u,g,$),r(u,S,$),r(u,N,$),r(u,q,$),r(u,C,$),r(u,_,$)},p(u,$){z!==(z=M(u))&&(P.d(1),P=z(u),P&&(P.c(),P.m(f,y)))},d(u){u&&d(e),u&&d(l),u&&d(s),u&&d(b),u&&d(p),P.d(),u&&d(V),u&&d(H),u&&d(I),u&&d(j),u&&d(g),u&&d(S),u&&d(N),u&&d(q),u&&d(C),u&&d(_)}}}function Vt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function It(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Jt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Et(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Ut(o){var p;let e,l=((p=o[12].options)==null?void 0:p.maxSelect)===1?"id":"ids",s,b;return{c(){e=k("Relation record "),s=k(l),b=k(".")},m(c,f){r(c,e,f),r(c,s,f),r(c,b,f)},p(c,f){var y;f&1&&l!==(l=((y=c[12].options)==null?void 0:y.maxSelect)===1?"id":"ids")&&x(s,l)},d(c){c&&d(e),c&&d(s),c&&d(b)}}}function Qt(o){let e,l,s,b,p;return{c(){e=k("File object."),l=a("br"),s=k(` - Set to `),b=a("code"),b.textContent="null",p=k(" to delete already uploaded file(s).")},m(c,f){r(c,e,f),r(c,l,f),r(c,s,f),r(c,b,f),r(c,p,f)},p:le,d(c){c&&d(e),c&&d(l),c&&d(s),c&&d(b),c&&d(p)}}}function zt(o){let e;return{c(){e=k("URL address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Kt(o){let e;return{c(){e=k("Email address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Wt(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Yt(o){let e;return{c(){e=k("Number value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Gt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function qt(o,e){let l,s,b,p,c,f=e[12].name+"",y,T,w,O,F=Q.getFieldValueType(e[12])+"",D,V,H,I;function j(_,M){return _[12].required?Et:Jt}let g=j(e),S=g(e);function N(_,M){if(_[12].type==="text")return Gt;if(_[12].type==="number")return Yt;if(_[12].type==="json")return Wt;if(_[12].type==="email")return Kt;if(_[12].type==="url")return zt;if(_[12].type==="file")return Qt;if(_[12].type==="relation")return Ut}let q=N(e),C=q&&q(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),b=a("div"),S.c(),p=m(),c=a("span"),y=k(f),T=m(),w=a("td"),O=a("span"),D=k(F),V=m(),H=a("td"),C&&C.c(),I=m(),h(b,"class","inline-flex"),h(O,"class","label"),this.first=l},m(_,M){r(_,l,M),n(l,s),n(s,b),S.m(b,null),n(b,p),n(b,c),n(c,y),n(l,T),n(l,w),n(w,O),n(O,D),n(l,V),n(l,H),C&&C.m(H,null),n(l,I)},p(_,M){e=_,g!==(g=j(e))&&(S.d(1),S=g(e),S&&(S.c(),S.m(b,p))),M&1&&f!==(f=e[12].name+"")&&x(y,f),M&1&&F!==(F=Q.getFieldValueType(e[12])+"")&&x(D,F),q===(q=N(e))&&C?C.p(e,M):(C&&C.d(1),C=q&&q(e),C&&(C.c(),C.m(H,null)))},d(_){_&&d(l),S.d(),C&&C.d()}}}function Ot(o,e){let l,s=e[7].code+"",b,p,c,f;function y(){return e[6](e[7])}return{key:o,first:null,c(){l=a("button"),b=k(s),p=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(T,w){r(T,l,w),n(l,b),n(l,p),c||(f=Dt(l,"click",y),c=!0)},p(T,w){e=T,w&4&&s!==(s=e[7].code+"")&&x(b,s),w&6&&ue(l,"active",e[1]===e[7].code)},d(T){T&&d(l),c=!1,f()}}}function Mt(o,e){let l,s,b,p;return s=new At({props:{content:e[7].body}}),{key:o,first:null,c(){l=a("div"),Pe(s.$$.fragment),b=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(c,f){r(c,l,f),Re(s,l,null),n(l,b),p=!0},p(c,f){e=c;const y={};f&4&&(y.content=e[7].body),s.$set(y),(!p||f&6)&&ue(l,"active",e[1]===e[7].code)},i(c){p||(fe(s.$$.fragment,c),p=!0)},o(c){pe(s.$$.fragment,c),p=!1},d(c){c&&d(l),ge(s)}}}function Xt(o){var st,it,at,ot,rt,dt,ct,ft;let e,l,s=o[0].name+"",b,p,c,f,y,T,w,O=o[0].name+"",F,D,V,H,I,j,g,S,N,q,C,_,M,z,P,u,$,ee,K=o[0].name+"",me,Be,Fe,be,ne,_e,W,ke,je,J,ye,De,ve,E=[],Ne=new Map,he,se,we,Y,Ce,Ve,Se,G,$e,Ie,Te,Je,A,Ee,te,Ue,Qe,ze,qe,Ke,Oe,We,Ye,Ge,Me,Xe,Ae,ie,Le,X,ae,U=[],Ze=new Map,xe,oe,B=[],et=new Map,Z;S=new Nt({props:{js:` + This field can be set only by admins or auth records with "Manage" access.`,C=m(),_=a("tr"),_.innerHTML='Schema fields',h(f,"class","inline-flex")},m(u,$){r(u,e,$),r(u,l,$),r(u,s,$),r(u,b,$),r(u,p,$),n(p,c),n(c,f),P.m(f,null),n(f,y),n(f,T),n(p,w),n(p,O),n(p,F),n(p,D),r(u,V,$),r(u,L,$),r(u,I,$),r(u,j,$),r(u,g,$),r(u,S,$),r(u,N,$),r(u,q,$),r(u,C,$),r(u,_,$)},p(u,$){z!==(z=M(u))&&(P.d(1),P=z(u),P&&(P.c(),P.m(f,y)))},d(u){u&&d(e),u&&d(l),u&&d(s),u&&d(b),u&&d(p),P.d(),u&&d(V),u&&d(L),u&&d(I),u&&d(j),u&&d(g),u&&d(S),u&&d(N),u&&d(q),u&&d(C),u&&d(_)}}}function Vt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function It(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Jt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Et(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Ut(o){var p;let e,l=((p=o[12].options)==null?void 0:p.maxSelect)===1?"id":"ids",s,b;return{c(){e=k("Relation record "),s=k(l),b=k(".")},m(c,f){r(c,e,f),r(c,s,f),r(c,b,f)},p(c,f){var y;f&1&&l!==(l=((y=c[12].options)==null?void 0:y.maxSelect)===1?"id":"ids")&&x(s,l)},d(c){c&&d(e),c&&d(s),c&&d(b)}}}function Qt(o){let e,l,s,b,p;return{c(){e=k("File object."),l=a("br"),s=k(` + Set to `),b=a("code"),b.textContent="null",p=k(" to delete already uploaded file(s).")},m(c,f){r(c,e,f),r(c,l,f),r(c,s,f),r(c,b,f),r(c,p,f)},p:le,d(c){c&&d(e),c&&d(l),c&&d(s),c&&d(b),c&&d(p)}}}function zt(o){let e;return{c(){e=k("URL address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Kt(o){let e;return{c(){e=k("Email address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Wt(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Yt(o){let e;return{c(){e=k("Number value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Gt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function qt(o,e){let l,s,b,p,c,f=e[12].name+"",y,T,w,O,F=Q.getFieldValueType(e[12])+"",D,V,L,I;function j(_,M){return _[12].required?Et:Jt}let g=j(e),S=g(e);function N(_,M){if(_[12].type==="text")return Gt;if(_[12].type==="number")return Yt;if(_[12].type==="json")return Wt;if(_[12].type==="email")return Kt;if(_[12].type==="url")return zt;if(_[12].type==="file")return Qt;if(_[12].type==="relation")return Ut}let q=N(e),C=q&&q(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),b=a("div"),S.c(),p=m(),c=a("span"),y=k(f),T=m(),w=a("td"),O=a("span"),D=k(F),V=m(),L=a("td"),C&&C.c(),I=m(),h(b,"class","inline-flex"),h(O,"class","label"),this.first=l},m(_,M){r(_,l,M),n(l,s),n(s,b),S.m(b,null),n(b,p),n(b,c),n(c,y),n(l,T),n(l,w),n(w,O),n(O,D),n(l,V),n(l,L),C&&C.m(L,null),n(l,I)},p(_,M){e=_,g!==(g=j(e))&&(S.d(1),S=g(e),S&&(S.c(),S.m(b,p))),M&1&&f!==(f=e[12].name+"")&&x(y,f),M&1&&F!==(F=Q.getFieldValueType(e[12])+"")&&x(D,F),q===(q=N(e))&&C?C.p(e,M):(C&&C.d(1),C=q&&q(e),C&&(C.c(),C.m(L,null)))},d(_){_&&d(l),S.d(),C&&C.d()}}}function Ot(o,e){let l,s=e[7].code+"",b,p,c,f;function y(){return e[6](e[7])}return{key:o,first:null,c(){l=a("button"),b=k(s),p=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(T,w){r(T,l,w),n(l,b),n(l,p),c||(f=Dt(l,"click",y),c=!0)},p(T,w){e=T,w&4&&s!==(s=e[7].code+"")&&x(b,s),w&6&&ue(l,"active",e[1]===e[7].code)},d(T){T&&d(l),c=!1,f()}}}function Mt(o,e){let l,s,b,p;return s=new At({props:{content:e[7].body}}),{key:o,first:null,c(){l=a("div"),Pe(s.$$.fragment),b=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(c,f){r(c,l,f),Re(s,l,null),n(l,b),p=!0},p(c,f){e=c;const y={};f&4&&(y.content=e[7].body),s.$set(y),(!p||f&6)&&ue(l,"active",e[1]===e[7].code)},i(c){p||(fe(s.$$.fragment,c),p=!0)},o(c){pe(s.$$.fragment,c),p=!1},d(c){c&&d(l),ge(s)}}}function Xt(o){var st,it,at,ot,rt,dt,ct,ft;let e,l,s=o[0].name+"",b,p,c,f,y,T,w,O=o[0].name+"",F,D,V,L,I,j,g,S,N,q,C,_,M,z,P,u,$,ee,K=o[0].name+"",me,Be,Fe,be,ne,_e,W,ke,je,J,ye,De,ve,E=[],Ne=new Map,he,se,we,Y,Ce,Ve,Se,G,$e,Ie,Te,Je,A,Ee,te,Ue,Qe,ze,qe,Ke,Oe,We,Ye,Ge,Me,Xe,Ae,ie,He,X,ae,U=[],Ze=new Map,xe,oe,B=[],et=new Map,Z;S=new Nt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[4]}'); @@ -46,7 +46,7 @@ final record = await pb.collection('${(ot=o[0])==null?void 0:ot.name}').create(b `+((rt=o[0])!=null&&rt.isAuth?` // (optional) send an email verification request await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('test@example.com'); -`:"")}});let R=o[5]&&$t(),L=((ct=o[0])==null?void 0:ct.isAuth)&&Tt(o),de=(ft=o[0])==null?void 0:ft.schema;const tt=t=>t[12].name;for(let t=0;tt[7].code;for(let t=0;tt[7].code;for(let t=0;tapplication/json or +`:"")}});let R=o[5]&&$t(),H=((ct=o[0])==null?void 0:ct.isAuth)&&Tt(o),de=(ft=o[0])==null?void 0:ft.schema;const tt=t=>t[12].name;for(let t=0;tt[7].code;for(let t=0;tt[7].code;for(let t=0;tapplication/json or multipart/form-data.`,I=m(),j=a("p"),j.innerHTML=`File upload is supported only via multipart/form-data.
For more info and examples you could check the detailed @@ -58,7 +58,7 @@ await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('te String 15 characters string to store as record ID.
- If not set, it will be auto generated.`,De=m(),L&&L.c(),ve=m();for(let t=0;tParam + If not set, it will be auto generated.`,De=m(),H&&H.c(),ve=m();for(let t=0;tParam Type Description`,Ve=m(),Se=a("tbody"),G=a("tr"),$e=a("td"),$e.textContent="expand",Ie=m(),Te=a("td"),Te.innerHTML='String',Je=m(),A=a("td"),Ee=k(`Auto expand relations when returning the created record. Ex.: `),Pe(te.$$.fragment),Ue=k(` @@ -66,7 +66,7 @@ await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('te The expanded relations will be appended to the record under the `),qe=a("code"),qe.textContent="expand",Ke=k(" property (eg. "),Oe=a("code"),Oe.textContent='"expand": {"relField1": {...}, ...}',We=k(`). `),Ye=a("br"),Ge=k(` - Only the relations to which the request user has permissions to `),Me=a("strong"),Me.textContent="view",Xe=k(" will be expanded."),Ae=m(),ie=a("div"),ie.textContent="Responses",Le=m(),X=a("div"),ae=a("div");for(let t=0;tl(1,c=w.code);return o.$$set=w=>{"collection"in w&&l(0,p=w.collection)},o.$$.update=()=>{var w,O;o.$$.dirty&1&&l(5,s=(p==null?void 0:p.createRule)===null),o.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(p),null,2)},{code:400,body:` +`:"")),S.$set(v),(!Z||i&1)&&K!==(K=t[0].name+"")&&x(me,K),t[5]?R||(R=$t(),R.c(),R.m(_,null)):R&&(R.d(1),R=null),(yt=t[0])!=null&&yt.isAuth?H?H.p(t,i):(H=Tt(t),H.c(),H.m(J,ve)):H&&(H.d(1),H=null),i&1&&(de=(vt=t[0])==null?void 0:vt.schema,E=Le(E,i,tt,1,t,de,Ne,J,ht,qt,null,St)),i&6&&(ce=t[2],U=Le(U,i,lt,1,t,ce,Ze,ae,ht,Ot,null,Ct)),i&6&&(re=t[2],Rt(),B=Le(B,i,nt,1,t,re,et,oe,gt,Mt,null,wt),Bt())},i(t){if(!Z){fe(S.$$.fragment,t),fe(te.$$.fragment,t);for(let i=0;il(1,c=w.code);return o.$$set=w=>{"collection"in w&&l(0,p=w.collection)},o.$$.update=()=>{var w,O;o.$$.dirty&1&&l(5,s=(p==null?void 0:p.createRule)===null),o.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(p),null,2)},{code:400,body:` { "code": 400, "message": "Failed to create record.", @@ -111,4 +111,4 @@ await pb.collection('${(kt=t[0])==null?void 0:kt.name}').requestVerification('te "message": "You are not allowed to perform this request.", "data": {} } - `}]),o.$$.dirty&1&&(p.isAuth?l(3,y={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):l(3,y={}))},l(4,b=Q.getApiExampleUrl(jt.baseUrl)),[p,c,f,y,b,s,T]}class tl extends Lt{constructor(e){super(),Ht(this,e,Zt,Xt,Pt,{collection:0})}}export{tl as default}; + `}]),o.$$.dirty&1&&(p.isAuth?l(3,y={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):l(3,y={}))},l(4,b=Q.getApiExampleUrl(jt.baseUrl)),[p,c,f,y,b,s,T]}class tl extends Ht{constructor(e){super(),Lt(this,e,Zt,Xt,Pt,{collection:0})}}export{tl as default}; diff --git a/ui/dist/assets/DeleteApiDocs.897705d4.js b/ui/dist/assets/DeleteApiDocs.aff484d3.js similarity index 78% rename from ui/dist/assets/DeleteApiDocs.897705d4.js rename to ui/dist/assets/DeleteApiDocs.aff484d3.js index a9b8f808..2ea21346 100644 --- a/ui/dist/assets/DeleteApiDocs.897705d4.js +++ b/ui/dist/assets/DeleteApiDocs.aff484d3.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,P as _e,Q as Ee,k as Oe,R as Te,n as Be,t as ee,a as te,o as f,d as ge,L as Ie,C as Ae,p as Me,r as z,u as Se,O as qe}from"./index.786ddc4b.js";import{S as Le}from"./SdkTabs.af9891cd.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&z(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&z(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function He(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",F,le,K,C,N,O,Q,y,L,se,H,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new Le({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index.27866c98.js";import{S as He}from"./SdkTabs.22a960f8.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); @@ -14,12 +14,12 @@ import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n ... await pb.collection('${(pe=o[0])==null?void 0:pe.name}').delete('RECORD_ID'); - `}});let _=o[1]&&ve(),j=o[4];const de=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam + `}});let _=o[1]&&ve(),j=o[4];const de=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam Type Description id String - ID of the record to delete.`,Y=k(),I=c("div"),I.textContent="Responses",Z=k(),R=c("div"),A=c("div");for(let e=0;eID of the record to delete.`,Y=k(),I=c("div"),I.textContent="Responses",Z=k(),R=c("div"),A=c("div");for(let e=0;es(2,r=b.code);return o.$$set=b=>{"collection"in b&&s(0,i=b.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(1,a=(i==null?void 0:i.deleteRule)===null),o.$$.dirty&3&&i!=null&&i.id&&(u.push({code:204,body:` + `),C.$set(p),(!P||t&1)&&U!==(U=e[0].name+"")&&x(J,U),e[1]?_||(_=ve(),_.c(),_.m(y,null)):_&&(_.d(1),_=null),t&20&&(j=e[4],w=_e(w,t,de,1,e,j,ie,A,Ee,ye,null,he)),t&20&&(S=e[4],Oe(),v=_e(v,t,fe,1,e,S,ce,M,Te,De,null,ke),Be())},i(e){if(!P){ee(C.$$.fragment,e);for(let t=0;ts(2,r=b.code);return o.$$set=b=>{"collection"in b&&s(0,i=b.collection)},o.$$.update=()=>{o.$$.dirty&1&&s(1,a=(i==null?void 0:i.deleteRule)===null),o.$$.dirty&3&&i!=null&&i.id&&(u.push({code:204,body:` null `}),u.push({code:400,body:` { @@ -55,4 +55,4 @@ import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n "message": "The requested resource wasn't found.", "data": {} } - `}))},s(3,h=Ae.getApiExampleUrl(Me.baseUrl)),[i,a,r,h,u,$]}class Fe extends Ce{constructor(l){super(),Re(this,l,Ue,He,Pe,{collection:0})}}export{Fe as default}; + `}))},s(3,h=Ae.getApiExampleUrl(Me.baseUrl)),[i,a,r,h,u,$]}class ze extends Ce{constructor(l){super(),Re(this,l,Ue,Le,Pe,{collection:0})}}export{ze as default}; diff --git a/ui/dist/assets/FilterAutocompleteInput.774da6c1.js b/ui/dist/assets/FilterAutocompleteInput.774da6c1.js deleted file mode 100644 index 92bea94c..00000000 --- a/ui/dist/assets/FilterAutocompleteInput.774da6c1.js +++ /dev/null @@ -1 +0,0 @@ -import{S as $,i as ee,s as te,e as ne,f as ie,g as oe,y as v,o as re,I as se,J as le,K as ce,L as ae,M as ue,C as L,N as fe}from"./index.786ddc4b.js";import{C as I,E as q,a as w,h as de,b as he,c as ge,d as pe,e as ye,s as me,f as be,g as ke,i as xe,r as Ke,j as qe,k as we,l as Ce,m as Se,n as Le,o as Ie,p as Ee,q as Re,t as T,S as ve}from"./index.30b22912.js";function Ae(n){G(n,"start");var i={},t=n.languageData||{},h=!1;for(var f in n)if(f!=t&&n.hasOwnProperty(f))for(var g=i[f]=[],l=n[f],r=0;r2&&l.token&&typeof l.token!="string"){t.pending=[];for(var a=2;a-1)return null;var f=t.indent.length-1,g=n[t.state];e:for(;;){for(var l=0;lt(14,g=e));const l=ce();let{id:r=""}=i,{value:s=""}=i,{disabled:a=!1}=i,{placeholder:y=""}=i,{baseCollection:m=new ae}=i,{singleLine:C=!1}=i,{extraAutocompleteKeys:E=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,d,b,A=new I,_=new I,B=new I,M=new I,O=[],F=[],D=[];function R(){d==null||d.focus()}function J(e){let o=e.slice();return L.pushOrReplaceByKey(o,m,"id"),o}function U(){b==null||b.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0}))}function W(){if(!r)return;const e=document.querySelectorAll('[for="'+r+'"]');for(let o of e)o.removeEventListener("click",R)}function H(){if(!r)return;W();const e=document.querySelectorAll('[for="'+r+'"]');for(let o of e)o.addEventListener("click",R)}function S(e,o="",c=0){let p=f.find(k=>k.name==e||k.id==e);if(!p||c>=4)return[];let u=[o+"id",o+"created",o+"updated"];p.isAuth&&(u.push(o+"username"),u.push(o+"email"),u.push(o+"emailVisibility"),u.push(o+"verified"));for(const k of p.schema){const V=o+k.name;if(u.push(V),k.type==="relation"&&k.options.collectionId){const P=S(k.options.collectionId,V+".",c+1);P.length&&(u=u.concat(P))}}return u}function z(){return S(m.name)}function Q(){const e=[];e.push("@request.method"),e.push("@request.query."),e.push("@request.data."),e.push("@request.auth."),e.push("@request.auth.id"),e.push("@request.auth.collectionId"),e.push("@request.auth.collectionName"),e.push("@request.auth.verified"),e.push("@request.auth.username"),e.push("@request.auth.email"),e.push("@request.auth.emailVisibility"),e.push("@request.auth.created"),e.push("@request.auth.updated");const o=f.filter(c=>c.isAuth);for(const c of o){const p=S(c.id,"@request.auth.");for(const u of p)L.pushUnique(e,u)}return e}function X(){const e=[];for(const o of f){const c="@collection."+o.name+".",p=S(o.name,c);for(const u of p)e.push(u)}return e}function Y(e=!0,o=!0){let c=[].concat(E);return c=c.concat(O),e&&(c=c.concat(F)),o&&(c=c.concat(D)),c.sort(function(p,u){return u.length-p.length}),c}function Z(e){let o=e.matchBefore(/[\'\"\@\w\.]*/);if(o&&o.from==o.to&&!e.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const p=Y(!x,!x&&o.text.startsWith("@c"));for(const u of p)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:o.from,options:c}}function N(){return ve.define(Ae({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:L.escapeRegExp("@now"),token:"keyword"},{regex:L.escapeRegExp("@request.method"),token:"keyword"}]}))}ue(()=>{const e={key:"Enter",run:o=>{C&&l("submit",s)}};return H(),t(11,d=new q({parent:b,state:w.create({doc:s,extensions:[de(),he(),ge(),pe(),ye(),w.allowMultipleSelections.of(!0),me(be,{fallback:!0}),ke(),xe(),Ke(),qe(),we.of([e,...Ce,...Se,Le.find(o=>o.key==="Mod-d"),...Ie,...Ee]),q.lineWrapping,Re({override:[Z],icons:!1}),M.of(T(y)),_.of(q.editable.of(!0)),B.of(w.readOnly.of(!1)),A.of(N()),w.transactionFilter.of(o=>C&&o.newDoc.lines>1?[]:o),q.updateListener.of(o=>{!o.docChanged||a||(t(1,s=o.state.doc.toString()),U())})]})})),()=>{W(),d==null||d.destroy()}});function j(e){fe[e?"unshift":"push"](()=>{b=e,t(0,b)})}return n.$$set=e=>{"id"in e&&t(2,r=e.id),"value"in e&&t(1,s=e.value),"disabled"in e&&t(3,a=e.disabled),"placeholder"in e&&t(4,y=e.placeholder),"baseCollection"in e&&t(5,m=e.baseCollection),"singleLine"in e&&t(6,C=e.singleLine),"extraAutocompleteKeys"in e&&t(7,E=e.extraAutocompleteKeys),"disableRequestKeys"in e&&t(8,x=e.disableRequestKeys),"disableIndirectCollectionsKeys"in e&&t(9,K=e.disableIndirectCollectionsKeys)},n.$$.update=()=>{n.$$.dirty[0]&32&&t(13,h=m.type),n.$$.dirty[0]&16384&&t(12,f=J(g)),n.$$.dirty[0]&13056&&(h||f!==-1||x!==-1||K!==-1)&&(O=z(),F=x?[]:Q(),D=K?[]:X()),n.$$.dirty[0]&4&&r&&H(),n.$$.dirty[0]&2080&&d&&(m==null?void 0:m.schema)&&d.dispatch({effects:[A.reconfigure(N())]}),n.$$.dirty[0]&2056&&d&&typeof a<"u"&&(d.dispatch({effects:[_.reconfigure(q.editable.of(!a)),B.reconfigure(w.readOnly.of(a))]}),U()),n.$$.dirty[0]&2050&&d&&s!=d.state.doc.toString()&&d.dispatch({changes:{from:0,to:d.state.doc.length,insert:s}}),n.$$.dirty[0]&2064&&d&&typeof y<"u"&&d.dispatch({effects:[M.reconfigure(T(y))]})},[b,s,r,a,y,m,C,E,x,K,R,d,f,h,g,j]}class Ne extends ${constructor(i){super(),ee(this,i,Ue,De,te,{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{Ne as default}; diff --git a/ui/dist/assets/FilterAutocompleteInput.9bb81144.js b/ui/dist/assets/FilterAutocompleteInput.9bb81144.js new file mode 100644 index 00000000..79b4b314 --- /dev/null +++ b/ui/dist/assets/FilterAutocompleteInput.9bb81144.js @@ -0,0 +1 @@ +import{S as te,i as ne,s as ie,e as re,f as oe,g as se,y as _,o as ae,I as le,J as ue,K as ce,L as fe,C as L,M as de}from"./index.27866c98.js";import{C as E,E as C,a as q,h as he,b as ge,c as pe,d as ye,e as me,s as be,f as ke,g as xe,i as Ke,r as Ce,j as qe,k as we,l as Se,m as Le,n as Ee,o as Ie,p as Re,q as Ae,t as T,S as Be}from"./index.30b22912.js";function _e(e){z(e,"start");var i={},t=e.languageData||{},h=!1;for(var g in e)if(g!=t&&e.hasOwnProperty(g))for(var d=i[g]=[],s=e[g],o=0;o2&&s.token&&typeof s.token!="string"){t.pending=[];for(var l=2;l-1)return null;var g=t.indent.length-1,d=e[t.state];e:for(;;){for(var s=0;st(16,h=n));const g=ce();let{id:d=""}=i,{value:s=""}=i,{disabled:o=!1}=i,{placeholder:a=""}=i,{baseCollection:l=null}=i,{singleLine:y=!1}=i,{extraAutocompleteKeys:I=[]}=i,{disableRequestKeys:k=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,m,R=o,v=new E,M=new E,O=new E,H=new E,x=[],D=[],F=[],U=[],w="",A="";function B(){f==null||f.focus()}function Q(n){let r=n.slice();return L.pushOrReplaceByKey(r,l,"id"),r}function W(){m==null||m.dispatchEvent(new CustomEvent("change",{detail:{value:s},bubbles:!0}))}function N(){if(!d)return;const n=document.querySelectorAll('[for="'+d+'"]');for(let r of n)r.removeEventListener("click",B)}function V(){if(!d)return;N();const n=document.querySelectorAll('[for="'+d+'"]');for(let r of n)r.addEventListener("click",B)}function S(n,r="",u=0){let p=x.find(b=>b.name==n||b.id==n);if(!p||u>=4)return[];let c=[r+"id",r+"created",r+"updated"];p.isAuth&&(c.push(r+"username"),c.push(r+"email"),c.push(r+"emailVisibility"),c.push(r+"verified"));for(const b of p.schema){const P=r+b.name;if(c.push(P),b.type==="relation"&&b.options.collectionId){const G=S(b.options.collectionId,P+".",u+1);G.length&&(c=c.concat(G))}}return c}function X(){return S(l==null?void 0:l.name)}function Y(){const n=[];n.push("@request.method"),n.push("@request.query."),n.push("@request.data."),n.push("@request.auth."),n.push("@request.auth.id"),n.push("@request.auth.collectionId"),n.push("@request.auth.collectionName"),n.push("@request.auth.verified"),n.push("@request.auth.username"),n.push("@request.auth.email"),n.push("@request.auth.emailVisibility"),n.push("@request.auth.created"),n.push("@request.auth.updated");const r=x.filter(u=>u.isAuth);for(const u of r){const p=S(u.id,"@request.auth.");for(const c of p)L.pushUnique(n,c)}return n}function Z(){const n=[];for(const r of x){const u="@collection."+r.name+".",p=S(r.name,u);for(const c of p)n.push(c)}return n}function j(n=!0,r=!0){let u=[].concat(I);return u=u.concat(U||[]),n&&(u=u.concat(D||[])),r&&(u=u.concat(F||[])),u.sort(function(p,c){return c.length-p.length}),u}function $(n){let r=n.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.to&&!n.explicit)return null;let u=[{label:"false"},{label:"true"},{label:"@now"}];K||u.push({label:"@collection.*",apply:"@collection."});const p=j(!k,!k&&r.text.startsWith("@c"));for(const c of p)u.push({label:c.endsWith(".")?c+"*":c,apply:c});return{from:r.from,options:u}}function J(){return Be.define(_e({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:L.escapeRegExp("@now"),token:"keyword"},{regex:L.escapeRegExp("@request.method"),token:"keyword"}]}))}fe(()=>{const n={key:"Enter",run:r=>{y&&g("submit",s)}};return V(),t(11,f=new C({parent:m,state:q.create({doc:s,extensions:[he(),ge(),pe(),ye(),me(),q.allowMultipleSelections.of(!0),be(ke,{fallback:!0}),xe(),Ke(),Ce(),qe(),we.of([n,...Se,...Le,Ee.find(r=>r.key==="Mod-d"),...Ie,...Re]),C.lineWrapping,Ae({override:[$],icons:!1}),H.of(T(a)),M.of(C.editable.of(!o)),O.of(q.readOnly.of(o)),v.of(J()),q.transactionFilter.of(r=>y&&r.newDoc.lines>1?[]:r),C.updateListener.of(r=>{!r.docChanged||o||(t(1,s=r.state.doc.toString()),W())})]})})),()=>{N(),f==null||f.destroy()}});function ee(n){de[n?"unshift":"push"](()=>{m=n,t(0,m)})}return e.$$set=n=>{"id"in n&&t(2,d=n.id),"value"in n&&t(1,s=n.value),"disabled"in n&&t(3,o=n.disabled),"placeholder"in n&&t(4,a=n.placeholder),"baseCollection"in n&&t(5,l=n.baseCollection),"singleLine"in n&&t(6,y=n.singleLine),"extraAutocompleteKeys"in n&&t(7,I=n.extraAutocompleteKeys),"disableRequestKeys"in n&&t(8,k=n.disableRequestKeys),"disableIndirectCollectionsKeys"in n&&t(9,K=n.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&65536&&t(13,x=Q(h)),e.$$.dirty[0]&32&&t(14,w=Ue(l)),e.$$.dirty[0]&49160&&!o&&A!=w&&(t(15,A=w),U=X()),e.$$.dirty[0]&8968&&!o&&(x!==-1||k!==-1||K!==-1)&&(D=k?[]:Y(),F=K?[]:Z()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&(l==null?void 0:l.schema)&&f.dispatch({effects:[v.reconfigure(J())]}),e.$$.dirty[0]&6152&&f&&R!=o&&(f.dispatch({effects:[M.reconfigure(C.editable.of(!o)),O.reconfigure(q.readOnly.of(o))]}),t(12,R=o),W()),e.$$.dirty[0]&2050&&f&&s!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:s}}),e.$$.dirty[0]&2064&&f&&typeof a<"u"&&f.dispatch({effects:[H.reconfigure(T(a))]})},[m,s,d,o,a,l,y,I,k,K,B,f,R,x,w,A,h,ee]}class Je extends te{constructor(i){super(),ne(this,i,We,Fe,ie,{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{Je as default}; diff --git a/ui/dist/assets/ListApiDocs.2462c379.js b/ui/dist/assets/ListApiDocs.de213c92.js similarity index 98% rename from ui/dist/assets/ListApiDocs.2462c379.js rename to ui/dist/assets/ListApiDocs.de213c92.js index 844bcef9..806d81b2 100644 --- a/ui/dist/assets/ListApiDocs.2462c379.js +++ b/ui/dist/assets/ListApiDocs.de213c92.js @@ -1,4 +1,4 @@ -import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as xt,o as u,w as k,h as e,O as Ae,c as ge,m as ye,x as Ue,P as Lt,Q as Dt,k as It,R as Bt,n as zt,t as ce,a as de,d as ve,L as Gt,C as je,p as Ut,r as Ee}from"./index.786ddc4b.js";import{S as jt}from"./SdkTabs.af9891cd.js";function Qt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Show details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-down-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Jt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Hide details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-up-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Tt(r){let s,n,i,c,f,m,_,w,b,$,h,H,W,fe,T,pe,O,G,C,M,Fe,A,E,Ce,U,X,q,Y,xe,j,Q,D,P,ue,Z,v,I,ee,me,te,N,B,le,be,se,x,J,ne,Le,K,he,V;return{c(){s=l("p"),s.innerHTML=`The syntax basically follows the format +import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as xt,o as u,w as k,h as e,N as Ae,c as ge,m as ye,x as Ue,O as Lt,P as Dt,k as It,Q as Bt,n as zt,t as ce,a as de,d as ve,R as Gt,C as je,p as Ut,r as Ee}from"./index.27866c98.js";import{S as jt}from"./SdkTabs.22a960f8.js";function Qt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Show details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-down-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Jt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Hide details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-up-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Tt(r){let s,n,i,c,f,m,_,w,b,$,h,H,W,fe,T,pe,O,G,C,M,Fe,A,E,Ce,U,X,q,Y,xe,j,Q,D,P,ue,Z,v,I,ee,me,te,N,B,le,be,se,x,J,ne,Le,K,he,V;return{c(){s=l("p"),s.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,n=a(),i=l("ul"),c=l("li"),c.innerHTML=`OPERAND - could be any of the above field literal, string (single diff --git a/ui/dist/assets/ListExternalAuthsDocs.a160e1ab.js b/ui/dist/assets/ListExternalAuthsDocs.3f25886a.js similarity index 78% rename from ui/dist/assets/ListExternalAuthsDocs.a160e1ab.js rename to ui/dist/assets/ListExternalAuthsDocs.3f25886a.js index a74c47c9..b86a0310 100644 --- a/ui/dist/assets/ListExternalAuthsDocs.a160e1ab.js +++ b/ui/dist/assets/ListExternalAuthsDocs.3f25886a.js @@ -1,4 +1,4 @@ -import{S as Be,i as qe,s as Le,e as i,w as v,b as _,c as Ie,f as b,g as r,h as s,m as Se,x as U,P as Pe,Q as Oe,k as Me,R as Re,n as We,t as te,a as le,o as d,d as Ee,L as ze,C as De,p as He,r as j,u as Ue,O as je}from"./index.786ddc4b.js";import{S as Ge}from"./SdkTabs.af9891cd.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Ie(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Se(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ee(n)}}}function Ke(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",G,oe,se,K,N,y,Q,I,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,S,Z,E,x,B,ee,C,q,$=[],de=new Map,ue,L,k=[],pe=new Map,T;y=new Ge({props:{js:` +import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Ie,f as b,g as r,h as s,m as Se,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ee,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index.27866c98.js";import{S as Ne}from"./SdkTabs.22a960f8.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Ie(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Se(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ee(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,I,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,S,Z,E,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); @@ -22,12 +22,12 @@ import{S as Be,i as qe,s as Le,e as i,w as v,b as _,c as Ie,f as b,g as r,h as s final result = await pb.collection('${(ke=a[0])==null?void 0:ke.name}').listExternalAuths( pb.authStore.model.id, ); - `}});let H=a[2];const fe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",Y=_(),S=i("div"),S.textContent="Path Parameters",Z=_(),E=i("table"),E.innerHTML=`Param + `}});let H=a[2];const fe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",Y=_(),S=i("div"),S.textContent="Path Parameters",Z=_(),E=i("table"),E.innerHTML=`Param Type Description id String - ID of the auth record.`,x=_(),B=i("div"),B.textContent="Responses",ee=_(),C=i("div"),q=i("div");for(let e=0;e<$.length;e+=1)$[e].c();ue=_(),L=i("div");for(let e=0;eID of the auth record.`,x=_(),B=i("div"),B.textContent="Responses",ee=_(),C=i("div"),q=i("div");for(let e=0;e<$.length;e+=1)$[e].c();ue=_(),O=i("div");for(let e=0;eo(1,h=m.code);return a.$$set=m=>{"collection"in m&&o(0,f=m.collection)},a.$$.update=()=>{a.$$.dirty&1&&o(2,c=[{code:200,body:` + `),y.$set(p),(!T||t&1)&&z!==(z=e[0].name+"")&&U(V,z),t&6&&(H=e[2],$=Pe($,t,fe,1,e,H,de,q,Le,Ce,null,Ae)),t&6&&(L=e[2],Me(),k=Pe(k,t,me,1,e,L,pe,O,Re,Te,null,ye),We())},i(e){if(!T){te(y.$$.fragment,e);for(let t=0;to(1,h=m.code);return a.$$set=m=>{"collection"in m&&o(0,f=m.collection)},a.$$.update=()=>{a.$$.dirty&1&&o(2,c=[{code:200,body:` [ { "id": "8171022dc95a4e8", @@ -90,4 +90,4 @@ import{S as Be,i as qe,s as Le,e as i,w as v,b as _,c as Ie,f as b,g as r,h as s "message": "The requested resource wasn't found.", "data": {} } - `}])},o(3,n=De.getApiExampleUrl(He.baseUrl)),[f,h,c,n,u]}class Je extends Be{constructor(l){super(),qe(this,l,Ne,Ke,Le,{collection:0})}}export{Je as default}; + `}])},o(3,n=De.getApiExampleUrl(He.baseUrl)),[f,h,c,n,u]}class Je extends Be{constructor(l){super(),qe(this,l,Ke,Ge,Oe,{collection:0})}}export{Je as default}; diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset.33e5cd5b.js b/ui/dist/assets/PageAdminConfirmPasswordReset.3080c4ea.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset.33e5cd5b.js rename to ui/dist/assets/PageAdminConfirmPasswordReset.3080c4ea.js index 612b4c9e..5f6c3820 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset.33e5cd5b.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset.3080c4ea.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index.786ddc4b.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password +import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index.27866c98.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password `),m&&m.c(),t=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",R=C(),P=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(P,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,P,$),_(P,v),k=!0,F||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],F=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(H(r.$$.fragment,a),H(d.$$.fragment,a),k=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(P),F=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(H(e.$$.fragment,s),o=!0)},o(s){N(e.$$.fragment,s),o=!1},d(s){T(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.errorResponseHandler(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset.847f2078.js b/ui/dist/assets/PageAdminRequestPasswordReset.26fe534b.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset.847f2078.js rename to ui/dist/assets/PageAdminRequestPasswordReset.26fe534b.js index 408e1502..9356213d 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset.847f2078.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset.26fe534b.js @@ -1,2 +1,2 @@ -import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index.786ddc4b.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

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

Forgotten admin password

Enter the email associated with your account and we\u2019ll send you a recovery link:

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

Successfully changed the user email address.

You can now sign in with your new email address.

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

Successfully changed the user password.

You can now sign in with your new password.

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

Invalid or expired verification token.

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

Successfully verified email address.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function F(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function I(o){let t;function s(l,i){return l[1]?F:l[0]?E:T}let e=s(o),n=e(o);return{c(){n.c(),t=S()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function V(o){let t,s;return t=new x({props:{nobranding:!0,$$slots:{default:[I]},$$scope:{ctx:o}}}),{c(){C(t.$$.fragment)},m(e,n){g(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(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new M("../");try{const m=P(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class N extends v{constructor(t){super(),y(this,t,q,V,w,{params:2})}}export{N as default}; diff --git a/ui/dist/assets/RealtimeApiDocs.cfc0059e.js b/ui/dist/assets/RealtimeApiDocs.f9f04d5f.js similarity index 96% rename from ui/dist/assets/RealtimeApiDocs.cfc0059e.js rename to ui/dist/assets/RealtimeApiDocs.f9f04d5f.js index c9abd118..77adaf81 100644 --- a/ui/dist/assets/RealtimeApiDocs.cfc0059e.js +++ b/ui/dist/assets/RealtimeApiDocs.f9f04d5f.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,O as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,L as me,p as de}from"./index.786ddc4b.js";import{S as fe}from"./SdkTabs.af9891cd.js";function $e(o){var B,U,W,L,A,H,T,q,M,j,J,N;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` +import{S as re,i as ae,s as be,N as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index.27866c98.js";import{S as fe}from"./SdkTabs.22a960f8.js";function $e(o){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[1]}'); @@ -19,9 +19,9 @@ import{S as re,i as ae,s as be,O as ue,C as P,e as u,w as y,b as a,c as te,f as }); // Unsubscribe - pb.collection('${(L=o[0])==null?void 0:L.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions - pb.collection('${(A=o[0])==null?void 0:A.name}').unsubscribe('*'); // remove all '*' topic subscriptions - pb.collection('${(H=o[0])==null?void 0:H.name}').unsubscribe(); // remove all subscriptions in the collection + pb.collection('${(A=o[0])==null?void 0:A.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions + pb.collection('${(H=o[0])==null?void 0:H.name}').unsubscribe('*'); // remove all '*' topic subscriptions + pb.collection('${(L=o[0])==null?void 0:L.name}').unsubscribe(); // remove all subscriptions in the collection `,dart:` import 'package:pocketbase/pocketbase.dart'; @@ -43,9 +43,9 @@ import{S as re,i as ae,s as be,O as ue,C as P,e as u,w as y,b as a,c as te,f as }); // Unsubscribe - pb.collection('${(j=o[0])==null?void 0:j.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions - pb.collection('${(J=o[0])==null?void 0:J.name}').unsubscribe('*'); // remove all '*' topic subscriptions - pb.collection('${(N=o[0])==null?void 0:N.name}').unsubscribe(); // remove all subscriptions in the collection + pb.collection('${(N=o[0])==null?void 0:N.name}').unsubscribe('RECORD_ID'); // remove all 'RECORD_ID' subscriptions + pb.collection('${(j=o[0])==null?void 0:j.name}').unsubscribe('*'); // remove all '*' topic subscriptions + pb.collection('${(J=o[0])==null?void 0:J.name}').unsubscribe(); // remove all subscriptions in the collection `}}),r=new ue({props:{content:JSON.stringify({action:"create",record:P.dummyCollectionRecord(o[0])},null,2).replace('"action": "create"','"action": "create" // create, update or delete')}}),{c(){i=u("h3"),m=y("Realtime ("),b=y(l),d=y(")"),h=a(),f=u("div"),f.innerHTML=`

Subscribe to realtime changes via Server-Sent Events (SSE).

Events are sent for create, update and delete record operations (see "Event data format" section below).

`,_=a(),$=u("div"),$.innerHTML=`
diff --git a/ui/dist/assets/RequestEmailChangeDocs.c902168f.js b/ui/dist/assets/RequestEmailChangeDocs.226d2d46.js similarity index 68% rename from ui/dist/assets/RequestEmailChangeDocs.c902168f.js rename to ui/dist/assets/RequestEmailChangeDocs.226d2d46.js index 9fe950ff..84797564 100644 --- a/ui/dist/assets/RequestEmailChangeDocs.c902168f.js +++ b/ui/dist/assets/RequestEmailChangeDocs.226d2d46.js @@ -1,4 +1,4 @@ -import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as D,P as ve,Q as Se,k as Re,R as Me,n as Ae,t as x,a as ee,o as m,d as ye,L as We,C as ze,p as He,r as I,u as Le,O as Oe}from"./index.786ddc4b.js";import{S as Ue}from"./SdkTabs.af9891cd.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Le(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&D(_,a),q&6&&I(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Oe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&I(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function je(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,K,P,N,T,Q,w,H,le,L,E,se,G,O=o[0].name+"",J,ae,oe,U,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new Ue({props:{js:` +import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as I,O as ve,P as Se,k as Re,Q as Me,n as Ae,t as x,a as ee,o as m,d as ye,R as We,C as ze,p as He,r as L,u as Oe,N as Ue}from"./index.27866c98.js";import{S as je}from"./SdkTabs.22a960f8.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&I(_,a),q&6&&L(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&L(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",N,te,F,P,K,T,Q,w,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new je({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); @@ -18,13 +18,13 @@ import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as await pb.collection('${(ue=o[0])==null?void 0:ue.name}').authWithPassword('test@example.com', '1234567890'); await pb.collection('${(fe=o[0])==null?void 0:fe.name}').requestEmailChange('new@example.com'); - `}});let j=o[2];const re=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",V=h(),B=c("div"),B.textContent="Body Parameters",X=h(),S=c("table"),S.innerHTML=`Param + `}});let D=o[2];const re=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",V=h(),B=c("div"),B.textContent="Body Parameters",X=h(),S=c("table"),S.innerHTML=`Param Type Description
Required newEmail
String - The new email address to send the change email request.`,Y=h(),R=c("div"),R.textContent="Responses",Z=h(),C=c("div"),M=c("div");for(let e=0;eThe new email address to send the change email request.`,Y=h(),R=c("div"),R.textContent="Responses",Z=h(),C=c("div"),M=c("div");for(let e=0;es(1,b=u.code);return o.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,a=ze.getApiExampleUrl(He.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` + `),P.$set(d),(!y||t&1)&&U!==(U=e[0].name+"")&&I(J,U),t&6&&(D=e[2],g=ve(g,t,re,1,e,D,ne,M,Se,$e,null,ge)),t&6&&(W=e[2],Re(),k=ve(k,t,me,1,e,W,ce,A,Me,qe,null,we),Ae())},i(e){if(!y){x(P.$$.fragment,e);for(let t=0;ts(1,b=u.code);return o.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,a=ze.getApiExampleUrl(He.baseUrl)),s(2,i=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", @@ -67,4 +67,4 @@ import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as "message": "The authorized record model is not allowed to perform this action.", "data": {} } - `}]),[_,b,i,a,p]}class Ke extends Te{constructor(l){super(),Ee(this,l,De,je,Be,{collection:0})}}export{Ke as default}; + `}]),[_,b,i,a,p]}class Fe extends Te{constructor(l){super(),Ee(this,l,Ie,De,Be,{collection:0})}}export{Fe as default}; diff --git a/ui/dist/assets/RequestPasswordResetDocs.5dfa24eb.js b/ui/dist/assets/RequestPasswordResetDocs.9d7773f1.js similarity index 70% rename from ui/dist/assets/RequestPasswordResetDocs.5dfa24eb.js rename to ui/dist/assets/RequestPasswordResetDocs.9d7773f1.js index 6df59e1b..27715388 100644 --- a/ui/dist/assets/RequestPasswordResetDocs.5dfa24eb.js +++ b/ui/dist/assets/RequestPasswordResetDocs.9d7773f1.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as E,P as ue,Q as Re,k as ge,R as ye,n as Be,t as Z,a as x,o as d,d as he,L as Ce,C as Se,p as Te,r as F,u as Me,O as Ae}from"./index.786ddc4b.js";import{S as Ue}from"./SdkTabs.af9891cd.js";function me(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),m=v(),b(l,"class","tab-item"),F(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,m),i||(p=Me(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&E(_,o),$&6&&F(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),F(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&F(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",Q,ee,z,q,G,B,J,R,H,te,I,C,se,K,L=a[0].name+"",N,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as F,O as ue,P as Re,k as ge,Q as ye,n as Be,t as Z,a as x,o as d,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,N as Ae}from"./index.27866c98.js";import{S as Ue}from"./SdkTabs.22a960f8.js";function me(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,m),i||(p=Me(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&F(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,R,H,te,I,C,se,J,O=a[0].name+"",K,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); @@ -14,13 +14,13 @@ import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as ... await pb.collection('${(de=a[0])==null?void 0:de.name}').requestPasswordReset('test@example.com'); - `}});let O=a[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam + `}});let E=a[2];const ie=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required email
String - The auth record email address to send the password reset request (if exists).`,X=v(),M=c("div"),M.textContent="Responses",Y=v(),g=c("div"),A=c("div");for(let e=0;eThe auth record email address to send the password reset request (if exists).`,X=v(),M=c("div"),M.textContent="Responses",Y=v(),g=c("div"),A=c("div");for(let e=0;el(1,m=u.code);return a.$$set=u=>{"collection"in u&&l(0,_=u.collection)},l(3,o=Se.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` + `),q.$set(f),(!y||t&1)&&O!==(O=e[0].name+"")&&F(K,O),t&6&&(E=e[2],h=ue(h,t,ie,1,e,E,oe,A,Re,_e,null,be)),t&6&&(j=e[2],ge(),k=ue(k,t,ce,1,e,j,ne,U,ye,ke,null,me),Be())},i(e){if(!y){Z(q.$$.fragment,e);for(let t=0;tl(1,m=u.code);return a.$$set=u=>{"collection"in u&&l(0,_=u.collection)},l(3,o=Se.getApiExampleUrl(Te.baseUrl)),l(2,i=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", @@ -47,4 +47,4 @@ import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as } } } - `}]),[_,m,i,o,p]}class Le extends Pe{constructor(s){super(),$e(this,s,De,je,qe,{collection:0})}}export{Le as default}; + `}]),[_,m,i,o,p]}class Oe extends Pe{constructor(s){super(),$e(this,s,De,je,qe,{collection:0})}}export{Oe as default}; diff --git a/ui/dist/assets/RequestVerificationDocs.9e1a7b04.js b/ui/dist/assets/RequestVerificationDocs.9cdd467c.js similarity index 71% rename from ui/dist/assets/RequestVerificationDocs.9e1a7b04.js rename to ui/dist/assets/RequestVerificationDocs.9cdd467c.js index 948adc07..920e5650 100644 --- a/ui/dist/assets/RequestVerificationDocs.9e1a7b04.js +++ b/ui/dist/assets/RequestVerificationDocs.9cdd467c.js @@ -1,4 +1,4 @@ -import{S as we,i as qe,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as O,P as ue,Q as ge,k as ye,R as Be,n as Ce,t as Z,a as x,o as f,d as $e,L as Se,C as Te,p as Re,r as E,u as Ve,O as Me}from"./index.786ddc4b.js";import{S as Ae}from"./SdkTabs.af9891cd.js";function me(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,m,n,p;function u(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),m=v(),b(s,"class","tab-item"),E(s,"active",l[1]===l[5].code),this.first=s},m(w,q){r(w,s,q),i(s,_),i(s,m),n||(p=Ve(s,"click",u),n=!0)},p(w,q){l=w,q&4&&o!==(o=l[5].code+"")&&O(_,o),q&6&&E(s,"active",l[1]===l[5].code)},d(w){w&&f(s),n=!1,p()}}}function ke(a,l){let s,o,_,m;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),E(s,"active",l[1]===l[5].code),this.first=s},m(n,p){r(n,s,p),he(o,s,null),i(s,_),m=!0},p(n,p){l=n;const u={};p&4&&(u.content=l[5].body),o.$set(u),(!m||p&6)&&E(s,"active",l[1]===l[5].code)},i(n){m||(Z(o.$$.fragment,n),m=!0)},o(n){x(o.$$.fragment,n),m=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,m,n,p,u,w,q,j=a[0].name+"",F,ee,Q,P,z,C,G,g,D,te,H,S,le,J,I=a[0].name+"",K,se,N,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` +import{S as we,i as qe,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as E,O as ue,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as f,d as $e,R as Se,C as Te,p as Re,r as F,u as Ve,N as Me}from"./index.27866c98.js";import{S as Ae}from"./SdkTabs.22a960f8.js";function me(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,m,n,p;function u(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),m=v(),b(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(w,q){r(w,s,q),i(s,_),i(s,m),n||(p=Ve(s,"click",u),n=!0)},p(w,q){l=w,q&4&&o!==(o=l[5].code+"")&&E(_,o),q&6&&F(s,"active",l[1]===l[5].code)},d(w){w&&f(s),n=!1,p()}}}function ke(a,l){let s,o,_,m;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(n,p){r(n,s,p),he(o,s,null),i(s,_),m=!0},p(n,p){l=n;const u={};p&4&&(u.content=l[5].body),o.$set(u),(!m||p&6)&&F(s,"active",l[1]===l[5].code)},i(n){m||(Z(o.$$.fragment,n),m=!0)},o(n){x(o.$$.fragment,n),m=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,m,n,p,u,w,q,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,I=a[0].name+"",J,se,K,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); @@ -14,13 +14,13 @@ import{S as we,i as qe,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i ... await pb.collection('${(fe=a[0])==null?void 0:fe.name}').requestVerification('test@example.com'); - `}});let L=a[2];const ne=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam + `}});let O=a[2];const ne=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required email
String - The auth record email address to send the verification request (if exists).`,X=v(),V=c("div"),V.textContent="Responses",Y=v(),y=c("div"),M=c("div");for(let e=0;e<$.length;e+=1)$[e].c();ae=v(),A=c("div");for(let e=0;eThe auth record email address to send the verification request (if exists).`,X=v(),V=c("div"),V.textContent="Responses",Y=v(),y=c("div"),M=c("div");for(let e=0;e<$.length;e+=1)$[e].c();ae=v(),A=c("div");for(let e=0;es(1,m=u.code);return a.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,o=Te.getApiExampleUrl(Re.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:` + `),P.$set(d),(!B||t&1)&&I!==(I=e[0].name+"")&&E(J,I),t&6&&(O=e[2],$=ue($,t,ne,1,e,O,oe,M,ge,_e,null,be)),t&6&&(U=e[2],ye(),k=ue(k,t,ce,1,e,U,ie,A,Be,ke,null,me),Ce())},i(e){if(!B){Z(P.$$.fragment,e);for(let t=0;ts(1,m=u.code);return a.$$set=u=>{"collection"in u&&s(0,_=u.collection)},s(3,o=Te.getApiExampleUrl(Re.baseUrl)),s(2,n=[{code:204,body:"null"},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", diff --git a/ui/dist/assets/SdkTabs.22a960f8.js b/ui/dist/assets/SdkTabs.22a960f8.js new file mode 100644 index 00000000..c50e73ae --- /dev/null +++ b/ui/dist/assets/SdkTabs.22a960f8.js @@ -0,0 +1 @@ +import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index.27866c98.js";function D(c,e,l){const s=c.slice();return s[6]=e[l],s}function K(c,e,l){const s=c.slice();return s[6]=e[l],s}function T(c,e){let l,s,g=e[6].title+"",r,i,n,k;function o(){return e[5](e[6])}return{key:c,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",o),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&R(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function I(c,e){let l,s,g,r,i,n,k=e[6].title+"",o,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:c,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),o=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,o),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&R(o,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(N(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(c){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,o,u,_=c[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(c,_,t),d=p(a);g.set(d,s[t]=T(d,a))}let f=c[2];const b=t=>t[6].language;for(let t=0;tl(1,n=o.language);return c.$$set=o=>{"class"in o&&l(0,g=o.class),"js"in o&&l(3,r=o.js),"dart"in o&&l(4,i=o.dart)},c.$$.update=()=>{c.$$.dirty&2&&n&&localStorage.setItem(M,n),c.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk/tree/rc"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk/tree/rc"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; diff --git a/ui/dist/assets/SdkTabs.af9891cd.js b/ui/dist/assets/SdkTabs.af9891cd.js deleted file mode 100644 index adcbf127..00000000 --- a/ui/dist/assets/SdkTabs.af9891cd.js +++ /dev/null @@ -1 +0,0 @@ -import{S as B,i as F,s as J,e as v,b as j,f as h,g as y,h as m,P as C,Q as N,k as O,R as Q,n as Y,t as M,a as P,o as w,w as E,r as S,u as z,x as q,O as A,c as G,m as H,d as L}from"./index.786ddc4b.js";function D(c,e,l){const s=c.slice();return s[6]=e[l],s}function K(c,e,l){const s=c.slice();return s[6]=e[l],s}function R(c,e){let l,s,g=e[6].title+"",r,i,n,k;function o(){return e[5](e[6])}return{key:c,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",o),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&q(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function T(c,e){let l,s,g,r,i,n,k=e[6].title+"",o,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:c,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),o=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,o),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&q(o,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(M(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(c){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,o,u,_=c[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(c,_,t),d=p(a);g.set(d,s[t]=R(d,a))}let f=c[2];const b=t=>t[6].language;for(let t=0;tl(1,n=o.language);return c.$$set=o=>{"class"in o&&l(0,g=o.class),"js"in o&&l(3,r=o.js),"dart"in o&&l(4,i=o.dart)},c.$$.update=()=>{c.$$.dirty&2&&n&&localStorage.setItem(I,n),c.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk/tree/rc"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk/tree/rc"}])},[g,n,s,r,i,k]}class X extends B{constructor(e){super(),F(this,e,V,U,J,{class:0,js:3,dart:4})}}export{X as S}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs.3a64cb9b.js b/ui/dist/assets/UnlinkExternalAuthDocs.6b315273.js similarity index 76% rename from ui/dist/assets/UnlinkExternalAuthDocs.3a64cb9b.js rename to ui/dist/assets/UnlinkExternalAuthDocs.6b315273.js index f1dd2ffc..8c45a16a 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs.3a64cb9b.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs.6b315273.js @@ -1,4 +1,4 @@ -import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as R,P as ye,Q as Le,k as Me,R as We,n as ze,t as le,a as oe,o as d,d as Ue,L as He,C as Ie,p as Re,r as j,u as je,O as Ke}from"./index.786ddc4b.js";import{S as Ne}from"./SdkTabs.af9891cd.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=je(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&R(_,a),P&6&&j(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ke({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,L=n[0].name+"",K,se,ae,N,Q,A,F,E,G,g,M,ne,W,y,ie,J,z=n[0].name+"",V,ce,X,re,Y,de,H,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ne({props:{js:` +import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as R,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as d,d as Ue,R as Ie,C as Le,p as Re,r as j,u as je,N as Ne}from"./index.27866c98.js";import{S as Ke}from"./SdkTabs.22a960f8.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=je(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&R(_,a),P&6&&j(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,M=n[0].name+"",N,se,ae,K,Q,A,F,E,G,g,W,ne,z,y,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,I,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); @@ -24,7 +24,7 @@ import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as pb.authStore.model.id, 'google', ); - `}});let I=n[2];const fe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",Z=h(),S=i("div"),S.textContent="Path Parameters",x=h(),B=i("table"),B.innerHTML=`Param + `}});let L=n[2];const fe=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eAuthorization:TOKEN header",Z=h(),S=i("div"),S.textContent="Path Parameters",x=h(),B=i("table"),B.innerHTML=`Param Type Description id @@ -33,7 +33,7 @@ import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as provider String The name of the auth provider to unlink, eg. google, twitter, - github, etc.`,ee=h(),U=i("div"),U.textContent="Responses",te=h(),C=i("div"),q=i("div");for(let e=0;egithub, etc.`,ee=h(),U=i("div"),U.textContent="Responses",te=h(),C=i("div"),q=i("div");for(let e=0;eo(1,b=m.code);return n.$$set=m=>{"collection"in m&&o(0,_=m.collection)},o(3,a=Ie.getApiExampleUrl(Re.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:` + `),A.$set(p),(!T||t&1)&&H!==(H=e[0].name+"")&&R(V,H),t&6&&(L=e[2],w=ye(w,t,fe,1,e,L,ue,q,Me,Te,null,Ce)),t&6&&(D=e[2],We(),k=ye(k,t,be,1,e,D,me,O,ze,Ee,null,Ae),He())},i(e){if(!T){le(A.$$.fragment,e);for(let t=0;to(1,b=m.code);return n.$$set=m=>{"collection"in m&&o(0,_=m.collection)},o(3,a=Le.getApiExampleUrl(Re.baseUrl)),o(2,c=[{code:204,body:"null"},{code:401,body:` { "code": 401, "message": "The request requires valid record authorization token to be set.", diff --git a/ui/dist/assets/UpdateApiDocs.fa905f85.js b/ui/dist/assets/UpdateApiDocs.915abddf.js similarity index 88% rename from ui/dist/assets/UpdateApiDocs.fa905f85.js rename to ui/dist/assets/UpdateApiDocs.915abddf.js index 6f1b2d38..348bcfcc 100644 --- a/ui/dist/assets/UpdateApiDocs.fa905f85.js +++ b/ui/dist/assets/UpdateApiDocs.915abddf.js @@ -1,4 +1,4 @@ -import{S as Ct,i as St,s as Ot,C as I,O as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as U,P as Pe,Q as ut,k as Mt,R as $t,n as Rt,t as pe,a as fe,o,d as Fe,L as qt,p as Dt,r as ce,u as Ht,y as G}from"./index.786ddc4b.js";import{S as Lt}from"./SdkTabs.af9891cd.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,j,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional +import{S as Ct,i as St,s as Ot,C as I,N as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as U,O as Pe,P as ut,k as Mt,Q as $t,n as Rt,t as pe,a as fe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index.27866c98.js";import{S as Lt}from"./SdkTabs.22a960f8.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional username
String The username of the auth record.`,b=m(),u=r("tr"),u.innerHTML=`
Optional @@ -28,8 +28,8 @@ import{S as Ct,i as St,s as Ot,C as I,O as Tt,e as r,w as y,b as m,c as Ae,f as Boolean Indicates whether the auth record is verified or not.
- This field can be set only by admins or auth records with "Manage" access.`,j=m(),B=r("tr"),B.innerHTML='Schema fields'},m(c,_){a(c,t,_),a(c,l,_),a(c,s,_),a(c,b,_),a(c,u,_),a(c,d,_),a(c,f,_),a(c,k,_),a(c,C,_),a(c,v,_),a(c,O,_),a(c,D,_),a(c,A,_),a(c,F,_),a(c,M,_),a(c,j,_),a(c,B,_)},d(c){c&&o(t),c&&o(l),c&&o(s),c&&o(b),c&&o(u),c&&o(d),c&&o(f),c&&o(k),c&&o(C),c&&o(v),c&&o(O),c&&o(D),c&&o(A),c&&o(F),c&&o(M),c&&o(j),c&&o(B)}}}function Pt(p){let t;return{c(){t=r("span"),t.textContent="Optional",T(t,"class","label label-warning")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function At(p){let t;return{c(){t=r("span"),t.textContent="Required",T(t,"class","label label-success")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function Bt(p){var u;let t,l=((u=p[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("User "),s=y(l),b=y(".")},m(d,f){a(d,t,f),a(d,s,f),a(d,b,f)},p(d,f){var k;f&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&U(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function Ft(p){var u;let t,l=((u=p[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("Relation record "),s=y(l),b=y(".")},m(d,f){a(d,t,f),a(d,s,f),a(d,b,f)},p(d,f){var k;f&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&U(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function jt(p){let t,l,s,b,u;return{c(){t=y("File object."),l=r("br"),s=y(` - Set to `),b=r("code"),b.textContent="null",u=y(" to delete already uploaded file(s).")},m(d,f){a(d,t,f),a(d,l,f),a(d,s,f),a(d,b,f),a(d,u,f)},p:G,d(d){d&&o(t),d&&o(l),d&&o(s),d&&o(b),d&&o(u)}}}function Nt(p){let t;return{c(){t=y("URL address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Et(p){let t;return{c(){t=y("Email address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function It(p){let t;return{c(){t=y("JSON array or object.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Ut(p){let t;return{c(){t=y("Number value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function gt(p){let t;return{c(){t=y("Plain text value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function ht(p,t){let l,s,b,u,d,f=t[12].name+"",k,C,v,O,D=I.getFieldValueType(t[12])+"",A,F,M,j;function B(h,L){return h[12].required?At:Pt}let c=B(t),_=c(t);function K(h,L){if(h[12].type==="text")return gt;if(h[12].type==="number")return Ut;if(h[12].type==="json")return It;if(h[12].type==="email")return Et;if(h[12].type==="url")return Nt;if(h[12].type==="file")return jt;if(h[12].type==="relation")return Ft;if(h[12].type==="user")return Bt}let H=K(t),S=H&&H(t);return{key:p,first:null,c(){l=r("tr"),s=r("td"),b=r("div"),_.c(),u=m(),d=r("span"),k=y(f),C=m(),v=r("td"),O=r("span"),A=y(D),F=m(),M=r("td"),S&&S.c(),j=m(),T(b,"class","inline-flex"),T(O,"class","label"),this.first=l},m(h,L){a(h,l,L),i(l,s),i(s,b),_.m(b,null),i(b,u),i(b,d),i(d,k),i(l,C),i(l,v),i(v,O),i(O,A),i(l,F),i(l,M),S&&S.m(M,null),i(l,j)},p(h,L){t=h,c!==(c=B(t))&&(_.d(1),_=c(t),_&&(_.c(),_.m(b,u))),L&1&&f!==(f=t[12].name+"")&&U(k,f),L&1&&D!==(D=I.getFieldValueType(t[12])+"")&&U(A,D),H===(H=K(t))&&S?S.p(t,L):(S&&S.d(1),S=H&&H(t),S&&(S.c(),S.m(M,null)))},d(h){h&&o(l),_.d(),S&&S.d()}}}function vt(p,t){let l,s=t[7].code+"",b,u,d,f;function k(){return t[6](t[7])}return{key:p,first:null,c(){l=r("button"),b=y(s),u=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(C,v){a(C,l,v),i(l,b),i(l,u),d||(f=Ht(l,"click",k),d=!0)},p(C,v){t=C,v&4&&s!==(s=t[7].code+"")&&U(b,s),v&6&&ce(l,"active",t[1]===t[7].code)},d(C){C&&o(l),d=!1,f()}}}function wt(p,t){let l,s,b,u;return s=new Tt({props:{content:t[7].body}}),{key:p,first:null,c(){l=r("div"),Ae(s.$$.fragment),b=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(d,f){a(d,l,f),Be(s,l,null),i(l,b),u=!0},p(d,f){t=d;const k={};f&4&&(k.content=t[7].body),s.$set(k),(!u||f&6)&&ce(l,"active",t[1]===t[7].code)},i(d){u||(pe(s.$$.fragment,d),u=!0)},o(d){fe(s.$$.fragment,d),u=!1},d(d){d&&o(l),Fe(s)}}}function Jt(p){var it,at,ot,dt;let t,l,s=p[0].name+"",b,u,d,f,k,C,v,O=p[0].name+"",D,A,F,M,j,B,c,_,K,H,S,h,L,je,ae,W,Ne,ue,oe=p[0].name+"",be,Ee,me,Ie,_e,X,ye,Z,ke,ee,he,g,ve,Ue,J,we,N=[],ge=new Map,Te,te,Ce,V,Se,Je,Oe,x,Me,Ve,$e,xe,$,Qe,Y,ze,Ke,We,Re,Ye,qe,Ge,De,Xe,He,le,Le,Q,se,E=[],Ze=new Map,et,ne,P=[],tt=new Map,z;_=new Lt({props:{js:` + This field can be set only by admins or auth records with "Manage" access.`,N=m(),B=r("tr"),B.innerHTML='Schema fields'},m(c,_){a(c,t,_),a(c,l,_),a(c,s,_),a(c,b,_),a(c,u,_),a(c,d,_),a(c,f,_),a(c,k,_),a(c,C,_),a(c,v,_),a(c,O,_),a(c,D,_),a(c,A,_),a(c,F,_),a(c,M,_),a(c,N,_),a(c,B,_)},d(c){c&&o(t),c&&o(l),c&&o(s),c&&o(b),c&&o(u),c&&o(d),c&&o(f),c&&o(k),c&&o(C),c&&o(v),c&&o(O),c&&o(D),c&&o(A),c&&o(F),c&&o(M),c&&o(N),c&&o(B)}}}function Pt(p){let t;return{c(){t=r("span"),t.textContent="Optional",T(t,"class","label label-warning")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function At(p){let t;return{c(){t=r("span"),t.textContent="Required",T(t,"class","label label-success")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function Bt(p){var u;let t,l=((u=p[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("User "),s=y(l),b=y(".")},m(d,f){a(d,t,f),a(d,s,f),a(d,b,f)},p(d,f){var k;f&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&U(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function Ft(p){var u;let t,l=((u=p[12].options)==null?void 0:u.maxSelect)>1?"ids":"id",s,b;return{c(){t=y("Relation record "),s=y(l),b=y(".")},m(d,f){a(d,t,f),a(d,s,f),a(d,b,f)},p(d,f){var k;f&1&&l!==(l=((k=d[12].options)==null?void 0:k.maxSelect)>1?"ids":"id")&&U(s,l)},d(d){d&&o(t),d&&o(s),d&&o(b)}}}function Nt(p){let t,l,s,b,u;return{c(){t=y("File object."),l=r("br"),s=y(` + Set to `),b=r("code"),b.textContent="null",u=y(" to delete already uploaded file(s).")},m(d,f){a(d,t,f),a(d,l,f),a(d,s,f),a(d,b,f),a(d,u,f)},p:G,d(d){d&&o(t),d&&o(l),d&&o(s),d&&o(b),d&&o(u)}}}function jt(p){let t;return{c(){t=y("URL address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Et(p){let t;return{c(){t=y("Email address.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function It(p){let t;return{c(){t=y("JSON array or object.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function Ut(p){let t;return{c(){t=y("Number value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function gt(p){let t;return{c(){t=y("Plain text value.")},m(l,s){a(l,t,s)},p:G,d(l){l&&o(t)}}}function ht(p,t){let l,s,b,u,d,f=t[12].name+"",k,C,v,O,D=I.getFieldValueType(t[12])+"",A,F,M,N;function B(h,L){return h[12].required?At:Pt}let c=B(t),_=c(t);function K(h,L){if(h[12].type==="text")return gt;if(h[12].type==="number")return Ut;if(h[12].type==="json")return It;if(h[12].type==="email")return Et;if(h[12].type==="url")return jt;if(h[12].type==="file")return Nt;if(h[12].type==="relation")return Ft;if(h[12].type==="user")return Bt}let H=K(t),S=H&&H(t);return{key:p,first:null,c(){l=r("tr"),s=r("td"),b=r("div"),_.c(),u=m(),d=r("span"),k=y(f),C=m(),v=r("td"),O=r("span"),A=y(D),F=m(),M=r("td"),S&&S.c(),N=m(),T(b,"class","inline-flex"),T(O,"class","label"),this.first=l},m(h,L){a(h,l,L),i(l,s),i(s,b),_.m(b,null),i(b,u),i(b,d),i(d,k),i(l,C),i(l,v),i(v,O),i(O,A),i(l,F),i(l,M),S&&S.m(M,null),i(l,N)},p(h,L){t=h,c!==(c=B(t))&&(_.d(1),_=c(t),_&&(_.c(),_.m(b,u))),L&1&&f!==(f=t[12].name+"")&&U(k,f),L&1&&D!==(D=I.getFieldValueType(t[12])+"")&&U(A,D),H===(H=K(t))&&S?S.p(t,L):(S&&S.d(1),S=H&&H(t),S&&(S.c(),S.m(M,null)))},d(h){h&&o(l),_.d(),S&&S.d()}}}function vt(p,t){let l,s=t[7].code+"",b,u,d,f;function k(){return t[6](t[7])}return{key:p,first:null,c(){l=r("button"),b=y(s),u=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(C,v){a(C,l,v),i(l,b),i(l,u),d||(f=Ht(l,"click",k),d=!0)},p(C,v){t=C,v&4&&s!==(s=t[7].code+"")&&U(b,s),v&6&&ce(l,"active",t[1]===t[7].code)},d(C){C&&o(l),d=!1,f()}}}function wt(p,t){let l,s,b,u;return s=new Tt({props:{content:t[7].body}}),{key:p,first:null,c(){l=r("div"),Ae(s.$$.fragment),b=m(),T(l,"class","tab-item"),ce(l,"active",t[1]===t[7].code),this.first=l},m(d,f){a(d,l,f),Be(s,l,null),i(l,b),u=!0},p(d,f){t=d;const k={};f&4&&(k.content=t[7].body),s.$set(k),(!u||f&6)&&ce(l,"active",t[1]===t[7].code)},i(d){u||(pe(s.$$.fragment,d),u=!0)},o(d){fe(s.$$.fragment,d),u=!1},d(d){d&&o(l),Fe(s)}}}function Jt(p){var it,at,ot,dt;let t,l,s=p[0].name+"",b,u,d,f,k,C,v,O=p[0].name+"",D,A,F,M,N,B,c,_,K,H,S,h,L,Ne,ae,W,je,ue,oe=p[0].name+"",be,Ee,me,Ie,_e,X,ye,Z,ke,ee,he,g,ve,Ue,J,we,j=[],ge=new Map,Te,te,Ce,V,Se,Je,Oe,x,Me,Ve,$e,xe,$,Qe,Y,ze,Ke,We,Re,Ye,qe,Ge,De,Xe,He,le,Le,Q,se,E=[],Ze=new Map,et,ne,P=[],tt=new Map,z;_=new Lt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${p[4]}'); @@ -51,26 +51,26 @@ final pb = PocketBase('${p[4]}'); final body = ${JSON.stringify(Object.assign({},p[3],I.dummyCollectionSchemaData(p[0])),null,2)}; final record = await pb.collection('${(at=p[0])==null?void 0:at.name}').update('RECORD_ID', body: body); - `}});let R=p[5]&&yt(),q=((ot=p[0])==null?void 0:ot.isAuth)&&kt(),de=(dt=p[0])==null?void 0:dt.schema;const lt=e=>e[12].name;for(let e=0;ee[7].code;for(let e=0;ee[7].code;for(let e=0;eapplication/json or - multipart/form-data.`,j=m(),B=r("p"),B.innerHTML=`File upload is supported only via multipart/form-data. + `}});let R=p[5]&&yt(),q=((ot=p[0])==null?void 0:ot.isAuth)&&kt(),de=(dt=p[0])==null?void 0:dt.schema;const lt=e=>e[12].name;for(let e=0;ee[7].code;for(let e=0;ee[7].code;for(let e=0;eapplication/json or + multipart/form-data.`,N=m(),B=r("p"),B.innerHTML=`File upload is supported only via multipart/form-data.
For more info and examples you could check the detailed Files upload and handling docs - .`,c=m(),Ae(_.$$.fragment),K=m(),H=r("h6"),H.textContent="API details",S=m(),h=r("div"),L=r("strong"),L.textContent="PATCH",je=m(),ae=r("div"),W=r("p"),Ne=y("/api/collections/"),ue=r("strong"),be=y(oe),Ee=y("/records/"),me=r("strong"),me.textContent=":id",Ie=m(),R&&R.c(),_e=m(),X=r("div"),X.textContent="Path parameters",ye=m(),Z=r("table"),Z.innerHTML=`Param + .`,c=m(),Ae(_.$$.fragment),K=m(),H=r("h6"),H.textContent="API details",S=m(),h=r("div"),L=r("strong"),L.textContent="PATCH",Ne=m(),ae=r("div"),W=r("p"),je=y("/api/collections/"),ue=r("strong"),be=y(oe),Ee=y("/records/"),me=r("strong"),me.textContent=":id",Ie=m(),R&&R.c(),_e=m(),X=r("div"),X.textContent="Path parameters",ye=m(),Z=r("table"),Z.innerHTML=`Param Type Description id String ID of the record to update.`,ke=m(),ee=r("div"),ee.textContent="Body Parameters",he=m(),g=r("table"),ve=r("thead"),ve.innerHTML=`Param Type - Description`,Ue=m(),J=r("tbody"),q&&q.c(),we=m();for(let e=0;eParam + Description`,Ue=m(),J=r("tbody"),q&&q.c(),we=m();for(let e=0;eParam Type Description`,Je=m(),Oe=r("tbody"),x=r("tr"),Me=r("td"),Me.textContent="expand",Ve=m(),$e=r("td"),$e.innerHTML='String',xe=m(),$=r("td"),Qe=y(`Auto expand relations when returning the updated record. Ex.: `),Ae(Y.$$.fragment),ze=y(` Supports up to 6-levels depth nested relations expansion. `),Ke=r("br"),We=y(` The expanded relations will be appended to the record under the `),Re=r("code"),Re.textContent="expand",Ye=y(" property (eg. "),qe=r("code"),qe.textContent='"expand": {"relField1": {...}, ...}',Ge=y(`). Only - the relations that the user has permissions to `),De=r("strong"),De.textContent="view",Xe=y(" will be expanded."),He=m(),le=r("div"),le.textContent="Responses",Le=m(),Q=r("div"),se=r("div");for(let e=0;e${JSON.stringify(Object.assign({},e[3],I.dummyCollectionSchemaData(e[0])),null,2)}; final record = await pb.collection('${(pt=e[0])==null?void 0:pt.name}').update('RECORD_ID', body: body); - `),_.$set(w),(!z||n&1)&&oe!==(oe=e[0].name+"")&&U(be,oe),e[5]?R||(R=yt(),R.c(),R.m(h,null)):R&&(R.d(1),R=null),(ft=e[0])!=null&&ft.isAuth?q||(q=kt(),q.c(),q.m(J,we)):q&&(q.d(1),q=null),n&1&&(de=(ct=e[0])==null?void 0:ct.schema,N=Pe(N,n,lt,1,e,de,ge,J,ut,ht,null,_t)),n&6&&(re=e[2],E=Pe(E,n,st,1,e,re,Ze,se,ut,vt,null,mt)),n&6&&(ie=e[2],Mt(),P=Pe(P,n,nt,1,e,ie,tt,ne,$t,wt,null,bt),Rt())},i(e){if(!z){pe(_.$$.fragment,e),pe(Y.$$.fragment,e);for(let n=0;nl(1,d=v.code);return p.$$set=v=>{"collection"in v&&l(0,u=v.collection)},p.$$.update=()=>{var v,O;p.$$.dirty&1&&l(5,s=(u==null?void 0:u.updateRule)===null),p.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(I.dummyCollectionRecord(u),null,2)},{code:400,body:` + `),_.$set(w),(!z||n&1)&&oe!==(oe=e[0].name+"")&&U(be,oe),e[5]?R||(R=yt(),R.c(),R.m(h,null)):R&&(R.d(1),R=null),(ft=e[0])!=null&&ft.isAuth?q||(q=kt(),q.c(),q.m(J,we)):q&&(q.d(1),q=null),n&1&&(de=(ct=e[0])==null?void 0:ct.schema,j=Pe(j,n,lt,1,e,de,ge,J,ut,ht,null,_t)),n&6&&(re=e[2],E=Pe(E,n,st,1,e,re,Ze,se,ut,vt,null,mt)),n&6&&(ie=e[2],Mt(),P=Pe(P,n,nt,1,e,ie,tt,ne,$t,wt,null,bt),Rt())},i(e){if(!z){pe(_.$$.fragment,e),pe(Y.$$.fragment,e);for(let n=0;nl(1,d=v.code);return p.$$set=v=>{"collection"in v&&l(0,u=v.collection)},p.$$.update=()=>{var v,O;p.$$.dirty&1&&l(5,s=(u==null?void 0:u.updateRule)===null),p.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(I.dummyCollectionRecord(u),null,2)},{code:400,body:` { "code": 400, "message": "Failed to update record.", diff --git a/ui/dist/assets/ViewApiDocs.04348b73.js b/ui/dist/assets/ViewApiDocs.283f7433.js similarity index 76% rename from ui/dist/assets/ViewApiDocs.04348b73.js rename to ui/dist/assets/ViewApiDocs.283f7433.js index 7f7393b5..74832f2a 100644 --- a/ui/dist/assets/ViewApiDocs.04348b73.js +++ b/ui/dist/assets/ViewApiDocs.283f7433.js @@ -1,11 +1,11 @@ -import{S as Ze,i as et,s as tt,O as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,P as Ve,Q as lt,k as st,R as nt,n as ot,t as z,a as G,o as d,d as he,L as it,C as ze,p as at,r as J,u as rt}from"./index.786ddc4b.js";import{S as dt}from"./SdkTabs.af9891cd.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ue,je;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,U=i[0].name+"",K,ve,W,g,X,B,Y,$,j,we,N,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,I,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,Ie,fe,xe,ue,M,be,P,H,R=[],Ae=new Map,Me,L,y=[],He=new Map,T;g=new dt({props:{js:` +import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index.27866c98.js";import{S as dt}from"./SdkTabs.22a960f8.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,I,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,Ie,fe,xe,ue,M,be,P,H,R=[],Ae=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); ... - const record = await pb.collection('${(Ue=i[0])==null?void 0:Ue.name}').getOne('RECORD_ID', { + const record = await pb.collection('${(Ne=i[0])==null?void 0:Ne.name}').getOne('RECORD_ID', { expand: 'relField1,relField2.subRelField', }); `,dart:` @@ -15,10 +15,10 @@ import{S as Ze,i as et,s as tt,O as Ye,e as o,w as m,b as f,c as _e,f as _,g as ... - final record = await pb.collection('${(je=i[0])==null?void 0:je.name}').getOne('RECORD_ID', + final record = await pb.collection('${(Ue=i[0])==null?void 0:Ue.name}').getOne('RECORD_ID', 'expand': 'relField1,relField2.subRelField', ); - `}});let v=i[1]&&Ke();S=new Ye({props:{content:"?expand=relField1,relField2.subRelField"}});let V=i[4];const Le=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam + `}});let v=i[1]&&Ke();S=new Ye({props:{content:"?expand=relField1,relField2.subRelField"}});let V=i[4];const qe=e=>e[6].code;for(let e=0;ee[6].code;for(let e=0;eParam Type Description id @@ -31,14 +31,14 @@ import{S as Ze,i as et,s as tt,O as Ye,e as o,w as m,b as f,c as _e,f as _,g as The expanded relations will be appended to the record under the `),ce=o("code"),ce.textContent="expand",Ee=m(" property (eg. "),pe=o("code"),pe.textContent='"expand": {"relField1": {...}, ...}',Se=m(`). `),Be=o("br"),Ie=m(` - Only the relations to which the request user has permissions to `),fe=o("strong"),fe.textContent="view",xe=m(" will be expanded."),ue=f(),M=o("div"),M.textContent="Responses",be=f(),P=o("div"),H=o("div");for(let e=0;en(2,p=h.code);return i.$$set=h=>{"collection"in h&&n(0,c=h.collection)},i.$$.update=()=>{i.$$.dirty&1&&n(1,a=(c==null?void 0:c.viewRule)===null),i.$$.dirty&3&&c!=null&&c.id&&(u.push({code:200,body:JSON.stringify(ze.dummyCollectionRecord(c),null,2)}),a&&u.push({code:403,body:` + `),g.$set(b),(!T||t&1)&&Q!==(Q=e[0].name+"")&&me(ee,Q),e[1]?v||(v=Ke(),v.c(),v.m($,null)):v&&(v.d(1),v=null),t&20&&(V=e[4],R=Ve(R,t,qe,1,e,V,Ae,H,lt,We,null,Je)),t&20&&(L=e[4],st(),y=Ve(y,t,Le,1,e,L,He,q,nt,Xe,null,Ge),ot())},i(e){if(!T){z(g.$$.fragment,e),z(S.$$.fragment,e);for(let t=0;tn(2,p=h.code);return i.$$set=h=>{"collection"in h&&n(0,c=h.collection)},i.$$.update=()=>{i.$$.dirty&1&&n(1,a=(c==null?void 0:c.viewRule)===null),i.$$.dirty&3&&c!=null&&c.id&&(u.push({code:200,body:JSON.stringify(ze.dummyCollectionRecord(c),null,2)}),a&&u.push({code:403,body:` { "code": 403, "message": "Only admins can access this action.", diff --git a/ui/dist/assets/index.786ddc4b.js b/ui/dist/assets/index.27866c98.js similarity index 99% rename from ui/dist/assets/index.786ddc4b.js rename to ui/dist/assets/index.27866c98.js index a974121e..17ead93d 100644 --- a/ui/dist/assets/index.786ddc4b.js +++ b/ui/dist/assets/index.27866c98.js @@ -8,7 +8,7 @@ opacity: ${a-f*d}`}}function St(n,{delay:e=0,duration:t=400,easing:i=Vo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:h=>`overflow: hidden;opacity: ${Math.min(h*20,1)*l};height: ${h*o}px;padding-top: ${h*r}px;padding-bottom: ${h*a}px;margin-top: ${h*u}px;margin-bottom: ${h*f}px;border-top-width: ${h*c}px;border-bottom-width: ${h*d}px;`}}function $t(n,{delay:e=0,duration:t=400,easing:i=Vo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` transform: ${a} scale(${1-u*d}); opacity: ${r-f*d} - `}}function Q1(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),ce(e,n[7]),i||(s=K(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&ce(e,l[7])},i:te,o:te,d(l){l&&w(e),n[13](null),i=!1,s()}}}function x1(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>_e(e,"value",l)),e.$on("submit",n[10])),{c(){e&&j(e.$$.fragment),i=Ae()},m(a,u){e&&R(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],ke(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),he()}o?(e=jt(o,r(a)),le.push(()=>_e(e,"value",l)),e.$on("submit",a[10]),j(e.$$.fragment),A(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function Ru(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Hu();return{c(){r&&r.c(),e=O(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=K(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Hu(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(pe(),P(r,1,1,()=>{r=null}),he())},i(a){s||(A(r),a&&xe(()=>{i||(i=je(t,Sn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=je(t,Sn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Hu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&xe(()=>{t||(t=je(e,Sn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,Sn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function ev(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[x1,Q1],h=[];function m(g,y){return g[4]&&!g[5]?0:1}o=m(n),r=h[o]=d[o](n);let b=(n[0].length||n[7].length)&&Ru(n);return{c(){e=v("div"),t=v("form"),i=v("label"),s=v("i"),l=O(),r.c(),a=O(),b&&b.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(i,s),_(t,l),h[o].m(t,null),_(t,a),b&&b.m(t,null),u=!0,f||(c=[K(t,"click",Yn(n[11])),K(t,"submit",ut(n[10]))],f=!0)},p(g,[y]){let k=o;o=m(g),o===k?h[o].p(g,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),he(),r=h[o],r?r.p(g,y):(r=h[o]=d[o](g),r.c()),A(r,1),r.m(t,a)),g[0].length||g[7].length?b?(b.p(g,y),y&129&&A(b,1)):(b=Ru(g),b.c(),A(b,1),b.m(t,null)):b&&(pe(),P(b,1,1,()=>{b=null}),he())},i(g){u||(A(r),A(b),u=!0)},o(g){P(r),P(b),u=!1},d(g){g&&w(e),h[o].d(),b&&b.d(),f=!1,Pe(c)}}}function tv(n,e,t){const i=It(),s="search_"+W.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new Pn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function m(){t(0,l=d),i("submit",l)}async function b(){u||f||(t(5,f=!0),t(4,u=(await st(()=>import("./FilterAutocompleteInput.774da6c1.js"),["./FilterAutocompleteInput.774da6c1.js","./index.30b22912.js"],import.meta.url)).default),t(5,f=!1))}cn(()=>{b()});function g(M){Ve.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){le[M?"unshift":"push"](()=>{c=M,t(6,c)})}function $(){d=this.value,t(7,d),t(0,l)}const C=()=>{h(!1),m()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,m,g,y,k,$,C]}class ka extends ye{constructor(e){super(),ve(this,e,tv,ev,be,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let qr,Ii;const Vr="app-tooltip";function ju(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function _i(){return Ii=Ii||document.querySelector("."+Vr),Ii||(Ii=document.createElement("div"),Ii.classList.add(Vr),document.body.appendChild(Ii)),Ii}function Pg(n,e){let t=_i();if(!t.classList.contains("active")||!(e!=null&&e.text)){zr();return}t.textContent=e.text,t.className=Vr+" 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 zr(){clearTimeout(qr),_i().classList.remove("active"),_i().activeNode=void 0}function nv(n,e){_i().activeNode=n,clearTimeout(qr),qr=setTimeout(()=>{_i().classList.add("active"),Pg(n,e)},isNaN(e.delay)?0:e.delay)}function Be(n,e){let t=ju(e);function i(){nv(n,t)}function s(){zr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&W.isFocusable(n))&&n.addEventListener("click",s),_i(),{update(l){var o,r;t=ju(l),(r=(o=_i())==null?void 0:o.activeNode)!=null&&r.contains(n)&&Pg(n,t)},destroy(){var l,o;(o=(l=_i())==null?void 0:l.activeNode)!=null&&o.contains(n)&&zr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function iv(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle svelte-1bvelc2"),ne(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Ee(t=Be.call(null,e,n[0])),K(e,"click",n[2])],i=!0)},p(l,[o]){t&&Yt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&ne(e,"refreshing",l[1])},i:te,o:te,d(l){l&&w(e),i=!1,Pe(s)}}}function sv(n,e,t){const i=It();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return cn(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class wa extends ye{constructor(e){super(),ve(this,e,sv,iv,be,{tooltip:0})}}function lv(n){let e,t,i,s,l;const o=n[6].default,r=Ot(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"class",t="col-sort "+n[1]),ne(e,"col-sort-disabled",n[3]),ne(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),ne(e,"sort-desc",n[0]==="-"+n[2]),ne(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[K(e,"click",n[7]),K(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&At(r,o,a,a[5],i?Dt(o,a[5],u,null):Et(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&ne(e,"col-sort-disabled",a[3]),(!i||u&7)&&ne(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&ne(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&ne(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Pe(l)}}}function ov(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 Ft extends ye{constructor(e){super(),ve(this,e,ov,lv,be,{class:1,name:2,sort:0,disable:3})}}function rv(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function av(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=B(n[2]),s=O(),l=v("div"),o=B(n[1]),r=B(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(e,s),_(e,l),_(l,o),_(l,r)},p(a,u){u&4&&ae(i,a[2]),u&2&&ae(o,a[1])},d(a){a&&w(e)}}}function uv(n){let e;function t(l,o){return l[0]?av:rv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function fv(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Ki extends ye{constructor(e){super(),ve(this,e,fv,uv,be,{date:0})}}const cv=n=>({}),qu=n=>({}),dv=n=>({}),Vu=n=>({});function pv(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ot(u,n,n[4],Vu),c=n[5].default,d=Ot(c,n,n[4],null),h=n[5].after,m=Ot(h,n,n[4],qu);return{c(){e=v("div"),f&&f.c(),t=O(),i=v("div"),d&&d.c(),l=O(),m&&m.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(b,g){S(b,e,g),f&&f.m(e,null),_(e,t),_(e,i),d&&d.m(i,null),n[6](i),_(e,l),m&&m.m(e,null),o=!0,r||(a=[K(window,"resize",n[1]),K(i,"scroll",n[1])],r=!0)},p(b,[g]){f&&f.p&&(!o||g&16)&&At(f,u,b,b[4],o?Dt(u,b[4],g,dv):Et(b[4]),Vu),d&&d.p&&(!o||g&16)&&At(d,c,b,b[4],o?Dt(c,b[4],g,null):Et(b[4]),null),(!o||g&9&&s!==(s="horizontal-scroller "+b[0]+" "+b[3]+" svelte-wc2j9h"))&&p(i,"class",s),m&&m.p&&(!o||g&16)&&At(m,h,b,b[4],o?Dt(h,b[4],g,cv):Et(b[4]),qu)},i(b){o||(A(f,b),A(d,b),A(m,b),o=!0)},o(b){P(f,b),P(d,b),P(m,b),o=!1},d(b){b&&w(e),f&&f.d(b),d&&d.d(b),n[6](null),m&&m.d(b),r=!1,Pe(a)}}}function hv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){!o||(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,h=o.scrollWidth;h-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==h&&t(3,r+=" scroll-end")):t(3,r="")},100))}cn(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){le[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class Sa extends ye{constructor(e){super(),ve(this,e,hv,pv,be,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function zu(n,e,t){const i=n.slice();return i[23]=e[t],i}function mv(n){let e;return{c(){e=v("div"),e.innerHTML=` + `}}function Q1(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),ce(e,n[7]),i||(s=K(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&ce(e,l[7])},i:te,o:te,d(l){l&&w(e),n[13](null),i=!1,s()}}}function x1(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>_e(e,"value",l)),e.$on("submit",n[10])),{c(){e&&j(e.$$.fragment),i=Ae()},m(a,u){e&&R(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],ke(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),he()}o?(e=jt(o,r(a)),le.push(()=>_e(e,"value",l)),e.$on("submit",a[10]),j(e.$$.fragment),A(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function Ru(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Hu();return{c(){r&&r.c(),e=O(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=K(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&A(r,1):(r=Hu(),r.c(),A(r,1),r.m(e.parentNode,e)):r&&(pe(),P(r,1,1,()=>{r=null}),he())},i(a){s||(A(r),a&&xe(()=>{i||(i=je(t,Sn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=je(t,Sn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Hu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&xe(()=>{t||(t=je(e,Sn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,Sn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function ev(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[x1,Q1],h=[];function m(g,y){return g[4]&&!g[5]?0:1}o=m(n),r=h[o]=d[o](n);let b=(n[0].length||n[7].length)&&Ru(n);return{c(){e=v("div"),t=v("form"),i=v("label"),s=v("i"),l=O(),r.c(),a=O(),b&&b.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(i,s),_(t,l),h[o].m(t,null),_(t,a),b&&b.m(t,null),u=!0,f||(c=[K(t,"click",Yn(n[11])),K(t,"submit",ut(n[10]))],f=!0)},p(g,[y]){let k=o;o=m(g),o===k?h[o].p(g,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),he(),r=h[o],r?r.p(g,y):(r=h[o]=d[o](g),r.c()),A(r,1),r.m(t,a)),g[0].length||g[7].length?b?(b.p(g,y),y&129&&A(b,1)):(b=Ru(g),b.c(),A(b,1),b.m(t,null)):b&&(pe(),P(b,1,1,()=>{b=null}),he())},i(g){u||(A(r),A(b),u=!0)},o(g){P(r),P(b),u=!1},d(g){g&&w(e),h[o].d(),b&&b.d(),f=!1,Pe(c)}}}function tv(n,e,t){const i=It(),s="search_"+W.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new Pn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function m(){t(0,l=d),i("submit",l)}async function b(){u||f||(t(5,f=!0),t(4,u=(await st(()=>import("./FilterAutocompleteInput.9bb81144.js"),["./FilterAutocompleteInput.9bb81144.js","./index.30b22912.js"],import.meta.url)).default),t(5,f=!1))}cn(()=>{b()});function g(M){Ve.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){le[M?"unshift":"push"](()=>{c=M,t(6,c)})}function $(){d=this.value,t(7,d),t(0,l)}const C=()=>{h(!1),m()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,m,g,y,k,$,C]}class ka extends ye{constructor(e){super(),ve(this,e,tv,ev,be,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let qr,Ii;const Vr="app-tooltip";function ju(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function _i(){return Ii=Ii||document.querySelector("."+Vr),Ii||(Ii=document.createElement("div"),Ii.classList.add(Vr),document.body.appendChild(Ii)),Ii}function Pg(n,e){let t=_i();if(!t.classList.contains("active")||!(e!=null&&e.text)){zr();return}t.textContent=e.text,t.className=Vr+" 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 zr(){clearTimeout(qr),_i().classList.remove("active"),_i().activeNode=void 0}function nv(n,e){_i().activeNode=n,clearTimeout(qr),qr=setTimeout(()=>{_i().classList.add("active"),Pg(n,e)},isNaN(e.delay)?0:e.delay)}function Be(n,e){let t=ju(e);function i(){nv(n,t)}function s(){zr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&W.isFocusable(n))&&n.addEventListener("click",s),_i(),{update(l){var o,r;t=ju(l),(r=(o=_i())==null?void 0:o.activeNode)!=null&&r.contains(n)&&Pg(n,t)},destroy(){var l,o;(o=(l=_i())==null?void 0:l.activeNode)!=null&&o.contains(n)&&zr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function iv(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle svelte-1bvelc2"),ne(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Ee(t=Be.call(null,e,n[0])),K(e,"click",n[2])],i=!0)},p(l,[o]){t&&Yt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&ne(e,"refreshing",l[1])},i:te,o:te,d(l){l&&w(e),i=!1,Pe(s)}}}function sv(n,e,t){const i=It();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return cn(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class wa extends ye{constructor(e){super(),ve(this,e,sv,iv,be,{tooltip:0})}}function lv(n){let e,t,i,s,l;const o=n[6].default,r=Ot(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"class",t="col-sort "+n[1]),ne(e,"col-sort-disabled",n[3]),ne(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),ne(e,"sort-desc",n[0]==="-"+n[2]),ne(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[K(e,"click",n[7]),K(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&At(r,o,a,a[5],i?Dt(o,a[5],u,null):Et(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&ne(e,"col-sort-disabled",a[3]),(!i||u&7)&&ne(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&ne(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&ne(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Pe(l)}}}function ov(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 Ft extends ye{constructor(e){super(),ve(this,e,ov,lv,be,{class:1,name:2,sort:0,disable:3})}}function rv(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function av(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=B(n[2]),s=O(),l=v("div"),o=B(n[1]),r=B(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(e,s),_(e,l),_(l,o),_(l,r)},p(a,u){u&4&&ae(i,a[2]),u&2&&ae(o,a[1])},d(a){a&&w(e)}}}function uv(n){let e;function t(l,o){return l[0]?av:rv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function fv(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Ki extends ye{constructor(e){super(),ve(this,e,fv,uv,be,{date:0})}}const cv=n=>({}),qu=n=>({}),dv=n=>({}),Vu=n=>({});function pv(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ot(u,n,n[4],Vu),c=n[5].default,d=Ot(c,n,n[4],null),h=n[5].after,m=Ot(h,n,n[4],qu);return{c(){e=v("div"),f&&f.c(),t=O(),i=v("div"),d&&d.c(),l=O(),m&&m.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(b,g){S(b,e,g),f&&f.m(e,null),_(e,t),_(e,i),d&&d.m(i,null),n[6](i),_(e,l),m&&m.m(e,null),o=!0,r||(a=[K(window,"resize",n[1]),K(i,"scroll",n[1])],r=!0)},p(b,[g]){f&&f.p&&(!o||g&16)&&At(f,u,b,b[4],o?Dt(u,b[4],g,dv):Et(b[4]),Vu),d&&d.p&&(!o||g&16)&&At(d,c,b,b[4],o?Dt(c,b[4],g,null):Et(b[4]),null),(!o||g&9&&s!==(s="horizontal-scroller "+b[0]+" "+b[3]+" svelte-wc2j9h"))&&p(i,"class",s),m&&m.p&&(!o||g&16)&&At(m,h,b,b[4],o?Dt(h,b[4],g,cv):Et(b[4]),qu)},i(b){o||(A(f,b),A(d,b),A(m,b),o=!0)},o(b){P(f,b),P(d,b),P(m,b),o=!1},d(b){b&&w(e),f&&f.d(b),d&&d.d(b),n[6](null),m&&m.d(b),r=!1,Pe(a)}}}function hv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){!o||(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,h=o.scrollWidth;h-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==h&&t(3,r+=" scroll-end")):t(3,r="")},100))}cn(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){le[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class Sa extends ye{constructor(e){super(),ve(this,e,hv,pv,be,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function zu(n,e,t){const i=n.slice();return i[23]=e[t],i}function mv(n){let e;return{c(){e=v("div"),e.innerHTML=` method`,p(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function gv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="url",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function _v(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="referer",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function bv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="User IP",p(t,"class",W.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function vv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="status",p(t,"class",W.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function yv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function Bu(n){let e;function t(l,o){return l[6]?wv:kv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function kv(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Uu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Uu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function wv(n){let e;return{c(){e=v("tr"),e.innerHTML=` `},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function Uu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[19]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function Wu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yu(n,e){var Se,we,We;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,h,m,b,g,y,k=(e[23].referer||"N/A")+"",$,C,M,T,D,E=(e[23].userIp||"N/A")+"",I,L,F,q,z,J=e[23].status+"",G,X,Q,ie,Y,x,U,re,Re,Ne,Le=(((we=e[23].meta)==null?void 0:we.errorMessage)||((We=e[23].meta)==null?void 0:We.errorData))&&Wu();ie=new Ki({props:{date:e[23].created}});function Fe(){return e[17](e[23])}function me(...ue){return e[18](e[23],...ue)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=B(l),a=O(),u=v("td"),f=v("span"),d=B(c),m=O(),Le&&Le.c(),b=O(),g=v("td"),y=v("span"),$=B(k),M=O(),T=v("td"),D=v("span"),I=B(E),F=O(),q=v("td"),z=v("span"),G=B(J),X=O(),Q=v("td"),j(ie.$$.fragment),Y=O(),x=v("td"),x.innerHTML='',U=O(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[23].referer),ne(y,"txt-hint",!e[23].referer),p(g,"class","col-type-text col-field-referer"),p(D,"class","txt txt-ellipsis"),p(D,"title",L=e[23].userIp),ne(D,"txt-hint",!e[23].userIp),p(T,"class","col-type-number col-field-userIp"),p(z,"class","label"),ne(z,"label-danger",e[23].status>=400),p(q,"class","col-type-number col-field-status"),p(Q,"class","col-type-date col-field-created"),p(x,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ue,se){S(ue,t,se),_(t,i),_(i,s),_(s,o),_(t,a),_(t,u),_(u,f),_(f,d),_(u,m),Le&&Le.m(u,null),_(t,b),_(t,g),_(g,y),_(y,$),_(t,M),_(t,T),_(T,D),_(D,I),_(t,F),_(t,q),_(q,z),_(z,G),_(t,X),_(t,Q),R(ie,Q,null),_(t,Y),_(t,x),_(t,U),re=!0,Re||(Ne=[K(t,"click",Fe),K(t,"keydown",me)],Re=!0)},p(ue,se){var Z,Ce,Ue;e=ue,(!re||se&8)&&l!==(l=((Z=e[23].method)==null?void 0:Z.toUpperCase())+"")&&ae(o,l),(!re||se&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!re||se&8)&&c!==(c=e[23].url+"")&&ae(d,c),(!re||se&8&&h!==(h=e[23].url))&&p(f,"title",h),((Ce=e[23].meta)==null?void 0:Ce.errorMessage)||((Ue=e[23].meta)==null?void 0:Ue.errorData)?Le||(Le=Wu(),Le.c(),Le.m(u,null)):Le&&(Le.d(1),Le=null),(!re||se&8)&&k!==(k=(e[23].referer||"N/A")+"")&&ae($,k),(!re||se&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!re||se&8)&&ne(y,"txt-hint",!e[23].referer),(!re||se&8)&&E!==(E=(e[23].userIp||"N/A")+"")&&ae(I,E),(!re||se&8&&L!==(L=e[23].userIp))&&p(D,"title",L),(!re||se&8)&&ne(D,"txt-hint",!e[23].userIp),(!re||se&8)&&J!==(J=e[23].status+"")&&ae(G,J),(!re||se&8)&&ne(z,"label-danger",e[23].status>=400);const fe={};se&8&&(fe.date=e[23].created),ie.$set(fe)},i(ue){re||(A(ie.$$.fragment,ue),re=!0)},o(ue){P(ie.$$.fragment,ue),re=!1},d(ue){ue&&w(t),Le&&Le.d(),H(ie),Re=!1,Pe(Ne)}}}function Sv(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,E,I=[],L=new Map,F;function q(me){n[11](me)}let z={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[mv]},$$scope:{ctx:n}};n[1]!==void 0&&(z.sort=n[1]),s=new Ft({props:z}),le.push(()=>_e(s,"sort",q));function J(me){n[12](me)}let G={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[gv]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),r=new Ft({props:G}),le.push(()=>_e(r,"sort",J));function X(me){n[13](me)}let Q={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[_v]},$$scope:{ctx:n}};n[1]!==void 0&&(Q.sort=n[1]),f=new Ft({props:Q}),le.push(()=>_e(f,"sort",X));function ie(me){n[14](me)}let Y={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[bv]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),h=new Ft({props:Y}),le.push(()=>_e(h,"sort",ie));function x(me){n[15](me)}let U={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[vv]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),g=new Ft({props:U}),le.push(()=>_e(g,"sort",x));function re(me){n[16](me)}let Re={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[yv]},$$scope:{ctx:n}};n[1]!==void 0&&(Re.sort=n[1]),$=new Ft({props:Re}),le.push(()=>_e($,"sort",re));let Ne=n[3];const Le=me=>me[23].id;for(let me=0;mel=!1)),s.$set(we);const We={};Se&67108864&&(We.$$scope={dirty:Se,ctx:me}),!a&&Se&2&&(a=!0,We.sort=me[1],ke(()=>a=!1)),r.$set(We);const ue={};Se&67108864&&(ue.$$scope={dirty:Se,ctx:me}),!c&&Se&2&&(c=!0,ue.sort=me[1],ke(()=>c=!1)),f.$set(ue);const se={};Se&67108864&&(se.$$scope={dirty:Se,ctx:me}),!m&&Se&2&&(m=!0,se.sort=me[1],ke(()=>m=!1)),h.$set(se);const fe={};Se&67108864&&(fe.$$scope={dirty:Se,ctx:me}),!y&&Se&2&&(y=!0,fe.sort=me[1],ke(()=>y=!1)),g.$set(fe);const Z={};Se&67108864&&(Z.$$scope={dirty:Se,ctx:me}),!C&&Se&2&&(C=!0,Z.sort=me[1],ke(()=>C=!1)),$.$set(Z),Se&841&&(Ne=me[3],pe(),I=bt(I,Se,Le,1,me,Ne,L,E,en,Yu,null,zu),he(),!Ne.length&&Fe?Fe.p(me,Se):Ne.length?Fe&&(Fe.d(1),Fe=null):(Fe=Bu(me),Fe.c(),Fe.m(E,null))),(!F||Se&64)&&ne(e,"table-loading",me[6])},i(me){if(!F){A(s.$$.fragment,me),A(r.$$.fragment,me),A(f.$$.fragment,me),A(h.$$.fragment,me),A(g.$$.fragment,me),A($.$$.fragment,me);for(let Se=0;Se{if(L<=1&&b(),t(6,d=!1),t(5,f=q.page),t(4,c=q.totalItems),s("load",u.concat(q.items)),F){const z=++h;for(;q.items.length&&h==z;)t(3,u=u.concat(q.items.splice(0,10))),await W.yieldToMain()}else t(3,u=u.concat(q.items))}).catch(q=>{q!=null&&q.isAbort||(t(6,d=!1),console.warn(q),b(),de.errorResponseHandler(q,!1))})}function b(){t(3,u=[]),t(5,f=1),t(4,c=0)}function g(L){a=L,t(1,a)}function y(L){a=L,t(1,a)}function k(L){a=L,t(1,a)}function $(L){a=L,t(1,a)}function C(L){a=L,t(1,a)}function M(L){a=L,t(1,a)}const T=L=>s("select",L),D=(L,F)=>{F.code==="Enter"&&(F.preventDefault(),s("select",L))},E=()=>t(0,o=""),I=()=>m(f+1);return n.$$set=L=>{"filter"in L&&t(0,o=L.filter),"presets"in L&&t(10,r=L.presets),"sort"in L&&t(1,a=L.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(b(),m(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,m,u,c,f,d,i,s,l,r,g,y,k,$,C,M,T,D,E,I]}class Mv extends ye{constructor(e){super(),ve(this,e,Cv,$v,be,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! * Chart.js v3.9.1 @@ -81,7 +81,7 @@ `),s=v("code"),s.textContent="id",l=B(` , `),o=v("code"),o.textContent="created",r=B(` , `),a=v("code"),a.textContent="updated",u=O(),L&&L.c(),f=B(` - .`),c=O(),d=v("div");for(let G=0;Gy.name===g)}function f(g){let y=[];if(g.toDelete)return y;for(let k of i.schema)k===g||k.toDelete||y.push(k.name);return y}function c(g,y){if(!g)return;g.dataTransfer.dropEffect="move";const k=parseInt(g.dataTransfer.getData("text/plain")),$=i.schema;ko(g),m=(g,y)=>HC(y==null?void 0:y.detail,g),b=(g,y)=>c(y==null?void 0:y.detail,g);return n.$$set=g=>{"collection"in g&&t(0,i=g.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof(i==null?void 0:i.schema)>"u"&&(t(0,i=i||{}),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,h,m,b]}class qC extends ye{constructor(e){super(),ve(this,e,jC,RC,be,{collection:0})}}const VC=n=>({isAdminOnly:n&512}),ed=n=>({isAdminOnly:n[9]});function zC(n){let e,t,i,s;function l(a,u){return a[9]?WC:UC}let o=l(n),r=o(n);return i=new ge({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[ZC,({uniqueId:a})=>({17:a}),({uniqueId:a})=>a?131072:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),r.c(),t=O(),j(i.$$.fragment),p(e,"class","rule-block svelte-fjxz7k")},m(a,u){S(a,e,u),r.m(e,null),_(e,t),R(i,e,null),s=!0},p(a,u){o===(o=l(a))&&r?r.p(a,u):(r.d(1),r=o(a),r&&(r.c(),r.m(e,t)));const f={};u&528&&(f.class="form-field rule-field m-0 "+(a[4]?"requied":"")+" "+(a[9]?"disabled":"")),u&8&&(f.name=a[3]),u&164519&&(f.$$scope={dirty:u,ctx:a}),i.$set(f)},i(a){s||(A(i.$$.fragment,a),s=!0)},o(a){P(i.$$.fragment,a),s=!1},d(a){a&&w(e),r.d(),H(i)}}}function BC(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function UC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(s,l){S(s,e,l),t||(i=[Ee(Be.call(null,e,{text:"Lock and set to Admins only",position:"left"})),K(e,"click",n[12])],t=!0)},p:te,d(s){s&&w(e),t=!1,Pe(i)}}}function WC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(s,l){S(s,e,l),t||(i=[Ee(Be.call(null,e,{text:"Unlock and set custom rule",position:"left"})),K(e,"click",n[11])],t=!0)},p:te,d(s){s&&w(e),t=!1,Pe(i)}}}function YC(n){let e;return{c(){e=B("Leave empty to grant everyone access")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function KC(n){let e;return{c(){e=B("Only admins will be able to perform this action (unlock to change)")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function JC(n){let e;function t(l,o){return l[9]?KC:YC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function ZC(n){let e,t,i,s=n[9]?"Admins only":"Custom rule",l,o,r,a,u,f,c,d;function h($){n[14]($)}var m=n[7];function b($){let C={id:$[17],baseCollection:$[1],disabled:$[9]};return $[0]!==void 0&&(C.value=$[0]),{props:C}}m&&(a=jt(m,b(n)),n[13](a),le.push(()=>_e(a,"value",h)));const g=n[10].default,y=Ot(g,n,n[15],ed),k=y||JC(n);return{c(){e=v("label"),t=B(n[2]),i=B(" - "),l=B(s),r=O(),a&&j(a.$$.fragment),f=O(),c=v("div"),k&&k.c(),p(e,"for",o=n[17]),p(c,"class","help-block")},m($,C){S($,e,C),_(e,t),_(e,i),_(e,l),S($,r,C),a&&R(a,$,C),S($,f,C),S($,c,C),k&&k.m(c,null),d=!0},p($,C){(!d||C&4)&&ae(t,$[2]),(!d||C&512)&&s!==(s=$[9]?"Admins only":"Custom rule")&&ae(l,s),(!d||C&131072&&o!==(o=$[17]))&&p(e,"for",o);const M={};if(C&131072&&(M.id=$[17]),C&2&&(M.baseCollection=$[1]),C&512&&(M.disabled=$[9]),!u&&C&1&&(u=!0,M.value=$[0],ke(()=>u=!1)),m!==(m=$[7])){if(a){pe();const T=a;P(T.$$.fragment,1,0,()=>{H(T,1)}),he()}m?(a=jt(m,b($)),$[13](a),le.push(()=>_e(a,"value",h)),j(a.$$.fragment),A(a.$$.fragment,1),R(a,f.parentNode,f)):a=null}else m&&a.$set(M);y?y.p&&(!d||C&33280)&&At(y,g,$,$[15],d?Dt(g,$[15],C,VC):Et($[15]),ed):k&&k.p&&(!d||C&512)&&k.p($,d?C:-1)},i($){d||(a&&A(a.$$.fragment,$),A(k,$),d=!0)},o($){a&&P(a.$$.fragment,$),P(k,$),d=!1},d($){$&&w(e),$&&w(r),n[13](null),a&&H(a,$),$&&w(f),$&&w(c),k&&k.d($)}}}function GC(n){let e,t,i,s;const l=[BC,zC],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),he(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let td;function XC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,h=td,m=!1;async function b(){h||m||(t(8,m=!0),t(7,h=(await st(()=>import("./FilterAutocompleteInput.774da6c1.js"),["./FilterAutocompleteInput.774da6c1.js","./index.30b22912.js"],import.meta.url)).default),td=h,t(8,m=!1))}b();const g=async()=>{t(0,r=d||""),await Mn(),c==null||c.focus()},y=()=>{t(6,d=r),t(0,r=null)};function k(C){le[C?"unshift":"push"](()=>{c=C,t(5,c)})}function $(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(15,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,h,m,i,s,g,y,k,$,l]}class ds extends ye{constructor(e){super(),ve(this,e,XC,GC,be,{collection:1,rule:0,label:2,formKey:3,required:4})}}function nd(n,e,t){const i=n.slice();return i[9]=e[t],i}function id(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,E,I,L,F,q,z,J,G=n[0].schema,X=[];for(let Q=0;Q@request filter:",y=O(),k=v("div"),k.innerHTML=`@request.method + .`),c=O(),d=v("div");for(let G=0;Gy.name===g)}function f(g){let y=[];if(g.toDelete)return y;for(let k of i.schema)k===g||k.toDelete||y.push(k.name);return y}function c(g,y){if(!g)return;g.dataTransfer.dropEffect="move";const k=parseInt(g.dataTransfer.getData("text/plain")),$=i.schema;ko(g),m=(g,y)=>HC(y==null?void 0:y.detail,g),b=(g,y)=>c(y==null?void 0:y.detail,g);return n.$$set=g=>{"collection"in g&&t(0,i=g.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof(i==null?void 0:i.schema)>"u"&&(t(0,i=i||{}),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,h,m,b]}class qC extends ye{constructor(e){super(),ve(this,e,jC,RC,be,{collection:0})}}const VC=n=>({isAdminOnly:n&512}),ed=n=>({isAdminOnly:n[9]});function zC(n){let e,t,i,s;function l(a,u){return a[9]?WC:UC}let o=l(n),r=o(n);return i=new ge({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[ZC,({uniqueId:a})=>({17:a}),({uniqueId:a})=>a?131072:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),r.c(),t=O(),j(i.$$.fragment),p(e,"class","rule-block svelte-fjxz7k")},m(a,u){S(a,e,u),r.m(e,null),_(e,t),R(i,e,null),s=!0},p(a,u){o===(o=l(a))&&r?r.p(a,u):(r.d(1),r=o(a),r&&(r.c(),r.m(e,t)));const f={};u&528&&(f.class="form-field rule-field m-0 "+(a[4]?"requied":"")+" "+(a[9]?"disabled":"")),u&8&&(f.name=a[3]),u&164519&&(f.$$scope={dirty:u,ctx:a}),i.$set(f)},i(a){s||(A(i.$$.fragment,a),s=!0)},o(a){P(i.$$.fragment,a),s=!1},d(a){a&&w(e),r.d(),H(i)}}}function BC(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function UC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(s,l){S(s,e,l),t||(i=[Ee(Be.call(null,e,{text:"Lock and set to Admins only",position:"left"})),K(e,"click",n[12])],t=!0)},p:te,d(s){s&&w(e),t=!1,Pe(i)}}}function WC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(s,l){S(s,e,l),t||(i=[Ee(Be.call(null,e,{text:"Unlock and set custom rule",position:"left"})),K(e,"click",n[11])],t=!0)},p:te,d(s){s&&w(e),t=!1,Pe(i)}}}function YC(n){let e;return{c(){e=B("Leave empty to grant everyone access")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function KC(n){let e;return{c(){e=B("Only admins will be able to perform this action (unlock to change)")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function JC(n){let e;function t(l,o){return l[9]?KC:YC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function ZC(n){let e,t,i,s=n[9]?"Admins only":"Custom rule",l,o,r,a,u,f,c,d;function h($){n[14]($)}var m=n[7];function b($){let C={id:$[17],baseCollection:$[1],disabled:$[9]};return $[0]!==void 0&&(C.value=$[0]),{props:C}}m&&(a=jt(m,b(n)),n[13](a),le.push(()=>_e(a,"value",h)));const g=n[10].default,y=Ot(g,n,n[15],ed),k=y||JC(n);return{c(){e=v("label"),t=B(n[2]),i=B(" - "),l=B(s),r=O(),a&&j(a.$$.fragment),f=O(),c=v("div"),k&&k.c(),p(e,"for",o=n[17]),p(c,"class","help-block")},m($,C){S($,e,C),_(e,t),_(e,i),_(e,l),S($,r,C),a&&R(a,$,C),S($,f,C),S($,c,C),k&&k.m(c,null),d=!0},p($,C){(!d||C&4)&&ae(t,$[2]),(!d||C&512)&&s!==(s=$[9]?"Admins only":"Custom rule")&&ae(l,s),(!d||C&131072&&o!==(o=$[17]))&&p(e,"for",o);const M={};if(C&131072&&(M.id=$[17]),C&2&&(M.baseCollection=$[1]),C&512&&(M.disabled=$[9]),!u&&C&1&&(u=!0,M.value=$[0],ke(()=>u=!1)),m!==(m=$[7])){if(a){pe();const T=a;P(T.$$.fragment,1,0,()=>{H(T,1)}),he()}m?(a=jt(m,b($)),$[13](a),le.push(()=>_e(a,"value",h)),j(a.$$.fragment),A(a.$$.fragment,1),R(a,f.parentNode,f)):a=null}else m&&a.$set(M);y?y.p&&(!d||C&33280)&&At(y,g,$,$[15],d?Dt(g,$[15],C,VC):Et($[15]),ed):k&&k.p&&(!d||C&512)&&k.p($,d?C:-1)},i($){d||(a&&A(a.$$.fragment,$),A(k,$),d=!0)},o($){a&&P(a.$$.fragment,$),P(k,$),d=!1},d($){$&&w(e),$&&w(r),n[13](null),a&&H(a,$),$&&w(f),$&&w(c),k&&k.d($)}}}function GC(n){let e,t,i,s;const l=[BC,zC],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),he(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let td;function XC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,h=td,m=!1;async function b(){h||m||(t(8,m=!0),t(7,h=(await st(()=>import("./FilterAutocompleteInput.9bb81144.js"),["./FilterAutocompleteInput.9bb81144.js","./index.30b22912.js"],import.meta.url)).default),td=h,t(8,m=!1))}b();const g=async()=>{t(0,r=d||""),await Mn(),c==null||c.focus()},y=()=>{t(6,d=r),t(0,r=null)};function k(C){le[C?"unshift":"push"](()=>{c=C,t(5,c)})}function $(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(15,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,h,m,i,s,g,y,k,$,l]}class ds extends ye{constructor(e){super(),ve(this,e,XC,GC,be,{collection:1,rule:0,label:2,formKey:3,required:4})}}function nd(n,e,t){const i=n.slice();return i[9]=e[t],i}function id(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,E,I,L,F,q,z,J,G=n[0].schema,X=[];for(let Q=0;Q@request filter:",y=O(),k=v("div"),k.innerHTML=`@request.method @request.query.* @request.data.* @request.auth.*`,$=O(),C=v("hr"),M=O(),T=v("p"),T.innerHTML="You could also add constraints and query other collections using the @collection filter:",D=O(),E=v("div"),E.innerHTML="@collection.ANY_COLLECTION_NAME.*",I=O(),L=v("hr"),F=O(),q=v("p"),q.innerHTML=`Example rule: @@ -101,7 +101,7 @@ Also note that some OAuth2 providers (like Twitter), don't return an email and t `),s=v("strong"),o=B(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=B(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){S(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&16&&l!==(l=h[14].originalName+"")&&ae(o,l),m&16&&c!==(c=h[14].name+"")&&ae(d,c)},d(h){h&&w(e)}}}function gd(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=v("li"),t=B("Removed field "),i=v("span"),l=B(s),o=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(i,l),_(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&ae(l,s)},d(r){r&&w(e)}}}function M3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[3].length&&pd(),m=n[5]&&hd(n),b=n[4],g=[];for(let $=0;$',i=O(),s=v("div"),l=v("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to update it manually!`,o=O(),h&&h.c(),r=O(),a=v("h6"),a.textContent="Changes:",u=O(),f=v("ul"),m&&m.c(),c=O();for(let $=0;$Cancel',t=O(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[K(e,"click",n[8]),K(i,"click",n[9])],s=!0)},p:te,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Pe(l)}}}function D3(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[O3],header:[T3],default:[M3]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function A3(n,e,t){let i,s,l;const o=It();let r,a;async function u(y){t(1,a=y),await Mn(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),h=()=>c();function m(y){le[y?"unshift":"push"](()=>{r=y,t(2,r)})}function b(y){Ve.call(this,n,y)}function g(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,h,m,b,g]}class E3 extends ye{constructor(e){super(),ve(this,e,A3,D3,be,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function _d(n,e,t){const i=n.slice();return i[43]=e[t][0],i[44]=e[t][1],i}function bd(n){let e,t,i,s;function l(r){n[30](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new i3({props:o}),le.push(()=>_e(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){S(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function vd(n){let e,t,i,s;function l(r){n[31](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new C3({props:o}),le.push(()=>_e(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ne(e,"active",n[3]===Ms)},m(r,a){S(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ke(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&ne(e,"active",r[3]===Ms)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function I3(n){let e,t,i,s,l,o,r;function a(d){n[29](d)}let u={};n[2]!==void 0&&(u.collection=n[2]),i=new qC({props:u}),le.push(()=>_e(i,"collection",a));let f=n[3]===ml&&bd(n),c=n[2].isAuth&&vd(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),l=O(),f&&f.c(),o=O(),c&&c.c(),p(t,"class","tab-item"),ne(t,"active",n[3]===gi),p(e,"class","tabs-content svelte-b10vi")},m(d,h){S(d,e,h),_(e,t),R(i,t,null),_(e,l),f&&f.m(e,null),_(e,o),c&&c.m(e,null),r=!0},p(d,h){const m={};!s&&h[0]&4&&(s=!0,m.collection=d[2],ke(()=>s=!1)),i.$set(m),(!r||h[0]&8)&&ne(t,"active",d[3]===gi),d[3]===ml?f?(f.p(d,h),h[0]&8&&A(f,1)):(f=bd(d),f.c(),A(f,1),f.m(e,o)):f&&(pe(),P(f,1,1,()=>{f=null}),he()),d[2].isAuth?c?(c.p(d,h),h[0]&4&&A(c,1)):(c=vd(d),c.c(),A(c,1),c.m(e,null)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){r||(A(i.$$.fragment,d),A(f),A(c),r=!0)},o(d){P(i.$$.fragment,d),P(f),P(c),r=!1},d(d){d&&w(e),H(i),f&&f.d(),c&&c.d()}}}function yd(n){let e,t,i,s,l,o,r;return o=new Zn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[P3]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),i=v("button"),s=v("i"),l=O(),j(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),_(i,s),_(i,l),R(o,i,null),r=!0},p(a,u){const f={};u[1]&65536&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),H(o)}}}function P3(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(ut(n[22]))),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function kd(n){let e,t,i,s;return i=new Zn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[L3]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=O(),j(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),R(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&65536&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),H(i,l)}}}function wd(n){let e,t,i,s,l,o=n[44]+"",r,a,u,f,c;function d(){return n[24](n[43])}return{c(){e=v("button"),t=v("i"),s=O(),l=v("span"),r=B(o),a=B(" collection"),u=O(),p(t,"class",i=uo(W.getCollectionTypeIcon(n[43]))+" svelte-b10vi"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),ne(e,"selected",n[43]==n[2].type)},m(h,m){S(h,e,m),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),_(e,u),f||(c=K(e,"click",d),f=!0)},p(h,m){n=h,m[0]&64&&i!==(i=uo(W.getCollectionTypeIcon(n[43]))+" svelte-b10vi")&&p(t,"class",i),m[0]&64&&o!==(o=n[44]+"")&&ae(r,o),m[0]&68&&ne(e,"selected",n[43]==n[2].type)},d(h){h&&w(e),f=!1,c()}}}function L3(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{F=null}),he()),(!E||J[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(z[2].isNew?"btn-hint":"btn-secondary")))&&p(d,"class",C),(!E||J[0]&4&&M!==(M=!z[2].isNew))&&(d.disabled=M),z[2].system?q||(q=Sd(),q.c(),q.m(D.parentNode,D)):q&&(q.d(1),q=null)},i(z){E||(A(F),E=!0)},o(z){P(F),E=!1},d(z){z&&w(e),z&&w(s),z&&w(l),z&&w(f),z&&w(c),F&&F.d(),z&&w(T),q&&q.d(z),z&&w(D),I=!1,L()}}}function $d(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Ee(t=Be.call(null,e,n[13])),l=!0)},p(r,a){t&&Yt(t.update)&&a[0]&8192&&t.update.call(null,r[13])},i(r){s||(r&&xe(()=>{i||(i=je(e,$t,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=je(e,$t,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function Cd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Md(n){var a,u,f;let e,t,i,s=!W.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&&Td();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=O(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),ne(e,"active",n[3]===Ms)},m(c,d){S(c,e,d),_(e,t),_(e,i),r&&r.m(e,null),l||(o=K(e,"click",n[28]),l=!0)},p(c,d){var h,m,b;d[0]&32&&(s=!W.isEmpty((h=c[5])==null?void 0:h.options)&&!((b=(m=c[5])==null?void 0:m.options)!=null&&b.manageRule)),s?r?d[0]&32&&A(r,1):(r=Td(),r.c(),A(r,1),r.m(e,null)):r&&(pe(),P(r,1,1,()=>{r=null}),he()),d[0]&8&&ne(e,"active",c[3]===Ms)},d(c){c&&w(e),r&&r.d(),l=!1,o()}}}function Td(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function F3(n){var z,J,G,X,Q,ie,Y,x;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,h,m,b=!W.isEmpty((z=n[5])==null?void 0:z.schema),g,y,k,$,C=!W.isEmpty((J=n[5])==null?void 0:J.listRule)||!W.isEmpty((G=n[5])==null?void 0:G.viewRule)||!W.isEmpty((X=n[5])==null?void 0:X.createRule)||!W.isEmpty((Q=n[5])==null?void 0:Q.updateRule)||!W.isEmpty((ie=n[5])==null?void 0:ie.deleteRule)||!W.isEmpty((x=(Y=n[5])==null?void 0:Y.options)==null?void 0:x.manageRule),M,T,D,E,I=!n[2].isNew&&!n[2].system&&yd(n);r=new ge({props:{class:"form-field collection-field-name required m-b-0 "+(n[12]?"disabled":""),name:"name",$$slots:{default:[N3,({uniqueId:U})=>({42:U}),({uniqueId:U})=>[0,U?2048:0]]},$$scope:{ctx:n}}});let L=b&&$d(n),F=C&&Cd(),q=n[2].isAuth&&Md(n);return{c(){e=v("h4"),i=B(t),s=O(),I&&I.c(),l=O(),o=v("form"),j(r.$$.fragment),a=O(),u=v("input"),f=O(),c=v("div"),d=v("button"),h=v("span"),h.textContent="Fields",m=O(),L&&L.c(),g=O(),y=v("button"),k=v("span"),k.textContent="API Rules",$=O(),F&&F.c(),M=O(),q&&q.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ne(d,"active",n[3]===gi),p(k,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),ne(y,"active",n[3]===ml),p(c,"class","tabs-header stretched")},m(U,re){S(U,e,re),_(e,i),S(U,s,re),I&&I.m(U,re),S(U,l,re),S(U,o,re),R(r,o,null),_(o,a),_(o,u),S(U,f,re),S(U,c,re),_(c,d),_(d,h),_(d,m),L&&L.m(d,null),_(c,g),_(c,y),_(y,k),_(y,$),F&&F.m(y,null),_(c,M),q&&q.m(c,null),T=!0,D||(E=[K(o,"submit",ut(n[25])),K(d,"click",n[26]),K(y,"click",n[27])],D=!0)},p(U,re){var Ne,Le,Fe,me,Se,we,We,ue;(!T||re[0]&4)&&t!==(t=U[2].isNew?"New collection":"Edit collection")&&ae(i,t),!U[2].isNew&&!U[2].system?I?(I.p(U,re),re[0]&4&&A(I,1)):(I=yd(U),I.c(),A(I,1),I.m(l.parentNode,l)):I&&(pe(),P(I,1,1,()=>{I=null}),he());const Re={};re[0]&4096&&(Re.class="form-field collection-field-name required m-b-0 "+(U[12]?"disabled":"")),re[0]&4164|re[1]&67584&&(Re.$$scope={dirty:re,ctx:U}),r.$set(Re),re[0]&32&&(b=!W.isEmpty((Ne=U[5])==null?void 0:Ne.schema)),b?L?(L.p(U,re),re[0]&32&&A(L,1)):(L=$d(U),L.c(),A(L,1),L.m(d,null)):L&&(pe(),P(L,1,1,()=>{L=null}),he()),(!T||re[0]&8)&&ne(d,"active",U[3]===gi),re[0]&32&&(C=!W.isEmpty((Le=U[5])==null?void 0:Le.listRule)||!W.isEmpty((Fe=U[5])==null?void 0:Fe.viewRule)||!W.isEmpty((me=U[5])==null?void 0:me.createRule)||!W.isEmpty((Se=U[5])==null?void 0:Se.updateRule)||!W.isEmpty((we=U[5])==null?void 0:we.deleteRule)||!W.isEmpty((ue=(We=U[5])==null?void 0:We.options)==null?void 0:ue.manageRule)),C?F?re[0]&32&&A(F,1):(F=Cd(),F.c(),A(F,1),F.m(y,null)):F&&(pe(),P(F,1,1,()=>{F=null}),he()),(!T||re[0]&8)&&ne(y,"active",U[3]===ml),U[2].isAuth?q?q.p(U,re):(q=Md(U),q.c(),q.m(c,null)):q&&(q.d(1),q=null)},i(U){T||(A(I),A(r.$$.fragment,U),A(L),A(F),T=!0)},o(U){P(I),P(r.$$.fragment,U),P(L),P(F),T=!1},d(U){U&&w(e),U&&w(s),I&&I.d(U),U&&w(l),U&&w(o),H(r),U&&w(f),U&&w(c),L&&L.d(),F&&F.d(),q&&q.d(),D=!1,Pe(E)}}}function R3(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=B(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[9],ne(s,"btn-loading",n[9])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=[K(e,"click",n[20]),K(s,"click",n[21])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ae(r,o),d[0]&2560&&a!==(a=!c[11]||c[9])&&(s.disabled=a),d[0]&512&&ne(s,"btn-loading",c[9])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function H3(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[32],$$slots:{footer:[R3],header:[F3],default:[I3]},$$scope:{ctx:n}};e=new Jn({props:l}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]);let o={};return i=new E3({props:o}),n[36](i),i.$on("confirm",n[37]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(r,a){R(e,r,a),S(r,t,a),R(i,r,a),s=!0},p(r,a){const u={};a[0]&1040&&(u.beforeHide=r[32]),a[0]&14956|a[1]&65536&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[33](null),H(e,r),r&&w(t),n[36](null),H(i,r)}}}const gi="fields",ml="api_rules",Ms="options",j3="base",Od="auth";function Sr(n){return JSON.stringify(n)}function q3(n,e,t){let i,s,l,o,r;Ze(n,wi,we=>t(5,r=we));const a={};a[j3]="Base",a[Od]="Auth";const u=It();let f,c,d=null,h=new Pn,m=!1,b=!1,g=gi,y=Sr(h);function k(we){t(3,g=we)}function $(we){return M(we),t(10,b=!0),k(gi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(we){Fn({}),typeof we<"u"?(d=we,t(2,h=we==null?void 0:we.clone())):(d=null,t(2,h=new Pn)),t(2,h.schema=h.schema||[],h),t(2,h.originalName=h.name||"",h),await Mn(),t(19,y=Sr(h))}function T(){if(h.isNew)return D();c==null||c.show(h)}function D(){if(m)return;t(9,m=!0);const we=E();let We;h.isNew?We=de.collections.create(we):We=de.collections.update(h.id,we),We.then(ue=>{t(10,b=!1),C(),Lt(h.isNew?"Successfully created collection.":"Successfully updated collection."),ES(ue),u("save",{isNew:h.isNew,collection:ue})}).catch(ue=>{de.errorResponseHandler(ue)}).finally(()=>{t(9,m=!1)})}function E(){const we=h.export();we.schema=we.schema.slice(0);for(let We=we.schema.length-1;We>=0;We--)we.schema[We].toDelete&&we.schema.splice(We,1);return we}function I(){!(d!=null&&d.id)||wn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>de.collections.delete(d==null?void 0:d.id).then(()=>{C(),Lt(`Successfully deleted collection "${d==null?void 0:d.name}".`),u("delete",d),IS(d)}).catch(we=>{de.errorResponseHandler(we)}))}function L(we){t(2,h.type=we,h),ks("schema")}const F=()=>C(),q=()=>T(),z=()=>I(),J=we=>{t(2,h.name=W.slugify(we.target.value),h),we.target.value=h.name},G=we=>L(we),X=()=>{o&&T()},Q=()=>k(gi),ie=()=>k(ml),Y=()=>k(Ms);function x(we){h=we,t(2,h)}function U(we){h=we,t(2,h)}function re(we){h=we,t(2,h)}const Re=()=>l&&b?(wn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,b=!1),C()}),!1):!0;function Ne(we){le[we?"unshift":"push"](()=>{f=we,t(7,f)})}function Le(we){Ve.call(this,n,we)}function Fe(we){Ve.call(this,n,we)}function me(we){le[we?"unshift":"push"](()=>{c=we,t(8,c)})}const Se=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&32&&t(13,i=typeof W.getNestedVal(r,"schema.message",null)=="string"?W.getNestedVal(r,"schema.message"):"Has errors"),n.$$.dirty[0]&4&&t(12,s=!h.isNew&&h.system),n.$$.dirty[0]&524292&&t(4,l=y!=Sr(h)),n.$$.dirty[0]&20&&t(11,o=h.isNew||l),n.$$.dirty[0]&12&&g===Ms&&h.type!==Od&&k(gi)},[k,C,h,g,l,r,a,f,c,m,b,o,s,i,T,D,I,L,$,y,F,q,z,J,G,X,Q,ie,Y,x,U,re,Re,Ne,Le,Fe,me,Se]}class Ja extends ye{constructor(e){super(),ve(this,e,q3,H3,be,{changeTab:0,show:18,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[18]}get hide(){return this.$$.ctx[1]}}function Dd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Ad(n){let e,t=n[1].length&&Ed();return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=Ed(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Ed(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Id(n,e){let t,i,s,l,o,r=e[14].name+"",a,u,f,c,d;return{key:n,first:null,c(){var h;t=v("a"),i=v("i"),l=O(),o=v("span"),a=B(r),u=O(),p(i,"class",s=W.getCollectionTypeIcon(e[14].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[14].id),p(t,"class","sidebar-list-item"),ne(t,"active",((h=e[5])==null?void 0:h.id)===e[14].id),this.first=t},m(h,m){S(h,t,m),_(t,i),_(t,l),_(t,o),_(o,a),_(t,u),c||(d=Ee(Bt.call(null,t)),c=!0)},p(h,m){var b;e=h,m&8&&s!==(s=W.getCollectionTypeIcon(e[14].type))&&p(i,"class",s),m&8&&r!==(r=e[14].name+"")&&ae(a,r),m&8&&f!==(f="/collections?collectionId="+e[14].id)&&p(t,"href",f),m&40&&ne(t,"active",((b=e[5])==null?void 0:b.id)===e[14].id)},d(h){h&&w(t),c=!1,d()}}}function Pd(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` - New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",n[11]),i=!0)},p:te,d(l){l&&w(e),i=!1,s()}}}function V3(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],h=new Map,m,b,g,y,k,$,C=n[3];const M=I=>I[14].id;for(let I=0;I',o=O(),r=v("input"),a=O(),u=v("hr"),f=O(),c=v("div");for(let I=0;I20),p(e,"class","page-sidebar collection-sidebar")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),ce(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let F=0;F20),I[6]?D&&(D.d(1),D=null):D?D.p(I,L):(D=Pd(I),D.c(),D.m(e,null));const F={};g.$set(F)},i(I){y||(A(g.$$.fragment,I),y=!0)},o(I){P(g.$$.fragment,I),y=!1},d(I){I&&w(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function B3(n,e,t){let i,s,l,o,r,a;Ze(n,Bn,y=>t(5,o=y)),Ze(n,Zi,y=>t(8,r=y)),Ze(n,ws,y=>t(6,a=y));let u,f="";function c(y){Ht(Bn,o=y,o)}const d=()=>t(0,f="");function h(){f=this.value,t(0,f)}const m=()=>u==null?void 0:u.show();function b(y){le[y?"unshift":"push"](()=>{u=y,t(2,u)})}const g=y=>{var k;((k=y.detail)==null?void 0:k.isNew)&&y.detail.collection&&c(y.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=f.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=f!==""),n.$$.dirty&259&&t(3,l=r.filter(y=>y.id==f||y.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&256&&r&&z3()},[f,i,u,l,s,o,a,c,r,d,h,m,b,g]}class U3 extends ye{constructor(e){super(),ve(this,e,B3,V3,be,{})}}function Ld(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Nd(n){n[18]=n[19].default}function Fd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Rd(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Hd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Rd();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Ae(),c&&c.c(),s=O(),l=v("button"),r=B(o),a=O(),p(l,"type","button"),p(l,"class","sidebar-item"),ne(l,"active",e[5]===e[14]),this.first=t},m(h,m){S(h,t,m),c&&c.m(h,m),S(h,s,m),S(h,l,m),_(l,r),_(l,a),u||(f=K(l,"click",d),u=!0)},p(h,m){e=h,m&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Rd(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),m&8&&o!==(o=e[15].label+"")&&ae(r,o),m&40&&ne(l,"active",e[5]===e[14])},d(h){h&&w(t),c&&c.d(h),h&&w(s),h&&w(l),u=!1,f()}}}function jd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:K3,then:Y3,catch:W3,value:19,blocks:[,,,]};return xa(t=n[15].component,s),{c(){e=Ae(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&xa(t,s)||u0(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function W3(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function Y3(n){Nd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){j(e.$$.fragment),t=O()},m(s,l){R(e,s,l),S(s,t,l),i=!0},p(s,l){Nd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&w(t)}}}function K3(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function qd(n,e){let t,i,s,l=e[5]===e[14]&&jd(e);return{key:n,first:null,c(){t=Ae(),l&&l.c(),i=Ae(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=jd(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function J3(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=b=>b[14];for(let b=0;bb[14];for(let b=0;bClose',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function G3(n){let e,t,i={class:"docs-panel",$$slots:{footer:[Z3],default:[J3]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function X3(n,e,t){const i={list:{label:"List/Search",component:st(()=>import("./ListApiDocs.2462c379.js"),["./ListApiDocs.2462c379.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css","./ListApiDocs.68f52edd.css"],import.meta.url)},view:{label:"View",component:st(()=>import("./ViewApiDocs.04348b73.js"),["./ViewApiDocs.04348b73.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:st(()=>import("./CreateApiDocs.73fcce8d.js"),["./CreateApiDocs.73fcce8d.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:st(()=>import("./UpdateApiDocs.fa905f85.js"),["./UpdateApiDocs.fa905f85.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:st(()=>import("./DeleteApiDocs.897705d4.js"),["./DeleteApiDocs.897705d4.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:st(()=>import("./RealtimeApiDocs.cfc0059e.js"),["./RealtimeApiDocs.cfc0059e.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:st(()=>import("./AuthWithPasswordDocs.e5c37e44.js"),["./AuthWithPasswordDocs.e5c37e44.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:st(()=>import("./AuthWithOAuth2Docs.6075be31.js"),["./AuthWithOAuth2Docs.6075be31.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:st(()=>import("./AuthRefreshDocs.5e592318.js"),["./AuthRefreshDocs.5e592318.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:st(()=>import("./RequestVerificationDocs.9e1a7b04.js"),["./RequestVerificationDocs.9e1a7b04.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:st(()=>import("./ConfirmVerificationDocs.e5345b01.js"),["./ConfirmVerificationDocs.e5345b01.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:st(()=>import("./RequestPasswordResetDocs.5dfa24eb.js"),["./RequestPasswordResetDocs.5dfa24eb.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:st(()=>import("./ConfirmPasswordResetDocs.d539b4c2.js"),["./ConfirmPasswordResetDocs.d539b4c2.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:st(()=>import("./RequestEmailChangeDocs.c902168f.js"),["./RequestEmailChangeDocs.c902168f.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:st(()=>import("./ConfirmEmailChangeDocs.f7cb3c2a.js"),["./ConfirmEmailChangeDocs.f7cb3c2a.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:st(()=>import("./AuthMethodsDocs.91bd4123.js"),["./AuthMethodsDocs.91bd4123.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:st(()=>import("./ListExternalAuthsDocs.a160e1ab.js"),["./ListExternalAuthsDocs.a160e1ab.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:st(()=>import("./UnlinkExternalAuthDocs.3a64cb9b.js"),["./UnlinkExternalAuthDocs.3a64cb9b.js","./SdkTabs.af9891cd.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}};let l,o=new Pn,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){le[y?"unshift":"push"](()=>{l=y,t(4,l)})}function b(y){Ve.call(this,n,y)}function g(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,h,m,b,g]}class Q3 extends ye{constructor(e){super(),ve(this,e,X3,G3,be,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function x3(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Username",o=O(),r=v("input"),p(t,"class",W.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(h,m){S(h,e,m),_(e,t),_(e,i),_(e,s),S(h,o,m),S(h,r,m),ce(r,n[0].username),c||(d=K(r,"input",n[4]),c=!0)},p(h,m){m&4096&&l!==(l=h[12])&&p(e,"for",l),m&1&&a!==(a=!h[0].isNew)&&p(r,"requried",a),m&1&&u!==(u=h[0].isNew?"Leave empty to auto generate...":h[3])&&p(r,"placeholder",u),m&4096&&f!==(f=h[12])&&p(r,"id",f),m&1&&r.value!==h[0].username&&ce(r,h[0].username)},d(h){h&&w(e),h&&w(o),h&&w(r),c=!1,d()}}}function e4(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,h,m,b,g,y,k,$,C;return{c(){var M;e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("div"),a=v("button"),u=v("span"),f=B("Public: "),d=B(c),m=O(),b=v("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",h="btn btn-sm btn-secondary "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(b,"type","email"),b.autofocus=g=n[0].isNew,p(b,"autocomplete","off"),p(b,"id",y=n[12]),b.required=k=(M=n[1].options)==null?void 0:M.requireEmail,p(b,"class","svelte-1751a4d")},m(M,T){S(M,e,T),_(e,t),_(e,i),_(e,s),S(M,o,T),S(M,r,T),_(r,a),_(a,u),_(u,f),_(u,d),S(M,m,T),S(M,b,T),ce(b,n[0].email),n[0].isNew&&b.focus(),$||(C=[Ee(Be.call(null,a,{text:"Make email public or private",position:"top-right"})),K(a,"click",n[5]),K(b,"input",n[6])],$=!0)},p(M,T){var D;T&4096&&l!==(l=M[12])&&p(e,"for",l),T&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&ae(d,c),T&1&&h!==(h="btn btn-sm btn-secondary "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",h),T&1&&g!==(g=M[0].isNew)&&(b.autofocus=g),T&4096&&y!==(y=M[12])&&p(b,"id",y),T&2&&k!==(k=(D=M[1].options)==null?void 0:D.requireEmail)&&(b.required=k),T&1&&b.value!==M[0].email&&ce(b,M[0].email)},d(M){M&&w(e),M&&w(o),M&&w(r),M&&w(m),M&&w(b),$=!1,Pe(C)}}}function Vd(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[t4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function t4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function zd(n){let e,t,i,s,l,o,r,a,u;return s=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[n4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[i4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),ne(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){S(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c&12289&&(h.$$scope={dirty:c,ctx:f}),r.$set(h),(!u||c&4)&&ne(t,"p-t-xs",f[2])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&xe(()=>{a||(a=je(e,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=je(e,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function n4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].password),u||(f=K(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&ce(r,c[0].password)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function i4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].passwordConfirm),u||(f=K(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&ce(r,c[0].passwordConfirm)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function s4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"change",n[10]),K(e,"change",ut(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Pe(a)}}}function l4(n){var g;let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new ge({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[x3,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+((g=n[1].options)!=null&&g.requireEmail?"required":""),name:"email",$$slots:{default:[e4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}});let m=!n[0].isNew&&Vd(n),b=(n[0].isNew||n[2])&&zd(n);return d=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[s4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),m&&m.c(),u=O(),b&&b.c(),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,k){S(y,e,k),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),m&&m.m(a,null),_(a,u),b&&b.m(a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(y,[k]){var T;const $={};k&1&&($.class="form-field "+(y[0].isNew?"":"required")),k&12289&&($.$$scope={dirty:k,ctx:y}),i.$set($);const C={};k&2&&(C.class="form-field "+((T=y[1].options)!=null&&T.requireEmail?"required":"")),k&12291&&(C.$$scope={dirty:k,ctx:y}),o.$set(C),y[0].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),he()):m?(m.p(y,k),k&1&&A(m,1)):(m=Vd(y),m.c(),A(m,1),m.m(a,u)),y[0].isNew||y[2]?b?(b.p(y,k),k&5&&A(b,1)):(b=zd(y),b.c(),A(b,1),b.m(a,null)):b&&(pe(),P(b,1,1,()=>{b=null}),he());const M={};k&12289&&(M.$$scope={dirty:k,ctx:y}),d.$set(M)},i(y){h||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(m),A(b),A(d.$$.fragment,y),h=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(m),P(b),P(d.$$.fragment,y),h=!1},d(y){y&&w(e),H(i),H(o),m&&m.d(),b&&b.d(),H(d)}}}function o4(n,e,t){let{collection:i=new Pn}=e,{record:s=new Wi}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function h(){s.verified=this.checked,t(0,s),t(2,o)}const m=b=>{s.isNew||wn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!b.target.checked,s)})};return n.$$set=b=>{"collection"in b&&t(1,i=b.collection),"record"in b&&t(0,s=b.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),ks("password"),ks("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,h,m]}class r4 extends ye{constructor(e){super(),ve(this,e,o4,l4,be,{collection:1,record:0})}}function a4(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)){h.preventDefault();const m=r.closest("form");m!=null&&m.requestSubmit&&m.requestSubmit()}}cn(()=>(u(),()=>clearTimeout(a)));function c(h){le[h?"unshift":"push"](()=>{r=h,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ke(Ke({},e),Wn(h)),t(3,s=wt(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 f4 extends ye{constructor(e){super(),ve(this,e,u4,a4,be,{value:0,maxHeight:4})}}function c4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(b){n[2](b)}let m={id:n[3],required:n[1].required};return n[0]!==void 0&&(m.value=n[0]),f=new f4({props:m}),le.push(()=>_e(f,"value",h)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),R(f,b,g),d=!0},p(b,g){(!d||g&2&&i!==(i=W.getFieldTypeIcon(b[1].type)))&&p(t,"class",i),(!d||g&2)&&o!==(o=b[1].name+"")&&ae(r,o),(!d||g&8&&a!==(a=b[3]))&&p(e,"for",a);const y={};g&8&&(y.id=b[3]),g&2&&(y.required=b[1].required),!c&&g&1&&(c=!0,y.value=b[0],ke(()=>c=!1)),f.$set(y)},i(b){d||(A(f.$$.fragment,b),d=!0)},o(b){P(f.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(u),H(f,b)}}}function d4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[c4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function p4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class h4 extends ye{constructor(e){super(),ve(this,e,p4,d4,be,{field:1,value:0})}}function m4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,b,g;return{c(){var y,k;e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.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=(k=n[1].options)==null?void 0:k.max),p(f,"step","any")},m(y,k){S(y,e,k),_(e,t),_(e,s),_(e,l),_(l,r),S(y,u,k),S(y,f,k),ce(f,n[0]),b||(g=K(f,"input",n[2]),b=!0)},p(y,k){var $,C;k&2&&i!==(i=W.getFieldTypeIcon(y[1].type))&&p(t,"class",i),k&2&&o!==(o=y[1].name+"")&&ae(r,o),k&8&&a!==(a=y[3])&&p(e,"for",a),k&8&&c!==(c=y[3])&&p(f,"id",c),k&2&&d!==(d=y[1].required)&&(f.required=d),k&2&&h!==(h=($=y[1].options)==null?void 0:$.min)&&p(f,"min",h),k&2&&m!==(m=(C=y[1].options)==null?void 0:C.max)&&p(f,"max",m),k&1&&rt(f.value)!==y[0]&&ce(f,y[0])},d(y){y&&w(e),y&&w(u),y&&w(f),b=!1,g()}}}function g4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[m4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function _4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=rt(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 b4 extends ye{constructor(e){super(),ve(this,e,_4,g4,be,{field:1,value:0})}}function v4(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=O(),s=v("label"),o=B(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){S(f,e,c),e.checked=n[0],S(f,i,c),S(f,s,c),_(s,o),a||(u=K(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&ae(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function y4(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:[v4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function k4(n,e,t){let{field:i=new dn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class w4 extends ye{constructor(e){super(),ve(this,e,k4,y4,be,{field:1,value:0})}}function S4(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=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.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(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=W.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ae(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&f.value!==b[0]&&ce(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function $4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[S4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function C4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class M4 extends ye{constructor(e){super(),ve(this,e,C4,$4,be,{field:1,value:0})}}function T4(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=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.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(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=W.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ae(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&ce(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function O4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[T4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function D4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class A4 extends ye{constructor(e){super(),ve(this,e,D4,O4,be,{field:1,value:0})}}function E4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h;function m(g){n[2](g)}let b={id:n[3],options:W.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(b.formattedValue=n[0]),c=new Ka({props:b}),le.push(()=>_e(c,"formattedValue",m)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),a=B(" (UTC)"),f=O(),j(c.$$.fragment),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",u=n[3])},m(g,y){S(g,e,y),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),S(g,f,y),R(c,g,y),h=!0},p(g,y){(!h||y&2&&i!==(i=W.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!h||y&2)&&o!==(o=g[1].name+"")&&ae(r,o),(!h||y&8&&u!==(u=g[3]))&&p(e,"for",u);const k={};y&8&&(k.id=g[3]),y&1&&(k.value=g[0]),!d&&y&1&&(d=!0,k.formattedValue=g[0],ke(()=>d=!1)),c.$set(k)},i(g){h||(A(c.$$.fragment,g),h=!0)},o(g){P(c.$$.fragment,g),h=!1},d(g){g&&w(e),g&&w(f),H(c,g)}}}function I4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[E4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function P4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19))},[s,i,l]}class L4 extends ye{constructor(e){super(),ve(this,e,P4,I4,be,{field:1,value:0})}}function Bd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&ae(s,i)},d(o){o&&w(e)}}}function N4(n){var k,$,C;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function b(M){n[3](M)}let g={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(k=n[1].options)==null?void 0:k.values,searchable:(($=n[1].options)==null?void 0:$.values)>5};n[0]!==void 0&&(g.selected=n[0]),f=new N_({props:g}),le.push(()=>_e(f,"selected",b));let y=((C=n[1].options)==null?void 0:C.maxSelect)>1&&Bd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Ae(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,T){S(M,e,T),_(e,t),_(e,s),_(e,l),_(l,r),S(M,u,T),R(f,M,T),S(M,d,T),y&&y.m(M,T),S(M,h,T),m=!0},p(M,T){var E,I,L;(!m||T&2&&i!==(i=W.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!m||T&2)&&o!==(o=M[1].name+"")&&ae(r,o),(!m||T&16&&a!==(a=M[4]))&&p(e,"for",a);const D={};T&16&&(D.id=M[4]),T&6&&(D.toggle=!M[1].required||M[2]),T&4&&(D.multiple=M[2]),T&2&&(D.items=(E=M[1].options)==null?void 0:E.values),T&2&&(D.searchable=((I=M[1].options)==null?void 0:I.values)>5),!c&&T&1&&(c=!0,D.selected=M[0],ke(()=>c=!1)),f.$set(D),((L=M[1].options)==null?void 0:L.maxSelect)>1?y?y.p(M,T):(y=Bd(M),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(M){m||(A(f.$$.fragment,M),m=!0)},o(M){P(f.$$.fragment,M),m=!1},d(M){M&&w(e),M&&w(u),H(f,M),M&&w(d),y&&y.d(M),M&&w(h)}}}function F4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[N4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function R4(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class H4 extends ye{constructor(e){super(),ve(this,e,R4,F4,be,{field:1,value:0})}}function j4(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=O(),l=v("span"),r=B(o),u=O(),f=v("textarea"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono")},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=W.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ae(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&ce(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function q4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[j4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function V4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class z4 extends ye{constructor(e){super(),ve(this,e,V4,q4,be,{field:1,value:0})}}function B4(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&w(e)}}}function U4(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&w(e)}}}function W4(n){let e;function t(l,o){return l[2]?U4:B4}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function Y4(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),W.hasImageExtension(s==null?void 0:s.name)&&W.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class K4 extends ye{constructor(e){super(),ve(this,e,Y4,W4,be,{file:0,size:1})}}function J4(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&w(e)}}}function Z4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",ut(n[0])),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function G4(n){let e,t=n[2].substring(n[2].lastIndexOf("/")+1)+"",i,s,l,o,r,a,u;return{c(){e=v("a"),i=B(t),s=O(),l=v("div"),o=O(),r=v("button"),r.textContent="Close",p(e,"href",n[2]),p(e,"title","Download"),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis"),p(l,"class","flex-fill"),p(r,"type","button"),p(r,"class","btn btn-secondary")},m(f,c){S(f,e,c),_(e,i),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=K(r,"click",n[0]),a=!0)},p(f,c){c&4&&t!==(t=f[2].substring(f[2].lastIndexOf("/")+1)+"")&&ae(i,t),c&4&&p(e,"href",f[2])},d(f){f&&w(e),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,u()}}}function X4(n){let e,t,i={class:"image-preview",btnClose:!1,popup:!0,$$slots:{footer:[G4],header:[Z4],default:[J4]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&132&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[4](null),H(e,s)}}}function Q4(n,e,t){let i,s="";function l(f){f!==""&&(t(2,s=f),i==null||i.show())}function o(){return i==null?void 0:i.hide()}function r(f){le[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){Ve.call(this,n,f)}function u(f){Ve.call(this,n,f)}return[o,i,s,l,r,a,u]}class x4 extends ye{constructor(e){super(),ve(this,e,Q4,X4,be,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function eM(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-line")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function tM(n){let e,t,i,s,l;return{c(){e=v("img"),Ln(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),ne(e,"link-fade",n[2])},m(o,r){S(o,e,r),s||(l=[K(e,"click",n[7]),K(e,"error",n[5])],s=!0)},p(o,r){r&16&&!Ln(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i),r&4&&ne(e,"link-fade",o[2])},d(o){o&&w(e),s=!1,Pe(l)}}}function nM(n){let e,t,i;function s(a,u){return a[2]?tM:eM}let l=s(n),o=l(n),r={};return t=new x4({props:r}),n[8](t),{c(){o.c(),e=O(),j(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),R(t,a,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)));const f={};t.$set(f)},i(a){i||(A(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[8](null),H(t,a)}}}function iM(n,e,t){let i,{record:s}=e,{filename:l}=e,o,r="",a="";function u(){t(4,r="")}const f=d=>{d.stopPropagation(),o==null||o.show(a)};function c(d){le[d?"unshift":"push"](()=>{o=d,t(3,o)})}return n.$$set=d=>{"record"in d&&t(6,s=d.record),"filename"in d&&t(0,l=d.filename)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=W.hasImageExtension(l)),n.$$.dirty&69&&i&&t(1,a=de.getFileUrl(s,`${l}`)),n.$$.dirty&2&&t(4,r=a?a+"?thumb=100x100":"")},[l,a,i,o,r,u,s,f,c]}class j_ extends ye{constructor(e){super(),ve(this,e,iM,nM,be,{record:6,filename:0})}}function Ud(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function Wd(n,e,t){const i=n.slice();return i[25]=e[t],i[24]=t,i}function sM(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,o){S(l,e,o),t||(i=[Ee(Be.call(null,e,"Remove file")),K(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Pe(i)}}}function lM(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,o){S(l,e,o),t||(i=K(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Yd(n,e){let t,i,s,l,o,r=e[25]+"",a,u,f,c,d,h,m;s=new j_({props:{record:e[2],filename:e[25]}});function b(k,$){return $&18&&(c=null),c==null&&(c=!!k[1].includes(k[24])),c?lM:sM}let g=b(e,-1),y=g(e);return{key:n,first:null,c(){t=v("div"),i=v("figure"),j(s.$$.fragment),l=O(),o=v("a"),a=B(r),f=O(),y.c(),p(i,"class","thumb"),ne(i,"fade",e[1].includes(e[24])),p(o,"href",u=de.getFileUrl(e[2],e[25])),p(o,"class","filename link-hint"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),ne(o,"txt-strikethrough",e[1].includes(e[24])),p(t,"class","list-item"),this.first=t},m(k,$){S(k,t,$),_(t,i),R(s,i,null),_(t,l),_(t,o),_(o,a),_(t,f),y.m(t,null),d=!0,h||(m=Ee(Be.call(null,o,{position:"right",text:"Download"})),h=!0)},p(k,$){e=k;const C={};$&4&&(C.record=e[2]),$&16&&(C.filename=e[25]),s.$set(C),(!d||$&18)&&ne(i,"fade",e[1].includes(e[24])),(!d||$&16)&&r!==(r=e[25]+"")&&ae(a,r),(!d||$&20&&u!==(u=de.getFileUrl(e[2],e[25])))&&p(o,"href",u),(!d||$&18)&&ne(o,"txt-strikethrough",e[1].includes(e[24])),g===(g=b(e,$))&&y?y.p(e,$):(y.d(1),y=g(e),y&&(y.c(),y.m(t,null)))},i(k){d||(A(s.$$.fragment,k),d=!0)},o(k){P(s.$$.fragment,k),d=!1},d(k){k&&w(t),H(s),y.d(),h=!1,m()}}}function Kd(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,h,m,b,g;i=new K4({props:{file:n[22]}});function y(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),j(i.$$.fragment),s=O(),l=v("div"),o=v("small"),o.textContent="New",r=O(),a=v("span"),f=B(u),d=O(),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"),p(l,"title",c=n[22].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(k,$){S(k,e,$),_(e,t),R(i,t,null),_(e,s),_(e,l),_(l,o),_(l,r),_(l,a),_(a,f),_(e,d),_(e,h),m=!0,b||(g=[Ee(Be.call(null,h,"Remove file")),K(h,"click",y)],b=!0)},p(k,$){n=k;const C={};$&1&&(C.file=n[22]),i.$set(C),(!m||$&1)&&u!==(u=n[22].name+"")&&ae(f,u),(!m||$&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(k){m||(A(i.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),m=!1},d(k){k&&w(e),H(i),b=!1,Pe(g)}}}function Jd(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=O(),s=v("button"),s.innerHTML=` + New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",n[11]),i=!0)},p:te,d(l){l&&w(e),i=!1,s()}}}function V3(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],h=new Map,m,b,g,y,k,$,C=n[3];const M=I=>I[14].id;for(let I=0;I',o=O(),r=v("input"),a=O(),u=v("hr"),f=O(),c=v("div");for(let I=0;I20),p(e,"class","page-sidebar collection-sidebar")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),ce(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let F=0;F20),I[6]?D&&(D.d(1),D=null):D?D.p(I,L):(D=Pd(I),D.c(),D.m(e,null));const F={};g.$set(F)},i(I){y||(A(g.$$.fragment,I),y=!0)},o(I){P(g.$$.fragment,I),y=!1},d(I){I&&w(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function B3(n,e,t){let i,s,l,o,r,a;Ze(n,Bn,y=>t(5,o=y)),Ze(n,Zi,y=>t(8,r=y)),Ze(n,ws,y=>t(6,a=y));let u,f="";function c(y){Ht(Bn,o=y,o)}const d=()=>t(0,f="");function h(){f=this.value,t(0,f)}const m=()=>u==null?void 0:u.show();function b(y){le[y?"unshift":"push"](()=>{u=y,t(2,u)})}const g=y=>{var k;((k=y.detail)==null?void 0:k.isNew)&&y.detail.collection&&c(y.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=f.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=f!==""),n.$$.dirty&259&&t(3,l=r.filter(y=>y.id==f||y.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&256&&r&&z3()},[f,i,u,l,s,o,a,c,r,d,h,m,b,g]}class U3 extends ye{constructor(e){super(),ve(this,e,B3,V3,be,{})}}function Ld(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Nd(n){n[18]=n[19].default}function Fd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Rd(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Hd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Rd();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Ae(),c&&c.c(),s=O(),l=v("button"),r=B(o),a=O(),p(l,"type","button"),p(l,"class","sidebar-item"),ne(l,"active",e[5]===e[14]),this.first=t},m(h,m){S(h,t,m),c&&c.m(h,m),S(h,s,m),S(h,l,m),_(l,r),_(l,a),u||(f=K(l,"click",d),u=!0)},p(h,m){e=h,m&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Rd(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),m&8&&o!==(o=e[15].label+"")&&ae(r,o),m&40&&ne(l,"active",e[5]===e[14])},d(h){h&&w(t),c&&c.d(h),h&&w(s),h&&w(l),u=!1,f()}}}function jd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:K3,then:Y3,catch:W3,value:19,blocks:[,,,]};return xa(t=n[15].component,s),{c(){e=Ae(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&xa(t,s)||u0(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function W3(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function Y3(n){Nd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){j(e.$$.fragment),t=O()},m(s,l){R(e,s,l),S(s,t,l),i=!0},p(s,l){Nd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&w(t)}}}function K3(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function qd(n,e){let t,i,s,l=e[5]===e[14]&&jd(e);return{key:n,first:null,c(){t=Ae(),l&&l.c(),i=Ae(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=jd(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(A(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function J3(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=b=>b[14];for(let b=0;bb[14];for(let b=0;bClose',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function G3(n){let e,t,i={class:"docs-panel",$$slots:{footer:[Z3],default:[J3]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function X3(n,e,t){const i={list:{label:"List/Search",component:st(()=>import("./ListApiDocs.de213c92.js"),["./ListApiDocs.de213c92.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css","./ListApiDocs.68f52edd.css"],import.meta.url)},view:{label:"View",component:st(()=>import("./ViewApiDocs.283f7433.js"),["./ViewApiDocs.283f7433.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:st(()=>import("./CreateApiDocs.476c4e78.js"),["./CreateApiDocs.476c4e78.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:st(()=>import("./UpdateApiDocs.915abddf.js"),["./UpdateApiDocs.915abddf.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:st(()=>import("./DeleteApiDocs.aff484d3.js"),["./DeleteApiDocs.aff484d3.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:st(()=>import("./RealtimeApiDocs.f9f04d5f.js"),["./RealtimeApiDocs.f9f04d5f.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:st(()=>import("./AuthWithPasswordDocs.67606692.js"),["./AuthWithPasswordDocs.67606692.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:st(()=>import("./AuthWithOAuth2Docs.ade12b1d.js"),["./AuthWithOAuth2Docs.ade12b1d.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:st(()=>import("./AuthRefreshDocs.3fc44b55.js"),["./AuthRefreshDocs.3fc44b55.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:st(()=>import("./RequestVerificationDocs.9cdd467c.js"),["./RequestVerificationDocs.9cdd467c.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:st(()=>import("./ConfirmVerificationDocs.72bb2bc9.js"),["./ConfirmVerificationDocs.72bb2bc9.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:st(()=>import("./RequestPasswordResetDocs.9d7773f1.js"),["./RequestPasswordResetDocs.9d7773f1.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:st(()=>import("./ConfirmPasswordResetDocs.b11f6237.js"),["./ConfirmPasswordResetDocs.b11f6237.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:st(()=>import("./RequestEmailChangeDocs.226d2d46.js"),["./RequestEmailChangeDocs.226d2d46.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:st(()=>import("./ConfirmEmailChangeDocs.831201b5.js"),["./ConfirmEmailChangeDocs.831201b5.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:st(()=>import("./AuthMethodsDocs.e9abbcf9.js"),["./AuthMethodsDocs.e9abbcf9.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:st(()=>import("./ListExternalAuthsDocs.3f25886a.js"),["./ListExternalAuthsDocs.3f25886a.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:st(()=>import("./UnlinkExternalAuthDocs.6b315273.js"),["./UnlinkExternalAuthDocs.6b315273.js","./SdkTabs.22a960f8.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}};let l,o=new Pn,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){le[y?"unshift":"push"](()=>{l=y,t(4,l)})}function b(y){Ve.call(this,n,y)}function g(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,h,m,b,g]}class Q3 extends ye{constructor(e){super(),ve(this,e,X3,G3,be,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function x3(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Username",o=O(),r=v("input"),p(t,"class",W.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(h,m){S(h,e,m),_(e,t),_(e,i),_(e,s),S(h,o,m),S(h,r,m),ce(r,n[0].username),c||(d=K(r,"input",n[4]),c=!0)},p(h,m){m&4096&&l!==(l=h[12])&&p(e,"for",l),m&1&&a!==(a=!h[0].isNew)&&p(r,"requried",a),m&1&&u!==(u=h[0].isNew?"Leave empty to auto generate...":h[3])&&p(r,"placeholder",u),m&4096&&f!==(f=h[12])&&p(r,"id",f),m&1&&r.value!==h[0].username&&ce(r,h[0].username)},d(h){h&&w(e),h&&w(o),h&&w(r),c=!1,d()}}}function e4(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,h,m,b,g,y,k,$,C;return{c(){var M;e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("div"),a=v("button"),u=v("span"),f=B("Public: "),d=B(c),m=O(),b=v("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",h="btn btn-sm btn-secondary "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(b,"type","email"),b.autofocus=g=n[0].isNew,p(b,"autocomplete","off"),p(b,"id",y=n[12]),b.required=k=(M=n[1].options)==null?void 0:M.requireEmail,p(b,"class","svelte-1751a4d")},m(M,T){S(M,e,T),_(e,t),_(e,i),_(e,s),S(M,o,T),S(M,r,T),_(r,a),_(a,u),_(u,f),_(u,d),S(M,m,T),S(M,b,T),ce(b,n[0].email),n[0].isNew&&b.focus(),$||(C=[Ee(Be.call(null,a,{text:"Make email public or private",position:"top-right"})),K(a,"click",n[5]),K(b,"input",n[6])],$=!0)},p(M,T){var D;T&4096&&l!==(l=M[12])&&p(e,"for",l),T&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&ae(d,c),T&1&&h!==(h="btn btn-sm btn-secondary "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",h),T&1&&g!==(g=M[0].isNew)&&(b.autofocus=g),T&4096&&y!==(y=M[12])&&p(b,"id",y),T&2&&k!==(k=(D=M[1].options)==null?void 0:D.requireEmail)&&(b.required=k),T&1&&b.value!==M[0].email&&ce(b,M[0].email)},d(M){M&&w(e),M&&w(o),M&&w(r),M&&w(m),M&&w(b),$=!1,Pe(C)}}}function Vd(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[t4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function t4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function zd(n){let e,t,i,s,l,o,r,a,u;return s=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[n4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[i4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),ne(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){S(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c&12289&&(h.$$scope={dirty:c,ctx:f}),r.$set(h),(!u||c&4)&&ne(t,"p-t-xs",f[2])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&xe(()=>{a||(a=je(e,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=je(e,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function n4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].password),u||(f=K(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&ce(r,c[0].password)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function i4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].passwordConfirm),u||(f=K(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&ce(r,c[0].passwordConfirm)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function s4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"change",n[10]),K(e,"change",ut(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Pe(a)}}}function l4(n){var g;let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new ge({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[x3,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+((g=n[1].options)!=null&&g.requireEmail?"required":""),name:"email",$$slots:{default:[e4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}});let m=!n[0].isNew&&Vd(n),b=(n[0].isNew||n[2])&&zd(n);return d=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[s4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),m&&m.c(),u=O(),b&&b.c(),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,k){S(y,e,k),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),m&&m.m(a,null),_(a,u),b&&b.m(a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(y,[k]){var T;const $={};k&1&&($.class="form-field "+(y[0].isNew?"":"required")),k&12289&&($.$$scope={dirty:k,ctx:y}),i.$set($);const C={};k&2&&(C.class="form-field "+((T=y[1].options)!=null&&T.requireEmail?"required":"")),k&12291&&(C.$$scope={dirty:k,ctx:y}),o.$set(C),y[0].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),he()):m?(m.p(y,k),k&1&&A(m,1)):(m=Vd(y),m.c(),A(m,1),m.m(a,u)),y[0].isNew||y[2]?b?(b.p(y,k),k&5&&A(b,1)):(b=zd(y),b.c(),A(b,1),b.m(a,null)):b&&(pe(),P(b,1,1,()=>{b=null}),he());const M={};k&12289&&(M.$$scope={dirty:k,ctx:y}),d.$set(M)},i(y){h||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(m),A(b),A(d.$$.fragment,y),h=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(m),P(b),P(d.$$.fragment,y),h=!1},d(y){y&&w(e),H(i),H(o),m&&m.d(),b&&b.d(),H(d)}}}function o4(n,e,t){let{collection:i=new Pn}=e,{record:s=new Wi}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function h(){s.verified=this.checked,t(0,s),t(2,o)}const m=b=>{s.isNew||wn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!b.target.checked,s)})};return n.$$set=b=>{"collection"in b&&t(1,i=b.collection),"record"in b&&t(0,s=b.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),ks("password"),ks("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,h,m]}class r4 extends ye{constructor(e){super(),ve(this,e,o4,l4,be,{collection:1,record:0})}}function a4(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)){h.preventDefault();const m=r.closest("form");m!=null&&m.requestSubmit&&m.requestSubmit()}}cn(()=>(u(),()=>clearTimeout(a)));function c(h){le[h?"unshift":"push"](()=>{r=h,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ke(Ke({},e),Wn(h)),t(3,s=wt(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 f4 extends ye{constructor(e){super(),ve(this,e,u4,a4,be,{value:0,maxHeight:4})}}function c4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(b){n[2](b)}let m={id:n[3],required:n[1].required};return n[0]!==void 0&&(m.value=n[0]),f=new f4({props:m}),le.push(()=>_e(f,"value",h)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),R(f,b,g),d=!0},p(b,g){(!d||g&2&&i!==(i=W.getFieldTypeIcon(b[1].type)))&&p(t,"class",i),(!d||g&2)&&o!==(o=b[1].name+"")&&ae(r,o),(!d||g&8&&a!==(a=b[3]))&&p(e,"for",a);const y={};g&8&&(y.id=b[3]),g&2&&(y.required=b[1].required),!c&&g&1&&(c=!0,y.value=b[0],ke(()=>c=!1)),f.$set(y)},i(b){d||(A(f.$$.fragment,b),d=!0)},o(b){P(f.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(u),H(f,b)}}}function d4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[c4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function p4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class h4 extends ye{constructor(e){super(),ve(this,e,p4,d4,be,{field:1,value:0})}}function m4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,b,g;return{c(){var y,k;e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.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=(k=n[1].options)==null?void 0:k.max),p(f,"step","any")},m(y,k){S(y,e,k),_(e,t),_(e,s),_(e,l),_(l,r),S(y,u,k),S(y,f,k),ce(f,n[0]),b||(g=K(f,"input",n[2]),b=!0)},p(y,k){var $,C;k&2&&i!==(i=W.getFieldTypeIcon(y[1].type))&&p(t,"class",i),k&2&&o!==(o=y[1].name+"")&&ae(r,o),k&8&&a!==(a=y[3])&&p(e,"for",a),k&8&&c!==(c=y[3])&&p(f,"id",c),k&2&&d!==(d=y[1].required)&&(f.required=d),k&2&&h!==(h=($=y[1].options)==null?void 0:$.min)&&p(f,"min",h),k&2&&m!==(m=(C=y[1].options)==null?void 0:C.max)&&p(f,"max",m),k&1&&rt(f.value)!==y[0]&&ce(f,y[0])},d(y){y&&w(e),y&&w(u),y&&w(f),b=!1,g()}}}function g4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[m4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function _4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=rt(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 b4 extends ye{constructor(e){super(),ve(this,e,_4,g4,be,{field:1,value:0})}}function v4(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=O(),s=v("label"),o=B(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){S(f,e,c),e.checked=n[0],S(f,i,c),S(f,s,c),_(s,o),a||(u=K(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&ae(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function y4(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:[v4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function k4(n,e,t){let{field:i=new dn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class w4 extends ye{constructor(e){super(),ve(this,e,k4,y4,be,{field:1,value:0})}}function S4(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=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.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(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=W.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ae(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&f.value!==b[0]&&ce(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function $4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[S4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function C4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class M4 extends ye{constructor(e){super(),ve(this,e,C4,$4,be,{field:1,value:0})}}function T4(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=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.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(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=W.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ae(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&ce(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function O4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[T4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function D4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class A4 extends ye{constructor(e){super(),ve(this,e,D4,O4,be,{field:1,value:0})}}function E4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h;function m(g){n[2](g)}let b={id:n[3],options:W.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(b.formattedValue=n[0]),c=new Ka({props:b}),le.push(()=>_e(c,"formattedValue",m)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),a=B(" (UTC)"),f=O(),j(c.$$.fragment),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",u=n[3])},m(g,y){S(g,e,y),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),S(g,f,y),R(c,g,y),h=!0},p(g,y){(!h||y&2&&i!==(i=W.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!h||y&2)&&o!==(o=g[1].name+"")&&ae(r,o),(!h||y&8&&u!==(u=g[3]))&&p(e,"for",u);const k={};y&8&&(k.id=g[3]),y&1&&(k.value=g[0]),!d&&y&1&&(d=!0,k.formattedValue=g[0],ke(()=>d=!1)),c.$set(k)},i(g){h||(A(c.$$.fragment,g),h=!0)},o(g){P(c.$$.fragment,g),h=!1},d(g){g&&w(e),g&&w(f),H(c,g)}}}function I4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[E4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function P4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19))},[s,i,l]}class L4 extends ye{constructor(e){super(),ve(this,e,P4,I4,be,{field:1,value:0})}}function Bd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&ae(s,i)},d(o){o&&w(e)}}}function N4(n){var k,$,C;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function b(M){n[3](M)}let g={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(k=n[1].options)==null?void 0:k.values,searchable:(($=n[1].options)==null?void 0:$.values)>5};n[0]!==void 0&&(g.selected=n[0]),f=new N_({props:g}),le.push(()=>_e(f,"selected",b));let y=((C=n[1].options)==null?void 0:C.maxSelect)>1&&Bd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Ae(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,T){S(M,e,T),_(e,t),_(e,s),_(e,l),_(l,r),S(M,u,T),R(f,M,T),S(M,d,T),y&&y.m(M,T),S(M,h,T),m=!0},p(M,T){var E,I,L;(!m||T&2&&i!==(i=W.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!m||T&2)&&o!==(o=M[1].name+"")&&ae(r,o),(!m||T&16&&a!==(a=M[4]))&&p(e,"for",a);const D={};T&16&&(D.id=M[4]),T&6&&(D.toggle=!M[1].required||M[2]),T&4&&(D.multiple=M[2]),T&2&&(D.items=(E=M[1].options)==null?void 0:E.values),T&2&&(D.searchable=((I=M[1].options)==null?void 0:I.values)>5),!c&&T&1&&(c=!0,D.selected=M[0],ke(()=>c=!1)),f.$set(D),((L=M[1].options)==null?void 0:L.maxSelect)>1?y?y.p(M,T):(y=Bd(M),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(M){m||(A(f.$$.fragment,M),m=!0)},o(M){P(f.$$.fragment,M),m=!1},d(M){M&&w(e),M&&w(u),H(f,M),M&&w(d),y&&y.d(M),M&&w(h)}}}function F4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[N4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function R4(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class H4 extends ye{constructor(e){super(),ve(this,e,R4,F4,be,{field:1,value:0})}}function j4(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=O(),l=v("span"),r=B(o),u=O(),f=v("textarea"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono")},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=W.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ae(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&ce(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function q4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[j4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function V4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class z4 extends ye{constructor(e){super(),ve(this,e,V4,q4,be,{field:1,value:0})}}function B4(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&w(e)}}}function U4(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&w(e)}}}function W4(n){let e;function t(l,o){return l[2]?U4:B4}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function Y4(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),W.hasImageExtension(s==null?void 0:s.name)&&W.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class K4 extends ye{constructor(e){super(),ve(this,e,Y4,W4,be,{file:0,size:1})}}function J4(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&w(e)}}}function Z4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",ut(n[0])),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function G4(n){let e,t=n[2].substring(n[2].lastIndexOf("/")+1)+"",i,s,l,o,r,a,u;return{c(){e=v("a"),i=B(t),s=O(),l=v("div"),o=O(),r=v("button"),r.textContent="Close",p(e,"href",n[2]),p(e,"title","Download"),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis"),p(l,"class","flex-fill"),p(r,"type","button"),p(r,"class","btn btn-secondary")},m(f,c){S(f,e,c),_(e,i),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=K(r,"click",n[0]),a=!0)},p(f,c){c&4&&t!==(t=f[2].substring(f[2].lastIndexOf("/")+1)+"")&&ae(i,t),c&4&&p(e,"href",f[2])},d(f){f&&w(e),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,u()}}}function X4(n){let e,t,i={class:"image-preview",btnClose:!1,popup:!0,$$slots:{footer:[G4],header:[Z4],default:[J4]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&132&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[4](null),H(e,s)}}}function Q4(n,e,t){let i,s="";function l(f){f!==""&&(t(2,s=f),i==null||i.show())}function o(){return i==null?void 0:i.hide()}function r(f){le[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){Ve.call(this,n,f)}function u(f){Ve.call(this,n,f)}return[o,i,s,l,r,a,u]}class x4 extends ye{constructor(e){super(),ve(this,e,Q4,X4,be,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function eM(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-line")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function tM(n){let e,t,i,s,l;return{c(){e=v("img"),Ln(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),ne(e,"link-fade",n[2])},m(o,r){S(o,e,r),s||(l=[K(e,"click",n[7]),K(e,"error",n[5])],s=!0)},p(o,r){r&16&&!Ln(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i),r&4&&ne(e,"link-fade",o[2])},d(o){o&&w(e),s=!1,Pe(l)}}}function nM(n){let e,t,i;function s(a,u){return a[2]?tM:eM}let l=s(n),o=l(n),r={};return t=new x4({props:r}),n[8](t),{c(){o.c(),e=O(),j(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),R(t,a,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)));const f={};t.$set(f)},i(a){i||(A(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[8](null),H(t,a)}}}function iM(n,e,t){let i,{record:s}=e,{filename:l}=e,o,r="",a="";function u(){t(4,r="")}const f=d=>{d.stopPropagation(),o==null||o.show(a)};function c(d){le[d?"unshift":"push"](()=>{o=d,t(3,o)})}return n.$$set=d=>{"record"in d&&t(6,s=d.record),"filename"in d&&t(0,l=d.filename)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=W.hasImageExtension(l)),n.$$.dirty&69&&i&&t(1,a=de.getFileUrl(s,`${l}`)),n.$$.dirty&2&&t(4,r=a?a+"?thumb=100x100":"")},[l,a,i,o,r,u,s,f,c]}class j_ extends ye{constructor(e){super(),ve(this,e,iM,nM,be,{record:6,filename:0})}}function Ud(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function Wd(n,e,t){const i=n.slice();return i[25]=e[t],i[24]=t,i}function sM(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,o){S(l,e,o),t||(i=[Ee(Be.call(null,e,"Remove file")),K(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Pe(i)}}}function lM(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,o){S(l,e,o),t||(i=K(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Yd(n,e){let t,i,s,l,o,r=e[25]+"",a,u,f,c,d,h,m;s=new j_({props:{record:e[2],filename:e[25]}});function b(k,$){return $&18&&(c=null),c==null&&(c=!!k[1].includes(k[24])),c?lM:sM}let g=b(e,-1),y=g(e);return{key:n,first:null,c(){t=v("div"),i=v("figure"),j(s.$$.fragment),l=O(),o=v("a"),a=B(r),f=O(),y.c(),p(i,"class","thumb"),ne(i,"fade",e[1].includes(e[24])),p(o,"href",u=de.getFileUrl(e[2],e[25])),p(o,"class","filename link-hint"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),ne(o,"txt-strikethrough",e[1].includes(e[24])),p(t,"class","list-item"),this.first=t},m(k,$){S(k,t,$),_(t,i),R(s,i,null),_(t,l),_(t,o),_(o,a),_(t,f),y.m(t,null),d=!0,h||(m=Ee(Be.call(null,o,{position:"right",text:"Download"})),h=!0)},p(k,$){e=k;const C={};$&4&&(C.record=e[2]),$&16&&(C.filename=e[25]),s.$set(C),(!d||$&18)&&ne(i,"fade",e[1].includes(e[24])),(!d||$&16)&&r!==(r=e[25]+"")&&ae(a,r),(!d||$&20&&u!==(u=de.getFileUrl(e[2],e[25])))&&p(o,"href",u),(!d||$&18)&&ne(o,"txt-strikethrough",e[1].includes(e[24])),g===(g=b(e,$))&&y?y.p(e,$):(y.d(1),y=g(e),y&&(y.c(),y.m(t,null)))},i(k){d||(A(s.$$.fragment,k),d=!0)},o(k){P(s.$$.fragment,k),d=!1},d(k){k&&w(t),H(s),y.d(),h=!1,m()}}}function Kd(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,h,m,b,g;i=new K4({props:{file:n[22]}});function y(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),j(i.$$.fragment),s=O(),l=v("div"),o=v("small"),o.textContent="New",r=O(),a=v("span"),f=B(u),d=O(),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"),p(l,"title",c=n[22].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(k,$){S(k,e,$),_(e,t),R(i,t,null),_(e,s),_(e,l),_(l,o),_(l,r),_(l,a),_(a,f),_(e,d),_(e,h),m=!0,b||(g=[Ee(Be.call(null,h,"Remove file")),K(h,"click",y)],b=!0)},p(k,$){n=k;const C={};$&1&&(C.file=n[22]),i.$set(C),(!m||$&1)&&u!==(u=n[22].name+"")&&ae(f,u),(!m||$&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(k){m||(A(i.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),m=!1},d(k){k&&w(e),H(i),b=!1,Pe(g)}}}function Jd(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=O(),s=v("button"),s.innerHTML=` Upload new file`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(r,a){S(r,e,a),_(e,t),n[16](t),_(e,i),_(e,s),l||(o=[K(t,"change",n[17]),K(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&w(e),n[16](null),l=!1,Pe(o)}}}function oM(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,h,m,b,g=n[4];const y=T=>T[25];for(let T=0;TP($[T],1,1,()=>{$[T]=null});let M=!n[8]&&Jd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("div");for(let T=0;T({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function aM(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new dn}=e,c,d;function h(E){W.removeByValue(u,E),t(1,u)}function m(E){W.pushUnique(u,E),t(1,u)}function b(E){W.isEmpty(a[E])||a.splice(E,1),t(0,a)}function g(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=E=>h(E),k=E=>m(E),$=E=>b(E);function C(E){le[E?"unshift":"push"](()=>{c=E,t(6,c)})}const M=()=>{for(let E of c.files)a.push(E);t(0,a),t(6,c.value=null,c)},T=()=>c==null?void 0:c.click();function D(E){le[E?"unshift":"push"](()=>{d=E,t(7,d)})}return n.$$set=E=>{"record"in E&&t(2,o=E.record),"value"in E&&t(12,r=E.value),"uploadedFiles"in E&&t(0,a=E.uploadedFiles),"deletedFileIndexes"in E&&t(1,u=E.deletedFileIndexes),"field"in E&&t(3,f=E.field)},n.$$.update=()=>{var E,I;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=W.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=W.toArray(u))),n.$$.dirty&8&&t(5,i=((E=f.options)==null?void 0:E.maxSelect)>1),n.$$.dirty&4128&&W.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=W.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((I=f.options)==null?void 0:I.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&g()},[a,u,o,f,s,i,c,d,l,h,m,b,r,y,k,$,C,M,T,D]}class uM extends ye{constructor(e){super(),ve(this,e,aM,rM,be,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function Zd(n){let e,t;return{c(){e=v("small"),t=B(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&2&&ae(t,i[1])},d(i){i&&w(e)}}}function fM(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&Zd(n);return{c(){e=v("i"),i=O(),s=v("div"),l=v("div"),r=B(o),a=O(),c&&c.c(),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(s,"class","content svelte-1gjwqyd")},m(d,h){S(d,e,h),S(d,i,h),S(d,s,h),_(s,l),_(l,r),_(s,a),c&&c.m(s,null),u||(f=Ee(t=Be.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Yt(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&o!==(o=d[0].id+"")&&ae(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=Zd(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:te,o:te,d(d){d&&w(e),d&&w(i),d&&w(s),c&&c.d(),u=!1,f()}}}function cM(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["title","name","email","username","label","key","heading","content","description",...Object.keys(r)];for(const u of a)if(typeof r[u]=="string"&&!W.isEmpty(r[u])&&!s.includes(u))return u+": "+r[u];return""}return n.$$set=r=>{"item"in r&&t(0,l=r.item)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=o(l))},[l,i]}class dM extends ye{constructor(e){super(),ve(this,e,cM,fM,be,{item:0})}}function Gd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='New record',p(e,"type","button"),p(e,"class","btn btn-warning btn-block btn-sm m-t-5")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function Xd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Load more',p(e,"type","button"),p(e,"class","btn btn-block btn-sm m-t-5"),ne(e,"btn-loading",n[6]),ne(e,"btn-disabled",n[6])},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(n[18])),t=!0)},p(s,l){l&64&&ne(e,"btn-loading",s[6]),l&64&&ne(e,"btn-disabled",s[6])},d(s){s&&w(e),t=!1,i()}}}function pM(n){let e,t,i=!n[7]&&n[8]&&Gd(n),s=n[10]&&Xd(n);return{c(){i&&i.c(),e=O(),s&&s.c(),t=Ae()},m(l,o){i&&i.m(l,o),S(l,e,o),s&&s.m(l,o),S(l,t,o)},p(l,o){!l[7]&&l[8]?i?i.p(l,o):(i=Gd(l),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),l[10]?s?s.p(l,o):(s=Xd(l),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null)},d(l){i&&i.d(l),l&&w(e),s&&s.d(l),l&&w(t)}}}function hM(n){let e,t,i,s,l,o;const r=[{selectPlaceholder:n[11]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:n[4]},{disabled:n[11]},{optionComponent:n[4]},{multiple:n[2]},{class:"records-select block-options"},n[13]];function a(d){n[19](d)}function u(d){n[20](d)}let f={$$slots:{afterOptions:[pM]},$$scope:{ctx:n}};for(let d=0;d_e(e,"keyOfSelected",a)),le.push(()=>_e(e,"selected",u)),e.$on("show",n[21]),e.$on("hide",n[22]);let c={collection:n[8]};return l=new q_({props:c}),n[23](l),l.$on("save",n[24]),{c(){j(e.$$.fragment),s=O(),j(l.$$.fragment)},m(d,h){R(e,d,h),S(d,s,h),R(l,d,h),o=!0},p(d,[h]){const m=h&10300?Kt(r,[h&2056&&{selectPlaceholder:d[11]?"Loading...":d[3]},h&32&&{items:d[5]},h&32&&{searchable:d[5].length>5},r[3],h&16&&{labelComponent:d[4]},h&2048&&{disabled:d[11]},h&16&&{optionComponent:d[4]},h&4&&{multiple:d[2]},r[8],h&8192&&Kn(d[13])]):{};h&536872896&&(m.$$scope={dirty:h,ctx:d}),!t&&h&2&&(t=!0,m.keyOfSelected=d[1],ke(()=>t=!1)),!i&&h&1&&(i=!0,m.selected=d[0],ke(()=>i=!1)),e.$set(m);const b={};h&256&&(b.collection=d[8]),l.$set(b)},i(d){o||(A(e.$$.fragment,d),A(l.$$.fragment,d),o=!0)},o(d){P(e.$$.fragment,d),P(l.$$.fragment,d),o=!1},d(d){H(e,d),d&&w(s),n[23](null),H(l,d)}}}function mM(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent","collectionId"];let o=wt(e,l);const r="select_"+W.randomString(5);let{multiple:a=!1}=e,{selected:u=[]}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=dM}=e,{collectionId:h}=e,m=[],b=1,g=0,y=!1,k=!1,$=!1,C=null,M;async function T(){if(!h){t(8,C=null),t(7,$=!1);return}t(7,$=!0);try{t(8,C=await de.collections.getOne(h,{$cancelKey:"collection_"+r}))}catch(Q){de.errorResponseHandler(Q)}t(7,$=!1)}async function D(){const Q=W.toArray(f);if(!h||!Q.length)return;t(16,k=!0);let ie=[];const Y=Q.slice(),x=[];for(;Y.length>0;){const U=[];for(const re of Y.splice(0,50))U.push(`id="${re}"`);x.push(de.collection(h).getFullList(200,{filter:U.join("||"),$autoCancel:!1}))}try{await Promise.all(x).then(U=>{ie=ie.concat(...U)}),t(0,u=[]);for(const U of Q){const re=W.findByKey(ie,"id",U);re&&u.push(re)}t(5,m=W.filterDuplicatesByKey(u.concat(m)))}catch(U){de.errorResponseHandler(U)}t(16,k=!1)}async function E(Q=!1){if(!!h){t(6,y=!0);try{const ie=Q?1:b+1,Y=await de.collection(h).getList(ie,200,{sort:"-created",$cancelKey:r+"loadList"});Q&&t(5,m=W.toArray(u).slice()),t(5,m=W.filterDuplicatesByKey(m.concat(Y.items,W.toArray(u)))),b=Y.page,t(15,g=Y.totalItems)}catch(ie){de.errorResponseHandler(ie)}t(6,y=!1)}}const I=()=>M==null?void 0:M.show(),L=()=>E();function F(Q){f=Q,t(1,f)}function q(Q){u=Q,t(0,u)}function z(Q){Ve.call(this,n,Q)}function J(Q){Ve.call(this,n,Q)}function G(Q){le[Q?"unshift":"push"](()=>{M=Q,t(9,M)})}const X=Q=>{var ie;(ie=Q==null?void 0:Q.detail)!=null&&ie.id&&t(1,f=W.toArray(f).concat(Q.detail.id)),E(!0)};return n.$$set=Q=>{e=Ke(Ke({},e),Wn(Q)),t(13,o=wt(e,l)),"multiple"in Q&&t(2,a=Q.multiple),"selected"in Q&&t(0,u=Q.selected),"keyOfSelected"in Q&&t(1,f=Q.keyOfSelected),"selectPlaceholder"in Q&&t(3,c=Q.selectPlaceholder),"optionComponent"in Q&&t(4,d=Q.optionComponent),"collectionId"in Q&&t(14,h=Q.collectionId)},n.$$.update=()=>{n.$$.dirty&16384&&h&&(T(),D().then(()=>{E(!0)})),n.$$.dirty&65600&&t(11,i=y||k),n.$$.dirty&32800&&t(10,s=g>m.length)},[u,f,a,c,d,m,y,$,C,M,s,i,E,o,h,g,k,I,L,F,q,z,J,G,X]}class gM extends ye{constructor(e){super(),ve(this,e,mM,hM,be,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4,collectionId:14})}}function Qd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&ae(s,i)},d(o){o&&w(e)}}}function _M(n){var k,$;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function b(C){n[3](C)}let g={toggle:!0,id:n[4],multiple:n[2],collectionId:(k=n[1].options)==null?void 0:k.collectionId};n[0]!==void 0&&(g.keyOfSelected=n[0]),f=new gM({props:g}),le.push(()=>_e(f,"keyOfSelected",b));let y=(($=n[1].options)==null?void 0:$.maxSelect)>1&&Qd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Ae(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(C,M){S(C,e,M),_(e,t),_(e,s),_(e,l),_(l,r),S(C,u,M),R(f,C,M),S(C,d,M),y&&y.m(C,M),S(C,h,M),m=!0},p(C,M){var D,E;(!m||M&2&&i!==(i=W.getFieldTypeIcon(C[1].type)))&&p(t,"class",i),(!m||M&2)&&o!==(o=C[1].name+"")&&ae(r,o),(!m||M&16&&a!==(a=C[4]))&&p(e,"for",a);const T={};M&16&&(T.id=C[4]),M&4&&(T.multiple=C[2]),M&2&&(T.collectionId=(D=C[1].options)==null?void 0:D.collectionId),!c&&M&1&&(c=!0,T.keyOfSelected=C[0],ke(()=>c=!1)),f.$set(T),((E=C[1].options)==null?void 0:E.maxSelect)>1?y?y.p(C,M):(y=Qd(C),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(C){m||(A(f.$$.fragment,C),m=!0)},o(C){P(f.$$.fragment,C),m=!1},d(C){C&&w(e),C&&w(u),H(f,C),C&&w(d),y&&y.d(C),C&&w(h)}}}function bM(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[_M,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function vM(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r,a;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)!=1),n.$$.dirty&7&&i&&Array.isArray(l)&&((a=s.options)==null?void 0:a.maxSelect)&&l.length>s.options.maxSelect&&t(0,l=l.slice(s.options.maxSelect-1))},[l,s,i,o]}class yM extends ye{constructor(e){super(),ve(this,e,vM,bM,be,{field:1,value:0})}}function kM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Auth URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].authUrl),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&ce(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function wM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Token URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].tokenUrl),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&ce(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function SM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("User API URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].userApiUrl),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&ce(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function $M(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new ge({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[kM,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[wM,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),c=new ge({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[SM,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),u=O(),f=v("div"),j(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-4"),p(r,"class","col-lg-4"),p(f,"class","col-lg-4"),p(i,"class","grid")},m(h,m){S(h,e,m),S(h,t,m),S(h,i,m),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),_(i,u),_(i,f),R(c,f,null),d=!0},p(h,[m]){const b={};m&2&&(b.name=h[1]+".authUrl"),m&97&&(b.$$scope={dirty:m,ctx:h}),l.$set(b);const g={};m&2&&(g.name=h[1]+".tokenUrl"),m&97&&(g.$$scope={dirty:m,ctx:h}),a.$set(g);const y={};m&2&&(y.name=h[1]+".userApiUrl"),m&97&&(y.$$scope={dirty:m,ctx:h}),c.$set(y)},i(h){d||(A(l.$$.fragment,h),A(a.$$.fragment,h),A(c.$$.fragment,h),d=!0)},o(h){P(l.$$.fragment,h),P(a.$$.fragment,h),P(c.$$.fragment,h),d=!1},d(h){h&&w(e),h&&w(t),h&&w(i),H(l),H(a),H(c)}}}function CM(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class MM extends ye{constructor(e){super(),ve(this,e,CM,$M,be,{key:1,config:0})}}function TM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Auth URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize"),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[2]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&ce(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function OM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Token URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","text"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token"),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[3]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&ce(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function DM(n){let e,t,i,s,l,o,r,a,u;return l=new ge({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[TM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[OM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(i,"class","grid")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),u=!0},p(f,[c]){const d={};c&2&&(d.name=f[1]+".authUrl"),c&49&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const h={};c&2&&(h.name=f[1]+".tokenUrl"),c&49&&(h.$$scope={dirty:c,ctx:f}),a.$set(h)},i(f){u||(A(l.$$.fragment,f),A(a.$$.fragment,f),u=!0)},o(f){P(l.$$.fragment,f),P(a.$$.fragment,f),u=!1},d(f){f&&w(e),f&&w(t),f&&w(i),H(l),H(a)}}}function AM(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class EM extends ye{constructor(e){super(),ve(this,e,AM,DM,be,{key:1,config:0})}}const gl={googleAuth:{title:"Google",icon:"ri-google-fill"},facebookAuth:{title:"Facebook",icon:"ri-facebook-fill"},twitterAuth:{title:"Twitter",icon:"ri-twitter-fill"},githubAuth:{title:"GitHub",icon:"ri-github-fill"},gitlabAuth:{title:"GitLab",icon:"ri-gitlab-fill",optionsComponent:MM},discordAuth:{title:"Discord",icon:"ri-discord-fill"},microsoftAuth:{title:"Microsoft",icon:"ri-microsoft-fill",optionsComponent:EM},spotifyAuth:{title:"Spotify",icon:"ri-spotify-fill"},kakaoAuth:{title:"Kakao",icon:"ri-kakao-talk-fill"},twitchAuth:{title:"Twitch",icon:"ri-twitch-fill"}};function xd(n,e,t){const i=n.slice();return i[9]=e[t],i}function IM(n){let e;return{c(){e=v("p"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function PM(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function ep(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,h,m,b,g,y;function k(){return n[6](n[9])}return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=B(o),a=O(),u=v("div"),f=B("ID: "),d=B(c),h=O(),m=v("button"),m.innerHTML='',b=O(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(m,"type","button"),p(m,"class","btn btn-secondary link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m($,C){S($,e,C),_(e,t),_(e,s),_(e,l),_(l,r),_(e,a),_(e,u),_(u,f),_(u,d),_(e,h),_(e,m),_(e,b),g||(y=K(m,"click",k),g=!0)},p($,C){n=$,C&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&ae(r,o),C&2&&c!==(c=n[9].providerId+"")&&ae(d,c)},d($){$&&w(e),g=!1,y()}}}function NM(n){let e;function t(l,o){var r;return l[2]?LM:((r=l[0])==null?void 0:r.id)&&l[1].length?PM:IM}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function FM(n,e,t){const i=It();let{record:s}=e,l=[],o=!1;function r(d){var h;return((h=gl[d+"Auth"])==null?void 0:h.title)||W.sentenize(d,!1)}function a(d){var h;return((h=gl[d+"Auth"])==null?void 0:h.icon)||`ri-${d}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await de.collection(s.collectionId).listExternalAuths(s.id))}catch(d){de.errorResponseHandler(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||wn(`Do you really want to unlink the ${r(d)} provider?`,()=>de.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{Lt(`Successfully unlinked the ${r(d)} provider.`),i("unlink",d),u()}).catch(h=>{de.errorResponseHandler(h)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class RM extends ye{constructor(e){super(),ve(this,e,FM,NM,be,{record:0})}}function tp(n,e,t){const i=n.slice();return i[46]=e[t],i[47]=e,i[48]=t,i}function np(n){let e,t;return e=new ge({props:{class:"form-field disabled",name:"id",$$slots:{default:[HM,({uniqueId:i})=>({49:i}),({uniqueId:i})=>[0,i?262144:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&786432&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function HM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",l=O(),o=v("span"),a=O(),u=v("div"),f=v("i"),d=O(),h=v("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[49]),p(f,"class","ri-calendar-event-line txt-disabled"),p(u,"class","form-field-addon"),p(h,"type","text"),p(h,"id",m=n[49]),h.value=b=n[2].id,h.readOnly=!0},m(k,$){S(k,e,$),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),S(k,a,$),S(k,u,$),_(u,f),S(k,d,$),S(k,h,$),g||(y=Ee(c=Be.call(null,f,{text:`Created: ${n[2].created} Updated: ${n[2].updated}`,position:"left"})),g=!0)},p(k,$){$[1]&262144&&r!==(r=k[49])&&p(e,"for",r),c&&Yt(c.update)&&$[0]&4&&c.update.call(null,{text:`Created: ${k[2].created} Updated: ${k[2].updated}`,position:"left"}),$[1]&262144&&m!==(m=k[49])&&p(h,"id",m),$[0]&4&&b!==(b=k[2].id)&&h.value!==b&&(h.value=b)},d(k){k&&w(e),k&&w(a),k&&w(u),k&&w(d),k&&w(h),g=!1,y()}}}function ip(n){var u,f;let e,t,i,s,l;function o(c){n[26](c)}let r={collection:n[0]};n[2]!==void 0&&(r.record=n[2]),e=new r4({props:r}),le.push(()=>_e(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&sp();return{c(){j(e.$$.fragment),i=O(),a&&a.c(),s=Ae()},m(c,d){R(e,c,d),S(c,i,d),a&&a.m(c,d),S(c,s,d),l=!0},p(c,d){var m,b;const h={};d[0]&1&&(h.collection=c[0]),!t&&d[0]&4&&(t=!0,h.record=c[2],ke(()=>t=!1)),e.$set(h),(b=(m=c[0])==null?void 0:m.schema)!=null&&b.length?a||(a=sp(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){P(e.$$.fragment,c),l=!1},d(c){H(e,c),c&&w(i),a&&a.d(c),c&&w(s)}}}function sp(n){let e;return{c(){e=v("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function jM(n){let e,t,i;function s(o){n[38](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new yM({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function qM(n){let e,t,i,s,l;function o(f){n[35](f,n[46])}function r(f){n[36](f,n[46])}function a(f){n[37](f,n[46])}let u={field:n[46],record:n[2]};return n[2][n[46].name]!==void 0&&(u.value=n[2][n[46].name]),n[3][n[46].name]!==void 0&&(u.uploadedFiles=n[3][n[46].name]),n[4][n[46].name]!==void 0&&(u.deletedFileIndexes=n[4][n[46].name]),e=new uM({props:u}),le.push(()=>_e(e,"value",o)),le.push(()=>_e(e,"uploadedFiles",r)),le.push(()=>_e(e,"deletedFileIndexes",a)),{c(){j(e.$$.fragment)},m(f,c){R(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[46]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[46].name],ke(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[46].name],ke(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[46].name],ke(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){H(e,f)}}}function VM(n){let e,t,i;function s(o){n[34](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new z4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function zM(n){let e,t,i;function s(o){n[33](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new H4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function BM(n){let e,t,i;function s(o){n[32](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new L4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function UM(n){let e,t,i;function s(o){n[31](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new A4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function WM(n){let e,t,i;function s(o){n[30](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new M4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function YM(n){let e,t,i;function s(o){n[29](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new w4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function KM(n){let e,t,i;function s(o){n[28](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new b4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function JM(n){let e,t,i;function s(o){n[27](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new h4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ke(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function lp(n,e){let t,i,s,l,o;const r=[JM,KM,YM,WM,UM,BM,zM,VM,qM,jM],a=[];function u(f,c){return f[46].type==="text"?0:f[46].type==="number"?1:f[46].type==="bool"?2:f[46].type==="email"?3:f[46].type==="url"?4:f[46].type==="date"?5:f[46].type==="select"?6:f[46].type==="json"?7:f[46].type==="file"?8:f[46].type==="relation"?9:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Ae(),s&&s.c(),l=Ae(),this.first=t},m(f,c){S(f,t,c),~i&&a[i].m(f,c),S(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(pe(),P(a[d],1,1,()=>{a[d]=null}),he()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function op(n){let e,t,i;return t=new RM({props:{record:n[2]}}),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ne(e,"active",n[10]===_l)},m(s,l){S(s,e,l),R(t,e,null),i=!0},p(s,l){const o={};l[0]&4&&(o.record=s[2]),t.$set(o),(!i||l[0]&1024)&&ne(e,"active",s[10]===_l)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function ZM(n){var g,y;let e,t,i,s,l=[],o=new Map,r,a,u,f,c=!n[2].isNew&&np(n),d=((g=n[0])==null?void 0:g.isAuth)&&ip(n),h=((y=n[0])==null?void 0:y.schema)||[];const m=k=>k[46].name;for(let k=0;k{c=null}),he()):c?(c.p(k,$),$[0]&4&&A(c,1)):(c=np(k),c.c(),A(c,1),c.m(t,i)),(C=k[0])!=null&&C.isAuth?d?(d.p(k,$),$[0]&1&&A(d,1)):(d=ip(k),d.c(),A(d,1),d.m(t,s)):d&&(pe(),P(d,1,1,()=>{d=null}),he()),$[0]&29&&(h=((M=k[0])==null?void 0:M.schema)||[],pe(),l=bt(l,$,m,1,k,h,o,t,en,lp,null,tp),he()),(!a||$[0]&1024)&&ne(t,"active",k[10]===Ui),k[0].isAuth&&!k[2].isNew?b?(b.p(k,$),$[0]&5&&A(b,1)):(b=op(k),b.c(),A(b,1),b.m(e,null)):b&&(pe(),P(b,1,1,()=>{b=null}),he())},i(k){if(!a){A(c),A(d);for(let $=0;$ @@ -145,7 +145,7 @@ Updated: ${g[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=g[29])&&p(c," `),m=v("span"),m.textContent=`{TOKEN} `,b=B(`, `),g=v("span"),g.textContent=`{ACTION_URL} - `,y=B("."),p(e,"for",i=n[31]),p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(g,"class","label label-sm link-primary txt-mono"),p(g,"title","Required parameter"),p(a,"class","help-block")},m(E,I){S(E,e,I),_(e,t),S(E,s,I),T[l].m(E,I),S(E,r,I),S(E,a,I),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,b),_(a,g),_(a,y),k=!0,$||(C=[K(f,"click",n[22]),K(d,"click",n[23]),K(m,"click",n[24]),K(g,"click",n[25])],$=!0)},p(E,I){(!k||I[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let L=l;l=D(E),l===L?T[l].p(E,I):(pe(),P(T[L],1,1,()=>{T[L]=null}),he(),o=T[l],o?o.p(E,I):(o=T[l]=M[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){k||(A(o),k=!0)},o(E){P(o),k=!1},d(E){E&&w(e),E&&w(s),T[l].d(E),E&&w(r),E&&w(a),$=!1,Pe(C)}}}function YO(n){let e,t,i,s,l,o;return e=new ge({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[VO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new ge({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[zO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new ge({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[WO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(r,a){R(e,r,a),S(r,t,a),R(i,r,a),S(r,s,a),R(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function lh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function KO(n){let e,t,i,s,l,o,r,a,u,f,c=n[6]&&lh();return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),l=B(n[2]),o=O(),r=v("div"),a=O(),c&&c.c(),u=Ae(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(d,h){S(d,e,h),_(e,t),_(e,i),_(e,s),_(s,l),S(d,o,h),S(d,r,h),S(d,a,h),c&&c.m(d,h),S(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&ae(l,d[2]),d[6]?c?h[0]&64&&A(c,1):(c=lh(),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){f||(A(c),f=!0)},o(d){P(c),f=!1},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),c&&c.d(d),d&&w(u)}}}function JO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[KO],default:[YO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=Y));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=oh,d=!1;function h(){f==null||f.expand()}function m(){f==null||f.collapse()}function b(){f==null||f.collapseSiblings()}async function g(){c||d||(t(5,d=!0),t(4,c=(await st(()=>import("./CodeEditor.07a02f98.js"),["./CodeEditor.07a02f98.js","./index.30b22912.js"],import.meta.url)).default),oh=c,t(5,d=!1))}function y(Y){W.copyToClipboard(Y),Dg(`Copied ${Y} to clipboard`,2e3)}g();function k(){u.subject=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),D=()=>y("{APP_URL}"),E=()=>y("{TOKEN}");function I(Y){n.$$.not_equal(u.body,Y)&&(u.body=Y,t(0,u))}function L(){u.body=this.value,t(0,u)}const F=()=>y("{APP_NAME}"),q=()=>y("{APP_URL}"),z=()=>y("{TOKEN}"),J=()=>y("{ACTION_URL}");function G(Y){le[Y?"unshift":"push"](()=>{f=Y,t(3,f)})}function X(Y){Ve.call(this,n,Y)}function Q(Y){Ve.call(this,n,Y)}function ie(Y){Ve.call(this,n,Y)}return n.$$set=Y=>{e=Ke(Ke({},e),Wn(Y)),t(8,l=wt(e,s)),"key"in Y&&t(1,r=Y.key),"title"in Y&&t(2,a=Y.title),"config"in Y&&t(0,u=Y.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!W.isEmpty(W.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||ks(r))},[u,r,a,f,c,d,i,y,l,h,m,b,o,k,$,C,M,T,D,E,I,L,F,q,z,J,G,X,Q,ie]}class $r extends ye{constructor(e){super(),ve(this,e,ZO,JO,be,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function rh(n,e,t){const i=n.slice();return i[22]=e[t],i}function ah(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=O(),o=v("label"),a=B(r),f=O(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(h,m){S(h,t,m),_(t,i),i.checked=i.__value===e[2],_(t,l),_(t,o),_(o,a),_(t,f),c||(d=K(i,"change",e[11]),c=!0)},p(h,m){e=h,m&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),m&4&&(i.checked=i.__value===e[2]),m&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(h){h&&w(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function GO(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new ge({props:{class:"form-field required m-0",name:"email",$$slots:{default:[XO,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),j(t.$$.fragment),i=O(),j(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){S(a,e,u),R(t,e,null),_(e,i),R(s,e,null),l=!0,o||(r=K(e,"submit",ut(n[14])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),H(t),H(s),o=!1,r()}}}function xO(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function eD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=B("Close"),i=O(),s=v("button"),l=v("i"),o=O(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-secondary"),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],ne(s,"btn-loading",n[4])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"click",n[0]),K(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&ne(s,"btn-loading",c[4])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function tD(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[eD],header:[xO],default:[QO]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),H(e,s)}}}const Cr="last_email_test",uh="email_test_request";function nD(n,e,t){let i;const s=It(),l="email_test_"+W.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(Cr),u=o[0].value,f=!1,c=null;function d(E="",I=""){t(1,a=E||localStorage.getItem(Cr)),t(2,u=I||o[0].value),Fn({}),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(Cr,a),clearTimeout(c),c=setTimeout(()=>{de.cancelRequest(uh),al("Test email send timeout.")},3e4);try{await de.settings.testEmail(a,u,{$cancelKey:uh}),Lt("Successfully sent test email."),s("submit"),t(4,f=!1),await Mn(),h()}catch(E){t(4,f=!1),de.errorResponseHandler(E)}clearTimeout(c)}}const b=[[]],g=()=>m();function y(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>m(),C=()=>!f;function M(E){le[E?"unshift":"push"](()=>{r=E,t(3,r)})}function T(E){Ve.call(this,n,E)}function D(E){Ve.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,m,d,g,y,b,k,$,C,M,T,D]}class iD extends ye{constructor(e){super(),ve(this,e,nD,tD,be,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function sD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,E,I,L;i=new ge({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[oD,({uniqueId:U})=>({29:U}),({uniqueId:U})=>U?536870912:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[rD,({uniqueId:U})=>({29:U}),({uniqueId:U})=>U?536870912:0]},$$scope:{ctx:n}}});function F(U){n[13](U)}let q={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(q.config=n[0].meta.verificationTemplate),u=new $r({props:q}),le.push(()=>_e(u,"config",F));function z(U){n[14](U)}let J={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(J.config=n[0].meta.resetPasswordTemplate),d=new $r({props:J}),le.push(()=>_e(d,"config",z));function G(U){n[15](U)}let X={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(X.config=n[0].meta.confirmEmailChangeTemplate),b=new $r({props:X}),le.push(()=>_e(b,"config",G)),C=new ge({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[aD,({uniqueId:U})=>({29:U}),({uniqueId:U})=>U?536870912:0]},$$scope:{ctx:n}}});let Q=n[0].smtp.enabled&&fh(n);function ie(U,re){return U[4]?mD:hD}let Y=ie(n),x=Y(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),c=O(),j(d.$$.fragment),m=O(),j(b.$$.fragment),y=O(),k=v("hr"),$=O(),j(C.$$.fragment),M=O(),Q&&Q.c(),T=O(),D=v("div"),E=v("div"),I=O(),x.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(E,"class","flex-fill"),p(D,"class","flex")},m(U,re){S(U,e,re),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),S(U,r,re),S(U,a,re),R(u,a,null),_(a,c),R(d,a,null),_(a,m),R(b,a,null),S(U,y,re),S(U,k,re),S(U,$,re),R(C,U,re),S(U,M,re),Q&&Q.m(U,re),S(U,T,re),S(U,D,re),_(D,E),_(D,I),x.m(D,null),L=!0},p(U,re){const Re={};re&1610612737&&(Re.$$scope={dirty:re,ctx:U}),i.$set(Re);const Ne={};re&1610612737&&(Ne.$$scope={dirty:re,ctx:U}),o.$set(Ne);const Le={};!f&&re&1&&(f=!0,Le.config=U[0].meta.verificationTemplate,ke(()=>f=!1)),u.$set(Le);const Fe={};!h&&re&1&&(h=!0,Fe.config=U[0].meta.resetPasswordTemplate,ke(()=>h=!1)),d.$set(Fe);const me={};!g&&re&1&&(g=!0,me.config=U[0].meta.confirmEmailChangeTemplate,ke(()=>g=!1)),b.$set(me);const Se={};re&1610612737&&(Se.$$scope={dirty:re,ctx:U}),C.$set(Se),U[0].smtp.enabled?Q?(Q.p(U,re),re&1&&A(Q,1)):(Q=fh(U),Q.c(),A(Q,1),Q.m(T.parentNode,T)):Q&&(pe(),P(Q,1,1,()=>{Q=null}),he()),Y===(Y=ie(U))&&x?x.p(U,re):(x.d(1),x=Y(U),x&&(x.c(),x.m(D,null)))},i(U){L||(A(i.$$.fragment,U),A(o.$$.fragment,U),A(u.$$.fragment,U),A(d.$$.fragment,U),A(b.$$.fragment,U),A(C.$$.fragment,U),A(Q),L=!0)},o(U){P(i.$$.fragment,U),P(o.$$.fragment,U),P(u.$$.fragment,U),P(d.$$.fragment,U),P(b.$$.fragment,U),P(C.$$.fragment,U),P(Q),L=!1},d(U){U&&w(e),H(i),H(o),U&&w(r),U&&w(a),H(u),H(d),H(b),U&&w(y),U&&w(k),U&&w($),H(C,U),U&&w(M),Q&&Q.d(U),U&&w(T),U&&w(D),x.d()}}}function lD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function oD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender name"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderName),r||(a=K(l,"input",n[11]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderName&&ce(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function rD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender address"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","email"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderAddress),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderAddress&&ce(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function aD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[29]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[29])},m(c,d){S(c,e,d),e.checked=n[0].smtp.enabled,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[16]),Ee(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&536870912&&t!==(t=c[29])&&p(e,"id",t),d&1&&(e.checked=c[0].smtp.enabled),d&536870912&&a!==(a=c[29])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function fh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$;return i=new ge({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[uD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[fD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[cD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field",name:"smtp.username",$$slots:{default:[dD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),b=new ge({props:{class:"form-field",name:"smtp.password",$$slots:{default:[pD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(b.$$.fragment),g=O(),y=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(e,"class","grid")},m(C,M){S(C,e,M),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(b,m,null),_(e,g),_(e,y),$=!0},p(C,M){const T={};M&1610612737&&(T.$$scope={dirty:M,ctx:C}),i.$set(T);const D={};M&1610612737&&(D.$$scope={dirty:M,ctx:C}),o.$set(D);const E={};M&1610612737&&(E.$$scope={dirty:M,ctx:C}),u.$set(E);const I={};M&1610612737&&(I.$$scope={dirty:M,ctx:C}),d.$set(I);const L={};M&1610612737&&(L.$$scope={dirty:M,ctx:C}),b.$set(L)},i(C){$||(A(i.$$.fragment,C),A(o.$$.fragment,C),A(u.$$.fragment,C),A(d.$$.fragment,C),A(b.$$.fragment,C),C&&xe(()=>{k||(k=je(e,St,{duration:150},!0)),k.run(1)}),$=!0)},o(C){P(i.$$.fragment,C),P(o.$$.fragment,C),P(u.$$.fragment,C),P(d.$$.fragment,C),P(b.$$.fragment,C),C&&(k||(k=je(e,St,{duration:150},!1)),k.run(0)),$=!1},d(C){C&&w(e),H(i),H(o),H(u),H(d),H(b),C&&k&&k.end()}}}function uD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("SMTP server host"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.host),r||(a=K(l,"input",n[17]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.host&&ce(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function fD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Port"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","number"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.port),r||(a=K(l,"input",n[18]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].smtp.port&&ce(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function cD(n){let e,t,i,s,l,o,r;function a(f){n[19](f)}let u={id:n[29],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Es({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("TLS Encryption"),s=O(),j(l.$$.fragment),p(e,"for",i=n[29])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&536870912&&i!==(i=f[29]))&&p(e,"for",i);const d={};c&536870912&&(d.id=f[29]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function dD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Username"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.username),r||(a=K(l,"input",n[20]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.username&&ce(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function pD(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[29]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new Ga({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Password"),s=O(),j(l.$$.fragment),p(e,"for",i=n[29])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&536870912&&i!==(i=f[29]))&&p(e,"for",i);const d={};c&536870912&&(d.id=f[29]),!o&&c&1&&(o=!0,d.value=f[0].smtp.password,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function hD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + `,y=B("."),p(e,"for",i=n[31]),p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(g,"class","label label-sm link-primary txt-mono"),p(g,"title","Required parameter"),p(a,"class","help-block")},m(E,I){S(E,e,I),_(e,t),S(E,s,I),T[l].m(E,I),S(E,r,I),S(E,a,I),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,b),_(a,g),_(a,y),k=!0,$||(C=[K(f,"click",n[22]),K(d,"click",n[23]),K(m,"click",n[24]),K(g,"click",n[25])],$=!0)},p(E,I){(!k||I[1]&1&&i!==(i=E[31]))&&p(e,"for",i);let L=l;l=D(E),l===L?T[l].p(E,I):(pe(),P(T[L],1,1,()=>{T[L]=null}),he(),o=T[l],o?o.p(E,I):(o=T[l]=M[l](E),o.c()),A(o,1),o.m(r.parentNode,r))},i(E){k||(A(o),k=!0)},o(E){P(o),k=!1},d(E){E&&w(e),E&&w(s),T[l].d(E),E&&w(r),E&&w(a),$=!1,Pe(C)}}}function YO(n){let e,t,i,s,l,o;return e=new ge({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[VO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new ge({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[zO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new ge({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[WO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(r,a){R(e,r,a),S(r,t,a),R(i,r,a),S(r,s,a),R(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function lh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function KO(n){let e,t,i,s,l,o,r,a,u,f,c=n[6]&&lh();return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),l=B(n[2]),o=O(),r=v("div"),a=O(),c&&c.c(),u=Ae(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(d,h){S(d,e,h),_(e,t),_(e,i),_(e,s),_(s,l),S(d,o,h),S(d,r,h),S(d,a,h),c&&c.m(d,h),S(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&ae(l,d[2]),d[6]?c?h[0]&64&&A(c,1):(c=lh(),c.c(),A(c,1),c.m(u.parentNode,u)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){f||(A(c),f=!0)},o(d){P(c),f=!1},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),c&&c.d(d),d&&w(u)}}}function JO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[KO],default:[YO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=Y));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=oh,d=!1;function h(){f==null||f.expand()}function m(){f==null||f.collapse()}function b(){f==null||f.collapseSiblings()}async function g(){c||d||(t(5,d=!0),t(4,c=(await st(()=>import("./CodeEditor.d4833e13.js"),["./CodeEditor.d4833e13.js","./index.30b22912.js"],import.meta.url)).default),oh=c,t(5,d=!1))}function y(Y){W.copyToClipboard(Y),Dg(`Copied ${Y} to clipboard`,2e3)}g();function k(){u.subject=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),D=()=>y("{APP_URL}"),E=()=>y("{TOKEN}");function I(Y){n.$$.not_equal(u.body,Y)&&(u.body=Y,t(0,u))}function L(){u.body=this.value,t(0,u)}const F=()=>y("{APP_NAME}"),q=()=>y("{APP_URL}"),z=()=>y("{TOKEN}"),J=()=>y("{ACTION_URL}");function G(Y){le[Y?"unshift":"push"](()=>{f=Y,t(3,f)})}function X(Y){Ve.call(this,n,Y)}function Q(Y){Ve.call(this,n,Y)}function ie(Y){Ve.call(this,n,Y)}return n.$$set=Y=>{e=Ke(Ke({},e),Wn(Y)),t(8,l=wt(e,s)),"key"in Y&&t(1,r=Y.key),"title"in Y&&t(2,a=Y.title),"config"in Y&&t(0,u=Y.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!W.isEmpty(W.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||ks(r))},[u,r,a,f,c,d,i,y,l,h,m,b,o,k,$,C,M,T,D,E,I,L,F,q,z,J,G,X,Q,ie]}class $r extends ye{constructor(e){super(),ve(this,e,ZO,JO,be,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function rh(n,e,t){const i=n.slice();return i[22]=e[t],i}function ah(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=O(),o=v("label"),a=B(r),f=O(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(h,m){S(h,t,m),_(t,i),i.checked=i.__value===e[2],_(t,l),_(t,o),_(o,a),_(t,f),c||(d=K(i,"change",e[11]),c=!0)},p(h,m){e=h,m&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),m&4&&(i.checked=i.__value===e[2]),m&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(h){h&&w(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function GO(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new ge({props:{class:"form-field required m-0",name:"email",$$slots:{default:[XO,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),j(t.$$.fragment),i=O(),j(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){S(a,e,u),R(t,e,null),_(e,i),R(s,e,null),l=!0,o||(r=K(e,"submit",ut(n[14])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),H(t),H(s),o=!1,r()}}}function xO(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function eD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=B("Close"),i=O(),s=v("button"),l=v("i"),o=O(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-secondary"),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],ne(s,"btn-loading",n[4])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"click",n[0]),K(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&ne(s,"btn-loading",c[4])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function tD(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[eD],header:[xO],default:[QO]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),H(e,s)}}}const Cr="last_email_test",uh="email_test_request";function nD(n,e,t){let i;const s=It(),l="email_test_"+W.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(Cr),u=o[0].value,f=!1,c=null;function d(E="",I=""){t(1,a=E||localStorage.getItem(Cr)),t(2,u=I||o[0].value),Fn({}),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(Cr,a),clearTimeout(c),c=setTimeout(()=>{de.cancelRequest(uh),al("Test email send timeout.")},3e4);try{await de.settings.testEmail(a,u,{$cancelKey:uh}),Lt("Successfully sent test email."),s("submit"),t(4,f=!1),await Mn(),h()}catch(E){t(4,f=!1),de.errorResponseHandler(E)}clearTimeout(c)}}const b=[[]],g=()=>m();function y(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>m(),C=()=>!f;function M(E){le[E?"unshift":"push"](()=>{r=E,t(3,r)})}function T(E){Ve.call(this,n,E)}function D(E){Ve.call(this,n,E)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,m,d,g,y,b,k,$,C,M,T,D]}class iD extends ye{constructor(e){super(),ve(this,e,nD,tD,be,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function sD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,E,I,L;i=new ge({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[oD,({uniqueId:U})=>({29:U}),({uniqueId:U})=>U?536870912:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[rD,({uniqueId:U})=>({29:U}),({uniqueId:U})=>U?536870912:0]},$$scope:{ctx:n}}});function F(U){n[13](U)}let q={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(q.config=n[0].meta.verificationTemplate),u=new $r({props:q}),le.push(()=>_e(u,"config",F));function z(U){n[14](U)}let J={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(J.config=n[0].meta.resetPasswordTemplate),d=new $r({props:J}),le.push(()=>_e(d,"config",z));function G(U){n[15](U)}let X={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(X.config=n[0].meta.confirmEmailChangeTemplate),b=new $r({props:X}),le.push(()=>_e(b,"config",G)),C=new ge({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[aD,({uniqueId:U})=>({29:U}),({uniqueId:U})=>U?536870912:0]},$$scope:{ctx:n}}});let Q=n[0].smtp.enabled&&fh(n);function ie(U,re){return U[4]?mD:hD}let Y=ie(n),x=Y(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),c=O(),j(d.$$.fragment),m=O(),j(b.$$.fragment),y=O(),k=v("hr"),$=O(),j(C.$$.fragment),M=O(),Q&&Q.c(),T=O(),D=v("div"),E=v("div"),I=O(),x.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(E,"class","flex-fill"),p(D,"class","flex")},m(U,re){S(U,e,re),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),S(U,r,re),S(U,a,re),R(u,a,null),_(a,c),R(d,a,null),_(a,m),R(b,a,null),S(U,y,re),S(U,k,re),S(U,$,re),R(C,U,re),S(U,M,re),Q&&Q.m(U,re),S(U,T,re),S(U,D,re),_(D,E),_(D,I),x.m(D,null),L=!0},p(U,re){const Re={};re&1610612737&&(Re.$$scope={dirty:re,ctx:U}),i.$set(Re);const Ne={};re&1610612737&&(Ne.$$scope={dirty:re,ctx:U}),o.$set(Ne);const Le={};!f&&re&1&&(f=!0,Le.config=U[0].meta.verificationTemplate,ke(()=>f=!1)),u.$set(Le);const Fe={};!h&&re&1&&(h=!0,Fe.config=U[0].meta.resetPasswordTemplate,ke(()=>h=!1)),d.$set(Fe);const me={};!g&&re&1&&(g=!0,me.config=U[0].meta.confirmEmailChangeTemplate,ke(()=>g=!1)),b.$set(me);const Se={};re&1610612737&&(Se.$$scope={dirty:re,ctx:U}),C.$set(Se),U[0].smtp.enabled?Q?(Q.p(U,re),re&1&&A(Q,1)):(Q=fh(U),Q.c(),A(Q,1),Q.m(T.parentNode,T)):Q&&(pe(),P(Q,1,1,()=>{Q=null}),he()),Y===(Y=ie(U))&&x?x.p(U,re):(x.d(1),x=Y(U),x&&(x.c(),x.m(D,null)))},i(U){L||(A(i.$$.fragment,U),A(o.$$.fragment,U),A(u.$$.fragment,U),A(d.$$.fragment,U),A(b.$$.fragment,U),A(C.$$.fragment,U),A(Q),L=!0)},o(U){P(i.$$.fragment,U),P(o.$$.fragment,U),P(u.$$.fragment,U),P(d.$$.fragment,U),P(b.$$.fragment,U),P(C.$$.fragment,U),P(Q),L=!1},d(U){U&&w(e),H(i),H(o),U&&w(r),U&&w(a),H(u),H(d),H(b),U&&w(y),U&&w(k),U&&w($),H(C,U),U&&w(M),Q&&Q.d(U),U&&w(T),U&&w(D),x.d()}}}function lD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function oD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender name"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderName),r||(a=K(l,"input",n[11]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderName&&ce(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function rD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender address"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","email"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderAddress),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderAddress&&ce(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function aD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[29]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[29])},m(c,d){S(c,e,d),e.checked=n[0].smtp.enabled,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[16]),Ee(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&536870912&&t!==(t=c[29])&&p(e,"id",t),d&1&&(e.checked=c[0].smtp.enabled),d&536870912&&a!==(a=c[29])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function fh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$;return i=new ge({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[uD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[fD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[cD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field",name:"smtp.username",$$slots:{default:[dD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),b=new ge({props:{class:"form-field",name:"smtp.password",$$slots:{default:[pD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(b.$$.fragment),g=O(),y=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(e,"class","grid")},m(C,M){S(C,e,M),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(b,m,null),_(e,g),_(e,y),$=!0},p(C,M){const T={};M&1610612737&&(T.$$scope={dirty:M,ctx:C}),i.$set(T);const D={};M&1610612737&&(D.$$scope={dirty:M,ctx:C}),o.$set(D);const E={};M&1610612737&&(E.$$scope={dirty:M,ctx:C}),u.$set(E);const I={};M&1610612737&&(I.$$scope={dirty:M,ctx:C}),d.$set(I);const L={};M&1610612737&&(L.$$scope={dirty:M,ctx:C}),b.$set(L)},i(C){$||(A(i.$$.fragment,C),A(o.$$.fragment,C),A(u.$$.fragment,C),A(d.$$.fragment,C),A(b.$$.fragment,C),C&&xe(()=>{k||(k=je(e,St,{duration:150},!0)),k.run(1)}),$=!0)},o(C){P(i.$$.fragment,C),P(o.$$.fragment,C),P(u.$$.fragment,C),P(d.$$.fragment,C),P(b.$$.fragment,C),C&&(k||(k=je(e,St,{duration:150},!1)),k.run(0)),$=!1},d(C){C&&w(e),H(i),H(o),H(u),H(d),H(b),C&&k&&k.end()}}}function uD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("SMTP server host"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.host),r||(a=K(l,"input",n[17]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.host&&ce(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function fD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Port"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","number"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.port),r||(a=K(l,"input",n[18]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].smtp.port&&ce(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function cD(n){let e,t,i,s,l,o,r;function a(f){n[19](f)}let u={id:n[29],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Es({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("TLS Encryption"),s=O(),j(l.$$.fragment),p(e,"for",i=n[29])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&536870912&&i!==(i=f[29]))&&p(e,"for",i);const d={};c&536870912&&(d.id=f[29]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function dD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Username"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.username),r||(a=K(l,"input",n[20]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.username&&ce(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function pD(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[29]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new Ga({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Password"),s=O(),j(l.$$.fragment),p(e,"for",i=n[29])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&536870912&&i!==(i=f[29]))&&p(e,"for",i);const d={};c&536870912&&(d.id=f[29]),!o&&c&1&&(o=!0,d.value=f[0].smtp.password,ke(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function hD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[24]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function mD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],ne(s,"btn-loading",n[3])},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"click",n[22]),K(s,"click",n[23])],r=!0)},p(u,f){f&8&&(e.disabled=u[3]),f&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f&8&&ne(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Pe(a)}}}function gD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[lD,sD],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[5]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

Configure common settings for sending emails.

",c=O(),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(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=K(u,"submit",ut(n[25])),b=!0)},p(C,M){(!m||M&32)&&ae(o,C[5]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),A(h,1),h.m(u,null))},i(C){m||(A(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function _D(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[gD]},$$scope:{ctx:n}}});let r={};return l=new iD({props:r}),n[26](l),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,[u]){const f={};u&1073741887&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[26](null),H(l,a)}}}function bD(n,e,t){let i,s,l;Ze(n,mt,X=>t(5,l=X));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}];Ht(mt,l="Mail settings",l);let r,a={},u={},f=!1,c=!1;d();async function d(){t(2,f=!0);try{const X=await de.settings.getAll()||{};m(X)}catch(X){de.errorResponseHandler(X)}t(2,f=!1)}async function h(){if(!(c||!s)){t(3,c=!0);try{const X=await de.settings.update(W.filterRedactedProps(u));m(X),Fn({}),Lt("Successfully saved mail settings.")}catch(X){de.errorResponseHandler(X)}t(3,c=!1)}}function m(X={}){t(0,u={meta:(X==null?void 0:X.meta)||{},smtp:(X==null?void 0:X.smtp)||{}}),t(9,a=JSON.parse(JSON.stringify(u)))}function b(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function g(){u.meta.senderName=this.value,t(0,u)}function y(){u.meta.senderAddress=this.value,t(0,u)}function k(X){n.$$.not_equal(u.meta.verificationTemplate,X)&&(u.meta.verificationTemplate=X,t(0,u))}function $(X){n.$$.not_equal(u.meta.resetPasswordTemplate,X)&&(u.meta.resetPasswordTemplate=X,t(0,u))}function C(X){n.$$.not_equal(u.meta.confirmEmailChangeTemplate,X)&&(u.meta.confirmEmailChangeTemplate=X,t(0,u))}function M(){u.smtp.enabled=this.checked,t(0,u)}function T(){u.smtp.host=this.value,t(0,u)}function D(){u.smtp.port=rt(this.value),t(0,u)}function E(X){n.$$.not_equal(u.smtp.tls,X)&&(u.smtp.tls=X,t(0,u))}function I(){u.smtp.username=this.value,t(0,u)}function L(X){n.$$.not_equal(u.smtp.password,X)&&(u.smtp.password=X,t(0,u))}const F=()=>b(),q=()=>h(),z=()=>r==null?void 0:r.show(),J=()=>h();function G(X){le[X?"unshift":"push"](()=>{r=X,t(1,r)})}return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(4,s=i!=JSON.stringify(u))},[u,r,f,c,s,l,o,h,b,a,i,g,y,k,$,C,M,T,D,E,I,L,F,q,z,J,G]}class vD extends ye{constructor(e){super(),ve(this,e,bD,_D,be,{})}}function yD(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;e=new ge({props:{class:"form-field form-field-toggle",$$slots:{default:[wD,({uniqueId:T})=>({25:T}),({uniqueId:T})=>T?33554432:0]},$$scope:{ctx:n}}});let g=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&ch(n),y=n[1].s3.enabled&&dh(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&ph(n),$=n[6]&&hh(n);return{c(){j(e.$$.fragment),t=O(),g&&g.c(),i=O(),y&&y.c(),s=O(),l=v("div"),o=v("div"),r=O(),k&&k.c(),a=O(),$&&$.c(),u=O(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"class","flex-fill"),p(c,"class","txt"),p(f,"type","submit"),p(f,"class","btn btn-expanded"),f.disabled=d=!n[6]||n[3],ne(f,"btn-loading",n[3]),p(l,"class","flex")},m(T,D){R(e,T,D),S(T,t,D),g&&g.m(T,D),S(T,i,D),y&&y.m(T,D),S(T,s,D),S(T,l,D),_(l,o),_(l,r),k&&k.m(l,null),_(l,a),$&&$.m(l,null),_(l,u),_(l,f),_(f,c),h=!0,m||(b=K(f,"click",n[19]),m=!0)},p(T,D){var I,L;const E={};D&100663298&&(E.$$scope={dirty:D,ctx:T}),e.$set(E),((I=T[0].s3)==null?void 0:I.enabled)!=T[1].s3.enabled?g?(g.p(T,D),D&3&&A(g,1)):(g=ch(T),g.c(),A(g,1),g.m(i.parentNode,i)):g&&(pe(),P(g,1,1,()=>{g=null}),he()),T[1].s3.enabled?y?(y.p(T,D),D&2&&A(y,1)):(y=dh(T),y.c(),A(y,1),y.m(s.parentNode,s)):y&&(pe(),P(y,1,1,()=>{y=null}),he()),((L=T[1].s3)==null?void 0:L.enabled)&&!T[6]&&!T[3]?k?k.p(T,D):(k=ph(T),k.c(),k.m(l,a)):k&&(k.d(1),k=null),T[6]?$?$.p(T,D):($=hh(T),$.c(),$.m(l,u)):$&&($.d(1),$=null),(!h||D&72&&d!==(d=!T[6]||T[3]))&&(f.disabled=d),(!h||D&8)&&ne(f,"btn-loading",T[3])},i(T){h||(A(e.$$.fragment,T),A(g),A(y),h=!0)},o(T){P(e.$$.fragment,T),P(g),P(y),h=!1},d(T){H(e,T),T&&w(t),g&&g.d(T),T&&w(i),y&&y.d(T),T&&w(s),T&&w(l),k&&k.d(),$&&$.d(),m=!1,b()}}}function kD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function wD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[25]),e.required=!0,p(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ch(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,b,g,y,k,$,C,M,T,D,E;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=B(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=v("strong"),u=B(a),f=B(` @@ -169,6 +169,6 @@ Updated: ${g[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=g[29])&&p(c," `),o=v("button"),o.innerHTML='Load from JSON file',r=O(),j(a.$$.fragment),u=O(),f=O(),I&&I.c(),c=O(),L&&L.c(),d=O(),F&&F.c(),h=O(),m=v("div"),q&&q.c(),b=O(),g=v("div"),y=O(),k=v("button"),$=v("span"),$.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),ne(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(g,"class","flex-fill"),p($,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(m,"class","flex m-t-base")},m(z,J){S(z,e,J),n[19](e),S(z,t,J),S(z,i,J),_(i,s),_(s,l),_(s,o),S(z,r,J),R(a,z,J),S(z,u,J),S(z,f,J),I&&I.m(z,J),S(z,c,J),L&&L.m(z,J),S(z,d,J),F&&F.m(z,J),S(z,h,J),S(z,m,J),q&&q.m(m,null),_(m,b),_(m,g),_(m,y),_(m,k),_(k,$),M=!0,T||(D=[K(e,"change",n[20]),K(o,"click",n[21]),K(k,"click",n[26])],T=!0)},p(z,J){(!M||J[0]&4096)&&ne(o,"btn-loading",z[12]);const G={};J[0]&64&&(G.class="form-field "+(z[6]?"":"field-error")),J[0]&65|J[1]&1536&&(G.$$scope={dirty:J,ctx:z}),a.$set(G),z[6]&&z[1].length&&!z[7]?I||(I=Zh(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),z[6]&&z[1].length&&z[7]?L?L.p(z,J):(L=Gh(z),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),z[13].length?F?F.p(z,J):(F=rm(z),F.c(),F.m(h.parentNode,h)):F&&(F.d(1),F=null),z[0]?q?q.p(z,J):(q=am(z),q.c(),q.m(m,b)):q&&(q.d(1),q=null),(!M||J[0]&16384&&C!==(C=!z[14]))&&(k.disabled=C)},i(z){M||(A(a.$$.fragment,z),A(E),M=!0)},o(z){P(a.$$.fragment,z),P(E),M=!1},d(z){z&&w(e),n[19](null),z&&w(t),z&&w(i),z&&w(r),H(a,z),z&&w(u),z&&w(f),I&&I.d(z),z&&w(c),L&&L.d(z),z&&w(d),F&&F.d(z),z&&w(h),z&&w(m),q&&q.d(),T=!1,Pe(D)}}}function $A(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function Jh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function CA(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&Jh();return{c(){e=v("label"),t=B("Collections"),s=O(),l=v("textarea"),r=O(),c&&c.c(),a=Ae(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,h){S(d,e,h),_(e,t),S(d,s,h),S(d,l,h),ce(l,n[0]),S(d,r,h),c&&c.m(d,h),S(d,a,h),u||(f=K(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&ce(l,d[0]),!!d[0]&&!d[6]?c||(c=Jh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function Zh(n){let e;return{c(){e=v("div"),e.innerHTML=`
Your collections configuration is already up-to-date!
`,p(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Gh(n){let e,t,i,s,l,o=n[9].length&&Xh(n),r=n[4].length&&em(n),a=n[8].length&&sm(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=O(),i=v("div"),o&&o.c(),s=O(),r&&r.c(),l=O(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),_(i,s),r&&r.m(i,null),_(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=Xh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=em(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=sm(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function Xh(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=O(),s=v("div"),s.innerHTML=`Some of the imported collections shares the same name and/or fields but are imported with different IDs. You can replace them in the import if you want - to.`,l=O(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:te,d(u){u&&w(e),r=!1,a()}}}function am(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function MA(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[$A,SA],m=[];function b(g,y){return g[5]?0:1}return f=b(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[15]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(g,r,y),S(g,a,y),_(a,u),m[f].m(u,null),d=!0},p(g,y){(!d||y[0]&32768)&&ae(o,g[15]);let k=f;f=b(g),f===k?m[f].p(g,y):(pe(),P(m[k],1,1,()=>{m[k]=null}),he(),c=m[f],c?c.p(g,y):(c=m[f]=h[f](g),c.c()),A(c,1),c.m(u,null))},i(g){d||(A(c),d=!0)},o(g){P(c),d=!1},d(g){g&&w(e),g&&w(r),g&&w(a),m[f].d()}}}function TA(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[MA]},$$scope:{ctx:n}}});let r={};return l=new wA({props:r}),n[27](l),l.$on("submit",n[28]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[27](null),H(l,a)}}}function OA(n,e,t){let i,s,l,o,r,a,u;Ze(n,mt,Y=>t(15,u=Y)),Ht(mt,u="Import collections",u);let f,c,d="",h=!1,m=[],b=[],g=!0,y=[],k=!1;$();async function $(){t(5,k=!0);try{t(2,b=await de.collections.getFullList(200));for(let Y of b)delete Y.created,delete Y.updated}catch(Y){de.errorResponseHandler(Y)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let Y of m){const x=W.findByKey(b,"id",Y.id);!(x!=null&&x.id)||!W.hasCollectionChanges(x,Y,g)||y.push({new:Y,old:x})}}function M(){t(1,m=[]);try{t(1,m=JSON.parse(d))}catch{}Array.isArray(m)?t(1,m=W.filterDuplicatesByKey(m)):t(1,m=[]);for(let Y of m)delete Y.created,delete Y.updated,Y.schema=W.filterDuplicatesByKey(Y.schema)}function T(){var Y,x;for(let U of m){const re=W.findByKey(b,"name",U.name)||W.findByKey(b,"id",U.id);if(!re)continue;const Re=U.id,Ne=re.id;U.id=Ne;const Le=Array.isArray(re.schema)?re.schema:[],Fe=Array.isArray(U.schema)?U.schema:[];for(const me of Fe){const Se=W.findByKey(Le,"name",me.name);Se&&Se.id&&(me.id=Se.id)}for(let me of m)if(!!Array.isArray(me.schema))for(let Se of me.schema)((Y=Se.options)==null?void 0:Y.collectionId)&&((x=Se.options)==null?void 0:x.collectionId)===Re&&(Se.options.collectionId=Ne)}t(0,d=JSON.stringify(m,null,4))}function D(Y){t(12,h=!0);const x=new FileReader;x.onload=async U=>{t(12,h=!1),t(10,f.value="",f),t(0,d=U.target.result),await Mn(),m.length||(al("Invalid collections configuration."),E())},x.onerror=U=>{console.warn(U),al("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},x.readAsText(Y)}function E(){t(0,d=""),t(10,f.value="",f),Fn({})}function I(Y){le[Y?"unshift":"push"](()=>{f=Y,t(10,f)})}const L=()=>{f.files.length&&D(f.files[0])},F=()=>{f.click()};function q(){d=this.value,t(0,d)}function z(){g=this.checked,t(3,g)}const J=()=>T(),G=()=>E(),X=()=>c==null?void 0:c.show(b,m,g);function Q(Y){le[Y?"unshift":"push"](()=>{c=Y,t(11,c)})}const ie=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&m.length&&m.length===m.filter(Y=>!!Y.id&&!!Y.name).length),n.$$.dirty[0]&78&&t(9,s=b.filter(Y=>i&&g&&!W.findByKey(m,"id",Y.id))),n.$$.dirty[0]&70&&t(8,l=m.filter(Y=>i&&!W.findByKey(b,"id",Y.id))),n.$$.dirty[0]&10&&(typeof m<"u"||typeof g<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=m.filter(Y=>{let x=W.findByKey(b,"name",Y.name)||W.findByKey(b,"id",Y.id);if(!x)return!1;if(x.id!=Y.id)return!0;const U=Array.isArray(x.schema)?x.schema:[],re=Array.isArray(Y.schema)?Y.schema:[];for(const Re of re){if(W.findByKey(U,"id",Re.id))continue;const Le=W.findByKey(U,"name",Re.name);if(Le&&Re.id!=Le.id)return!0}return!1}))},[d,m,b,g,y,k,i,o,l,s,f,c,h,a,r,u,T,D,E,I,L,F,q,z,J,G,X,Q,ie]}class DA extends ye{constructor(e){super(),ve(this,e,OA,TA,be,{},null,[-1,-1])}}const Ct=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ki("/"):!0}],AA={"/login":vt({component:MO,conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":vt({asyncComponent:()=>st(()=>import("./PageAdminRequestPasswordReset.847f2078.js"),[],import.meta.url),conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageAdminConfirmPasswordReset.33e5cd5b.js"),[],import.meta.url),conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":vt({component:GT,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":vt({component:DS,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":vt({component:FO,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":vt({component:yO,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":vt({component:vD,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":vt({component:ND,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":vt({component:XD,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":vt({component:sA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":vt({component:fA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":vt({component:DA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.145ae561.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.145ae561.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.4f778a06.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.4f778a06.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.ca0271a1.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.ca0271a1.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"*":vt({component:X1,userData:{showAppSidebar:!1}})};function EA(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=Vo}=i;return{delay:f,duration:Yt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,m)=>{const b=m*a,g=m*u,y=h+m*e.width/t.width,k=h+m*e.height/t.height;return`transform: ${l} translate(${b}px, ${g}px) scale(${y}, ${k});`}}}function um(n,e,t){const i=n.slice();return i[2]=e[t],i}function IA(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function PA(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function LA(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function NA(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function fm(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,h=te,m,b,g;function y(M,T){return M[2].type==="info"?NA:M[2].type==="success"?LA:M[2].type==="warning"?PA:IA}let k=y(e),$=k(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),$.c(),s=O(),l=v("div"),r=B(o),a=O(),u=v("button"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),ne(t,"alert-info",e[2].type=="info"),ne(t,"alert-success",e[2].type=="success"),ne(t,"alert-danger",e[2].type=="error"),ne(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,T){S(M,t,T),_(t,i),$.m(i,null),_(t,s),_(t,l),_(l,r),_(t,a),_(t,u),_(t,f),m=!0,b||(g=K(u,"click",ut(C)),b=!0)},p(M,T){e=M,k!==(k=y(e))&&($.d(1),$=k(e),$&&($.c(),$.m(i,null))),(!m||T&1)&&o!==(o=e[2].message+"")&&ae(r,o),(!m||T&1)&&ne(t,"alert-info",e[2].type=="info"),(!m||T&1)&&ne(t,"alert-success",e[2].type=="success"),(!m||T&1)&&ne(t,"alert-danger",e[2].type=="error"),(!m||T&1)&&ne(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){l0(t),h(),vm(t,d)},a(){h(),h=s0(t,d,EA,{duration:150})},i(M){m||(xe(()=>{c||(c=je(t,bo,{duration:150},!0)),c.run(1)}),m=!0)},o(M){c||(c=je(t,bo,{duration:150},!1)),c.run(0),m=!1},d(M){M&&w(t),$.d(),M&&c&&c.end(),b=!1,g()}}}function FA(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>Ag(l)]}class HA extends ye{constructor(e){super(),ve(this,e,RA,FA,be,{})}}function jA(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=B(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){S(l,e,o),_(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&ae(i,t)},d(l){l&&w(e)}}}function qA(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=O(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary 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],ne(s,"btn-loading",n[2])},m(a,u){S(a,e,u),_(e,t),S(a,i,u),S(a,s,u),_(s,l),e.focus(),o||(r=[K(e,"click",n[4]),K(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&ne(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Pe(r)}}}function VA(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:[qA],header:[jA]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function zA(n,e,t){let i;Ze(n,Ya,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){le[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i==null?void 0:i.noCallback)&&i.noCallback(),await Mn(),t(3,o=!1),L_()};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 BA extends ye{constructor(e){super(),ve(this,e,zA,VA,be,{})}}function cm(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k;return b=new Zn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[UA]},$$scope:{ctx:n}}}),{c(){var $;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=O(),s=v("nav"),l=v("a"),l.innerHTML='',o=O(),r=v("a"),r.innerHTML='',a=O(),u=v("a"),u.innerHTML='',f=O(),c=v("figure"),d=v("img"),m=O(),j(b.$$.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"),Ln(d.src,h="./images/avatars/avatar"+((($=n[0])==null?void 0:$.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){S($,e,C),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(e,f),_(e,c),_(c,d),_(c,m),R(b,c,null),g=!0,y||(k=[Ee(Bt.call(null,t)),Ee(Bt.call(null,l)),Ee(An.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ee(Be.call(null,l,{text:"Collections",position:"right"})),Ee(Bt.call(null,r)),Ee(An.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ee(Be.call(null,r,{text:"Logs",position:"right"})),Ee(Bt.call(null,u)),Ee(An.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ee(Be.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p($,C){var T;(!g||C&1&&!Ln(d.src,h="./images/avatars/avatar"+(((T=$[0])==null?void 0:T.avatar)||0)+".svg"))&&p(d,"src",h);const M={};C&1024&&(M.$$scope={dirty:C,ctx:$}),b.$set(M)},i($){g||(A(b.$$.fragment,$),g=!0)},o($){P(b.$$.fragment,$),g=!1},d($){$&&w(e),H(b),y=!1,Pe(k)}}}function UA(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` + to.`,l=O(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:te,d(u){u&&w(e),r=!1,a()}}}function am(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function MA(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[$A,SA],m=[];function b(g,y){return g[5]?0:1}return f=b(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[15]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(g,r,y),S(g,a,y),_(a,u),m[f].m(u,null),d=!0},p(g,y){(!d||y[0]&32768)&&ae(o,g[15]);let k=f;f=b(g),f===k?m[f].p(g,y):(pe(),P(m[k],1,1,()=>{m[k]=null}),he(),c=m[f],c?c.p(g,y):(c=m[f]=h[f](g),c.c()),A(c,1),c.m(u,null))},i(g){d||(A(c),d=!0)},o(g){P(c),d=!1},d(g){g&&w(e),g&&w(r),g&&w(a),m[f].d()}}}function TA(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[MA]},$$scope:{ctx:n}}});let r={};return l=new wA({props:r}),n[27](l),l.$on("submit",n[28]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[27](null),H(l,a)}}}function OA(n,e,t){let i,s,l,o,r,a,u;Ze(n,mt,Y=>t(15,u=Y)),Ht(mt,u="Import collections",u);let f,c,d="",h=!1,m=[],b=[],g=!0,y=[],k=!1;$();async function $(){t(5,k=!0);try{t(2,b=await de.collections.getFullList(200));for(let Y of b)delete Y.created,delete Y.updated}catch(Y){de.errorResponseHandler(Y)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let Y of m){const x=W.findByKey(b,"id",Y.id);!(x!=null&&x.id)||!W.hasCollectionChanges(x,Y,g)||y.push({new:Y,old:x})}}function M(){t(1,m=[]);try{t(1,m=JSON.parse(d))}catch{}Array.isArray(m)?t(1,m=W.filterDuplicatesByKey(m)):t(1,m=[]);for(let Y of m)delete Y.created,delete Y.updated,Y.schema=W.filterDuplicatesByKey(Y.schema)}function T(){var Y,x;for(let U of m){const re=W.findByKey(b,"name",U.name)||W.findByKey(b,"id",U.id);if(!re)continue;const Re=U.id,Ne=re.id;U.id=Ne;const Le=Array.isArray(re.schema)?re.schema:[],Fe=Array.isArray(U.schema)?U.schema:[];for(const me of Fe){const Se=W.findByKey(Le,"name",me.name);Se&&Se.id&&(me.id=Se.id)}for(let me of m)if(!!Array.isArray(me.schema))for(let Se of me.schema)((Y=Se.options)==null?void 0:Y.collectionId)&&((x=Se.options)==null?void 0:x.collectionId)===Re&&(Se.options.collectionId=Ne)}t(0,d=JSON.stringify(m,null,4))}function D(Y){t(12,h=!0);const x=new FileReader;x.onload=async U=>{t(12,h=!1),t(10,f.value="",f),t(0,d=U.target.result),await Mn(),m.length||(al("Invalid collections configuration."),E())},x.onerror=U=>{console.warn(U),al("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},x.readAsText(Y)}function E(){t(0,d=""),t(10,f.value="",f),Fn({})}function I(Y){le[Y?"unshift":"push"](()=>{f=Y,t(10,f)})}const L=()=>{f.files.length&&D(f.files[0])},F=()=>{f.click()};function q(){d=this.value,t(0,d)}function z(){g=this.checked,t(3,g)}const J=()=>T(),G=()=>E(),X=()=>c==null?void 0:c.show(b,m,g);function Q(Y){le[Y?"unshift":"push"](()=>{c=Y,t(11,c)})}const ie=()=>E();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&m.length&&m.length===m.filter(Y=>!!Y.id&&!!Y.name).length),n.$$.dirty[0]&78&&t(9,s=b.filter(Y=>i&&g&&!W.findByKey(m,"id",Y.id))),n.$$.dirty[0]&70&&t(8,l=m.filter(Y=>i&&!W.findByKey(b,"id",Y.id))),n.$$.dirty[0]&10&&(typeof m<"u"||typeof g<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=m.filter(Y=>{let x=W.findByKey(b,"name",Y.name)||W.findByKey(b,"id",Y.id);if(!x)return!1;if(x.id!=Y.id)return!0;const U=Array.isArray(x.schema)?x.schema:[],re=Array.isArray(Y.schema)?Y.schema:[];for(const Re of re){if(W.findByKey(U,"id",Re.id))continue;const Le=W.findByKey(U,"name",Re.name);if(Le&&Re.id!=Le.id)return!0}return!1}))},[d,m,b,g,y,k,i,o,l,s,f,c,h,a,r,u,T,D,E,I,L,F,q,z,J,G,X,Q,ie]}class DA extends ye{constructor(e){super(),ve(this,e,OA,TA,be,{},null,[-1,-1])}}const Ct=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ki("/"):!0}],AA={"/login":vt({component:MO,conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":vt({asyncComponent:()=>st(()=>import("./PageAdminRequestPasswordReset.26fe534b.js"),[],import.meta.url),conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageAdminConfirmPasswordReset.3080c4ea.js"),[],import.meta.url),conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":vt({component:GT,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":vt({component:DS,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":vt({component:FO,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":vt({component:yO,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":vt({component:vD,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":vt({component:ND,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":vt({component:XD,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":vt({component:sA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":vt({component:fA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":vt({component:DA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.988d744d.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.988d744d.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.ecc2b4f9.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.ecc2b4f9.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.c22b2e8b.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.c22b2e8b.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"*":vt({component:X1,userData:{showAppSidebar:!1}})};function EA(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=Vo}=i;return{delay:f,duration:Yt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,m)=>{const b=m*a,g=m*u,y=h+m*e.width/t.width,k=h+m*e.height/t.height;return`transform: ${l} translate(${b}px, ${g}px) scale(${y}, ${k});`}}}function um(n,e,t){const i=n.slice();return i[2]=e[t],i}function IA(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function PA(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function LA(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function NA(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function fm(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,h=te,m,b,g;function y(M,T){return M[2].type==="info"?NA:M[2].type==="success"?LA:M[2].type==="warning"?PA:IA}let k=y(e),$=k(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),$.c(),s=O(),l=v("div"),r=B(o),a=O(),u=v("button"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),ne(t,"alert-info",e[2].type=="info"),ne(t,"alert-success",e[2].type=="success"),ne(t,"alert-danger",e[2].type=="error"),ne(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,T){S(M,t,T),_(t,i),$.m(i,null),_(t,s),_(t,l),_(l,r),_(t,a),_(t,u),_(t,f),m=!0,b||(g=K(u,"click",ut(C)),b=!0)},p(M,T){e=M,k!==(k=y(e))&&($.d(1),$=k(e),$&&($.c(),$.m(i,null))),(!m||T&1)&&o!==(o=e[2].message+"")&&ae(r,o),(!m||T&1)&&ne(t,"alert-info",e[2].type=="info"),(!m||T&1)&&ne(t,"alert-success",e[2].type=="success"),(!m||T&1)&&ne(t,"alert-danger",e[2].type=="error"),(!m||T&1)&&ne(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){l0(t),h(),vm(t,d)},a(){h(),h=s0(t,d,EA,{duration:150})},i(M){m||(xe(()=>{c||(c=je(t,bo,{duration:150},!0)),c.run(1)}),m=!0)},o(M){c||(c=je(t,bo,{duration:150},!1)),c.run(0),m=!1},d(M){M&&w(t),$.d(),M&&c&&c.end(),b=!1,g()}}}function FA(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>Ag(l)]}class HA extends ye{constructor(e){super(),ve(this,e,RA,FA,be,{})}}function jA(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=B(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){S(l,e,o),_(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&ae(i,t)},d(l){l&&w(e)}}}function qA(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=O(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary 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],ne(s,"btn-loading",n[2])},m(a,u){S(a,e,u),_(e,t),S(a,i,u),S(a,s,u),_(s,l),e.focus(),o||(r=[K(e,"click",n[4]),K(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&ne(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Pe(r)}}}function VA(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:[qA],header:[jA]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function zA(n,e,t){let i;Ze(n,Ya,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){le[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i==null?void 0:i.noCallback)&&i.noCallback(),await Mn(),t(3,o=!1),L_()};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 BA extends ye{constructor(e){super(),ve(this,e,zA,VA,be,{})}}function cm(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k;return b=new Zn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[UA]},$$scope:{ctx:n}}}),{c(){var $;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=O(),s=v("nav"),l=v("a"),l.innerHTML='',o=O(),r=v("a"),r.innerHTML='',a=O(),u=v("a"),u.innerHTML='',f=O(),c=v("figure"),d=v("img"),m=O(),j(b.$$.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"),Ln(d.src,h="./images/avatars/avatar"+((($=n[0])==null?void 0:$.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){S($,e,C),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(e,f),_(e,c),_(c,d),_(c,m),R(b,c,null),g=!0,y||(k=[Ee(Bt.call(null,t)),Ee(Bt.call(null,l)),Ee(An.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ee(Be.call(null,l,{text:"Collections",position:"right"})),Ee(Bt.call(null,r)),Ee(An.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ee(Be.call(null,r,{text:"Logs",position:"right"})),Ee(Bt.call(null,u)),Ee(An.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ee(Be.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p($,C){var T;(!g||C&1&&!Ln(d.src,h="./images/avatars/avatar"+(((T=$[0])==null?void 0:T.avatar)||0)+".svg"))&&p(d,"src",h);const M={};C&1024&&(M.$$scope={dirty:C,ctx:$}),b.$set(M)},i($){g||(A(b.$$.fragment,$),g=!0)},o($){P(b.$$.fragment,$),g=!1},d($){$&&w(e),H(b),y=!1,Pe(k)}}}function UA(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` Manage admins`,t=O(),i=v("hr"),s=O(),l=v("button"),l.innerHTML=` - Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Ee(Bt.call(null,e)),K(l,"click",n[6])],o=!0)},p:te,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Pe(r)}}}function WA(n){var h;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=W.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((h=n[0])==null?void 0:h.id)&&n[1]&&cm(n);return o=new b0({props:{routes:AA}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new HA({}),f=new BA({}),{c(){t=O(),i=v("div"),d&&d.c(),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(m,b){S(m,t,b),S(m,i,b),d&&d.m(i,null),_(i,s),_(i,l),R(o,l,null),_(l,r),R(a,l,null),S(m,u,b),R(f,m,b),c=!0},p(m,[b]){var g;(!c||b&12)&&e!==(e=W.joinNonEmpty([m[3],m[2],"PocketBase"]," - "))&&(document.title=e),((g=m[0])==null?void 0:g.id)&&m[1]?d?(d.p(m,b),b&3&&A(d,1)):(d=cm(m),d.c(),A(d,1),d.m(i,s)):d&&(pe(),P(d,1,1,()=>{d=null}),he())},i(m){c||(A(d),A(o.$$.fragment,m),A(a.$$.fragment,m),A(f.$$.fragment,m),c=!0)},o(m){P(d),P(o.$$.fragment,m),P(a.$$.fragment,m),P(f.$$.fragment,m),c=!1},d(m){m&&w(t),m&&w(i),d&&d.d(),H(o),H(a),m&&w(u),H(f,m)}}}function YA(n,e,t){let i,s,l,o;Ze(n,ws,h=>t(8,i=h)),Ze(n,_o,h=>t(2,s=h)),Ze(n,ya,h=>t(0,l=h)),Ze(n,mt,h=>t(3,o=h));let r,a=!1;function u(h){var m,b,g,y;((m=h==null?void 0:h.detail)==null?void 0:m.location)!==r&&(t(1,a=!!((g=(b=h==null?void 0:h.detail)==null?void 0:b.userData)!=null&&g.showAppSidebar)),r=(y=h==null?void 0:h.detail)==null?void 0:y.location,Ht(mt,o="",o),Fn({}),L_())}function f(){ki("/")}async function c(){var h,m;if(!!(l!=null&&l.id))try{const b=await de.settings.getAll({$cancelKey:"initialAppSettings"});Ht(_o,s=((h=b==null?void 0:b.meta)==null?void 0:h.appName)||"",s),Ht(ws,i=!!((m=b==null?void 0:b.meta)!=null&&m.hideControls),i)}catch(b){console.warn("Failed to load app settings.",b)}}function d(){de.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class KA extends ye{constructor(e){super(),ve(this,e,YA,WA,be,{})}}new KA({target:document.getElementById("app")});export{Pe as A,Lt as B,W as C,ki as D,Ae as E,Ig as F,fa as G,ru as H,Ze as I,Zi as J,It as K,Pn as L,cn as M,le as N,I_ as O,bt as P,Gi as Q,en as R,ye as S,Qa as T,P as a,O as b,j as c,H as d,v as e,p as f,S as g,_ as h,ve as i,Ee as j,pe as k,Bt as l,R as m,he as n,w as o,de as p,ge as q,ne as r,be as s,A as t,K as u,ut as v,B as w,ae as x,te as y,ce as z}; + Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Ee(Bt.call(null,e)),K(l,"click",n[6])],o=!0)},p:te,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Pe(r)}}}function WA(n){var h;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=W.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((h=n[0])==null?void 0:h.id)&&n[1]&&cm(n);return o=new b0({props:{routes:AA}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new HA({}),f=new BA({}),{c(){t=O(),i=v("div"),d&&d.c(),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(m,b){S(m,t,b),S(m,i,b),d&&d.m(i,null),_(i,s),_(i,l),R(o,l,null),_(l,r),R(a,l,null),S(m,u,b),R(f,m,b),c=!0},p(m,[b]){var g;(!c||b&12)&&e!==(e=W.joinNonEmpty([m[3],m[2],"PocketBase"]," - "))&&(document.title=e),((g=m[0])==null?void 0:g.id)&&m[1]?d?(d.p(m,b),b&3&&A(d,1)):(d=cm(m),d.c(),A(d,1),d.m(i,s)):d&&(pe(),P(d,1,1,()=>{d=null}),he())},i(m){c||(A(d),A(o.$$.fragment,m),A(a.$$.fragment,m),A(f.$$.fragment,m),c=!0)},o(m){P(d),P(o.$$.fragment,m),P(a.$$.fragment,m),P(f.$$.fragment,m),c=!1},d(m){m&&w(t),m&&w(i),d&&d.d(),H(o),H(a),m&&w(u),H(f,m)}}}function YA(n,e,t){let i,s,l,o;Ze(n,ws,h=>t(8,i=h)),Ze(n,_o,h=>t(2,s=h)),Ze(n,ya,h=>t(0,l=h)),Ze(n,mt,h=>t(3,o=h));let r,a=!1;function u(h){var m,b,g,y;((m=h==null?void 0:h.detail)==null?void 0:m.location)!==r&&(t(1,a=!!((g=(b=h==null?void 0:h.detail)==null?void 0:b.userData)!=null&&g.showAppSidebar)),r=(y=h==null?void 0:h.detail)==null?void 0:y.location,Ht(mt,o="",o),Fn({}),L_())}function f(){ki("/")}async function c(){var h,m;if(!!(l!=null&&l.id))try{const b=await de.settings.getAll({$cancelKey:"initialAppSettings"});Ht(_o,s=((h=b==null?void 0:b.meta)==null?void 0:h.appName)||"",s),Ht(ws,i=!!((m=b==null?void 0:b.meta)!=null&&m.hideControls),i)}catch(b){console.warn("Failed to load app settings.",b)}}function d(){de.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class KA extends ye{constructor(e){super(),ve(this,e,YA,WA,be,{})}}new KA({target:document.getElementById("app")});export{Pe as A,Lt as B,W as C,ki as D,Ae as E,Ig as F,fa as G,ru as H,Ze as I,Zi as J,It as K,cn as L,le as M,I_ as N,bt as O,Gi as P,en as Q,Pn as R,ye as S,Qa as T,P as a,O as b,j as c,H as d,v as e,p as f,S as g,_ as h,ve as i,Ee as j,pe as k,Bt as l,R as m,he as n,w as o,de as p,ge as q,ne as r,be as s,A as t,K as u,ut as v,B as w,ae as x,te as y,ce as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 7ea01531..40a14dca 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -24,7 +24,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/src/components/base/FilterAutocompleteInput.svelte b/ui/src/components/base/FilterAutocompleteInput.svelte index 74e4a695..48d2bb43 100644 --- a/ui/src/components/base/FilterAutocompleteInput.svelte +++ b/ui/src/components/base/FilterAutocompleteInput.svelte @@ -34,7 +34,6 @@ import { onMount, createEventDispatcher } from "svelte"; import CommonHelper from "@/utils/CommonHelper"; import { collections } from "@/stores/collections"; - import { Collection } from "pocketbase"; // code mirror imports // --- import { @@ -71,7 +70,7 @@ export let value = ""; export let disabled = false; export let placeholder = ""; - export let baseCollection = new Collection(); + export let baseCollection = null; export let singleLine = false; export let extraAutocompleteKeys = []; // eg. ["test1", "test2"] export let disableRequestKeys = false; @@ -79,26 +78,32 @@ let editor; let container; + let oldDisabledState = disabled; let langCompartment = new Compartment(); let editableCompartment = new Compartment(); let readOnlyCompartment = new Compartment(); let placeholderCompartment = new Compartment(); - let cachedBaseKeys = []; + let mergedCollections = []; let cachedRequestKeys = []; let cachedIndirectCollectionKeys = []; - - $: collectionType = baseCollection.type; // cache the collection type + let cachedBaseKeys = []; + let baseKeysChangeHash = ""; + let oldBaseKeysChangeHash = ""; $: mergedCollections = mergeWithBaseCollection($collections); - $: if ( - collectionType || - mergedCollections !== -1 || - disableRequestKeys !== -1 || - disableIndirectCollectionsKeys !== -1 - ) { + $: baseKeysChangeHash = getCollectionKeysChangeHash(baseCollection); + + $: if (!disabled && oldBaseKeysChangeHash != baseKeysChangeHash) { + oldBaseKeysChangeHash = baseKeysChangeHash; cachedBaseKeys = getBaseKeys(); + } + + $: if ( + !disabled && + (mergedCollections !== -1 || disableRequestKeys !== -1 || disableIndirectCollectionsKeys !== -1) + ) { cachedRequestKeys = !disableRequestKeys ? getRequestKeys() : []; cachedIndirectCollectionKeys = !disableIndirectCollectionsKeys ? getIndirectCollectionKeys() : []; } @@ -113,14 +118,14 @@ }); } - $: if (editor && typeof disabled !== "undefined") { + $: if (editor && oldDisabledState != disabled) { editor.dispatch({ effects: [ editableCompartment.reconfigure(EditorView.editable.of(!disabled)), readOnlyCompartment.reconfigure(EditorState.readOnly.of(disabled)), ], }); - + oldDisabledState = disabled; triggerNativeChange(); } @@ -145,6 +150,11 @@ editor?.focus(); } + // Return a collection keys hash string that can be used to compare with previous states. + function getCollectionKeysChangeHash(collection) { + return JSON.stringify([collection?.type, collection?.schema]); + } + // Replace the base collection in the provided list. function mergeWithBaseCollection(collections) { let copy = collections.slice(); @@ -226,7 +236,7 @@ } function getBaseKeys() { - return getCollectionFieldKeys(baseCollection.name); + return getCollectionFieldKeys(baseCollection?.name); } function getRequestKeys() { @@ -277,16 +287,16 @@ let result = [].concat(extraAutocompleteKeys); // add base keys - result = result.concat(cachedBaseKeys); + result = result.concat(cachedBaseKeys || []); // add @request.* keys if (includeRequestKeys) { - result = result.concat(cachedRequestKeys); + result = result.concat(cachedRequestKeys || []); } // add @collections.* keys if (includeIndirectCollectionsKeys) { - result = result.concat(cachedIndirectCollectionKeys); + result = result.concat(cachedIndirectCollectionKeys || []); } // sort longer keys first because the highlighter will highlight @@ -405,8 +415,8 @@ icons: false, }), placeholderCompartment.of(placeholderExt(placeholder)), - editableCompartment.of(EditorView.editable.of(true)), - readOnlyCompartment.of(EditorState.readOnly.of(false)), + editableCompartment.of(EditorView.editable.of(!disabled)), + readOnlyCompartment.of(EditorState.readOnly.of(disabled)), langCompartment.of(ruleLang()), EditorState.transactionFilter.of((tr) => { return singleLine && tr.newDoc.lines > 1 ? [] : tr;