From d1336da3393e85596b7385c41a805df5677a1650 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Sat, 22 Jul 2023 18:50:40 +0300 Subject: [PATCH] make use of skipTotal --- CHANGELOG.md | 2 +- tools/filesystem/filesystem.go | 5 +- tools/filesystem/filesystem_test.go | 2 +- ...b2c92b1.js => AuthMethodsDocs-e443370f.js} | 2 +- ...6051ba5.js => AuthRefreshDocs-050ecbaf.js} | 2 +- ...87b2.js => AuthWithOAuth2Docs-e2500223.js} | 2 +- ...44.js => AuthWithPasswordDocs-d010af6f.js} | 2 +- ...tor-bc0a826d.js => CodeEditor-14802b79.js} | 2 +- ....js => ConfirmEmailChangeDocs-1ba40b3f.js} | 2 +- ...s => ConfirmPasswordResetDocs-95a862f9.js} | 2 +- ...js => ConfirmVerificationDocs-70b00c0a.js} | 2 +- ...-5fb73b64.js => CreateApiDocs-8f33628d.js} | 2 +- ...-b77c2bda.js => DeleteApiDocs-0c4ec69e.js} | 2 +- ...f60100.js => FieldsQueryParam-b7007fe9.js} | 2 +- ...js => FilterAutocompleteInput-0a8b8b21.js} | 2 +- ...cs-9496970d.js => ListApiDocs-b3571a57.js} | 2 +- ...d.js => ListExternalAuthsDocs-ad614d24.js} | 2 +- ...PageAdminConfirmPasswordReset-1f7edcea.js} | 2 +- ...PageAdminRequestPasswordReset-de9101ef.js} | 2 +- ...4748.js => PageOAuth2Redirect-b6ce072a.js} | 2 +- ... PageRecordConfirmEmailChange-87912255.js} | 2 +- ...ageRecordConfirmPasswordReset-40637d9b.js} | 2 +- ...PageRecordConfirmVerification-e5397224.js} | 2 +- ...a350ca2.js => RealtimeApiDocs-32f89e17.js} | 2 +- ....js => RequestEmailChangeDocs-e46a24c9.js} | 2 +- ...s => RequestPasswordResetDocs-60d01d4d.js} | 2 +- ...js => RequestVerificationDocs-6ccba240.js} | 2 +- ...dkTabs-ad20c86c.js => SdkTabs-cc2b5912.js} | 2 +- ....js => UnlinkExternalAuthDocs-f29fdf14.js} | 2 +- ...-da4d34d2.js => UpdateApiDocs-97d4a9f2.js} | 2 +- ...cs-4c8d969c.js => ViewApiDocs-0b86dfe3.js} | 2 +- .../{index-f2972fa8.js => index-1097b3a4.js} | 190 +++++++++--------- ui/dist/index.html | 2 +- ui/package-lock.json | 14 +- ui/package.json | 2 +- .../components/records/RecordsPicker.svelte | 55 +++-- 36 files changed, 171 insertions(+), 157 deletions(-) rename ui/dist/assets/{AuthMethodsDocs-fb2c92b1.js => AuthMethodsDocs-e443370f.js} (97%) rename ui/dist/assets/{AuthRefreshDocs-d6051ba5.js => AuthRefreshDocs-050ecbaf.js} (97%) rename ui/dist/assets/{AuthWithOAuth2Docs-c14d87b2.js => AuthWithOAuth2Docs-e2500223.js} (98%) rename ui/dist/assets/{AuthWithPasswordDocs-bfa12c44.js => AuthWithPasswordDocs-d010af6f.js} (98%) rename ui/dist/assets/{CodeEditor-bc0a826d.js => CodeEditor-14802b79.js} (99%) rename ui/dist/assets/{ConfirmEmailChangeDocs-47c2e1d1.js => ConfirmEmailChangeDocs-1ba40b3f.js} (97%) rename ui/dist/assets/{ConfirmPasswordResetDocs-dee08d33.js => ConfirmPasswordResetDocs-95a862f9.js} (98%) rename ui/dist/assets/{ConfirmVerificationDocs-25b0cae5.js => ConfirmVerificationDocs-70b00c0a.js} (97%) rename ui/dist/assets/{CreateApiDocs-5fb73b64.js => CreateApiDocs-8f33628d.js} (98%) rename ui/dist/assets/{DeleteApiDocs-b77c2bda.js => DeleteApiDocs-0c4ec69e.js} (97%) rename ui/dist/assets/{FieldsQueryParam-38f60100.js => FieldsQueryParam-b7007fe9.js} (88%) rename ui/dist/assets/{FilterAutocompleteInput-49490f14.js => FilterAutocompleteInput-0a8b8b21.js} (99%) rename ui/dist/assets/{ListApiDocs-9496970d.js => ListApiDocs-b3571a57.js} (99%) rename ui/dist/assets/{ListExternalAuthsDocs-2d8d09bd.js => ListExternalAuthsDocs-ad614d24.js} (97%) rename ui/dist/assets/{PageAdminConfirmPasswordReset-2ddacfe8.js => PageAdminConfirmPasswordReset-1f7edcea.js} (98%) rename ui/dist/assets/{PageAdminRequestPasswordReset-39ec325e.js => PageAdminRequestPasswordReset-de9101ef.js} (98%) rename ui/dist/assets/{PageOAuth2Redirect-88044748.js => PageOAuth2Redirect-b6ce072a.js} (87%) rename ui/dist/assets/{PageRecordConfirmEmailChange-5990e635.js => PageRecordConfirmEmailChange-87912255.js} (98%) rename ui/dist/assets/{PageRecordConfirmPasswordReset-c9a66dba.js => PageRecordConfirmPasswordReset-40637d9b.js} (98%) rename ui/dist/assets/{PageRecordConfirmVerification-96a0e95d.js => PageRecordConfirmVerification-e5397224.js} (97%) rename ui/dist/assets/{RealtimeApiDocs-fa350ca2.js => RealtimeApiDocs-32f89e17.js} (98%) rename ui/dist/assets/{RequestEmailChangeDocs-b770c6f7.js => RequestEmailChangeDocs-e46a24c9.js} (98%) rename ui/dist/assets/{RequestPasswordResetDocs-288fb230.js => RequestPasswordResetDocs-60d01d4d.js} (97%) rename ui/dist/assets/{RequestVerificationDocs-0ec5a242.js => RequestVerificationDocs-6ccba240.js} (97%) rename ui/dist/assets/{SdkTabs-ad20c86c.js => SdkTabs-cc2b5912.js} (96%) rename ui/dist/assets/{UnlinkExternalAuthDocs-c61aed44.js => UnlinkExternalAuthDocs-f29fdf14.js} (98%) rename ui/dist/assets/{UpdateApiDocs-da4d34d2.js => UpdateApiDocs-97d4a9f2.js} (98%) rename ui/dist/assets/{ViewApiDocs-4c8d969c.js => ViewApiDocs-0b86dfe3.js} (97%) rename ui/dist/assets/{index-f2972fa8.js => index-1097b3a4.js} (67%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cb44de4..c2d1d589 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,7 +89,7 @@ - **!** Changed the type of `subscriptions.Message.Data` from `string` to `[]byte` because `Data` usually is a json bytes slice anyway. -- Added `?download` file query parameter option to instruct the browser to always download a file and not show a preview. +- Added `?download=1` file query parameter option to instruct the browser to always download a file and not show a preview. - Added support for wrapped API errors (_in case Go 1.20+ is used with multiple wrapped errors, `apis.ApiError` takes precedence_). diff --git a/tools/filesystem/filesystem.go b/tools/filesystem/filesystem.go index c31e45f6..02bf46a0 100644 --- a/tools/filesystem/filesystem.go +++ b/tools/filesystem/filesystem.go @@ -336,7 +336,10 @@ func (s *System) Serve(res http.ResponseWriter, req *http.Request, fileKey strin } defer br.Close() - forceAttachment := req.URL.Query().Has(forceAttachmentParam) + var forceAttachment bool + if raw := req.URL.Query().Get(forceAttachmentParam); raw != "" { + forceAttachment, _ = strconv.ParseBool(raw) + } disposition := "attachment" realContentType := br.ContentType() diff --git a/tools/filesystem/filesystem_test.go b/tools/filesystem/filesystem_test.go index ce81a05a..3667aee0 100644 --- a/tools/filesystem/filesystem_test.go +++ b/tools/filesystem/filesystem_test.go @@ -305,7 +305,7 @@ func TestFileSystemServe(t *testing.T) { // png with forced attachment "image.png", "test_name_download.png", - map[string]string{"download": "12"}, + map[string]string{"download": "1"}, nil, false, map[string]string{ diff --git a/ui/dist/assets/AuthMethodsDocs-fb2c92b1.js b/ui/dist/assets/AuthMethodsDocs-e443370f.js similarity index 97% rename from ui/dist/assets/AuthMethodsDocs-fb2c92b1.js rename to ui/dist/assets/AuthMethodsDocs-e443370f.js index 0d471b0b..b294f2c7 100644 --- a/ui/dist/assets/AuthMethodsDocs-fb2c92b1.js +++ b/ui/dist/assets/AuthMethodsDocs-e443370f.js @@ -1,4 +1,4 @@ -import{S as $e,i as Se,s as ye,e as c,w,b as k,c as oe,f as h,g as d,h as a,m as se,x as G,N as we,P as Te,k as je,Q as Ae,n as Be,t as U,a as W,o as u,d as ae,T as Fe,C as Oe,p as Qe,r as V,u as Ne,M as He}from"./index-f2972fa8.js";import{S as Ke}from"./SdkTabs-ad20c86c.js";import{F as qe}from"./FieldsQueryParam-38f60100.js";function ve(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l){let o,s=l[5].code+"",_,p,i,f;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),p=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,p),i||(f=Ne(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&V(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,f()}}}function Me(n,l){let o,s,_,p;return s=new He({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),oe(s.$$.fragment),_=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(i,f){d(i,o,f),se(s,o,null),a(o,_),p=!0},p(i,f){l=i;const m={};f&4&&(m.content=l[5].body),s.$set(m),(!p||f&6)&&V(o,"active",l[1]===l[5].code)},i(i){p||(U(s.$$.fragment,i),p=!0)},o(i){W(s.$$.fragment,i),p=!1},d(i){i&&u(o),ae(s)}}}function ze(n){var _e,be;let l,o,s=n[0].name+"",_,p,i,f,m,v,C,H=n[0].name+"",L,ne,E,P,I,j,J,M,K,ie,q,A,ce,Y,z=n[0].name+"",X,re,R,B,Z,$,x,de,ee,T,te,F,le,S,O,g=[],ue=new Map,fe,Q,b=[],me=new Map,y;P=new Ke({props:{js:` +import{S as $e,i as Se,s as ye,e as c,w,b as k,c as oe,f as h,g as d,h as a,m as se,x as G,N as we,P as Te,k as je,Q as Ae,n as Be,t as U,a as W,o as u,d as ae,T as Fe,C as Oe,p as Qe,r as V,u as Ne,M as He}from"./index-1097b3a4.js";import{S as Ke}from"./SdkTabs-cc2b5912.js";import{F as qe}from"./FieldsQueryParam-b7007fe9.js";function ve(n,l,o){const s=n.slice();return s[5]=l[o],s}function Ce(n,l,o){const s=n.slice();return s[5]=l[o],s}function Pe(n,l){let o,s=l[5].code+"",_,p,i,f;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=c("button"),_=w(s),p=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(v,C){d(v,o,C),a(o,_),a(o,p),i||(f=Ne(o,"click",m),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(_,s),C&6&&V(o,"active",l[1]===l[5].code)},d(v){v&&u(o),i=!1,f()}}}function Me(n,l){let o,s,_,p;return s=new He({props:{content:l[5].body}}),{key:n,first:null,c(){o=c("div"),oe(s.$$.fragment),_=k(),h(o,"class","tab-item"),V(o,"active",l[1]===l[5].code),this.first=o},m(i,f){d(i,o,f),se(s,o,null),a(o,_),p=!0},p(i,f){l=i;const m={};f&4&&(m.content=l[5].body),s.$set(m),(!p||f&6)&&V(o,"active",l[1]===l[5].code)},i(i){p||(U(s.$$.fragment,i),p=!0)},o(i){W(s.$$.fragment,i),p=!1},d(i){i&&u(o),ae(s)}}}function ze(n){var _e,be;let l,o,s=n[0].name+"",_,p,i,f,m,v,C,H=n[0].name+"",L,ne,E,P,I,j,J,M,K,ie,q,A,ce,Y,z=n[0].name+"",X,re,R,B,Z,$,x,de,ee,T,te,F,le,S,O,g=[],ue=new Map,fe,Q,b=[],me=new Map,y;P=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/AuthRefreshDocs-d6051ba5.js b/ui/dist/assets/AuthRefreshDocs-050ecbaf.js similarity index 97% rename from ui/dist/assets/AuthRefreshDocs-d6051ba5.js rename to ui/dist/assets/AuthRefreshDocs-050ecbaf.js index 47e33b5a..f3a562a1 100644 --- a/ui/dist/assets/AuthRefreshDocs-d6051ba5.js +++ b/ui/dist/assets/AuthRefreshDocs-050ecbaf.js @@ -1,4 +1,4 @@ -import{S as Ue,i as je,s as xe,M as Qe,e as s,w as k,b as p,c as J,f as b,g as d,h as o,m as K,x as ce,N as Oe,P as Je,k as Ke,Q as Ie,n as We,t as N,a as V,o as u,d as I,T as Ge,C as Ee,p as Xe,r as W,u as Ye}from"./index-f2972fa8.js";import{S as Ze}from"./SdkTabs-ad20c86c.js";import{F as et}from"./FieldsQueryParam-38f60100.js";function Le(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l){let a,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m($,w){d($,a,w),o(a,m),o(a,_),i||(f=Ye(a,"click",v),i=!0)},p($,w){l=$,w&4&&n!==(n=l[5].code+"")&&ce(m,n),w&6&&W(a,"active",l[1]===l[5].code)},d($){$&&u(a),i=!1,f()}}}function ze(r,l){let a,n,m,_;return n=new Qe({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),J(n.$$.fragment),m=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m(i,f){d(i,a,f),K(n,a,null),o(a,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&W(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),I(n)}}}function tt(r){var qe,De;let l,a,n=r[0].name+"",m,_,i,f,v,$,w,B,G,S,z,de,Q,q,ue,X,U=r[0].name+"",Y,pe,fe,j,Z,D,ee,T,te,he,F,C,oe,be,le,me,h,_e,R,ke,ve,$e,ae,ge,se,ye,Se,we,ne,Te,Ce,M,re,H,ie,P,O,y=[],Pe=new Map,Re,E,g=[],Me=new Map,A;$=new Ze({props:{js:` +import{S as Ue,i as je,s as xe,M as Qe,e as s,w as k,b as p,c as J,f as b,g as d,h as o,m as K,x as ce,N as Oe,P as Je,k as Ke,Q as Ie,n as We,t as N,a as V,o as u,d as I,T as Ge,C as Ee,p as Xe,r as W,u as Ye}from"./index-1097b3a4.js";import{S as Ze}from"./SdkTabs-cc2b5912.js";import{F as et}from"./FieldsQueryParam-b7007fe9.js";function Le(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ne(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ve(r,l){let a,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){a=s("button"),m=k(n),_=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m($,w){d($,a,w),o(a,m),o(a,_),i||(f=Ye(a,"click",v),i=!0)},p($,w){l=$,w&4&&n!==(n=l[5].code+"")&&ce(m,n),w&6&&W(a,"active",l[1]===l[5].code)},d($){$&&u(a),i=!1,f()}}}function ze(r,l){let a,n,m,_;return n=new Qe({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),J(n.$$.fragment),m=p(),b(a,"class","tab-item"),W(a,"active",l[1]===l[5].code),this.first=a},m(i,f){d(i,a,f),K(n,a,null),o(a,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&W(a,"active",l[1]===l[5].code)},i(i){_||(N(n.$$.fragment,i),_=!0)},o(i){V(n.$$.fragment,i),_=!1},d(i){i&&u(a),I(n)}}}function tt(r){var qe,De;let l,a,n=r[0].name+"",m,_,i,f,v,$,w,B,G,S,z,de,Q,q,ue,X,U=r[0].name+"",Y,pe,fe,j,Z,D,ee,T,te,he,F,C,oe,be,le,me,h,_e,R,ke,ve,$e,ae,ge,se,ye,Se,we,ne,Te,Ce,M,re,H,ie,P,O,y=[],Pe=new Map,Re,E,g=[],Me=new Map,A;$=new Ze({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs-c14d87b2.js b/ui/dist/assets/AuthWithOAuth2Docs-e2500223.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs-c14d87b2.js rename to ui/dist/assets/AuthWithOAuth2Docs-e2500223.js index 767ebd2f..604d9659 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs-c14d87b2.js +++ b/ui/dist/assets/AuthWithOAuth2Docs-e2500223.js @@ -1,4 +1,4 @@ -import{S as Ve,i as Le,s as Ee,M as je,e as s,w as k,b as h,c as z,f as p,g as r,h as a,m as I,x as he,N as xe,P as Je,k as Ne,Q as Qe,n as ze,t as V,a as L,o as c,d as K,T as Ie,C as We,p as Ke,r as G,u as Ge}from"./index-f2972fa8.js";import{S as Xe}from"./SdkTabs-ad20c86c.js";import{F as Ye}from"./FieldsQueryParam-38f60100.js";function Ue(i,l,o){const n=i.slice();return n[5]=l[o],n}function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l){let o,n=l[5].code+"",m,g,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=k(n),g=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,g),u||(b=Ge(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&he(m,n),A&6&&G(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function He(i,l){let o,n,m,g;return n=new je({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),z(n.$$.fragment),m=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),I(n,o,null),a(o,m),g=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!g||b&6)&&G(o,"active",l[1]===l[5].code)},i(u){g||(V(n.$$.fragment,u),g=!0)},o(u){L(n.$$.fragment,u),g=!1},d(u){u&&c(o),K(n)}}}function Ze(i){let l,o,n=i[0].name+"",m,g,u,b,_,v,A,P,X,S,E,pe,J,M,be,Y,N=i[0].name+"",Z,fe,ee,R,te,x,ae,W,le,y,oe,me,U,$,se,ge,ne,ke,f,_e,C,ve,we,Oe,ie,Ae,re,Se,ye,$e,ce,Te,Ce,q,ue,B,de,T,F,O=[],qe=new Map,De,H,w=[],Pe=new Map,D;v=new Xe({props:{js:` +import{S as Ve,i as Le,s as Ee,M as je,e as s,w as k,b as h,c as z,f as p,g as r,h as a,m as I,x as he,N as xe,P as Je,k as Ne,Q as Qe,n as ze,t as V,a as L,o as c,d as K,T as Ie,C as We,p as Ke,r as G,u as Ge}from"./index-1097b3a4.js";import{S as Xe}from"./SdkTabs-cc2b5912.js";import{F as Ye}from"./FieldsQueryParam-b7007fe9.js";function Ue(i,l,o){const n=i.slice();return n[5]=l[o],n}function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l){let o,n=l[5].code+"",m,g,u,b;function _(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=k(n),g=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(v,A){r(v,o,A),a(o,m),a(o,g),u||(b=Ge(o,"click",_),u=!0)},p(v,A){l=v,A&4&&n!==(n=l[5].code+"")&&he(m,n),A&6&&G(o,"active",l[1]===l[5].code)},d(v){v&&c(o),u=!1,b()}}}function He(i,l){let o,n,m,g;return n=new je({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),z(n.$$.fragment),m=h(),p(o,"class","tab-item"),G(o,"active",l[1]===l[5].code),this.first=o},m(u,b){r(u,o,b),I(n,o,null),a(o,m),g=!0},p(u,b){l=u;const _={};b&4&&(_.content=l[5].body),n.$set(_),(!g||b&6)&&G(o,"active",l[1]===l[5].code)},i(u){g||(V(n.$$.fragment,u),g=!0)},o(u){L(n.$$.fragment,u),g=!1},d(u){u&&c(o),K(n)}}}function Ze(i){let l,o,n=i[0].name+"",m,g,u,b,_,v,A,P,X,S,E,pe,J,M,be,Y,N=i[0].name+"",Z,fe,ee,R,te,x,ae,W,le,y,oe,me,U,$,se,ge,ne,ke,f,_e,C,ve,we,Oe,ie,Ae,re,Se,ye,$e,ce,Te,Ce,q,ue,B,de,T,F,O=[],qe=new Map,De,H,w=[],Pe=new Map,D;v=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/AuthWithPasswordDocs-bfa12c44.js b/ui/dist/assets/AuthWithPasswordDocs-d010af6f.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs-bfa12c44.js rename to ui/dist/assets/AuthWithPasswordDocs-d010af6f.js index 50ff00a9..bbae09c5 100644 --- a/ui/dist/assets/AuthWithPasswordDocs-bfa12c44.js +++ b/ui/dist/assets/AuthWithPasswordDocs-d010af6f.js @@ -1,4 +1,4 @@ -import{S as ve,i as ye,s as ge,M as we,e as s,w as f,b as d,c as ot,f as h,g as r,h as e,m as st,x as Ut,N as ue,P as $e,k as Pe,Q as Re,n as Ce,t as Z,a as x,o as c,d as nt,T as Te,C as fe,p as Ae,r as it,u as Oe}from"./index-f2972fa8.js";import{S as Me}from"./SdkTabs-ad20c86c.js";import{F as Ue}from"./FieldsQueryParam-38f60100.js";function pe(n,l,a){const i=n.slice();return i[8]=l[a],i}function be(n,l,a){const i=n.slice();return i[8]=l[a],i}function De(n){let l;return{c(){l=f("email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function Ee(n){let l;return{c(){l=f("username")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function We(n){let l;return{c(){l=f("username/email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function me(n){let l;return{c(){l=s("strong"),l.textContent="username"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function he(n){let l;return{c(){l=f("or")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function _e(n){let l;return{c(){l=s("strong"),l.textContent="email"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ke(n,l){let a,i=l[8].code+"",S,m,p,u;function _(){return l[7](l[8])}return{key:n,first:null,c(){a=s("button"),S=f(i),m=d(),h(a,"class","tab-item"),it(a,"active",l[3]===l[8].code),this.first=a},m(R,C){r(R,a,C),e(a,S),e(a,m),p||(u=Oe(a,"click",_),p=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Ut(S,i),C&24&&it(a,"active",l[3]===l[8].code)},d(R){R&&c(a),p=!1,u()}}}function Se(n,l){let a,i,S,m;return i=new we({props:{content:l[8].body}}),{key:n,first:null,c(){a=s("div"),ot(i.$$.fragment),S=d(),h(a,"class","tab-item"),it(a,"active",l[3]===l[8].code),this.first=a},m(p,u){r(p,a,u),st(i,a,null),e(a,S),m=!0},p(p,u){l=p;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!m||u&24)&&it(a,"active",l[3]===l[8].code)},i(p){m||(Z(i.$$.fragment,p),m=!0)},o(p){x(i.$$.fragment,p),m=!1},d(p){p&&c(a),nt(i)}}}function Le(n){var ie,re;let l,a,i=n[0].name+"",S,m,p,u,_,R,C,T,B,Dt,rt,O,ct,N,dt,M,tt,Et,et,I,Wt,ut,lt=n[0].name+"",ft,Lt,pt,V,bt,U,mt,Bt,Q,D,ht,qt,_t,Ft,$,Ht,kt,St,wt,Yt,vt,yt,j,gt,E,$t,Nt,J,W,Pt,It,Rt,Vt,k,Qt,q,jt,Jt,Kt,Ct,zt,Tt,Gt,Xt,Zt,At,xt,te,F,Ot,K,Mt,L,z,A=[],ee=new Map,le,G,w=[],ae=new Map,H;function oe(t,o){if(t[1]&&t[2])return We;if(t[1])return Ee;if(t[2])return De}let Y=oe(n),P=Y&&Y(n);O=new Me({props:{js:` +import{S as ve,i as ye,s as ge,M as we,e as s,w as f,b as d,c as ot,f as h,g as r,h as e,m as st,x as Ut,N as ue,P as $e,k as Pe,Q as Re,n as Ce,t as Z,a as x,o as c,d as nt,T as Te,C as fe,p as Ae,r as it,u as Oe}from"./index-1097b3a4.js";import{S as Me}from"./SdkTabs-cc2b5912.js";import{F as Ue}from"./FieldsQueryParam-b7007fe9.js";function pe(n,l,a){const i=n.slice();return i[8]=l[a],i}function be(n,l,a){const i=n.slice();return i[8]=l[a],i}function De(n){let l;return{c(){l=f("email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function Ee(n){let l;return{c(){l=f("username")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function We(n){let l;return{c(){l=f("username/email")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function me(n){let l;return{c(){l=s("strong"),l.textContent="username"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function he(n){let l;return{c(){l=f("or")},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function _e(n){let l;return{c(){l=s("strong"),l.textContent="email"},m(a,i){r(a,l,i)},d(a){a&&c(l)}}}function ke(n,l){let a,i=l[8].code+"",S,m,p,u;function _(){return l[7](l[8])}return{key:n,first:null,c(){a=s("button"),S=f(i),m=d(),h(a,"class","tab-item"),it(a,"active",l[3]===l[8].code),this.first=a},m(R,C){r(R,a,C),e(a,S),e(a,m),p||(u=Oe(a,"click",_),p=!0)},p(R,C){l=R,C&16&&i!==(i=l[8].code+"")&&Ut(S,i),C&24&&it(a,"active",l[3]===l[8].code)},d(R){R&&c(a),p=!1,u()}}}function Se(n,l){let a,i,S,m;return i=new we({props:{content:l[8].body}}),{key:n,first:null,c(){a=s("div"),ot(i.$$.fragment),S=d(),h(a,"class","tab-item"),it(a,"active",l[3]===l[8].code),this.first=a},m(p,u){r(p,a,u),st(i,a,null),e(a,S),m=!0},p(p,u){l=p;const _={};u&16&&(_.content=l[8].body),i.$set(_),(!m||u&24)&&it(a,"active",l[3]===l[8].code)},i(p){m||(Z(i.$$.fragment,p),m=!0)},o(p){x(i.$$.fragment,p),m=!1},d(p){p&&c(a),nt(i)}}}function Le(n){var ie,re;let l,a,i=n[0].name+"",S,m,p,u,_,R,C,T,B,Dt,rt,O,ct,N,dt,M,tt,Et,et,I,Wt,ut,lt=n[0].name+"",ft,Lt,pt,V,bt,U,mt,Bt,Q,D,ht,qt,_t,Ft,$,Ht,kt,St,wt,Yt,vt,yt,j,gt,E,$t,Nt,J,W,Pt,It,Rt,Vt,k,Qt,q,jt,Jt,Kt,Ct,zt,Tt,Gt,Xt,Zt,At,xt,te,F,Ot,K,Mt,L,z,A=[],ee=new Map,le,G,w=[],ae=new Map,H;function oe(t,o){if(t[1]&&t[2])return We;if(t[1])return Ee;if(t[2])return De}let Y=oe(n),P=Y&&Y(n);O=new Me({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); diff --git a/ui/dist/assets/CodeEditor-bc0a826d.js b/ui/dist/assets/CodeEditor-14802b79.js similarity index 99% rename from ui/dist/assets/CodeEditor-bc0a826d.js rename to ui/dist/assets/CodeEditor-14802b79.js index a126afe0..dceb9081 100644 --- a/ui/dist/assets/CodeEditor-bc0a826d.js +++ b/ui/dist/assets/CodeEditor-14802b79.js @@ -1,4 +1,4 @@ -import{S as $t,i as gt,s as mt,e as Xt,f as Pt,U as D,g as Zt,y as je,o as bt,I as xt,J as kt,K as wt,H as yt,C as Yt,L as Tt}from"./index-f2972fa8.js";import{P as Ut,N as vt,u as Vt,D as Rt,v as Ye,T as M,I as Te,w as oe,x as n,y as _t,L as ce,z as Qe,A,B as ue,F as kO,G as fe,H as q,J as wO,K as yO,M as YO,E as U,O as E,Q as Ct,R as Wt,U as TO,V as P,W as qt,X as jt,a as j,h as zt,b as Gt,c as It,d as At,e as Et,s as Nt,t as Bt,f as Dt,g as Jt,r as Lt,i as Mt,k as Ft,j as Kt,l as Ht,m as ea,n as Oa,o as ta,p as aa,q as ze,C as J}from"./index-fd4289fb.js";class ee{constructor(e,a,t,i,s,r,l,o,Q,u=0,c){this.p=e,this.stack=a,this.state=t,this.reducePos=i,this.pos=s,this.score=r,this.buffer=l,this.bufferBase=o,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((e,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,a,t=0){let i=e.parser.context;return new ee(e,[],a,t,t,0,[],0,i?new Ge(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var a;let t=e>>19,i=e&65535,{parser:s}=this.p,r=s.dynamicPrecedence(i);if(r&&(this.score+=r),t==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,o)}storeNode(e,a,t,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&r.buffer[l-4]==0&&r.buffer[l-1]>-1){if(a==t)return;if(r.buffer[l-2]>=a){r.buffer[l-2]=t;return}}}if(!s||this.pos==t)this.buffer.push(e,a,t,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0)for(;r>0&&this.buffer[r-2]>t;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4);this.buffer[r]=e,this.buffer[r+1]=a,this.buffer[r+2]=t,this.buffer[r+3]=i}}shift(e,a,t){let i=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let s=e,{parser:r}=this.p;(t>this.pos||a<=r.maxNode)&&(this.pos=t,r.stateFlag(s,1)||(this.reducePos=t)),this.pushState(s,i),this.shiftContext(a,i),a<=r.maxNode&&this.buffer.push(a,i,t,4)}}apply(e,a,t){e&65536?this.reduce(e):this.shift(e,a,t)}useNode(e,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=e)&&(this.p.reused.push(e),t++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(a,i),this.buffer.push(t,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,a=e.buffer.length;for(;a>0&&e.buffer[a-2]>e.reducePos;)a-=4;let t=e.buffer.slice(a),i=e.bufferBase+a;for(;e&&i==e.bufferBase;)e=e.parent;return new ee(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,a){let t=e<=this.p.parser.maxNode;t&&this.storeNode(e,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(e){for(let a=new ia(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,e);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(e){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>8||this.stack.length>=120){let i=[];for(let s=0,r;so&1&&l==r)||i.push(a[s],r)}a=i}let t=[];for(let i=0;i>19,i=a&65535,s=this.stack.length-t*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;a=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(a),!0}findForcedReduction(){let{parser:e}=this.p,a=[],t=(i,s)=>{if(!a.includes(i))return a.push(i),e.allActions(i,r=>{if(!(r&393216))if(r&65536){let l=(r>>19)-s;if(l>1){let o=r&65535,Q=this.stack.length-l*3;if(Q>=0&&e.getGoto(this.stack[Q],o,!1)>=0)return l<<19|65536|o}}else{let l=t(r,s+1);if(l!=null)return l}})};return t(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ge{constructor(e,a){this.tracker=e,this.context=a,this.hash=e.strict?e.hash(a):0}}var Ie;(function(O){O[O.Insert=200]="Insert",O[O.Delete=190]="Delete",O[O.Reduce=100]="Reduce",O[O.MaxNext=4]="MaxNext",O[O.MaxInsertStackDepth=300]="MaxInsertStackDepth",O[O.DampenInsertStackDepth=120]="DampenInsertStackDepth",O[O.MinBigReduction=2e3]="MinBigReduction"})(Ie||(Ie={}));class ia{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let a=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class Oe{constructor(e,a,t){this.stack=e,this.pos=a,this.index=t,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,a=e.bufferBase+e.buffer.length){return new Oe(e,a,a-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Oe(this.stack,this.pos,this.index)}}function I(O,e=Uint16Array){if(typeof O!="string")return O;let a=null;for(let t=0,i=0;t=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,l=!0),s+=o,l)break;s*=46}a?a[i++]=s:a=new e(s)}return a}class F{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ae=new F;class ra{constructor(e,a){this.input=e,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ae,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(e,a){let t=this.range,i=this.rangeIndex,s=this.pos+e;for(;st.to:s>=t.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];s+=r.from-t.to,t=r}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,a.from);return this.end}peek(e){let a=this.chunkOff+e,t,i;if(a>=0&&a=this.chunk2Pos&&tl.to&&(this.chunk2=this.chunk2.slice(0,l.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,a){if(a?(this.token=a,a.start=e,a.lookAhead=e+1,a.value=a.extended=-1):this.token=Ae,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,a-this.chunkPos);if(e>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,a-this.chunk2Pos);if(e>=this.range.from&&a<=this.range.to)return this.input.read(e,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>e&&(t+=this.input.read(Math.max(i.from,e),Math.min(i.to,a)))}return t}}class _{constructor(e,a){this.data=e,this.id=a}token(e,a){let{parser:t}=a.p;UO(this.data,e,a,this.id,t.data,t.tokenPrecTable)}}_.prototype.contextual=_.prototype.fallback=_.prototype.extend=!1;class te{constructor(e,a,t){this.precTable=a,this.elseToken=t,this.data=typeof e=="string"?I(e):e}token(e,a){let t=e.pos,i=0;for(;;){let s=e.next<0,r=e.resolveOffset(1,1);if(UO(this.data,e,a,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,r==null)break;e.reset(r,e.token)}i&&(e.reset(t,e.token),e.acceptToken(this.elseToken,i))}}te.prototype.contextual=_.prototype.fallback=_.prototype.extend=!1;class b{constructor(e,a={}){this.token=e,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function UO(O,e,a,t,i,s){let r=0,l=1<0){let p=O[f];if(o.allows(p)&&(e.token.value==-1||e.token.value==p||sa(p,e.token.value,i,s))){e.acceptToken(p);break}}let u=e.next,c=0,h=O[r+2];if(e.next<0&&h>c&&O[Q+h*3-3]==65535&&O[Q+h*3-3]==65535){r=O[Q+h*3-1];continue e}for(;c>1,p=Q+f+(f<<1),g=O[p],$=O[p+1]||65536;if(u=$)c=f+1;else{r=O[p+2],e.advance();continue e}}break}}function Ee(O,e,a){for(let t=e,i;(i=O[t])!=65535;t++)if(i==a)return t-e;return-1}function sa(O,e,a,t){let i=Ee(a,t,e);return i<0||Ee(a,t,O)e)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,e-25)):Math.min(O.length,Math.max(t.from+1,e+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:O.length}}class la{constructor(e,a){this.fragments=e,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Be(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Be(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=r,null;if(s instanceof M){if(r==e){if(r=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[a]++,this.nextStart=r+s.length}}}class na{constructor(e,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(t=>new F)}getActions(e){let a=0,t=null,{parser:i}=e.p,{tokenizers:s}=i,r=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let h=a;if(c.extended>-1&&(a=this.addActions(e,c.extended,c.end,a)),a=this.addActions(e,c.value,c.end,a),!u.extend&&(t=c,a>h))break}}for(;this.actions.length>a;)this.actions.pop();return o&&e.setLookAhead(o),!t&&e.pos==this.stream.end&&(t=new F,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,a=this.addActions(e,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let a=new F,{pos:t,p:i}=e;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(e,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,e),t),e.value>-1){let{parser:s}=t.p;for(let r=0;r=0&&t.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,a,t,i){for(let s=0;se.bufferLength*4?new la(t,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,a=this.minStackPos,t=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[r]=e;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;ra)t.push(l);else{if(this.advanceStack(l,t,e))continue;{i||(i=[],s=[]),i.push(l);let o=this.tokens.getMainToken(l);s.push(o.value,o.end)}}break}}if(!t.length){let r=i&&Qa(i);if(r)return this.stackToTree(r);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,t);if(r)return this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(t.length>r)for(t.sort((l,o)=>o.score-l.score);t.length>r;)t.pop();t.some(l=>l.reducePos>a)&&this.recovering--}else if(t.length>1){e:for(let r=0;r500&&Q.buffer.length>500)if((l.score-Q.score||l.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(r--,1);continue e}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let r=1;r ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let Q=e.curContext&&e.curContext.tracker.strict,u=Q?e.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let h=this.parser.nodeSet.types[c.type.id]==c.type?s.getGoto(e.state,c.type.id):-1;if(h>-1&&c.length&&(!Q||(c.prop(Ye.contextHash)||0)==u))return e.useNode(c,h),Z&&console.log(r+this.stackID(e)+` (via reuse of ${s.getName(c.type.id)})`),!0;if(!(c instanceof M)||c.children.length==0||c.positions[0]>0)break;let f=c.children[0];if(f instanceof M&&c.positions[0]==0)c=f;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),Z&&console.log(r+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(e,a){let t=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>t)return Je(e,a),!0}}runRecovery(e,a,t){let i=null,s=!1;for(let r=0;r ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Z&&console.log(u+this.stackID(l)+" (restarted)"),this.advanceFully(l,t))))continue;let c=l.split(),h=u;for(let f=0;c.forceReduce()&&f<10&&(Z&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));f++)Z&&(h=this.stackID(c)+" -> ");for(let f of l.recoverByInsert(o))Z&&console.log(u+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,t);this.stream.end>l.pos?(Q==l.pos&&(Q++,o=0),l.recoverByDelete(o,Q),Z&&console.log(u+this.stackID(l)+` (via recover-delete ${this.parser.getName(o)})`),Je(l,t)):(!i||i.scoreO;class vO{constructor(e){this.start=e.start,this.shift=e.shift||de,this.reduce=e.reduce||de,this.reuse=e.reuse||de,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class v extends Ut{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let a=e.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let l=0;le.topRules[l][1]),i=[];for(let l=0;l=0)s(u,o,l[Q++]);else{let c=l[Q+-u];for(let h=-u;h>0;h--)s(l[Q++],o,c);Q++}}}this.nodeSet=new vt(a.map((l,o)=>Vt.define({name:o>=this.minRepeatTerm?void 0:l,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Rt;let r=I(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new _(r,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,a,t){let i=new oa(this,e,a,t);for(let s of this.wrappers)i=s(i,e,a,t);return i}getGoto(e,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let s=i[a+1];;){let r=i[s++],l=r&1,o=i[s++];if(l&&t)return o;for(let Q=s+(r>>1);s0}validAction(e,a){return!!this.allActions(e,t=>t==a?!0:null)}allActions(e,a){let t=this.stateSlot(e,4),i=t?a(t):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;i=a(k(this.data,s+1))}return i}nextStates(e){let a=[];for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((s,r)=>r&1&&s==i)||a.push(this.data[t],i)}}return a}configure(e){let a=Object.assign(Object.create(v.prototype),this);if(e.props&&(a.nodeSet=this.nodeSet.extend(...e.props)),e.top){let t=this.topRules[e.top];if(!t)throw new RangeError(`Invalid top rule name ${e.top}`);a.top=t}return e.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=e.tokenizers.find(s=>s.from==t);return i?i.to:t})),e.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let s=e.specializers.find(l=>l.from==t.external);if(!s)return t;let r=Object.assign(Object.assign({},t),{external:s.to});return a.specializers[i]=Le(r),r})),e.contextTracker&&(a.context=e.contextTracker),e.dialect&&(a.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(a.strict=e.strict),e.wrap&&(a.wrappers=a.wrappers.concat(e.wrap)),e.bufferLength!=null&&(a.bufferLength=e.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let a=this.dynamicPrecedences;return a==null?0:a[e]||0}parseDialect(e){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(e)for(let s of e.split(" ")){let r=a.indexOf(s);r>=0&&(t[r]=!0)}let i=null;for(let s=0;st)&&a.p.parser.stateFlag(a.state,2)&&(!e||e.scoreO.external(a,t)<<1|e}return O.get}const ua=54,fa=1,ha=55,da=2,pa=56,Sa=3,Me=4,$a=5,ae=6,VO=7,RO=8,_O=9,CO=10,ga=11,ma=12,Xa=13,pe=57,Pa=14,Fe=58,WO=20,Za=22,qO=23,ba=24,be=26,jO=27,xa=28,ka=31,wa=34,ya=36,Ya=37,Ta=0,Ua=1,va={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},Va={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Ke={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 Ra(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function zO(O){return O==9||O==10||O==13||O==32}let He=null,eO=null,OO=0;function xe(O,e){let a=O.pos+e;if(OO==a&&eO==O)return He;let t=O.peek(e);for(;zO(t);)t=O.peek(++e);let i="";for(;Ra(t);)i+=String.fromCharCode(t),t=O.peek(++e);return eO=O,OO=a,He=i?i.toLowerCase():t==_a||t==Ca?void 0:null}const GO=60,ie=62,Ue=47,_a=63,Ca=33,Wa=45;function tO(O,e){this.name=O,this.parent=e,this.hash=e?e.hash:0;for(let a=0;a-1?new tO(xe(t,1)||"",O):O},reduce(O,e){return e==WO&&O?O.parent:O},reuse(O,e,a,t){let i=e.type.id;return i==ae||i==ya?new tO(xe(t,1)||"",O):O},hash(O){return O?O.hash:0},strict:!1}),za=new b((O,e)=>{if(O.next!=GO){O.next<0&&e.context&&O.acceptToken(pe);return}O.advance();let a=O.next==Ue;a&&O.advance();let t=xe(O,0);if(t===void 0)return;if(!t)return O.acceptToken(a?Pa:ae);let i=e.context?e.context.name:null;if(a){if(t==i)return O.acceptToken(ga);if(i&&Va[i])return O.acceptToken(pe,-2);if(e.dialectEnabled(Ta))return O.acceptToken(ma);for(let s=e.context;s;s=s.parent)if(s.name==t)return;O.acceptToken(Xa)}else{if(t=="script")return O.acceptToken(VO);if(t=="style")return O.acceptToken(RO);if(t=="textarea")return O.acceptToken(_O);if(va.hasOwnProperty(t))return O.acceptToken(CO);i&&Ke[i]&&Ke[i][t]?O.acceptToken(pe,-1):O.acceptToken(ae)}},{contextual:!0}),Ga=new b(O=>{for(let e=0,a=0;;a++){if(O.next<0){a&&O.acceptToken(Fe);break}if(O.next==Wa)e++;else if(O.next==ie&&e>=2){a>3&&O.acceptToken(Fe,-2);break}else e=0;O.advance()}});function Ia(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}const Aa=new b((O,e)=>{if(O.next==Ue&&O.peek(1)==ie){let a=e.dialectEnabled(Ua)||Ia(e.context);O.acceptToken(a?$a:Me,2)}else O.next==ie&&O.acceptToken(Me,1)});function ve(O,e,a){let t=2+O.length;return new b(i=>{for(let s=0,r=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(s==0&&i.next==GO||s==1&&i.next==Ue||s>=2&&sr?i.acceptToken(e,-r):i.acceptToken(a,-(r-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else s=r=0;i.advance()}})}const Ea=ve("script",ua,fa),Na=ve("style",ha,da),Ba=ve("textarea",pa,Sa),Da=oe({"Text RawText":n.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":n.angleBracket,TagName:n.tagName,"MismatchedCloseTag/TagName":[n.tagName,n.invalid],AttributeName:n.attributeName,"AttributeValue UnquotedAttributeValue":n.attributeValue,Is:n.definitionOperator,"EntityReference CharacterReference":n.character,Comment:n.blockComment,ProcessingInst:n.processingInstruction,DoctypeDecl:n.documentMeta}),Ja=v.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Da],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let Q=l.type.id;if(Q==xa)return Se(l,o,a);if(Q==ka)return Se(l,o,t);if(Q==wa)return Se(l,o,i);if(Q==WO&&s.length){let u=l.node,c=u.firstChild,h=c&&aO(c,o),f;if(h){for(let p of s)if(p.tag==h&&(!p.attrs||p.attrs(f||(f=IO(u,o))))){let g=u.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:g.type.id==Ya?g.from:u.to}]}}}}if(r&&Q==qO){let u=l.node,c;if(c=u.firstChild){let h=r[o.read(c.from,c.to)];if(h)for(let f of h){if(f.tagName&&f.tagName!=aO(u.parent,o))continue;let p=u.lastChild;if(p.type.id==be){let g=p.from+1,$=p.lastChild,x=p.to-($&&$.isError?0:1);if(x>g)return{parser:f.parser,overlay:[{from:g,to:x}]}}else if(p.type.id==jO)return{parser:f.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const La=96,iO=1,Ma=97,Fa=98,rO=2,EO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ka=58,Ha=40,NO=95,ei=91,K=45,Oi=46,ti=35,ai=37;function re(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function ii(O){return O>=48&&O<=57}const ri=new b((O,e)=>{for(let a=!1,t=0,i=0;;i++){let{next:s}=O;if(re(s)||s==K||s==NO||a&&ii(s))!a&&(s!=K||i>0)&&(a=!0),t===i&&s==K&&t++,O.advance();else{a&&O.acceptToken(s==Ha?Ma:t==2&&e.canShift(rO)?rO:Fa);break}}}),si=new b(O=>{if(EO.includes(O.peek(-1))){let{next:e}=O;(re(e)||e==NO||e==ti||e==Oi||e==ei||e==Ka||e==K)&&O.acceptToken(La)}}),li=new b(O=>{if(!EO.includes(O.peek(-1))){let{next:e}=O;if(e==ai&&(O.advance(),O.acceptToken(iO)),re(e)){do O.advance();while(re(O.next));O.acceptToken(iO)}}}),ni=oe({"AtKeyword import charset namespace keyframes media supports":n.definitionKeyword,"from to selector":n.keyword,NamespaceName:n.namespace,KeyframeName:n.labelName,KeyframeRangeName:n.operatorKeyword,TagName:n.tagName,ClassName:n.className,PseudoClassName:n.constant(n.className),IdName:n.labelName,"FeatureName PropertyName":n.propertyName,AttributeName:n.attributeName,NumberLiteral:n.number,KeywordQuery:n.keyword,UnaryQueryOp:n.operatorKeyword,"CallTag ValueName":n.atom,VariableName:n.variableName,Callee:n.operatorKeyword,Unit:n.unit,"UniversalSelector NestingSelector":n.definitionOperator,MatchOp:n.compareOperator,"ChildOp SiblingOp, LogicOp":n.logicOperator,BinOp:n.arithmeticOperator,Important:n.modifier,Comment:n.blockComment,ColorLiteral:n.color,"ParenthesizedContent StringLiteral":n.string,":":n.punctuation,"PseudoOp #":n.derefOperator,"; ,":n.separator,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace}),oi={__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},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},Qi={__proto__:null,not:128,only:128},ui=v.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O)QQ[O,59SO$qQ[O,59kO$vQ[O,59oO(^Q[O,59sO(^Q[O,59uO(^Q[O,59vO)]Q[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)dQWO,59SO)iQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)nQ`O,59oOOQS'#Cp'#CpO${QdO'#CqO)vQvO'#CsO+TQtO,5:POOQO'#Cx'#CxO)iQWO'#CwO+iQWO'#CyOOQS'#Em'#EmOOQO'#Dh'#DhO+nQ[O'#DoO+|QWO'#EqO&]Q[O'#DmO,[QWO'#DpOOQO'#Er'#ErO({QWO,5:^O,aQpO,5:`OOQS'#Dx'#DxO,iQWO,5:bO,nQ[O,5:bOOQO'#D{'#D{O,vQWO,5:eO,{QWO,5:kO-TQWO,5:mOOQS-E8S-E8SO${QdO,59{O-]Q[O'#EZO-jQWO,5;[O-jQWO,5;[POOO'#ET'#ETP-uO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO.lQXO,5:sOOQO-E8V-E8VOOQS1G.g1G.gOOQP1G.n1G.nO)dQWO1G.nO)iQWO1G.nOOQP1G/V1G/VO.yQ`O1G/ZO/dQXO1G/_O/zQXO1G/aO0bQXO1G/bO0xQWO,59zO0}Q[O'#DOO1UQdO'#CoOOQP1G/Z1G/ZO${QdO1G/ZO1]QpO,59]OOQS,59_,59_O${QdO,59aO1eQWO1G/kOOQS,59c,59cO1jQ!bO,59eO1rQWO'#DhO1}QWO,5:TO2SQWO,5:ZO&]Q[O,5:VO&]Q[O'#E[O2[QWO,5;]O2gQWO,5:XO(^Q[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2xQWO1G/|O2}QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO3YQtO1G/gOOQO,5:u,5:uO3pQ[O,5:uOOQO-E8X-E8XO3}QWO1G0vPOOO-E8R-E8RPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$u7+$uO${QdO7+$uOOQS1G/f1G/fO4YQXO'#EoO4aQWO,59jO4fQtO'#EVO5ZQdO'#ElO5eQWO,59ZO5jQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5rQWO1G/PO${QdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5wQWO,5:vOOQO-E8Y-E8YO6VQXO1G/vOOQS7+%h7+%hO6^QYO'#CsOOQO'#EO'#EOO6iQ`O'#D}OOQO'#D}'#D}O6tQWO'#E]O6|QdO,5:hOOQS,5:h,5:hO7XQtO'#EYO${QdO'#EYO8VQdO7+%ROOQO7+%R7+%ROOQO1G0a1G0aO8jQpO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#b[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSp^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#_QOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#X~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!W^Oy%^z;'S%^;'S;=`%o<%lO%^dCoSzSOy%^z;'S%^;'S;=`%o<%lO%^bDQU|QOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS|Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!YQo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bFfSxQOy%^z;'S%^;'S;=`%o<%lO%^lFwSv[Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!`Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[si,li,ri,1,2,3,4,new te("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:O=>oi[O]||-1},{term:56,get:O=>ci[O]||-1},{term:98,get:O=>Qi[O]||-1}],tokenPrec:1169});let $e=null;function ge(){if(!$e&&typeof document=="object"&&document.body){let{style:O}=document.body,e=[],a=new Set;for(let t in O)t!="cssText"&&t!="cssFloat"&&typeof O[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(e.push(t),a.add(t)));$e=e.sort().map(t=>({type:"property",label:t}))}return $e||[]}const sO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(O=>({type:"class",label:O})),lO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(O=>({type:"keyword",label:O})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(O=>({type:"constant",label:O}))),fi=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(O=>({type:"type",label:O})),Y=/^(\w[\w-]*|-\w[\w-]*|)$/,hi=/^-(-[\w-]*)?$/;function di(O,e){var a;if((O.name=="("||O.type.isError)&&(O=O.parent||O),O.name!="ArgList")return!1;let t=(a=O.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:e.sliceString(t.from,t.to)=="var"}const nO=new wO,pi=["Declaration"];function Si(O){for(let e=O;;){if(e.type.isTop)return e;if(!(e=e.parent))return O}}function BO(O,e,a){if(e.to-e.from>4096){let t=nO.get(e);if(t)return t;let i=[],s=new Set,r=e.cursor(Te.IncludeAnonymous);if(r.firstChild())do for(let l of BO(O,r.node,a))s.has(l.label)||(s.add(l.label),i.push(l));while(r.nextSibling());return nO.set(e,i),i}else{let t=[],i=new Set;return e.cursor().iterate(s=>{var r;if(a(s)&&s.matchContext(pi)&&((r=s.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let l=O.sliceString(s.from,s.to);i.has(l)||(i.add(l),t.push({label:l,type:"variable"}))}}),t}}const $i=O=>e=>{let{state:a,pos:t}=e,i=q(a).resolveInner(t,-1),s=i.type.isError&&i.from==i.to-1&&a.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:ge(),validFor:Y};if(i.name=="ValueName")return{from:i.from,options:lO,validFor:Y};if(i.name=="PseudoClassName")return{from:i.from,options:sO,validFor:Y};if(O(i)||(e.explicit||s)&&di(i,a.doc))return{from:O(i)||s?i.from:t,options:BO(a.doc,Si(i),O),validFor:hi};if(i.name=="TagName"){for(let{parent:o}=i;o;o=o.parent)if(o.name=="Block")return{from:i.from,options:ge(),validFor:Y};return{from:i.from,options:fi,validFor:Y}}if(!e.explicit)return null;let r=i.resolve(t),l=r.childBefore(t);return l&&l.name==":"&&r.name=="PseudoClassSelector"?{from:t,options:sO,validFor:Y}:l&&l.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:t,options:lO,validFor:Y}:r.name=="Block"||r.name=="Styles"?{from:t,options:ge(),validFor:Y}:null},gi=$i(O=>O.name=="VariableName"),se=ce.define({name:"css",parser:ui.configure({props:[Qe.add({Declaration:A()}),ue.add({Block:kO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function mi(){return new fe(se,se.data.of({autocomplete:gi}))}const Xi=303,oO=1,Pi=2,Zi=304,bi=306,xi=307,ki=3,wi=4,yi=[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],DO=125,Yi=59,cO=47,Ti=42,Ui=43,vi=45,Vi=new vO({start:!1,shift(O,e){return e==ki||e==wi||e==bi?O:e==xi},strict:!1}),Ri=new b((O,e)=>{let{next:a}=O;(a==DO||a==-1||e.context)&&O.acceptToken(Zi)},{contextual:!0,fallback:!0}),_i=new b((O,e)=>{let{next:a}=O,t;yi.indexOf(a)>-1||a==cO&&((t=O.peek(1))==cO||t==Ti)||a!=DO&&a!=Yi&&a!=-1&&!e.context&&O.acceptToken(Xi)},{contextual:!0}),Ci=new b((O,e)=>{let{next:a}=O;if((a==Ui||a==vi)&&(O.advance(),a==O.next)){O.advance();let t=!e.context&&e.canShift(oO);O.acceptToken(t?oO:Pi)}},{contextual:!0}),Wi=oe({"get set async static":n.modifier,"for while do if else switch try catch finally return throw break continue default case":n.controlKeyword,"in of await yield void typeof delete instanceof":n.operatorKeyword,"let var const function class extends":n.definitionKeyword,"import export from":n.moduleKeyword,"with debugger as new":n.keyword,TemplateString:n.special(n.string),super:n.atom,BooleanLiteral:n.bool,this:n.self,null:n.null,Star:n.modifier,VariableName:n.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":n.function(n.variableName),VariableDefinition:n.definition(n.variableName),Label:n.labelName,PropertyName:n.propertyName,PrivatePropertyName:n.special(n.propertyName),"CallExpression/MemberExpression/PropertyName":n.function(n.propertyName),"FunctionDeclaration/VariableDefinition":n.function(n.definition(n.variableName)),"ClassDeclaration/VariableDefinition":n.definition(n.className),PropertyDefinition:n.definition(n.propertyName),PrivatePropertyDefinition:n.definition(n.special(n.propertyName)),UpdateOp:n.updateOperator,LineComment:n.lineComment,BlockComment:n.blockComment,Number:n.number,String:n.string,Escape:n.escape,ArithOp:n.arithmeticOperator,LogicOp:n.logicOperator,BitOp:n.bitwiseOperator,CompareOp:n.compareOperator,RegExp:n.regexp,Equals:n.definitionOperator,Arrow:n.function(n.punctuation),": Spread":n.punctuation,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace,"InterpolationStart InterpolationEnd":n.special(n.brace),".":n.derefOperator,", ;":n.separator,"@":n.meta,TypeName:n.typeName,TypeDefinition:n.definition(n.typeName),"type enum interface implements namespace module declare":n.definitionKeyword,"abstract global Privacy readonly override":n.modifier,"is keyof unique infer":n.operatorKeyword,JSXAttributeValue:n.attributeValue,JSXText:n.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":n.angleBracket,"JSXIdentifier JSXNameSpacedName":n.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":n.attributeName,"JSXBuiltin/JSXIdentifier":n.standard(n.tagName)}),qi={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,using:413,interface:419,enum:423,namespace:429,module:431,declare:435,global:439,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},ji={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},zi={__proto__:null,"<":137},Gi=v.deserialize({version:14,states:"$6tO`QUOOO%TQUOOO'WQWOOP(eOSOOO*sQ(CjO'#CfO*zOpO'#CgO+YO!bO'#CgO+hO07`O'#DZO-yQUO'#DaO.ZQUO'#DlO%TQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0xQSO'#ETOOQO'#Ei'#EiOOQO'#Ic'#IcO1QQSO'#GkO1]QSO'#EhO1bQSO'#EhO3dQ(CjO'#JdO6TQ(CjO'#JeO6qQSO'#FWO6vQ#tO'#FoOOQ(CY'#F`'#F`O7RO&jO'#F`O7aQ,UO'#FvO8wQSO'#FuOOQ(CY'#Je'#JeOOQ(CW'#Jd'#JdO8|QSO'#GoOOQQ'#KP'#KPO9XQSO'#IPO9^Q(C[O'#IQOOQQ'#JQ'#JQOOQQ'#IU'#IUQ`QUOOO%TQUO'#DnO9fQUO'#DzO9mQUO'#D|O9SQSO'#GkO9tQ,UO'#ClO:SQSO'#EgO:_QSO'#ErO:dQ,UO'#F_O;RQSO'#GkOOQO'#KQ'#KQO;WQSO'#KQO;fQSO'#GsO;fQSO'#GtO;fQSO'#GvO9SQSO'#GyO<]QSO'#G|O=tQSO'#CbO>UQSO'#HYO>^QSO'#H`O>^QSO'#HbO`QUO'#HdO>^QSO'#HfO>^QSO'#HiO>cQSO'#HoO>hQ(C]O'#HuO%TQUO'#HwO>sQ(C]O'#HyO?OQ(C]O'#H{O9^Q(C[O'#H}O?ZQ(CjO'#CfO@]QWO'#DfQOQSOOO%TQUO'#D|O@sQSO'#EPO9tQ,UO'#EgOAOQSO'#EgOAZQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jh'#JhO%TQUO'#JhOOQO'#Jl'#JlOOQO'#I`'#I`OBZQWO'#E`OOQ(CW'#E_'#E_OCVQ(C`O'#E`OCaQWO'#ESOOQO'#Jk'#JkOCuQWO'#JlOESQWO'#ESOCaQWO'#E`PEaO?MpO'#C`POOO)CDo)CDoOOOO'#IV'#IVOElOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOEzO!bO,59RO%TQUO'#D]OOOO'#IY'#IYOFYO07`O,59uOOQ(CY,59u,59uOFhQUO'#IZOF{QSO'#JfOH}QbO'#JfO+vQUO'#JfOIUQSO,59{OIlQSO'#EiOIyQSO'#JtOJUQSO'#JsOJUQSO'#JsOJ^QSO,5;VOJcQSO'#JrOOQ(CY,5:W,5:WOJjQUO,5:WOLkQ(CjO,5:bOM[QSO,5:jOMuQ(C[O'#JqOM|QSO'#JpO8|QSO'#JpONbQSO'#JpONjQSO,5;UONoQSO'#JpO!!wQbO'#JeOOQ(CY'#Cf'#CfO%TQUO'#EOO!#gQ`O,5:oOOQO'#Jm'#JmOOQO-EkOOQQ'#JY'#JYOOQQ,5>l,5>lOOQQ-EqQ(CjO,5:hOOQO,5@l,5@lO!?bQ,UO,5=VO!?pQ(C[O'#JZO8wQSO'#JZO!@RQ(C[O,59WO!@^QWO,59WO!@fQ,UO,59WO9tQ,UO,59WO!@qQSO,5;SO!@yQSO'#HXO!A[QSO'#KUO%TQUO,5;wO!7[QWO,5;yO!AdQSO,5=rO!AiQSO,5=rO!AnQSO,5=rO9^Q(C[O,5=rO;fQSO,5=bOOQO'#Cr'#CrO!A|QWO,5=_O!BUQ,UO,5=`O!BaQSO,5=bO!BfQ`O,5=eO!BnQSO'#KQO>cQSO'#HOO9SQSO'#HQO!BsQSO'#HQO9tQ,UO'#HSO!BxQSO'#HSOOQQ,5=h,5=hO!B}QSO'#HTO!CVQSO'#ClO!C[QSO,58|O!CfQSO,58|O!EkQUO,58|OOQQ,58|,58|O!E{Q(C[O,58|O%TQUO,58|O!HWQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!HnQSO,5=tO`QUO,5=zO`QUO,5=|O!HsQSO,5>OO`QUO,5>QO!HxQSO,5>TO!H}QUO,5>ZOOQQ,5>a,5>aO%TQUO,5>aO9^Q(C[O,5>cOOQQ,5>e,5>eO!MXQSO,5>eOOQQ,5>g,5>gO!MXQSO,5>gOOQQ,5>i,5>iO!M^QWO'#DXO%TQUO'#JhO!M{QWO'#JhO!NjQWO'#DgO!N{QWO'#DgO##^QUO'#DgO##eQSO'#JgO##mQSO,5:QO##rQSO'#EmO#$QQSO'#JuO#$YQSO,5;WO#$_QWO'#DgO#$lQWO'#EROOQ(CY,5:k,5:kO%TQUO,5:kO#$sQSO,5:kO>cQSO,5;RO!@^QWO,5;RO!@fQ,UO,5;RO9tQ,UO,5;RO#${QSO,5@SO#%QQ!LQO,5:oOOQO-E<^-E<^O#&WQ(C`O,5:zOCaQWO,5:nO#&bQWO,5:nOCaQWO,5:zO!@RQ(C[O,5:nOOQ(CW'#Ec'#EcOOQO,5:z,5:zO%TQUO,5:zO#&oQ(C[O,5:zO#&zQ(C[O,5:zO!@^QWO,5:nOOQO,5;Q,5;QO#'YQ(C[O,5:zPOOO'#IT'#ITP#'nO?MpO,58zPOOO,58z,58zOOOO-EuO+vQUO,5>uOOQO,5>{,5>{O#(YQUO'#IZOOQO-E^QSO1G3jO$.VQUO1G3lO$2ZQUO'#HkOOQQ1G3o1G3oO$2hQSO'#HqO>cQSO'#HsOOQQ1G3u1G3uO$2pQUO1G3uO9^Q(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9^Q(C[O1G4PO9^Q(C[O1G4RO$6wQSO,5@SO!){QUO,5;XO8|QSO,5;XO>cQSO,5:RO!){QUO,5:RO!@^QWO,5:RO$6|Q$IUO,5:ROOQO,5;X,5;XO$7WQWO'#I[O$7nQSO,5@ROOQ(CY1G/l1G/lO$7vQWO'#IbO$8QQSO,5@aOOQ(CW1G0r1G0rO!N{QWO,5:ROOQO'#I_'#I_O$8YQWO,5:mOOQ(CY,5:m,5:mO#$vQSO1G0VOOQ(CY1G0V1G0VO%TQUO1G0VOOQ(CY1G0m1G0mO>cQSO1G0mO!@^QWO1G0mO!@fQ,UO1G0mOOQ(CW1G5n1G5nO!@RQ(C[O1G0YOOQO1G0f1G0fO%TQUO1G0fO$8aQ(C[O1G0fO$8lQ(C[O1G0fO!@^QWO1G0YOCaQWO1G0YO$8zQ(C[O1G0fOOQO1G0Y1G0YO$9`Q(CjO1G0fPOOO-EuO$9|QSO1G5lO$:UQSO1G5yO$:^QbO1G5zO8|QSO,5>{O$:hQ(CjO1G5wO%TQUO1G5wO$:xQ(C[O1G5wO$;ZQSO1G5vO$;ZQSO1G5vO8|QSO1G5vO$;cQSO,5?OO8|QSO,5?OOOQO,5?O,5?OO$;wQSO,5?OO$$XQSO,5?OOOQO-ExQ(CjO,5VOOQQ,5>V,5>VO%TQUO'#HlO%(dQSO'#HnOOQQ,5>],5>]O8|QSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%(iQWO1G5nO%(}Q$IUO1G0sO%)XQSO1G0sOOQO1G/m1G/mO%)dQ$IUO1G/mO>cQSO1G/mO!){QUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!@^QWO1G/mOOQO-E<]-E<]OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO#$vQSO7+%qOOQ(CY7+&X7+&XO>cQSO7+&XO!@^QWO7+&XOOQO7+%t7+%tO$9`Q(CjO7+&QOOQO7+&Q7+&QO%TQUO7+&QO%)nQ(C[O7+&QO!@RQ(C[O7+%tO!@^QWO7+%tO%)yQ(C[O7+&QO%*XQ(CjO7++cO%TQUO7++cO%*iQSO7++bO%*iQSO7++bOOQO1G4j1G4jO8|QSO1G4jO%*qQSO1G4jOOQO7+%y7+%yO#$vQSO<wOOQO-ExO%TQUO,5>xOOQO-E<[-E<[O%2qQSO1G5pOOQ(CY<bQ$IUO1G0xO%>iQ$IUO1G0xO%@aQ$IUO1G0xO%@tQ(CjO<WOOQQ,5>Y,5>YO%N_QSO1G3wO8|QSO7+&_O!){QUO7+&_OOQO7+%X7+%XO%NdQ$IUO1G5zO>cQSO7+%XOOQ(CY<cQSO<cQSO7+)cO&5{QSO<zAN>zO%TQUOAN?WOOQO<TQSO<= cOOQQG27jG27jO9^Q(C[OG27jO!){QUO1G4uO&>]QSO7++tO%LpQSOANAxOOQQANAxANAxO!&VQ,UOANAxO&>eQSOANAxOOQQANAzANAzO9^Q(C[OANAzO#MzQSOANAzOOQO'#HV'#HVOOQO7+*d7+*dOOQQG22tG22tOOQQANEOANEOOOQQANEPANEPOOQQANBSANBSO&>mQSOANBSOOQQ<rQSOLD,iO&>zQ$IUO7+'sO&@pQ$IUO7+'uO&BfQ,UOG26{OOQO<ROPYXXYXkYXyYXzYX|YX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX!VYX!WYX~O#yYX~P#@lOP$[OX:XOk9{Oy#xOz#yO|#zO!e9}O!f#vO!h#wO!l$[O#g9yO#h9zO#i9zO#j9zO#k9|O#l9}O#m9}O#n:WO#o9}O#q:OO#s:QO#u:SO#v:TO(SVO(c$YO(j#{O(k#|O~O#y.hO~P#ByO#X:YO#{:YO#y(XX!W(XX~PN}O^'Za!V'Za'l'Za'j'Za!g'Za!S'Zao'Za!X'Za%a'Za!a'Za~P!7sOP#fiX#fi^#fik#fiz#fi!V#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'l#fi(S#fi(c#fi'j#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#,`O^#zi!V#zi'l#zi'j#zi!S#zi!g#zio#zi!X#zi%a#zi!a#zi~P!7sO$W.mO$Y.mO~O$W.nO$Y.nO~O!a)^O#X.oO!X$^X$T$^X$W$^X$Y$^X$a$^X~O!U.pO~O!X)aO$T.rO$W)`O$Y)`O$a.sO~O!V:UO!W(WX~P#ByO!W.tO~O!a)^O$a(lX~O$a.vO~Oq)pO(T)qO(U.yO~Ol.|O!S.}O'wTO'zUO~O!VcX!acX!gcX!g$sX(ccX~P!/ZO!g/TO~P#,`O!V/UO!a#tO(c'fO!g(pX~O!g/ZO~O!U*RO'u%_O!g(pP~O#d/]O~O!S$sX!V$sX!a$zX~P!/ZO!V/^O!S(qX~P#,`O!a/`O~O!S/bO~Ok/fO!a#tO!h%]O(O%QO(c'fO~O'u/hO~O!a+XO~O^%fO!V/lO'l%fO~O!W/nO~P!3XO!]/oO!^/oO'v!kO(V!lO~O|/qO(V!lO~O#T/rO~O'u&POd'`X!V'`X~O!V*kOd(Pa~Od/wO~Oy/xOz/xO|/yOgva(jva(kva!Vva#Xva~Odva#yva~P$ hOy)uO|)vOg$la(j$la(k$la!V$la#X$la~Od$la#y$la~P$!^Oy)uO|)vOg$na(j$na(k$na!V$na#X$na~Od$na#y$na~P$#PO#d/{O~Od$|a!V$|a#X$|a#y$|a~P!0dO!a#tO~O#d0OO~O!V*|O^(ua'l(ua~Oy#xOz#yO|#zO!f#vO!h#wO(SVOP!niX!nik!ni!V!ni!e!ni!l!ni#g!ni#h!ni#i!ni#j!ni#k!ni#l!ni#m!ni#n!ni#o!ni#q!ni#s!ni#u!ni#v!ni(c!ni(j!ni(k!ni~O^!ni'l!ni'j!ni!S!ni!g!nio!ni!X!ni%a!ni!a!ni~P$$nOg.TO!X'UO%a.SO~Oi0YO'u0XO~P!1UO!a+XO^'}a!X'}a'l'}a!V'}a~O#d0`O~OXYX!VcX!WcX~O!V0aO!W(yX~O!W0cO~OX0dO~O'u+aO'wTO'zUO~O!X%vO'u%_O]'hX!V'hX~O!V+fO](xa~O!g0iO~P!7sOX0lO~O]0mO~O#X0pO~Og0sO!X${O~O(V(sO!W(vP~Og0|O!X0yO%a0{O(O%QO~OX1WO!V1UO!W(wX~O!W1XO~O]1ZO^%fO'l%fO~O'u#lO'wTO'zUO~O#X$dO#{$dOP(XXX(XXk(XXy(XXz(XX|(XX!V(XX!e(XX!h(XX!l(XX#g(XX#h(XX#i(XX#j(XX#k(XX#l(XX#m(XX#n(XX#q(XX#s(XX#u(XX#v(XX(S(XX(c(XX(j(XX(k(XX~O#o1^O&R1_O^(XX!f(XX~P$+dO#X$dO#o1^O&R1_O~O^1aO~P%TO^1cO~O&[1fOP&YiQ&YiV&Yi^&Yia&Yib&Yii&Yik&Yil&Yim&Yis&Yiu&Yiw&Yi|&Yi!Q&Yi!R&Yi!X&Yi!c&Yi!h&Yi!k&Yi!l&Yi!m&Yi!o&Yi!q&Yi!t&Yi!x&Yi#p&Yi$Q&Yi$U&Yi%`&Yi%b&Yi%d&Yi%e&Yi%f&Yi%i&Yi%k&Yi%n&Yi%o&Yi%q&Yi%}&Yi&T&Yi&V&Yi&X&Yi&Z&Yi&^&Yi&d&Yi&j&Yi&l&Yi&n&Yi&p&Yi&r&Yi'j&Yi'u&Yi'w&Yi'z&Yi(S&Yi(b&Yi(o&Yi!W&Yi_&Yi&a&Yi~O_1lO!W1jO&a1kO~P`O!XXO!h1nO~O&h,iOP&ciQ&ciV&ci^&cia&cib&cii&cik&cil&cim&cis&ciu&ciw&ci|&ci!Q&ci!R&ci!X&ci!c&ci!h&ci!k&ci!l&ci!m&ci!o&ci!q&ci!t&ci!x&ci#p&ci$Q&ci$U&ci%`&ci%b&ci%d&ci%e&ci%f&ci%i&ci%k&ci%n&ci%o&ci%q&ci%}&ci&T&ci&V&ci&X&ci&Z&ci&^&ci&d&ci&j&ci&l&ci&n&ci&p&ci&r&ci'j&ci'u&ci'w&ci'z&ci(S&ci(b&ci(o&ci!W&ci&[&ci_&ci&a&ci~O!S1tO~O!V!Za!W!Za~P#ByOl!mO|!nO!U1zO(V!lO!V'OX!W'OX~P?wO!V,yO!W(Za~O!V'UX!W'UX~P!6{O!V,|O!W(ia~O!W2RO~P'WO^%fO#X2[O'l%fO~O^%fO!a#tO#X2[O'l%fO~O^%fO!a#tO!l2`O#X2[O'l%fO(c'fO~O^%fO'l%fO~P!7sO!V$`Oo$ka~O!S&}i!V&}i~P!7sO!V'zO!S(Yi~O!V(RO!S(gi~O!S(hi!V(hi~P!7sO!V(ei!g(ei^(ei'l(ei~P!7sO#X2bO!V(ei!g(ei^(ei'l(ei~O!V(_O!g(di~O|%`O!X%aO!x]O#b2gO#c2fO'u%_O~O|%`O!X%aO#c2fO'u%_O~Og2nO!X'UO%a2mO~Og2nO!X'UO%a2mO(O%QO~O#dvaPvaXva^vakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva'lva(Sva(cva!gva!Sva'jvaova!Xva%ava!ava~P$ hO#d$laP$laX$la^$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la'l$la(S$la(c$la!g$la!S$la'j$lao$la!X$la%a$la!a$la~P$!^O#d$naP$naX$na^$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na'l$na(S$na(c$na!g$na!S$na'j$nao$na!X$na%a$na!a$na~P$#PO#d$|aP$|aX$|a^$|ak$|az$|a!V$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a'l$|a(S$|a(c$|a!g$|a!S$|a'j$|a#X$|ao$|a!X$|a%a$|a!a$|a~P#,`O^#[q!V#[q'l#[q'j#[q!S#[q!g#[qo#[q!X#[q%a#[q!a#[q~P!7sOd'PX!V'PX~P!'oO!V.^Od(]a~O!U2vO!V'QX!g'QX~P%TO!V.aO!g(^a~O!V.aO!g(^a~P!7sO!S2yO~O#y!ja!W!ja~PJqO#y!ba!V!ba!W!ba~P#ByO#y!na!W!na~P!:^O#y!pa!W!pa~P!pO^#wy!V#wy'l#wy'j#wy!S#wy!g#wyo#wy!X#wy%a#wy!a#wy~P!7sOg;lOy)uO|)vO(j)xO(k)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(S#fi(c#fi!V#fi!W#fi~P%AhO!f#vOP(RXX(RXg(RXk(RXy(RXz(RX|(RX!e(RX!h(RX!l(RX#g(RX#h(RX#i(RX#j(RX#k(RX#l(RX#m(RX#n(RX#o(RX#q(RX#s(RX#u(RX#v(RX#y(RX(S(RX(c(RX(j(RX(k(RX!V(RX!W(RX~O#y#zi!V#zi!W#zi~P#ByO#y!ni!W!ni~P$$nO!W6_O~O!V'Za!W'Za~P#ByO!a#tO(c'fO!V'[a!g'[a~O!V/UO!g(pi~O!V/UO!a#tO!g(pi~Od$uq!V$uq#X$uq#y$uq~P!0dO!S'^a!V'^a~P#,`O!a6fO~O!V/^O!S(qi~P#,`O!V/^O!S(qi~O!S6jO~O!a#tO#o6oO~Ok6pO!a#tO(c'fO~O!S6rO~Od$wq!V$wq#X$wq#y$wq~P!0dO^$iy!V$iy'l$iy'j$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!7sO!a5jO~O!V4VO!X(ra~O^#[y!V#[y'l#[y'j#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!7sOX6wO~O!V0aO!W(yi~O]6}O~O(V(sO!V'cX!W'cX~O!V4mO!W(va~OikO'u7UO~P.bO!W7XO~P%$wOl!mO|7YO'wTO'zUO(V!lO(b!rO~O!X0yO~O!X0yO%a7[O~Og7_O!X0yO%a7[O~OX7dO!V'fa!W'fa~O!V1UO!W(wi~O!g7hO~O!g7iO~O!g7lO~O!g7lO~P%TO^7nO~O!a7oO~O!g7pO~O!V(hi!W(hi~P#ByO^%fO#X7xO'l%fO~O!V(ey!g(ey^(ey'l(ey~P!7sO!V(_O!g(dy~O!X'UO%a7{O~O#d$uqP$uqX$uq^$uqk$uqz$uq!V$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq'l$uq(S$uq(c$uq!g$uq!S$uq'j$uq#X$uqo$uq!X$uq%a$uq!a$uq~P#,`O#d$wqP$wqX$wq^$wqk$wqz$wq!V$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq'l$wq(S$wq(c$wq!g$wq!S$wq'j$wq#X$wqo$wq!X$wq%a$wq!a$wq~P#,`O!V'Qi!g'Qi~P!7sO#y#[q!V#[q!W#[q~P#ByOy/xOz/xO|/yOPvaXvagvakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva#yva(Sva(cva(jva(kva!Vva!Wva~Oy)uO|)vOP$laX$lag$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la#y$la(S$la(c$la(j$la(k$la!V$la!W$la~Oy)uO|)vOP$naX$nag$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na#y$na(S$na(c$na(j$na(k$na!V$na!W$na~OP$|aX$|ak$|az$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a#y$|a(S$|a(c$|a!V$|a!W$|a~P%AhO#y$hq!V$hq!W$hq~P#ByO#y$iq!V$iq!W$iq~P#ByO!W8VO~O#y8WO~P!0dO!a#tO!V'[i!g'[i~O!a#tO(c'fO!V'[i!g'[i~O!V/UO!g(pq~O!S'^i!V'^i~P#,`O!V/^O!S(qq~O!S8^O~P#,`O!S8^O~Od(Qy!V(Qy~P!0dO!V'aa!X'aa~P#,`O^%Tq!X%Tq'l%Tq!V%Tq~P#,`OX8cO~O!V0aO!W(yq~O#X8gO!V'ca!W'ca~O!V4mO!W(vi~P#ByOPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX~O!a%RX#o%RX~P&2hO!X0yO%a8kO~O'wTO'zUO(V8pO~O!V1UO!W(wq~O!g8sO~O!g8tO~O!g8uO~O!g8uO~P%TO#X8xO!V#ay!W#ay~O!V#ay!W#ay~P#ByO!X'UO%a8}O~O#y#wy!V#wy!W#wy~P#ByOP$uiX$uik$uiz$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui#y$ui(S$ui(c$ui!V$ui!W$ui~P%AhOy)uO|)vO(k)zOP%XiX%Xig%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi#y%Xi(S%Xi(c%Xi(j%Xi!V%Xi!W%Xi~Oy)uO|)vOP%ZiX%Zig%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi#y%Zi(S%Zi(c%Zi(j%Zi(k%Zi!V%Zi!W%Zi~O#y$iy!V$iy!W$iy~P#ByO#y#[y!V#[y!W#[y~P#ByO!a#tO!V'[q!g'[q~O!V/UO!g(py~O!S'^q!V'^q~P#,`O!S9UO~P#,`O!V0aO!W(yy~O!V4mO!W(vq~O!X0yO%a9]O~O!g9`O~O!X'UO%a9eO~OP$uqX$uqk$uqz$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq#y$uq(S$uq(c$uq!V$uq!W$uq~P%AhOP$wqX$wqk$wqz$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq#y$wq(S$wq(c$wq!V$wq!W$wq~P%AhOd%]!Z!V%]!Z#X%]!Z#y%]!Z~P!0dO!V'cq!W'cq~P#ByO!V#a!Z!W#a!Z~P#ByO#d%]!ZP%]!ZX%]!Z^%]!Zk%]!Zz%]!Z!V%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z'l%]!Z(S%]!Z(c%]!Z!g%]!Z!S%]!Z'j%]!Z#X%]!Zo%]!Z!X%]!Z%a%]!Z!a%]!Z~P#,`OP%]!ZX%]!Zk%]!Zz%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z#y%]!Z(S%]!Z(c%]!Z!V%]!Z!W%]!Z~P%AhOo(WX~P1jO'v!kO~P!){O!ScX!VcX#XcX~P&2hOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#XYX#XcX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX~O!acX!gYX!gcX(ccX~P&HOOP9pOQ9pOa;aOb!hOikOk9pOlkOmkOskOu9pOw9pO|WO!QkO!RkO!XXO!c9sO!hZO!k9pO!l9pO!m9pO!o9tO!q9wO!t!gO$Q!jO$UfO'u)TO'wTO'zUO(SVO(b[O(o;_O~O!V:UO!W$ka~Oi%ROk$sOl$rOm$rOs%SOu%TOw:[O|$zO!X${O!c;fO!h$wO#c:bO$Q%XO$m:^O$o:`O$r%YO'u(kO'wTO'zUO(O%QO(S$tO~O#p)[O~P&LtO!WYX!WcX~P&HOO#d9xO~O!a#tO#d9xO~O#X:YO~O#o9}O~O#X:dO!V(hX!W(hX~O#X:YO!V(fX!W(fX~O#d:eO~Od:gO~P!0dO#d:lO~O#d:mO~O!a#tO#d:nO~O!a#tO#d:eO~O#y:oO~P#ByO#d:pO~O#d:qO~O#d:rO~O#d:sO~O#d:tO~O#d:uO~O#y:vO~P!0dO#y:wO~P!0dO$U~!f!|!}#P#Q#T#b#c#n(o$m$o$r%U%`%a%b%i%k%n%o%q%s~'pR$U(o#h!R'n'v#il#g#jky'o(V'o'u$W$Y$W~",goto:"$&O(}PPPP)OP)RP)cP*r.uPPPP5WPP5mP;h>mP?QP?QPPP?QP@pP?QP?QP?QP@tPP@yPAdPFZPPPF_PPPPF_I_PPPIeJ`PF_PLmPPPPN{F_PPPF_PF_P!#ZF_P!&n!'p!'yP!(l!(p!(lPPPPP!+z!'pPP!,h!-bP!0UF_F_!0Z!3d!7x!7x!;mPPP!;tF_PPPPPPPPPPP!?QP!@cPPF_!ApPF_PF_F_F_F_PF_!CSPP!FZP!I^P!Ib!Il!Ip!IpP!FWP!It!ItP!LwP!L{F_F_!MR#!T?QP?QP?Q?QP##_?Q?Q#%X?Q#'f?Q#)Y?Q?Q#)v#+r#+r#+v#,O#+r#,WP#+rP?Q#,p?Q#-x?Q?Q5WPPP#/TPPP#/m#/mP#/mP#0S#/mPP#0YP#0PP#0P#0l#0P#1W#1^5T)R#1a)RP#1h#1h#1hP)RP)RP)RP)RPP)RP#1n#1qP#1q)RP#1uP#1xP)RP)RP)RP)RP)RP)R)RPP#2O#2U#2`#2f#2l#2r#2x#3W#3^#3d#3n#3t#4O#4_#4e#5U#5h#5n#5t#6S#6i#7y#8X#8_#8e#8k#8q#8{#9R#9X#9c#9u#9{PPPPPPPPPP#:RPPPPPPP#:u#=|P#?]#?d#?lPPPP#Cv#Fl#MS#MV#MY#NR#NU#NX#N`#NhPP#Nn#Nr$ j$!i$!m$#RPP$#V$#]$#aP$#d$#h$#k$$a$$w$%_$%c$%f$%i$%o$%r$%v$%zR!zRmqOXs!Y#b%e&h&j&k&m,a,f1f1iY!tQ'U-R0y4tQ%kuQ%sxQ%z{Q&`!US&|!d,yQ'[!hS'b!q!wS*^${*cQ+_%tQ+l%|Q,Q&YQ-P'TQ-Z']Q-c'cQ/o*eQ1T,RR:c9t$|dOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{,^,a,f-V-_-m-s.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2v4q4{5]5^5a5t7Y7_7n7xS#o]9q!r)V$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ*n%UQ+d%vQ,S&]Q,Z&eQ.W:ZQ0V+VQ0Z+XQ0f+eQ1],XQ2j.TQ4_0aQ5S1UQ6Q2nQ6W:[Q6y4`R8O6R&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bt!mQ!q!t!w!x&|'T'U'b'c'd,y-P-R-c0y4t4v$Y$ri#t#v$b$c$w$z%V%W%[)p)y){)|*T*Z*i*j+U+X+p+s.S.^/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lQ%}{Q&z!dS'Q%a,|Q+d%vS.|)v/OQ/z*rQ0f+eQ0k+kQ1[,WQ1],XQ4_0aQ4h0mQ5V1WQ5W1ZQ6y4`Q6|4eQ7g5YQ8f6}R8q7dpnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iR,U&a&t^OPXYstuvy!Y!_!f!i!n#Q#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y'W'h'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;a;b[#ZWZ#U#X&}'x!S%bm#f#g#j%]%`(R(](^(_*y*z*|,],s-q-w-x-y-{1n2f2g5j5{Q%nwQ%rxS%w{%|Q&T!SQ'X!gQ'Z!hQ(f#qS*Q$w*US+^%s%tQ+b%vQ+{&WQ,P&YS-Y'[']Q.V(gQ/Y*RQ0_+_Q0e+eQ0g+fQ0j+jQ1O+|S1S,Q,RQ2W-ZQ3f/UQ4^0aQ4b0dQ4g0lQ5R1TQ6c3gQ6x4`Q6{4dQ8b6wR9W8cv$yi#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h!S%px!h!s%r%s%t&{'Z'[']'a'k*]+^+_,v-Y-Z-b/g0_2P2W2_3yQ+W%nQ+q&QQ+t&RQ,O&YQ.U(fQ0}+{U1R,P,Q,RQ2o.VQ4|1OS5Q1S1TQ7c5R!z;c#t$b$c$w$z)p)|*Z+U+X+p+s.S/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lg;d:W:X:^:`:b:i:k:m:q:s:wW%Oi%Q*k;_S&Q!P&_Q&R!QQ&S!RR+o&O$Z$}i#t#v$b$c$w$z%V%W%[)p)y){)|*T*Z*i*j+U+X+p+s.S.^/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lT)q$t)rV*o%U:Z:[U'Q!d%a,|S(t#x#yQ+i%yS.O(b(cQ0t+uQ4O/xR7R4m&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;b$i$_c#W#c%i%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.i.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;UT#RV#S&{kOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ'O!dR1{,yv!mQ!d!q!t!w!x&|'T'U'b'c'd,y-P-R-c0y4t4vS*]${*cS/g*^*eQ/p*fQ0v+wQ3y/oR3|/rlqOXs!Y#b%e&h&j&k&m,a,f1f1iQ&o!]Q'l!vS(h#s9xQ+[%qQ+y&TQ+z&VQ-W'YQ-e'eS.[(m:eS/}*w:nQ0]+]Q0x+xQ1m,hQ1o,iQ1w,tQ2U-XQ2X-]S4T0O:tQ4Y0^S4]0`:uQ5l1yQ5p2VQ5u2^Q6v4ZQ7s5nQ7t5qQ7w5vR8w7p$d$^c#W#c%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;US(e#n'_U*h$|(l3YS+R%i.iQ2k0VQ5}2jQ7}6QR9O8O$d$]c#W#c%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;US(d#n'_S(v#y$^S+Q%i.iS.P(c(eQ.l)WQ0S+RR2h.Q&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bS#o]9qQ&j!WQ&k!XQ&m!ZQ&n![R1e,dQ'V!gQ+T%nQ-U'XS.R(f+WQ2S-TW2l.U.V0U0WQ5o2TU5|2i2k2oS7z5}6PS8|7|7}S9c8{9OQ9k9dR9n9lU!uQ'U-RT4r0y4t!O_OXZ`s!U!Y#b#f%]%e&_&a&h&j&k&m(_,a,f-x1f1i]!oQ!q'U-R0y4tT#o]9q%WzOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xS(t#x#yS.O(b(c!s:{$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bY!sQ'U-R0y4tQ'a!qS'k!t!wS'm!x4vS-b'b'cQ-d'dR2_-cQ'j!sS(Z#e1`S-a'a'mQ/X*QQ/e*]Q2`-dQ3k/YS3t/f/pQ6b3fS6m3z3|Q8Y6cR8a6pQ#ubQ'i!sS(Y#e1`S([#k*vQ*x%^Q+Y%oQ+`%uU-`'a'j'mQ-t(ZQ/W*QQ/d*]Q/j*`Q0[+ZQ1P+}S2]-a-dQ2e-|S3j/X/YS3s/e/pQ3v/iQ3x/kQ5O1QQ5w2`Q6a3fQ6e3kS6i3t3|Q6n3{Q7a5PS8X6b6cQ8]6jQ8_6mQ8n7bQ9S8YQ9T8^Q9V8aQ9_8oQ9g9UQ;O:yQ;Z;SR;[;TV!uQ'U-R%WaOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xS#uy!i!r:x$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bR;O;a%WbOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xQ%^j!S%ox!h!s%r%s%t&{'Z'[']'a'k*]+^+_,v-Y-Z-b/g0_2P2W2_3yS%uy!iQ+Z%pQ+}&YW1Q,O,P,Q,RU5P1R1S1TS7b5Q5RQ8o7c!r:y$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ;S;`R;T;a$zeOPXYstuv!Y!_!f!n#Q#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xY#`WZ#U#X'x!S%bm#f#g#j%]%`(R(](^(_*y*z*|,],s-q-w-x-y-{1n2f2g5j5{Q,[&e!p:z$Z$l)i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bR:}&}S'R!d%aR1},|$|dOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{,^,a,f-V-_-m-s.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2v4q4{5]5^5a5t7Y7_7n7x!r)V$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ,Z&eQ0V+VQ2j.TQ6Q2nR8O6R!f$Tc#W%i'w'}(i(p)P)Q)R)S)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9r!T:P)U)g,w.i1u1x2z3S3T3U3V3Z3a5m6V6[6]7T7r8P8T8U9Y9a;U!b$Vc#W%i'w'}(i(p)R)S)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9r!P:R)U)g,w.i1u1x2z3U3V3Z3a5m6V6[6]7T7r8P8T8U9Y9a;U!^$Zc#W%i'w'}(i(p)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9rQ3e/Sz;b)U)g,w.i1u1x2z3Z3a5m6V6[6]7T7r8P8T8U9Y9a;UQ;g;iR;h;j&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bS$mh$nR3^.o'RgOPWXYZhstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l$n%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.o.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bT$if$oQ$gfS)`$j)dR)l$oT$hf$oT)b$j)d'RhOPWXYZhstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l$n%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.o.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bT$mh$nQ$phR)k$n%WjOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7x!s;`$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;b#alOPXZs!Y!_!n#Q#b#m#z$l%e&a&d&e&h&j&k&m&q&y'W(u)i*{+V,^,a,f-V.T.p/y0|1^1_1a1c1f1i1k2n3]4q4{5]5^5a6R7Y7_7nv$|i#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h!z(l#t$b$c$w$z)p)|*Z+U+X+p+s.S/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lQ*s%YQ.{)ug3Y:W:X:^:`:b:i:k:m:q:s:wv$xi#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;hQ*V$yS*`${*cQ*t%ZQ/k*a!z;Q#t$b$c$w$z)p)|*Z+U+X+p+s.S/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lf;R:W:X:^:`:b:i:k:m:q:s:wQ;V;cQ;W;dQ;X;eR;Y;fv$|i#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h!z(l#t$b$c$w$z)p)|*Z+U+X+p+s.S/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lg3Y:W:X:^:`:b:i:k:m:q:s:wloOXs!Y#b%e&h&j&k&m,a,f1f1iQ*Y$zQ,o&tQ,p&vR3n/^$Y$}i#t#v$b$c$w$z%V%W%[)p)y){)|*T*Z*i*j+U+X+p+s.S.^/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lQ+r&RQ0r+tQ4k0qR7Q4lT*b${*cS*b${*cT4s0y4tS/i*_4qT3{/q7YQ+Y%oQ/j*`Q0[+ZQ1P+}Q5O1QQ7a5PQ8n7bR9_8on)y$u(n*u/[/s/t2s3l4R6`6q9R;P;];^!W:h(j)Z*P*X.Z.w/S/a0T0o0q2r3m3q4j4l6S6T6g6k6s6u8[8`9f;i;j]:i3X6Z8Q9P9Q9op){$u(n*u/Q/[/s/t2s3l4R6`6q9R;P;];^!Y:j(j)Z*P*X.Z.w/S/a0T0o0q2p2r3m3q4j4l6S6T6g6k6s6u8[8`9f;i;j_:k3X6Z8Q8R9P9Q9opnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iQ&[!TR,^&epnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iR&[!TQ+v&SR0n+oqnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iQ0z+{S4y0}1OU7Z4w4x4|S8j7]7^S9Z8i8lQ9h9[R9m9iQ&c!UR,V&_R5V1WS%w{%|R0g+fQ&h!VR,a&iR,g&nT1g,f1iR,k&oQ,j&oR1p,kQ'o!yR-g'oQsOQ#bXT%hs#bQ!|TR'q!|Q#PUR's#PQ)r$tR.x)rQ#SVR'u#SQ#VWU'{#V'|-nQ'|#WR-n'}Q,z'OR1|,zQ._(nR2t._Q.b(pS2w.b2xR2x.cQ-R'UR2Q-RY!qQ'U-R0y4tR'`!qS#]W%`U(S#](T-oQ(T#^R-o(OQ,}'RR2O,}r`OXs!U!Y#b%e&_&a&h&j&k&m,a,f1f1iS#fZ%]U#p`#f-xR-x(_Q(`#hQ-u([W-}(`-u2c5yQ2c-vR5y2dQ)d$jR.q)dQ$nhR)j$nQ$acU)Y$a-j:VQ-j9rR:V)gQ/V*QW3h/V3i6d8ZU3i/W/X/YS6d3j3kR8Z6e#m)w$u(j(n)Z*P*X*p*q*u.X.Y.Z.w/Q/R/S/[/a/s/t0T0o0q2p2q2r2s3X3l3m3q4R4j4l6S6T6X6Y6Z6`6g6k6q6s6u8Q8R8S8[8`9P9Q9R9f9o;P;];^;i;jQ/_*XU3p/_3r6hQ3r/aR6h3qQ*c${R/m*cQ*l%PR/v*lQ4W0TR6t4WQ*}%cR0R*}Q4n0tS7S4n8hR8h7TQ+x&TR0w+xQ4t0yR7W4tQ1V,SS5T1V7eR7e5VQ0b+bW4a0b4c6z8dQ4c0eQ6z4bR8d6{Q+g%wR0h+gQ1i,fR5e1iWrOXs#bQ&l!YQ+P%eQ,`&hQ,b&jQ,c&kQ,e&mQ1d,aS1g,f1iR5d1fQ%gpQ&p!^Q&s!`Q&u!aQ&w!bQ'g!sQ+O%dQ+[%qQ+n%}Q,U&cQ,m&rW-^'a'i'j'mQ-e'eQ/l*bQ0]+]S1Y,V,YQ1q,lQ1r,oQ1s,pQ2X-]W2Z-`-a-d-fQ4Y0^Q4f0kQ4i0oQ4}1PQ5X1[Q5c1eU5r2Y2]2`Q5u2^Q6v4ZQ7O4hQ7P4jQ7V4sQ7`5OQ7f5WS7u5s5wQ7w5vQ8e6|Q8m7aQ8r7gQ8y7vQ9X8fQ9^8nQ9b8zR9j9_Q%qxQ'Y!hQ'e!sU+]%r%s%tQ,t&{U-X'Z'[']S-]'a'kQ/c*]S0^+^+_Q1y,vS2V-Y-ZQ2^-bQ3u/gQ4Z0_Q5n2PQ5q2WQ5v2_R6l3yS$vi;_R*m%QU%Pi%Q;_R/u*kQ$uiS(j#t+XQ(n#vS)Z$b$cQ*P$wQ*X$zQ*p%VQ*q%WQ*u%[Q.X:]Q.Y:_Q.Z:aQ.w)pQ/Q)yQ/R){Q/S)|Q/[*TQ/a*ZQ/s*iQ/t*jh0T+U.S0{2m4z6O7[7{8k8}9]9eQ0o+pQ0q+sQ2p:hQ2q:jQ2r:lQ2s.^S3X:W:XQ3l/]Q3m/^Q3q/`Q4R/{Q4j0pQ4l0sQ6S:pQ6T:rQ6X:^Q6Y:`Q6Z:bQ6`3eQ6g3oQ6k3wQ6q3}Q6s4VQ6u4XQ8Q:mQ8R:iQ8S:kQ8[6fQ8`6oQ9P:qQ9Q:sQ9R8WQ9f:vQ9o:wQ;P;_Q;];gQ;^;hQ;i;kR;j;llpOXs!Y#b%e&h&j&k&m,a,f1f1iQ!ePS#dZ#mQ&r!_U'^!n4q7YQ't#QQ(w#zQ)h$lS,Y&a&dQ,_&eQ,l&qQ,q&yQ-T'WQ.e(uQ.u)iQ0P*{Q0W+VQ1b,^Q2T-VQ2k.TQ3`.pQ4P/yQ4x0|Q5Z1^Q5[1_Q5`1aQ5b1cQ5g1kQ5}2nQ6^3]Q7^4{Q7j5]Q7k5^Q7m5aQ7}6RQ8l7_R8v7n#UcOPXZs!Y!_!n#b#m#z%e&a&d&e&h&j&k&m&q&y'W(u*{+V,^,a,f-V.T/y0|1^1_1a1c1f1i1k2n4q4{5]5^5a6R7Y7_7nQ#WWQ#cYQ%itQ%juS%lv!fS'w#U'zQ'}#XQ(i#sQ(p#wQ(x#}Q(y$OQ(z$PQ({$QQ(|$RQ(}$SQ)O$TQ)P$UQ)Q$VQ)R$WQ)S$XQ)U$ZQ)X$`Q)]$dW)g$l)i.p3]Q+S%kQ+h%xS,w&}1zQ-f'hS-k'x-mQ-p(QQ-r(XQ.](mQ.c(qQ.g9pQ.i9sQ.j9tQ.k9wQ.z)tQ/|*wQ1u,rQ1x,uQ2Y-_Q2a-sQ2u.aQ2z9xQ2{9yQ2|9zQ2}9{Q3O9|Q3P9}Q3Q:OQ3R:PQ3S:QQ3T:RQ3U:SQ3V:TQ3W.hQ3Z:YQ3[:cQ3a:UQ4S0OQ4[0`Q5m:dQ5s2[Q5x2bQ6U2vQ6V:eQ6[:gQ6]:nQ7T4oQ7r5kQ7v5tQ8P:oQ8T:tQ8U:uQ8z7xQ9Y8gQ9a8xQ9r#QR;U;bR#YWR'P!dY!sQ'U-R0y4tS&{!d,yQ'a!qS'k!t!wS'm!x4vS,v&|'TS-b'b'cQ-d'dQ2P-PR2_-cR(o#vR(r#wQ!eQT-Q'U-R]!pQ!q'U-R0y4tQ#n]R'_9qT#iZ%]S#hZ%]S%cm,]U([#f#g#jS-v(](^Q-z(_Q0Q*|Q2d-wU2e-x-y-{S5z2f2gR7y5{`#[W#U#X%`'x(R*y-qr#eZm#f#g#j%](](^(_*|-w-x-y-{2f2g5{Q1`,]Q1v,sQ5i1nQ7q5jT:|&}*zT#_W%`S#^W%`S'y#U(RS(O#X*yS,x&}*zT-l'x-qT'S!d%aQ$jfR)n$oT)c$j)dR3_.oT*S$w*UR*[$zQ0U+UQ2i.SQ4w0{Q6P2mQ7]4zQ7|6OQ8i7[Q8{7{Q9[8kQ9d8}Q9i9]R9l9elqOXs!Y#b%e&h&j&k&m,a,f1f1iQ&b!UR,U&_rmOXs!T!U!Y#b%e&_&h&j&k&m,a,f1f1iR,]&eT%dm,]R0u+uR,T&]Q%{{R+m%|R+c%vT&f!V&iT&g!V&iT1h,f1i",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:366,context:Vi,nodeProps:[["group",-26,6,14,16,62,199,203,207,208,210,213,216,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Wi],skippedNodes:[0,3,4,269],repeatNodeCount:33,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'{!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'{!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'xpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'xpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'xp'{!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'xp'{!b'n(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'y#S$d&j'o(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'xp'{!b'o(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'w$(n$d&j'{!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'{!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'{!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'{!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'{!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'xp'{!b(V!LY'u&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'xp'{!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'xp'{!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(k%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'xp'{!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'xp'{!b'o(;d(V!LY'u&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[_i,Ci,2,3,4,5,6,7,8,9,10,11,12,13,Ri,new te("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(U~~",141,327),new te("j~RQYZXz{^~^O'r~~aP!P!Qd~iO's~~",25,309)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:12810,ts:12812},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:313,get:O=>qi[O]||-1},{term:329,get:O=>ji[O]||-1},{term:67,get:O=>zi[O]||-1}],tokenPrec:12836}),Ii=[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 $t,i as gt,s as mt,e as Xt,f as Pt,U as D,g as Zt,y as je,o as bt,I as xt,J as kt,K as wt,H as yt,C as Yt,L as Tt}from"./index-1097b3a4.js";import{P as Ut,N as vt,u as Vt,D as Rt,v as Ye,T as M,I as Te,w as oe,x as n,y as _t,L as ce,z as Qe,A,B as ue,F as kO,G as fe,H as q,J as wO,K as yO,M as YO,E as U,O as E,Q as Ct,R as Wt,U as TO,V as P,W as qt,X as jt,a as j,h as zt,b as Gt,c as It,d as At,e as Et,s as Nt,t as Bt,f as Dt,g as Jt,r as Lt,i as Mt,k as Ft,j as Kt,l as Ht,m as ea,n as Oa,o as ta,p as aa,q as ze,C as J}from"./index-fd4289fb.js";class ee{constructor(e,a,t,i,s,r,l,o,Q,u=0,c){this.p=e,this.stack=a,this.state=t,this.reducePos=i,this.pos=s,this.score=r,this.buffer=l,this.bufferBase=o,this.curContext=Q,this.lookAhead=u,this.parent=c}toString(){return`[${this.stack.filter((e,a)=>a%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,a,t=0){let i=e.parser.context;return new ee(e,[],a,t,t,0,[],0,i?new Ge(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,a){this.stack.push(this.state,a,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var a;let t=e>>19,i=e&65535,{parser:s}=this.p,r=s.dynamicPrecedence(i);if(r&&(this.score+=r),t==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i=2e3&&!(!((a=this.p.parser.nodeSet.types[i])===null||a===void 0)&&a.isAnonymous)&&(o==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=Q):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,o)}storeNode(e,a,t,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&r.buffer[l-4]==0&&r.buffer[l-1]>-1){if(a==t)return;if(r.buffer[l-2]>=a){r.buffer[l-2]=t;return}}}if(!s||this.pos==t)this.buffer.push(e,a,t,i);else{let r=this.buffer.length;if(r>0&&this.buffer[r-4]!=0)for(;r>0&&this.buffer[r-2]>t;)this.buffer[r]=this.buffer[r-4],this.buffer[r+1]=this.buffer[r-3],this.buffer[r+2]=this.buffer[r-2],this.buffer[r+3]=this.buffer[r-1],r-=4,i>4&&(i-=4);this.buffer[r]=e,this.buffer[r+1]=a,this.buffer[r+2]=t,this.buffer[r+3]=i}}shift(e,a,t){let i=this.pos;if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=t,this.shiftContext(a,i),a<=this.p.parser.maxNode&&this.buffer.push(a,i,t,4);else{let s=e,{parser:r}=this.p;(t>this.pos||a<=r.maxNode)&&(this.pos=t,r.stateFlag(s,1)||(this.reducePos=t)),this.pushState(s,i),this.shiftContext(a,i),a<=r.maxNode&&this.buffer.push(a,i,t,4)}}apply(e,a,t){e&65536?this.reduce(e):this.shift(e,a,t)}useNode(e,a){let t=this.p.reused.length-1;(t<0||this.p.reused[t]!=e)&&(this.p.reused.push(e),t++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(a,i),this.buffer.push(t,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,a=e.buffer.length;for(;a>0&&e.buffer[a-2]>e.reducePos;)a-=4;let t=e.buffer.slice(a),i=e.bufferBase+a;for(;e&&i==e.bufferBase;)e=e.parent;return new ee(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,t,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,a){let t=e<=this.p.parser.maxNode;t&&this.storeNode(e,this.pos,a,4),this.storeNode(0,this.pos,a,t?8:4),this.pos=this.reducePos=a,this.score-=190}canShift(e){for(let a=new ia(this);;){let t=this.p.parser.stateSlot(a.state,4)||this.p.parser.hasAction(a.state,e);if(t==0)return!1;if(!(t&65536))return!0;a.reduce(t)}}recoverByInsert(e){if(this.stack.length>=300)return[];let a=this.p.parser.nextStates(this.state);if(a.length>8||this.stack.length>=120){let i=[];for(let s=0,r;so&1&&l==r)||i.push(a[s],r)}a=i}let t=[];for(let i=0;i>19,i=a&65535,s=this.stack.length-t*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let r=this.findForcedReduction();if(r==null)return!1;a=r}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(a),!0}findForcedReduction(){let{parser:e}=this.p,a=[],t=(i,s)=>{if(!a.includes(i))return a.push(i),e.allActions(i,r=>{if(!(r&393216))if(r&65536){let l=(r>>19)-s;if(l>1){let o=r&65535,Q=this.stack.length-l*3;if(Q>=0&&e.getGoto(this.stack[Q],o,!1)>=0)return l<<19|65536|o}}else{let l=t(r,s+1);if(l!=null)return l}})};return t(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let a=0;athis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class Ge{constructor(e,a){this.tracker=e,this.context=a,this.hash=e.strict?e.hash(a):0}}var Ie;(function(O){O[O.Insert=200]="Insert",O[O.Delete=190]="Delete",O[O.Reduce=100]="Reduce",O[O.MaxNext=4]="MaxNext",O[O.MaxInsertStackDepth=300]="MaxInsertStackDepth",O[O.DampenInsertStackDepth=120]="DampenInsertStackDepth",O[O.MinBigReduction=2e3]="MinBigReduction"})(Ie||(Ie={}));class ia{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let a=e&65535,t=e>>19;t==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(t-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],a,!0);this.state=i}}class Oe{constructor(e,a,t){this.stack=e,this.pos=a,this.index=t,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,a=e.bufferBase+e.buffer.length){return new Oe(e,a,a-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Oe(this.stack,this.pos,this.index)}}function I(O,e=Uint16Array){if(typeof O!="string")return O;let a=null;for(let t=0,i=0;t=92&&r--,r>=34&&r--;let o=r-32;if(o>=46&&(o-=46,l=!0),s+=o,l)break;s*=46}a?a[i++]=s:a=new e(s)}return a}class F{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Ae=new F;class ra{constructor(e,a){this.input=e,this.ranges=a,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Ae,this.rangeIndex=0,this.pos=this.chunkPos=a[0].from,this.range=a[0],this.end=a[a.length-1].to,this.readNext()}resolveOffset(e,a){let t=this.range,i=this.rangeIndex,s=this.pos+e;for(;st.to:s>=t.to;){if(i==this.ranges.length-1)return null;let r=this.ranges[++i];s+=r.from-t.to,t=r}return s}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,a.from);return this.end}peek(e){let a=this.chunkOff+e,t,i;if(a>=0&&a=this.chunk2Pos&&tl.to&&(this.chunk2=this.chunk2.slice(0,l.to-t)),i=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),i}acceptToken(e,a=0){let t=a?this.resolveOffset(a,-1):this.pos;if(t==null||t=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,a){if(a?(this.token=a,a.start=e,a.lookAhead=e+1,a.value=a.extended=-1):this.token=Ae,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&a<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,a-this.chunkPos);if(e>=this.chunk2Pos&&a<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,a-this.chunk2Pos);if(e>=this.range.from&&a<=this.range.to)return this.input.read(e,a);let t="";for(let i of this.ranges){if(i.from>=a)break;i.to>e&&(t+=this.input.read(Math.max(i.from,e),Math.min(i.to,a)))}return t}}class _{constructor(e,a){this.data=e,this.id=a}token(e,a){let{parser:t}=a.p;UO(this.data,e,a,this.id,t.data,t.tokenPrecTable)}}_.prototype.contextual=_.prototype.fallback=_.prototype.extend=!1;class te{constructor(e,a,t){this.precTable=a,this.elseToken=t,this.data=typeof e=="string"?I(e):e}token(e,a){let t=e.pos,i=0;for(;;){let s=e.next<0,r=e.resolveOffset(1,1);if(UO(this.data,e,a,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,r==null)break;e.reset(r,e.token)}i&&(e.reset(t,e.token),e.acceptToken(this.elseToken,i))}}te.prototype.contextual=_.prototype.fallback=_.prototype.extend=!1;class b{constructor(e,a={}){this.token=e,this.contextual=!!a.contextual,this.fallback=!!a.fallback,this.extend=!!a.extend}}function UO(O,e,a,t,i,s){let r=0,l=1<0){let p=O[f];if(o.allows(p)&&(e.token.value==-1||e.token.value==p||sa(p,e.token.value,i,s))){e.acceptToken(p);break}}let u=e.next,c=0,h=O[r+2];if(e.next<0&&h>c&&O[Q+h*3-3]==65535&&O[Q+h*3-3]==65535){r=O[Q+h*3-1];continue e}for(;c>1,p=Q+f+(f<<1),g=O[p],$=O[p+1]||65536;if(u=$)c=f+1;else{r=O[p+2],e.advance();continue e}}break}}function Ee(O,e,a){for(let t=e,i;(i=O[t])!=65535;t++)if(i==a)return t-e;return-1}function sa(O,e,a,t){let i=Ee(a,t,e);return i<0||Ee(a,t,O)e)&&!t.type.isError)return a<0?Math.max(0,Math.min(t.to-1,e-25)):Math.min(O.length,Math.max(t.from+1,e+25));if(a<0?t.prevSibling():t.nextSibling())break;if(!t.parent())return a<0?0:O.length}}class la{constructor(e,a){this.fragments=e,this.nodeSet=a,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Be(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Be(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=r,null;if(s instanceof M){if(r==e){if(r=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(r),this.index.push(0))}else this.index[a]++,this.nextStart=r+s.length}}}class na{constructor(e,a){this.stream=a,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(t=>new F)}getActions(e){let a=0,t=null,{parser:i}=e.p,{tokenizers:s}=i,r=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,o=0;for(let Q=0;Qc.end+25&&(o=Math.max(c.lookAhead,o)),c.value!=0)){let h=a;if(c.extended>-1&&(a=this.addActions(e,c.extended,c.end,a)),a=this.addActions(e,c.value,c.end,a),!u.extend&&(t=c,a>h))break}}for(;this.actions.length>a;)this.actions.pop();return o&&e.setLookAhead(o),!t&&e.pos==this.stream.end&&(t=new F,t.value=e.p.parser.eofTerm,t.start=t.end=e.pos,a=this.addActions(e,t.value,t.end,a)),this.mainToken=t,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let a=new F,{pos:t,p:i}=e;return a.start=t,a.end=Math.min(t+1,i.stream.end),a.value=t==i.stream.end?i.parser.eofTerm:0,a}updateCachedToken(e,a,t){let i=this.stream.clipPos(t.pos);if(a.token(this.stream.reset(i,e),t),e.value>-1){let{parser:s}=t.p;for(let r=0;r=0&&t.p.parser.dialect.allows(l>>1)){l&1?e.extended=l>>1:e.value=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,a,t,i){for(let s=0;se.bufferLength*4?new la(t,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,a=this.minStackPos,t=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[r]=e;for(;r.forceReduce()&&r.stack.length&&r.stack[r.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;ra)t.push(l);else{if(this.advanceStack(l,t,e))continue;{i||(i=[],s=[]),i.push(l);let o=this.tokens.getMainToken(l);s.push(o.value,o.end)}}break}}if(!t.length){let r=i&&Qa(i);if(r)return this.stackToTree(r);if(this.parser.strict)throw Z&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+a);this.recovering||(this.recovering=5)}if(this.recovering&&i){let r=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,t);if(r)return this.stackToTree(r.forceAll())}if(this.recovering){let r=this.recovering==1?1:this.recovering*3;if(t.length>r)for(t.sort((l,o)=>o.score-l.score);t.length>r;)t.pop();t.some(l=>l.reducePos>a)&&this.recovering--}else if(t.length>1){e:for(let r=0;r500&&Q.buffer.length>500)if((l.score-Q.score||l.buffer.length-Q.buffer.length)>0)t.splice(o--,1);else{t.splice(r--,1);continue e}}}t.length>12&&t.splice(12,t.length-12)}this.minStackPos=t[0].pos;for(let r=1;r ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let Q=e.curContext&&e.curContext.tracker.strict,u=Q?e.curContext.hash:0;for(let c=this.fragments.nodeAt(i);c;){let h=this.parser.nodeSet.types[c.type.id]==c.type?s.getGoto(e.state,c.type.id):-1;if(h>-1&&c.length&&(!Q||(c.prop(Ye.contextHash)||0)==u))return e.useNode(c,h),Z&&console.log(r+this.stackID(e)+` (via reuse of ${s.getName(c.type.id)})`),!0;if(!(c instanceof M)||c.children.length==0||c.positions[0]>0)break;let f=c.children[0];if(f instanceof M&&c.positions[0]==0)c=f;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),Z&&console.log(r+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let o=this.tokens.getActions(e);for(let Q=0;Qi?a.push(p):t.push(p)}return!1}advanceFully(e,a){let t=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>t)return Je(e,a),!0}}runRecovery(e,a,t){let i=null,s=!1;for(let r=0;r ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),Z&&console.log(u+this.stackID(l)+" (restarted)"),this.advanceFully(l,t))))continue;let c=l.split(),h=u;for(let f=0;c.forceReduce()&&f<10&&(Z&&console.log(h+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,t));f++)Z&&(h=this.stackID(c)+" -> ");for(let f of l.recoverByInsert(o))Z&&console.log(u+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,t);this.stream.end>l.pos?(Q==l.pos&&(Q++,o=0),l.recoverByDelete(o,Q),Z&&console.log(u+this.stackID(l)+` (via recover-delete ${this.parser.getName(o)})`),Je(l,t)):(!i||i.scoreO;class vO{constructor(e){this.start=e.start,this.shift=e.shift||de,this.reduce=e.reduce||de,this.reuse=e.reuse||de,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class v extends Ut{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let a=e.nodeNames.split(" ");this.minRepeatTerm=a.length;for(let l=0;le.topRules[l][1]),i=[];for(let l=0;l=0)s(u,o,l[Q++]);else{let c=l[Q+-u];for(let h=-u;h>0;h--)s(l[Q++],o,c);Q++}}}this.nodeSet=new vt(a.map((l,o)=>Vt.define({name:o>=this.minRepeatTerm?void 0:l,id:o,props:i[o],top:t.indexOf(o)>-1,error:o==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Rt;let r=I(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new _(r,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,a,t){let i=new oa(this,e,a,t);for(let s of this.wrappers)i=s(i,e,a,t);return i}getGoto(e,a,t=!1){let i=this.goto;if(a>=i[0])return-1;for(let s=i[a+1];;){let r=i[s++],l=r&1,o=i[s++];if(l&&t)return o;for(let Q=s+(r>>1);s0}validAction(e,a){return!!this.allActions(e,t=>t==a?!0:null)}allActions(e,a){let t=this.stateSlot(e,4),i=t?a(t):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=k(this.data,s+2);else break;i=a(k(this.data,s+1))}return i}nextStates(e){let a=[];for(let t=this.stateSlot(e,1);;t+=3){if(this.data[t]==65535)if(this.data[t+1]==1)t=k(this.data,t+2);else break;if(!(this.data[t+2]&1)){let i=this.data[t+1];a.some((s,r)=>r&1&&s==i)||a.push(this.data[t],i)}}return a}configure(e){let a=Object.assign(Object.create(v.prototype),this);if(e.props&&(a.nodeSet=this.nodeSet.extend(...e.props)),e.top){let t=this.topRules[e.top];if(!t)throw new RangeError(`Invalid top rule name ${e.top}`);a.top=t}return e.tokenizers&&(a.tokenizers=this.tokenizers.map(t=>{let i=e.tokenizers.find(s=>s.from==t);return i?i.to:t})),e.specializers&&(a.specializers=this.specializers.slice(),a.specializerSpecs=this.specializerSpecs.map((t,i)=>{let s=e.specializers.find(l=>l.from==t.external);if(!s)return t;let r=Object.assign(Object.assign({},t),{external:s.to});return a.specializers[i]=Le(r),r})),e.contextTracker&&(a.context=e.contextTracker),e.dialect&&(a.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(a.strict=e.strict),e.wrap&&(a.wrappers=a.wrappers.concat(e.wrap)),e.bufferLength!=null&&(a.bufferLength=e.bufferLength),a}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let a=this.dynamicPrecedences;return a==null?0:a[e]||0}parseDialect(e){let a=Object.keys(this.dialects),t=a.map(()=>!1);if(e)for(let s of e.split(" ")){let r=a.indexOf(s);r>=0&&(t[r]=!0)}let i=null;for(let s=0;st)&&a.p.parser.stateFlag(a.state,2)&&(!e||e.scoreO.external(a,t)<<1|e}return O.get}const ua=54,fa=1,ha=55,da=2,pa=56,Sa=3,Me=4,$a=5,ae=6,VO=7,RO=8,_O=9,CO=10,ga=11,ma=12,Xa=13,pe=57,Pa=14,Fe=58,WO=20,Za=22,qO=23,ba=24,be=26,jO=27,xa=28,ka=31,wa=34,ya=36,Ya=37,Ta=0,Ua=1,va={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},Va={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Ke={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 Ra(O){return O==45||O==46||O==58||O>=65&&O<=90||O==95||O>=97&&O<=122||O>=161}function zO(O){return O==9||O==10||O==13||O==32}let He=null,eO=null,OO=0;function xe(O,e){let a=O.pos+e;if(OO==a&&eO==O)return He;let t=O.peek(e);for(;zO(t);)t=O.peek(++e);let i="";for(;Ra(t);)i+=String.fromCharCode(t),t=O.peek(++e);return eO=O,OO=a,He=i?i.toLowerCase():t==_a||t==Ca?void 0:null}const GO=60,ie=62,Ue=47,_a=63,Ca=33,Wa=45;function tO(O,e){this.name=O,this.parent=e,this.hash=e?e.hash:0;for(let a=0;a-1?new tO(xe(t,1)||"",O):O},reduce(O,e){return e==WO&&O?O.parent:O},reuse(O,e,a,t){let i=e.type.id;return i==ae||i==ya?new tO(xe(t,1)||"",O):O},hash(O){return O?O.hash:0},strict:!1}),za=new b((O,e)=>{if(O.next!=GO){O.next<0&&e.context&&O.acceptToken(pe);return}O.advance();let a=O.next==Ue;a&&O.advance();let t=xe(O,0);if(t===void 0)return;if(!t)return O.acceptToken(a?Pa:ae);let i=e.context?e.context.name:null;if(a){if(t==i)return O.acceptToken(ga);if(i&&Va[i])return O.acceptToken(pe,-2);if(e.dialectEnabled(Ta))return O.acceptToken(ma);for(let s=e.context;s;s=s.parent)if(s.name==t)return;O.acceptToken(Xa)}else{if(t=="script")return O.acceptToken(VO);if(t=="style")return O.acceptToken(RO);if(t=="textarea")return O.acceptToken(_O);if(va.hasOwnProperty(t))return O.acceptToken(CO);i&&Ke[i]&&Ke[i][t]?O.acceptToken(pe,-1):O.acceptToken(ae)}},{contextual:!0}),Ga=new b(O=>{for(let e=0,a=0;;a++){if(O.next<0){a&&O.acceptToken(Fe);break}if(O.next==Wa)e++;else if(O.next==ie&&e>=2){a>3&&O.acceptToken(Fe,-2);break}else e=0;O.advance()}});function Ia(O){for(;O;O=O.parent)if(O.name=="svg"||O.name=="math")return!0;return!1}const Aa=new b((O,e)=>{if(O.next==Ue&&O.peek(1)==ie){let a=e.dialectEnabled(Ua)||Ia(e.context);O.acceptToken(a?$a:Me,2)}else O.next==ie&&O.acceptToken(Me,1)});function ve(O,e,a){let t=2+O.length;return new b(i=>{for(let s=0,r=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(s==0&&i.next==GO||s==1&&i.next==Ue||s>=2&&sr?i.acceptToken(e,-r):i.acceptToken(a,-(r-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else s=r=0;i.advance()}})}const Ea=ve("script",ua,fa),Na=ve("style",ha,da),Ba=ve("textarea",pa,Sa),Da=oe({"Text RawText":n.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":n.angleBracket,TagName:n.tagName,"MismatchedCloseTag/TagName":[n.tagName,n.invalid],AttributeName:n.attributeName,"AttributeValue UnquotedAttributeValue":n.attributeValue,Is:n.definitionOperator,"EntityReference CharacterReference":n.character,Comment:n.blockComment,ProcessingInst:n.processingInstruction,DoctypeDecl:n.documentMeta}),Ja=v.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:ja,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[Da],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!Z5zbkWOX5uXZ7SZ[5u[^7S^p5uqr5urs7Sst+Ptw5uwx7Sx!]5u!]!^7w!^!a7S!a#S5u#S#T7S#T;'S5u;'S;=`8n<%lO5u!R7VVOp7Sqs7St!]7S!]!^7l!^;'S7S;'S;=`7q<%lO7S!R7qOa!R!R7tP;=`<%l7S!Z8OYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z8qP;=`<%l5u!_8{ihSkWOX5uXZ7SZ[5u[^7S^p5uqr8trs7Sst/^tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^:j!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!_:sbhSkWa!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VP<%l?Ah;{?Ah?BY7S?BY?Mn;{?MnO7S!V=dXhSa!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!V>SP;=`<%l;{!_>YP;=`<%l8t!_>dhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^/^!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!Z@TakWOX@OXZAYZ[@O[^AY^p@Oqr@OrsAYsw@OwxAYx!]@O!]!^Az!^!aAY!a#S@O#S#TAY#T;'S@O;'S;=`Bq<%lO@O!RA]UOpAYq!]AY!]!^Ao!^;'SAY;'S;=`At<%lOAY!RAtOb!R!RAwP;=`<%lAY!ZBRYkWb!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!ZBtP;=`<%l@O!_COhhSkWOX@OXZAYZ[@O[^AY^p@OqrBwrsAYswBwwxAYx!PBw!P!Q@O!Q!]Bw!]!^Dj!^!aAY!a#SBw#S#TE{#T#sBw#s$f@O$f;'SBw;'S;=`HS<%l?AhBw?Ah?BY@O?BY?MnBw?MnO@O!_DsbhSkWb!ROX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!a#S/^#S#T0m#T#s/^#s$f+P$f;'S/^;'S;=`1e<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+P!VFQbhSOpAYqrE{rsAYswE{wxAYx!PE{!P!QAY!Q!]E{!]!^GY!^!aAY!a#sE{#s$fAY$f;'SE{;'S;=`G|<%l?AhE{?Ah?BYAY?BY?MnE{?MnOAY!VGaXhSb!Rqr0msw0mx!P0m!Q!^0m!a#s0m$f;'S0m;'S;=`1_<%l?Ah0m?BY?Mn0m!VHPP;=`<%lE{!_HVP;=`<%lBw!ZHcW!bx`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t!aIYlhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OKQ!O!P-_!P!Q$q!Q!^-_!^!_*V!_!a&X!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!aK_khS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_*V!_!`&X!`!aMS!a#S-_#S#T1k#T#s-_#s$f$q$f;'S-_;'S;=`3X<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q!TM_X`P!a`!cp!eQOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!aNZ!ZhSfQ`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx}-_}!OMz!O!PMz!P!Q$q!Q![Mz![!]Mz!]!^-_!^!_*V!_!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f$}-_$}%OMz%O%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4UMz4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Je-_$Je$JgMz$Jg$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!a!$PP;=`<%lMz!R!$ZY!a`!cpOq*Vqr!$yrs(Vsv*Vwx)ex!a*V!a!b!4t!b;'S*V;'S;=`*s<%lO*V!R!%Q]!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!%y!O!f*V!f!g!']!g#W*V#W#X!0`#X;'S*V;'S;=`*s<%lO*V!R!&QX!a`!cpOr*Vrs(Vsv*Vwx)ex}*V}!O!&m!O;'S*V;'S;=`*s<%lO*V!R!&vV!a`!cp!dPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!'dX!a`!cpOr*Vrs(Vsv*Vwx)ex!q*V!q!r!(P!r;'S*V;'S;=`*s<%lO*V!R!(WX!a`!cpOr*Vrs(Vsv*Vwx)ex!e*V!e!f!(s!f;'S*V;'S;=`*s<%lO*V!R!(zX!a`!cpOr*Vrs(Vsv*Vwx)ex!v*V!v!w!)g!w;'S*V;'S;=`*s<%lO*V!R!)nX!a`!cpOr*Vrs(Vsv*Vwx)ex!{*V!{!|!*Z!|;'S*V;'S;=`*s<%lO*V!R!*bX!a`!cpOr*Vrs(Vsv*Vwx)ex!r*V!r!s!*}!s;'S*V;'S;=`*s<%lO*V!R!+UX!a`!cpOr*Vrs(Vsv*Vwx)ex!g*V!g!h!+q!h;'S*V;'S;=`*s<%lO*V!R!+xY!a`!cpOr!+qrs!,hsv!+qvw!-Swx!.[x!`!+q!`!a!/j!a;'S!+q;'S;=`!0Y<%lO!+qq!,mV!cpOv!,hvx!-Sx!`!,h!`!a!-q!a;'S!,h;'S;=`!.U<%lO!,hP!-VTO!`!-S!`!a!-f!a;'S!-S;'S;=`!-k<%lO!-SP!-kO{PP!-nP;=`<%l!-Sq!-xS!cp{POv(Vx;'S(V;'S;=`(h<%lO(Vq!.XP;=`<%l!,ha!.aX!a`Or!.[rs!-Ssv!.[vw!-Sw!`!.[!`!a!.|!a;'S!.[;'S;=`!/d<%lO!.[a!/TT!a`{POr)esv)ew;'S)e;'S;=`)y<%lO)ea!/gP;=`<%l!.[!R!/sV!a`!cp{POr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!0]P;=`<%l!+q!R!0gX!a`!cpOr*Vrs(Vsv*Vwx)ex#c*V#c#d!1S#d;'S*V;'S;=`*s<%lO*V!R!1ZX!a`!cpOr*Vrs(Vsv*Vwx)ex#V*V#V#W!1v#W;'S*V;'S;=`*s<%lO*V!R!1}X!a`!cpOr*Vrs(Vsv*Vwx)ex#h*V#h#i!2j#i;'S*V;'S;=`*s<%lO*V!R!2qX!a`!cpOr*Vrs(Vsv*Vwx)ex#m*V#m#n!3^#n;'S*V;'S;=`*s<%lO*V!R!3eX!a`!cpOr*Vrs(Vsv*Vwx)ex#d*V#d#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let Q=l.type.id;if(Q==xa)return Se(l,o,a);if(Q==ka)return Se(l,o,t);if(Q==wa)return Se(l,o,i);if(Q==WO&&s.length){let u=l.node,c=u.firstChild,h=c&&aO(c,o),f;if(h){for(let p of s)if(p.tag==h&&(!p.attrs||p.attrs(f||(f=IO(u,o))))){let g=u.lastChild;return{parser:p.parser,overlay:[{from:c.to,to:g.type.id==Ya?g.from:u.to}]}}}}if(r&&Q==qO){let u=l.node,c;if(c=u.firstChild){let h=r[o.read(c.from,c.to)];if(h)for(let f of h){if(f.tagName&&f.tagName!=aO(u.parent,o))continue;let p=u.lastChild;if(p.type.id==be){let g=p.from+1,$=p.lastChild,x=p.to-($&&$.isError?0:1);if(x>g)return{parser:f.parser,overlay:[{from:g,to:x}]}}else if(p.type.id==jO)return{parser:f.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const La=96,iO=1,Ma=97,Fa=98,rO=2,EO=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ka=58,Ha=40,NO=95,ei=91,K=45,Oi=46,ti=35,ai=37;function re(O){return O>=65&&O<=90||O>=97&&O<=122||O>=161}function ii(O){return O>=48&&O<=57}const ri=new b((O,e)=>{for(let a=!1,t=0,i=0;;i++){let{next:s}=O;if(re(s)||s==K||s==NO||a&&ii(s))!a&&(s!=K||i>0)&&(a=!0),t===i&&s==K&&t++,O.advance();else{a&&O.acceptToken(s==Ha?Ma:t==2&&e.canShift(rO)?rO:Fa);break}}}),si=new b(O=>{if(EO.includes(O.peek(-1))){let{next:e}=O;(re(e)||e==NO||e==ti||e==Oi||e==ei||e==Ka||e==K)&&O.acceptToken(La)}}),li=new b(O=>{if(!EO.includes(O.peek(-1))){let{next:e}=O;if(e==ai&&(O.advance(),O.acceptToken(iO)),re(e)){do O.advance();while(re(O.next));O.acceptToken(iO)}}}),ni=oe({"AtKeyword import charset namespace keyframes media supports":n.definitionKeyword,"from to selector":n.keyword,NamespaceName:n.namespace,KeyframeName:n.labelName,KeyframeRangeName:n.operatorKeyword,TagName:n.tagName,ClassName:n.className,PseudoClassName:n.constant(n.className),IdName:n.labelName,"FeatureName PropertyName":n.propertyName,AttributeName:n.attributeName,NumberLiteral:n.number,KeywordQuery:n.keyword,UnaryQueryOp:n.operatorKeyword,"CallTag ValueName":n.atom,VariableName:n.variableName,Callee:n.operatorKeyword,Unit:n.unit,"UniversalSelector NestingSelector":n.definitionOperator,MatchOp:n.compareOperator,"ChildOp SiblingOp, LogicOp":n.logicOperator,BinOp:n.arithmeticOperator,Important:n.modifier,Comment:n.blockComment,ColorLiteral:n.color,"ParenthesizedContent StringLiteral":n.string,":":n.punctuation,"PseudoOp #":n.derefOperator,"; ,":n.separator,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace}),oi={__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},ci={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},Qi={__proto__:null,not:128,only:128},ui=v.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#EROOQS'#Ei'#EiOOQS'#EU'#EUQYQ[OOO&rQXO'#CdO'gQWO'#DaO'lQWO'#EpO'wQ[O'#EpQOQWOOP(RO#tO'#C_POOO)C@X)C@XOOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(^Q[O'#EXO(xQWO,58{O)QQ[O,59SO$qQ[O,59kO$vQ[O,59oO(^Q[O,59sO(^Q[O,59uO(^Q[O,59vO)]Q[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)dQWO,59SO)iQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)nQ`O,59oOOQS'#Cp'#CpO${QdO'#CqO)vQvO'#CsO+TQtO,5:POOQO'#Cx'#CxO)iQWO'#CwO+iQWO'#CyOOQS'#Em'#EmOOQO'#Dh'#DhO+nQ[O'#DoO+|QWO'#EqO&]Q[O'#DmO,[QWO'#DpOOQO'#Er'#ErO({QWO,5:^O,aQpO,5:`OOQS'#Dx'#DxO,iQWO,5:bO,nQ[O,5:bOOQO'#D{'#D{O,vQWO,5:eO,{QWO,5:kO-TQWO,5:mOOQS-E8S-E8SO${QdO,59{O-]Q[O'#EZO-jQWO,5;[O-jQWO,5;[POOO'#ET'#ETP-uO#tO,58yPOOO,58y,58yOOQP1G.l1G.lO.lQXO,5:sOOQO-E8V-E8VOOQS1G.g1G.gOOQP1G.n1G.nO)dQWO1G.nO)iQWO1G.nOOQP1G/V1G/VO.yQ`O1G/ZO/dQXO1G/_O/zQXO1G/aO0bQXO1G/bO0xQWO,59zO0}Q[O'#DOO1UQdO'#CoOOQP1G/Z1G/ZO${QdO1G/ZO1]QpO,59]OOQS,59_,59_O${QdO,59aO1eQWO1G/kOOQS,59c,59cO1jQ!bO,59eO1rQWO'#DhO1}QWO,5:TO2SQWO,5:ZO&]Q[O,5:VO&]Q[O'#E[O2[QWO,5;]O2gQWO,5:XO(^Q[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2xQWO1G/|O2}QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO3YQtO1G/gOOQO,5:u,5:uO3pQ[O,5:uOOQO-E8X-E8XO3}QWO1G0vPOOO-E8R-E8RPOOO1G.e1G.eOOQP7+$Y7+$YOOQP7+$u7+$uO${QdO7+$uOOQS1G/f1G/fO4YQXO'#EoO4aQWO,59jO4fQtO'#EVO5ZQdO'#ElO5eQWO,59ZO5jQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5rQWO1G/PO${QdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5wQWO,5:vOOQO-E8Y-E8YO6VQXO1G/vOOQS7+%h7+%hO6^QYO'#CsOOQO'#EO'#EOO6iQ`O'#D}OOQO'#D}'#D}O6tQWO'#E]O6|QdO,5:hOOQS,5:h,5:hO7XQtO'#EYO${QdO'#EYO8VQdO7+%ROOQO7+%R7+%ROOQO1G0a1G0aO8jQpO<T![;'S%^;'S;=`%o<%lO%^l;TUo`Oy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^l;nYo`#b[Oy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^l[[o`#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^n?VSp^Oy%^z;'S%^;'S;=`%o<%lO%^l?hWjWOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^n@VU#_QOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjWOy%^z{@}{;'S%^;'S;=`%o<%lO%^~AUSo`#X~Oy%^z;'S%^;'S;=`%o<%lO%^lAg[#b[Oy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!W^Oy%^z;'S%^;'S;=`%o<%lO%^dCoSzSOy%^z;'S%^;'S;=`%o<%lO%^bDQU|QOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS|Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!YQo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bFfSxQOy%^z;'S%^;'S;=`%o<%lO%^lFwSv[Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!`Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[si,li,ri,1,2,3,4,new te("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:O=>oi[O]||-1},{term:56,get:O=>ci[O]||-1},{term:98,get:O=>Qi[O]||-1}],tokenPrec:1169});let $e=null;function ge(){if(!$e&&typeof document=="object"&&document.body){let{style:O}=document.body,e=[],a=new Set;for(let t in O)t!="cssText"&&t!="cssFloat"&&typeof O[t]=="string"&&(/[A-Z]/.test(t)&&(t=t.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),a.has(t)||(e.push(t),a.add(t)));$e=e.sort().map(t=>({type:"property",label:t}))}return $e||[]}const sO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(O=>({type:"class",label:O})),lO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(O=>({type:"keyword",label:O})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(O=>({type:"constant",label:O}))),fi=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(O=>({type:"type",label:O})),Y=/^(\w[\w-]*|-\w[\w-]*|)$/,hi=/^-(-[\w-]*)?$/;function di(O,e){var a;if((O.name=="("||O.type.isError)&&(O=O.parent||O),O.name!="ArgList")return!1;let t=(a=O.parent)===null||a===void 0?void 0:a.firstChild;return(t==null?void 0:t.name)!="Callee"?!1:e.sliceString(t.from,t.to)=="var"}const nO=new wO,pi=["Declaration"];function Si(O){for(let e=O;;){if(e.type.isTop)return e;if(!(e=e.parent))return O}}function BO(O,e,a){if(e.to-e.from>4096){let t=nO.get(e);if(t)return t;let i=[],s=new Set,r=e.cursor(Te.IncludeAnonymous);if(r.firstChild())do for(let l of BO(O,r.node,a))s.has(l.label)||(s.add(l.label),i.push(l));while(r.nextSibling());return nO.set(e,i),i}else{let t=[],i=new Set;return e.cursor().iterate(s=>{var r;if(a(s)&&s.matchContext(pi)&&((r=s.node.nextSibling)===null||r===void 0?void 0:r.name)==":"){let l=O.sliceString(s.from,s.to);i.has(l)||(i.add(l),t.push({label:l,type:"variable"}))}}),t}}const $i=O=>e=>{let{state:a,pos:t}=e,i=q(a).resolveInner(t,-1),s=i.type.isError&&i.from==i.to-1&&a.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:ge(),validFor:Y};if(i.name=="ValueName")return{from:i.from,options:lO,validFor:Y};if(i.name=="PseudoClassName")return{from:i.from,options:sO,validFor:Y};if(O(i)||(e.explicit||s)&&di(i,a.doc))return{from:O(i)||s?i.from:t,options:BO(a.doc,Si(i),O),validFor:hi};if(i.name=="TagName"){for(let{parent:o}=i;o;o=o.parent)if(o.name=="Block")return{from:i.from,options:ge(),validFor:Y};return{from:i.from,options:fi,validFor:Y}}if(!e.explicit)return null;let r=i.resolve(t),l=r.childBefore(t);return l&&l.name==":"&&r.name=="PseudoClassSelector"?{from:t,options:sO,validFor:Y}:l&&l.name==":"&&r.name=="Declaration"||r.name=="ArgList"?{from:t,options:lO,validFor:Y}:r.name=="Block"||r.name=="Styles"?{from:t,options:ge(),validFor:Y}:null},gi=$i(O=>O.name=="VariableName"),se=ce.define({name:"css",parser:ui.configure({props:[Qe.add({Declaration:A()}),ue.add({Block:kO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function mi(){return new fe(se,se.data.of({autocomplete:gi}))}const Xi=303,oO=1,Pi=2,Zi=304,bi=306,xi=307,ki=3,wi=4,yi=[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],DO=125,Yi=59,cO=47,Ti=42,Ui=43,vi=45,Vi=new vO({start:!1,shift(O,e){return e==ki||e==wi||e==bi?O:e==xi},strict:!1}),Ri=new b((O,e)=>{let{next:a}=O;(a==DO||a==-1||e.context)&&O.acceptToken(Zi)},{contextual:!0,fallback:!0}),_i=new b((O,e)=>{let{next:a}=O,t;yi.indexOf(a)>-1||a==cO&&((t=O.peek(1))==cO||t==Ti)||a!=DO&&a!=Yi&&a!=-1&&!e.context&&O.acceptToken(Xi)},{contextual:!0}),Ci=new b((O,e)=>{let{next:a}=O;if((a==Ui||a==vi)&&(O.advance(),a==O.next)){O.advance();let t=!e.context&&e.canShift(oO);O.acceptToken(t?oO:Pi)}},{contextual:!0}),Wi=oe({"get set async static":n.modifier,"for while do if else switch try catch finally return throw break continue default case":n.controlKeyword,"in of await yield void typeof delete instanceof":n.operatorKeyword,"let var const function class extends":n.definitionKeyword,"import export from":n.moduleKeyword,"with debugger as new":n.keyword,TemplateString:n.special(n.string),super:n.atom,BooleanLiteral:n.bool,this:n.self,null:n.null,Star:n.modifier,VariableName:n.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":n.function(n.variableName),VariableDefinition:n.definition(n.variableName),Label:n.labelName,PropertyName:n.propertyName,PrivatePropertyName:n.special(n.propertyName),"CallExpression/MemberExpression/PropertyName":n.function(n.propertyName),"FunctionDeclaration/VariableDefinition":n.function(n.definition(n.variableName)),"ClassDeclaration/VariableDefinition":n.definition(n.className),PropertyDefinition:n.definition(n.propertyName),PrivatePropertyDefinition:n.definition(n.special(n.propertyName)),UpdateOp:n.updateOperator,LineComment:n.lineComment,BlockComment:n.blockComment,Number:n.number,String:n.string,Escape:n.escape,ArithOp:n.arithmeticOperator,LogicOp:n.logicOperator,BitOp:n.bitwiseOperator,CompareOp:n.compareOperator,RegExp:n.regexp,Equals:n.definitionOperator,Arrow:n.function(n.punctuation),": Spread":n.punctuation,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace,"InterpolationStart InterpolationEnd":n.special(n.brace),".":n.derefOperator,", ;":n.separator,"@":n.meta,TypeName:n.typeName,TypeDefinition:n.definition(n.typeName),"type enum interface implements namespace module declare":n.definitionKeyword,"abstract global Privacy readonly override":n.modifier,"is keyof unique infer":n.operatorKeyword,JSXAttributeValue:n.attributeValue,JSXText:n.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":n.angleBracket,"JSXIdentifier JSXNameSpacedName":n.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":n.attributeName,"JSXBuiltin/JSXIdentifier":n.standard(n.tagName)}),qi={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,using:413,interface:419,enum:423,namespace:429,module:431,declare:435,global:439,for:458,of:467,while:470,with:474,do:478,if:482,else:484,switch:488,case:494,try:500,catch:504,finally:508,return:512,throw:516,break:520,continue:524,debugger:528},ji={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},zi={__proto__:null,"<":137},Gi=v.deserialize({version:14,states:"$6tO`QUOOO%TQUOOO'WQWOOP(eOSOOO*sQ(CjO'#CfO*zOpO'#CgO+YO!bO'#CgO+hO07`O'#DZO-yQUO'#DaO.ZQUO'#DlO%TQUO'#DvO0_QUO'#EOOOQ(CY'#EW'#EWO0xQSO'#ETOOQO'#Ei'#EiOOQO'#Ic'#IcO1QQSO'#GkO1]QSO'#EhO1bQSO'#EhO3dQ(CjO'#JdO6TQ(CjO'#JeO6qQSO'#FWO6vQ#tO'#FoOOQ(CY'#F`'#F`O7RO&jO'#F`O7aQ,UO'#FvO8wQSO'#FuOOQ(CY'#Je'#JeOOQ(CW'#Jd'#JdO8|QSO'#GoOOQQ'#KP'#KPO9XQSO'#IPO9^Q(C[O'#IQOOQQ'#JQ'#JQOOQQ'#IU'#IUQ`QUOOO%TQUO'#DnO9fQUO'#DzO9mQUO'#D|O9SQSO'#GkO9tQ,UO'#ClO:SQSO'#EgO:_QSO'#ErO:dQ,UO'#F_O;RQSO'#GkOOQO'#KQ'#KQO;WQSO'#KQO;fQSO'#GsO;fQSO'#GtO;fQSO'#GvO9SQSO'#GyO<]QSO'#G|O=tQSO'#CbO>UQSO'#HYO>^QSO'#H`O>^QSO'#HbO`QUO'#HdO>^QSO'#HfO>^QSO'#HiO>cQSO'#HoO>hQ(C]O'#HuO%TQUO'#HwO>sQ(C]O'#HyO?OQ(C]O'#H{O9^Q(C[O'#H}O?ZQ(CjO'#CfO@]QWO'#DfQOQSOOO%TQUO'#D|O@sQSO'#EPO9tQ,UO'#EgOAOQSO'#EgOAZQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jh'#JhO%TQUO'#JhOOQO'#Jl'#JlOOQO'#I`'#I`OBZQWO'#E`OOQ(CW'#E_'#E_OCVQ(C`O'#E`OCaQWO'#ESOOQO'#Jk'#JkOCuQWO'#JlOESQWO'#ESOCaQWO'#E`PEaO?MpO'#C`POOO)CDo)CDoOOOO'#IV'#IVOElOpO,59ROOQ(CY,59R,59ROOOO'#IW'#IWOEzO!bO,59RO%TQUO'#D]OOOO'#IY'#IYOFYO07`O,59uOOQ(CY,59u,59uOFhQUO'#IZOF{QSO'#JfOH}QbO'#JfO+vQUO'#JfOIUQSO,59{OIlQSO'#EiOIyQSO'#JtOJUQSO'#JsOJUQSO'#JsOJ^QSO,5;VOJcQSO'#JrOOQ(CY,5:W,5:WOJjQUO,5:WOLkQ(CjO,5:bOM[QSO,5:jOMuQ(C[O'#JqOM|QSO'#JpO8|QSO'#JpONbQSO'#JpONjQSO,5;UONoQSO'#JpO!!wQbO'#JeOOQ(CY'#Cf'#CfO%TQUO'#EOO!#gQ`O,5:oOOQO'#Jm'#JmOOQO-EkOOQQ'#JY'#JYOOQQ,5>l,5>lOOQQ-EqQ(CjO,5:hOOQO,5@l,5@lO!?bQ,UO,5=VO!?pQ(C[O'#JZO8wQSO'#JZO!@RQ(C[O,59WO!@^QWO,59WO!@fQ,UO,59WO9tQ,UO,59WO!@qQSO,5;SO!@yQSO'#HXO!A[QSO'#KUO%TQUO,5;wO!7[QWO,5;yO!AdQSO,5=rO!AiQSO,5=rO!AnQSO,5=rO9^Q(C[O,5=rO;fQSO,5=bOOQO'#Cr'#CrO!A|QWO,5=_O!BUQ,UO,5=`O!BaQSO,5=bO!BfQ`O,5=eO!BnQSO'#KQO>cQSO'#HOO9SQSO'#HQO!BsQSO'#HQO9tQ,UO'#HSO!BxQSO'#HSOOQQ,5=h,5=hO!B}QSO'#HTO!CVQSO'#ClO!C[QSO,58|O!CfQSO,58|O!EkQUO,58|OOQQ,58|,58|O!E{Q(C[O,58|O%TQUO,58|O!HWQUO'#H[OOQQ'#H]'#H]OOQQ'#H^'#H^O`QUO,5=tO!HnQSO,5=tO`QUO,5=zO`QUO,5=|O!HsQSO,5>OO`QUO,5>QO!HxQSO,5>TO!H}QUO,5>ZOOQQ,5>a,5>aO%TQUO,5>aO9^Q(C[O,5>cOOQQ,5>e,5>eO!MXQSO,5>eOOQQ,5>g,5>gO!MXQSO,5>gOOQQ,5>i,5>iO!M^QWO'#DXO%TQUO'#JhO!M{QWO'#JhO!NjQWO'#DgO!N{QWO'#DgO##^QUO'#DgO##eQSO'#JgO##mQSO,5:QO##rQSO'#EmO#$QQSO'#JuO#$YQSO,5;WO#$_QWO'#DgO#$lQWO'#EROOQ(CY,5:k,5:kO%TQUO,5:kO#$sQSO,5:kO>cQSO,5;RO!@^QWO,5;RO!@fQ,UO,5;RO9tQ,UO,5;RO#${QSO,5@SO#%QQ!LQO,5:oOOQO-E<^-E<^O#&WQ(C`O,5:zOCaQWO,5:nO#&bQWO,5:nOCaQWO,5:zO!@RQ(C[O,5:nOOQ(CW'#Ec'#EcOOQO,5:z,5:zO%TQUO,5:zO#&oQ(C[O,5:zO#&zQ(C[O,5:zO!@^QWO,5:nOOQO,5;Q,5;QO#'YQ(C[O,5:zPOOO'#IT'#ITP#'nO?MpO,58zPOOO,58z,58zOOOO-EuO+vQUO,5>uOOQO,5>{,5>{O#(YQUO'#IZOOQO-E^QSO1G3jO$.VQUO1G3lO$2ZQUO'#HkOOQQ1G3o1G3oO$2hQSO'#HqO>cQSO'#HsOOQQ1G3u1G3uO$2pQUO1G3uO9^Q(C[O1G3{OOQQ1G3}1G3}OOQ(CW'#GW'#GWO9^Q(C[O1G4PO9^Q(C[O1G4RO$6wQSO,5@SO!){QUO,5;XO8|QSO,5;XO>cQSO,5:RO!){QUO,5:RO!@^QWO,5:RO$6|Q$IUO,5:ROOQO,5;X,5;XO$7WQWO'#I[O$7nQSO,5@ROOQ(CY1G/l1G/lO$7vQWO'#IbO$8QQSO,5@aOOQ(CW1G0r1G0rO!N{QWO,5:ROOQO'#I_'#I_O$8YQWO,5:mOOQ(CY,5:m,5:mO#$vQSO1G0VOOQ(CY1G0V1G0VO%TQUO1G0VOOQ(CY1G0m1G0mO>cQSO1G0mO!@^QWO1G0mO!@fQ,UO1G0mOOQ(CW1G5n1G5nO!@RQ(C[O1G0YOOQO1G0f1G0fO%TQUO1G0fO$8aQ(C[O1G0fO$8lQ(C[O1G0fO!@^QWO1G0YOCaQWO1G0YO$8zQ(C[O1G0fOOQO1G0Y1G0YO$9`Q(CjO1G0fPOOO-EuO$9|QSO1G5lO$:UQSO1G5yO$:^QbO1G5zO8|QSO,5>{O$:hQ(CjO1G5wO%TQUO1G5wO$:xQ(C[O1G5wO$;ZQSO1G5vO$;ZQSO1G5vO8|QSO1G5vO$;cQSO,5?OO8|QSO,5?OOOQO,5?O,5?OO$;wQSO,5?OO$$XQSO,5?OOOQO-ExQ(CjO,5VOOQQ,5>V,5>VO%TQUO'#HlO%(dQSO'#HnOOQQ,5>],5>]O8|QSO,5>]OOQQ,5>_,5>_OOQQ7+)a7+)aOOQQ7+)g7+)gOOQQ7+)k7+)kOOQQ7+)m7+)mO%(iQWO1G5nO%(}Q$IUO1G0sO%)XQSO1G0sOOQO1G/m1G/mO%)dQ$IUO1G/mO>cQSO1G/mO!){QUO'#DgOOQO,5>v,5>vOOQO-E|,5>|OOQO-E<`-E<`O!@^QWO1G/mOOQO-E<]-E<]OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO#$vQSO7+%qOOQ(CY7+&X7+&XO>cQSO7+&XO!@^QWO7+&XOOQO7+%t7+%tO$9`Q(CjO7+&QOOQO7+&Q7+&QO%TQUO7+&QO%)nQ(C[O7+&QO!@RQ(C[O7+%tO!@^QWO7+%tO%)yQ(C[O7+&QO%*XQ(CjO7++cO%TQUO7++cO%*iQSO7++bO%*iQSO7++bOOQO1G4j1G4jO8|QSO1G4jO%*qQSO1G4jOOQO7+%y7+%yO#$vQSO<wOOQO-ExO%TQUO,5>xOOQO-E<[-E<[O%2qQSO1G5pOOQ(CY<bQ$IUO1G0xO%>iQ$IUO1G0xO%@aQ$IUO1G0xO%@tQ(CjO<WOOQQ,5>Y,5>YO%N_QSO1G3wO8|QSO7+&_O!){QUO7+&_OOQO7+%X7+%XO%NdQ$IUO1G5zO>cQSO7+%XOOQ(CY<cQSO<cQSO7+)cO&5{QSO<zAN>zO%TQUOAN?WOOQO<TQSO<= cOOQQG27jG27jO9^Q(C[OG27jO!){QUO1G4uO&>]QSO7++tO%LpQSOANAxOOQQANAxANAxO!&VQ,UOANAxO&>eQSOANAxOOQQANAzANAzO9^Q(C[OANAzO#MzQSOANAzOOQO'#HV'#HVOOQO7+*d7+*dOOQQG22tG22tOOQQANEOANEOOOQQANEPANEPOOQQANBSANBSO&>mQSOANBSOOQQ<rQSOLD,iO&>zQ$IUO7+'sO&@pQ$IUO7+'uO&BfQ,UOG26{OOQO<ROPYXXYXkYXyYXzYX|YX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX!VYX!WYX~O#yYX~P#@lOP$[OX:XOk9{Oy#xOz#yO|#zO!e9}O!f#vO!h#wO!l$[O#g9yO#h9zO#i9zO#j9zO#k9|O#l9}O#m9}O#n:WO#o9}O#q:OO#s:QO#u:SO#v:TO(SVO(c$YO(j#{O(k#|O~O#y.hO~P#ByO#X:YO#{:YO#y(XX!W(XX~PN}O^'Za!V'Za'l'Za'j'Za!g'Za!S'Zao'Za!X'Za%a'Za!a'Za~P!7sOP#fiX#fi^#fik#fiz#fi!V#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'l#fi(S#fi(c#fi'j#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#,`O^#zi!V#zi'l#zi'j#zi!S#zi!g#zio#zi!X#zi%a#zi!a#zi~P!7sO$W.mO$Y.mO~O$W.nO$Y.nO~O!a)^O#X.oO!X$^X$T$^X$W$^X$Y$^X$a$^X~O!U.pO~O!X)aO$T.rO$W)`O$Y)`O$a.sO~O!V:UO!W(WX~P#ByO!W.tO~O!a)^O$a(lX~O$a.vO~Oq)pO(T)qO(U.yO~Ol.|O!S.}O'wTO'zUO~O!VcX!acX!gcX!g$sX(ccX~P!/ZO!g/TO~P#,`O!V/UO!a#tO(c'fO!g(pX~O!g/ZO~O!U*RO'u%_O!g(pP~O#d/]O~O!S$sX!V$sX!a$zX~P!/ZO!V/^O!S(qX~P#,`O!a/`O~O!S/bO~Ok/fO!a#tO!h%]O(O%QO(c'fO~O'u/hO~O!a+XO~O^%fO!V/lO'l%fO~O!W/nO~P!3XO!]/oO!^/oO'v!kO(V!lO~O|/qO(V!lO~O#T/rO~O'u&POd'`X!V'`X~O!V*kOd(Pa~Od/wO~Oy/xOz/xO|/yOgva(jva(kva!Vva#Xva~Odva#yva~P$ hOy)uO|)vOg$la(j$la(k$la!V$la#X$la~Od$la#y$la~P$!^Oy)uO|)vOg$na(j$na(k$na!V$na#X$na~Od$na#y$na~P$#PO#d/{O~Od$|a!V$|a#X$|a#y$|a~P!0dO!a#tO~O#d0OO~O!V*|O^(ua'l(ua~Oy#xOz#yO|#zO!f#vO!h#wO(SVOP!niX!nik!ni!V!ni!e!ni!l!ni#g!ni#h!ni#i!ni#j!ni#k!ni#l!ni#m!ni#n!ni#o!ni#q!ni#s!ni#u!ni#v!ni(c!ni(j!ni(k!ni~O^!ni'l!ni'j!ni!S!ni!g!nio!ni!X!ni%a!ni!a!ni~P$$nOg.TO!X'UO%a.SO~Oi0YO'u0XO~P!1UO!a+XO^'}a!X'}a'l'}a!V'}a~O#d0`O~OXYX!VcX!WcX~O!V0aO!W(yX~O!W0cO~OX0dO~O'u+aO'wTO'zUO~O!X%vO'u%_O]'hX!V'hX~O!V+fO](xa~O!g0iO~P!7sOX0lO~O]0mO~O#X0pO~Og0sO!X${O~O(V(sO!W(vP~Og0|O!X0yO%a0{O(O%QO~OX1WO!V1UO!W(wX~O!W1XO~O]1ZO^%fO'l%fO~O'u#lO'wTO'zUO~O#X$dO#{$dOP(XXX(XXk(XXy(XXz(XX|(XX!V(XX!e(XX!h(XX!l(XX#g(XX#h(XX#i(XX#j(XX#k(XX#l(XX#m(XX#n(XX#q(XX#s(XX#u(XX#v(XX(S(XX(c(XX(j(XX(k(XX~O#o1^O&R1_O^(XX!f(XX~P$+dO#X$dO#o1^O&R1_O~O^1aO~P%TO^1cO~O&[1fOP&YiQ&YiV&Yi^&Yia&Yib&Yii&Yik&Yil&Yim&Yis&Yiu&Yiw&Yi|&Yi!Q&Yi!R&Yi!X&Yi!c&Yi!h&Yi!k&Yi!l&Yi!m&Yi!o&Yi!q&Yi!t&Yi!x&Yi#p&Yi$Q&Yi$U&Yi%`&Yi%b&Yi%d&Yi%e&Yi%f&Yi%i&Yi%k&Yi%n&Yi%o&Yi%q&Yi%}&Yi&T&Yi&V&Yi&X&Yi&Z&Yi&^&Yi&d&Yi&j&Yi&l&Yi&n&Yi&p&Yi&r&Yi'j&Yi'u&Yi'w&Yi'z&Yi(S&Yi(b&Yi(o&Yi!W&Yi_&Yi&a&Yi~O_1lO!W1jO&a1kO~P`O!XXO!h1nO~O&h,iOP&ciQ&ciV&ci^&cia&cib&cii&cik&cil&cim&cis&ciu&ciw&ci|&ci!Q&ci!R&ci!X&ci!c&ci!h&ci!k&ci!l&ci!m&ci!o&ci!q&ci!t&ci!x&ci#p&ci$Q&ci$U&ci%`&ci%b&ci%d&ci%e&ci%f&ci%i&ci%k&ci%n&ci%o&ci%q&ci%}&ci&T&ci&V&ci&X&ci&Z&ci&^&ci&d&ci&j&ci&l&ci&n&ci&p&ci&r&ci'j&ci'u&ci'w&ci'z&ci(S&ci(b&ci(o&ci!W&ci&[&ci_&ci&a&ci~O!S1tO~O!V!Za!W!Za~P#ByOl!mO|!nO!U1zO(V!lO!V'OX!W'OX~P?wO!V,yO!W(Za~O!V'UX!W'UX~P!6{O!V,|O!W(ia~O!W2RO~P'WO^%fO#X2[O'l%fO~O^%fO!a#tO#X2[O'l%fO~O^%fO!a#tO!l2`O#X2[O'l%fO(c'fO~O^%fO'l%fO~P!7sO!V$`Oo$ka~O!S&}i!V&}i~P!7sO!V'zO!S(Yi~O!V(RO!S(gi~O!S(hi!V(hi~P!7sO!V(ei!g(ei^(ei'l(ei~P!7sO#X2bO!V(ei!g(ei^(ei'l(ei~O!V(_O!g(di~O|%`O!X%aO!x]O#b2gO#c2fO'u%_O~O|%`O!X%aO#c2fO'u%_O~Og2nO!X'UO%a2mO~Og2nO!X'UO%a2mO(O%QO~O#dvaPvaXva^vakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva'lva(Sva(cva!gva!Sva'jvaova!Xva%ava!ava~P$ hO#d$laP$laX$la^$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la'l$la(S$la(c$la!g$la!S$la'j$lao$la!X$la%a$la!a$la~P$!^O#d$naP$naX$na^$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na'l$na(S$na(c$na!g$na!S$na'j$nao$na!X$na%a$na!a$na~P$#PO#d$|aP$|aX$|a^$|ak$|az$|a!V$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a'l$|a(S$|a(c$|a!g$|a!S$|a'j$|a#X$|ao$|a!X$|a%a$|a!a$|a~P#,`O^#[q!V#[q'l#[q'j#[q!S#[q!g#[qo#[q!X#[q%a#[q!a#[q~P!7sOd'PX!V'PX~P!'oO!V.^Od(]a~O!U2vO!V'QX!g'QX~P%TO!V.aO!g(^a~O!V.aO!g(^a~P!7sO!S2yO~O#y!ja!W!ja~PJqO#y!ba!V!ba!W!ba~P#ByO#y!na!W!na~P!:^O#y!pa!W!pa~P!pO^#wy!V#wy'l#wy'j#wy!S#wy!g#wyo#wy!X#wy%a#wy!a#wy~P!7sOg;lOy)uO|)vO(j)xO(k)zO~OP#fiX#fik#fiz#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(S#fi(c#fi!V#fi!W#fi~P%AhO!f#vOP(RXX(RXg(RXk(RXy(RXz(RX|(RX!e(RX!h(RX!l(RX#g(RX#h(RX#i(RX#j(RX#k(RX#l(RX#m(RX#n(RX#o(RX#q(RX#s(RX#u(RX#v(RX#y(RX(S(RX(c(RX(j(RX(k(RX!V(RX!W(RX~O#y#zi!V#zi!W#zi~P#ByO#y!ni!W!ni~P$$nO!W6_O~O!V'Za!W'Za~P#ByO!a#tO(c'fO!V'[a!g'[a~O!V/UO!g(pi~O!V/UO!a#tO!g(pi~Od$uq!V$uq#X$uq#y$uq~P!0dO!S'^a!V'^a~P#,`O!a6fO~O!V/^O!S(qi~P#,`O!V/^O!S(qi~O!S6jO~O!a#tO#o6oO~Ok6pO!a#tO(c'fO~O!S6rO~Od$wq!V$wq#X$wq#y$wq~P!0dO^$iy!V$iy'l$iy'j$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!7sO!a5jO~O!V4VO!X(ra~O^#[y!V#[y'l#[y'j#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!7sOX6wO~O!V0aO!W(yi~O]6}O~O(V(sO!V'cX!W'cX~O!V4mO!W(va~OikO'u7UO~P.bO!W7XO~P%$wOl!mO|7YO'wTO'zUO(V!lO(b!rO~O!X0yO~O!X0yO%a7[O~Og7_O!X0yO%a7[O~OX7dO!V'fa!W'fa~O!V1UO!W(wi~O!g7hO~O!g7iO~O!g7lO~O!g7lO~P%TO^7nO~O!a7oO~O!g7pO~O!V(hi!W(hi~P#ByO^%fO#X7xO'l%fO~O!V(ey!g(ey^(ey'l(ey~P!7sO!V(_O!g(dy~O!X'UO%a7{O~O#d$uqP$uqX$uq^$uqk$uqz$uq!V$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq'l$uq(S$uq(c$uq!g$uq!S$uq'j$uq#X$uqo$uq!X$uq%a$uq!a$uq~P#,`O#d$wqP$wqX$wq^$wqk$wqz$wq!V$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq'l$wq(S$wq(c$wq!g$wq!S$wq'j$wq#X$wqo$wq!X$wq%a$wq!a$wq~P#,`O!V'Qi!g'Qi~P!7sO#y#[q!V#[q!W#[q~P#ByOy/xOz/xO|/yOPvaXvagvakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva#yva(Sva(cva(jva(kva!Vva!Wva~Oy)uO|)vOP$laX$lag$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la#y$la(S$la(c$la(j$la(k$la!V$la!W$la~Oy)uO|)vOP$naX$nag$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na#y$na(S$na(c$na(j$na(k$na!V$na!W$na~OP$|aX$|ak$|az$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a#y$|a(S$|a(c$|a!V$|a!W$|a~P%AhO#y$hq!V$hq!W$hq~P#ByO#y$iq!V$iq!W$iq~P#ByO!W8VO~O#y8WO~P!0dO!a#tO!V'[i!g'[i~O!a#tO(c'fO!V'[i!g'[i~O!V/UO!g(pq~O!S'^i!V'^i~P#,`O!V/^O!S(qq~O!S8^O~P#,`O!S8^O~Od(Qy!V(Qy~P!0dO!V'aa!X'aa~P#,`O^%Tq!X%Tq'l%Tq!V%Tq~P#,`OX8cO~O!V0aO!W(yq~O#X8gO!V'ca!W'ca~O!V4mO!W(vi~P#ByOPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX~O!a%RX#o%RX~P&2hO!X0yO%a8kO~O'wTO'zUO(V8pO~O!V1UO!W(wq~O!g8sO~O!g8tO~O!g8uO~O!g8uO~P%TO#X8xO!V#ay!W#ay~O!V#ay!W#ay~P#ByO!X'UO%a8}O~O#y#wy!V#wy!W#wy~P#ByOP$uiX$uik$uiz$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui#y$ui(S$ui(c$ui!V$ui!W$ui~P%AhOy)uO|)vO(k)zOP%XiX%Xig%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi#y%Xi(S%Xi(c%Xi(j%Xi!V%Xi!W%Xi~Oy)uO|)vOP%ZiX%Zig%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi#y%Zi(S%Zi(c%Zi(j%Zi(k%Zi!V%Zi!W%Zi~O#y$iy!V$iy!W$iy~P#ByO#y#[y!V#[y!W#[y~P#ByO!a#tO!V'[q!g'[q~O!V/UO!g(py~O!S'^q!V'^q~P#,`O!S9UO~P#,`O!V0aO!W(yy~O!V4mO!W(vq~O!X0yO%a9]O~O!g9`O~O!X'UO%a9eO~OP$uqX$uqk$uqz$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq#y$uq(S$uq(c$uq!V$uq!W$uq~P%AhOP$wqX$wqk$wqz$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq#y$wq(S$wq(c$wq!V$wq!W$wq~P%AhOd%]!Z!V%]!Z#X%]!Z#y%]!Z~P!0dO!V'cq!W'cq~P#ByO!V#a!Z!W#a!Z~P#ByO#d%]!ZP%]!ZX%]!Z^%]!Zk%]!Zz%]!Z!V%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z'l%]!Z(S%]!Z(c%]!Z!g%]!Z!S%]!Z'j%]!Z#X%]!Zo%]!Z!X%]!Z%a%]!Z!a%]!Z~P#,`OP%]!ZX%]!Zk%]!Zz%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z#y%]!Z(S%]!Z(c%]!Z!V%]!Z!W%]!Z~P%AhOo(WX~P1jO'v!kO~P!){O!ScX!VcX#XcX~P&2hOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#XYX#XcX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(SYX(cYX(jYX(kYX~O!acX!gYX!gcX(ccX~P&HOOP9pOQ9pOa;aOb!hOikOk9pOlkOmkOskOu9pOw9pO|WO!QkO!RkO!XXO!c9sO!hZO!k9pO!l9pO!m9pO!o9tO!q9wO!t!gO$Q!jO$UfO'u)TO'wTO'zUO(SVO(b[O(o;_O~O!V:UO!W$ka~Oi%ROk$sOl$rOm$rOs%SOu%TOw:[O|$zO!X${O!c;fO!h$wO#c:bO$Q%XO$m:^O$o:`O$r%YO'u(kO'wTO'zUO(O%QO(S$tO~O#p)[O~P&LtO!WYX!WcX~P&HOO#d9xO~O!a#tO#d9xO~O#X:YO~O#o9}O~O#X:dO!V(hX!W(hX~O#X:YO!V(fX!W(fX~O#d:eO~Od:gO~P!0dO#d:lO~O#d:mO~O!a#tO#d:nO~O!a#tO#d:eO~O#y:oO~P#ByO#d:pO~O#d:qO~O#d:rO~O#d:sO~O#d:tO~O#d:uO~O#y:vO~P!0dO#y:wO~P!0dO$U~!f!|!}#P#Q#T#b#c#n(o$m$o$r%U%`%a%b%i%k%n%o%q%s~'pR$U(o#h!R'n'v#il#g#jky'o(V'o'u$W$Y$W~",goto:"$&O(}PPPP)OP)RP)cP*r.uPPPP5WPP5mP;h>mP?QP?QPPP?QP@pP?QP?QP?QP@tPP@yPAdPFZPPPF_PPPPF_I_PPPIeJ`PF_PLmPPPPN{F_PPPF_PF_P!#ZF_P!&n!'p!'yP!(l!(p!(lPPPPP!+z!'pPP!,h!-bP!0UF_F_!0Z!3d!7x!7x!;mPPP!;tF_PPPPPPPPPPP!?QP!@cPPF_!ApPF_PF_F_F_F_PF_!CSPP!FZP!I^P!Ib!Il!Ip!IpP!FWP!It!ItP!LwP!L{F_F_!MR#!T?QP?QP?Q?QP##_?Q?Q#%X?Q#'f?Q#)Y?Q?Q#)v#+r#+r#+v#,O#+r#,WP#+rP?Q#,p?Q#-x?Q?Q5WPPP#/TPPP#/m#/mP#/mP#0S#/mPP#0YP#0PP#0P#0l#0P#1W#1^5T)R#1a)RP#1h#1h#1hP)RP)RP)RP)RPP)RP#1n#1qP#1q)RP#1uP#1xP)RP)RP)RP)RP)RP)R)RPP#2O#2U#2`#2f#2l#2r#2x#3W#3^#3d#3n#3t#4O#4_#4e#5U#5h#5n#5t#6S#6i#7y#8X#8_#8e#8k#8q#8{#9R#9X#9c#9u#9{PPPPPPPPPP#:RPPPPPPP#:u#=|P#?]#?d#?lPPPP#Cv#Fl#MS#MV#MY#NR#NU#NX#N`#NhPP#Nn#Nr$ j$!i$!m$#RPP$#V$#]$#aP$#d$#h$#k$$a$$w$%_$%c$%f$%i$%o$%r$%v$%zR!zRmqOXs!Y#b%e&h&j&k&m,a,f1f1iY!tQ'U-R0y4tQ%kuQ%sxQ%z{Q&`!US&|!d,yQ'[!hS'b!q!wS*^${*cQ+_%tQ+l%|Q,Q&YQ-P'TQ-Z']Q-c'cQ/o*eQ1T,RR:c9t$|dOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{,^,a,f-V-_-m-s.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2v4q4{5]5^5a5t7Y7_7n7xS#o]9q!r)V$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ*n%UQ+d%vQ,S&]Q,Z&eQ.W:ZQ0V+VQ0Z+XQ0f+eQ1],XQ2j.TQ4_0aQ5S1UQ6Q2nQ6W:[Q6y4`R8O6R&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bt!mQ!q!t!w!x&|'T'U'b'c'd,y-P-R-c0y4t4v$Y$ri#t#v$b$c$w$z%V%W%[)p)y){)|*T*Z*i*j+U+X+p+s.S.^/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lQ%}{Q&z!dS'Q%a,|Q+d%vS.|)v/OQ/z*rQ0f+eQ0k+kQ1[,WQ1],XQ4_0aQ4h0mQ5V1WQ5W1ZQ6y4`Q6|4eQ7g5YQ8f6}R8q7dpnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iR,U&a&t^OPXYstuvy!Y!_!f!i!n#Q#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y'W'h'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;a;b[#ZWZ#U#X&}'x!S%bm#f#g#j%]%`(R(](^(_*y*z*|,],s-q-w-x-y-{1n2f2g5j5{Q%nwQ%rxS%w{%|Q&T!SQ'X!gQ'Z!hQ(f#qS*Q$w*US+^%s%tQ+b%vQ+{&WQ,P&YS-Y'[']Q.V(gQ/Y*RQ0_+_Q0e+eQ0g+fQ0j+jQ1O+|S1S,Q,RQ2W-ZQ3f/UQ4^0aQ4b0dQ4g0lQ5R1TQ6c3gQ6x4`Q6{4dQ8b6wR9W8cv$yi#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h!S%px!h!s%r%s%t&{'Z'[']'a'k*]+^+_,v-Y-Z-b/g0_2P2W2_3yQ+W%nQ+q&QQ+t&RQ,O&YQ.U(fQ0}+{U1R,P,Q,RQ2o.VQ4|1OS5Q1S1TQ7c5R!z;c#t$b$c$w$z)p)|*Z+U+X+p+s.S/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lg;d:W:X:^:`:b:i:k:m:q:s:wW%Oi%Q*k;_S&Q!P&_Q&R!QQ&S!RR+o&O$Z$}i#t#v$b$c$w$z%V%W%[)p)y){)|*T*Z*i*j+U+X+p+s.S.^/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lT)q$t)rV*o%U:Z:[U'Q!d%a,|S(t#x#yQ+i%yS.O(b(cQ0t+uQ4O/xR7R4m&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;b$i$_c#W#c%i%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.i.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;UT#RV#S&{kOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ'O!dR1{,yv!mQ!d!q!t!w!x&|'T'U'b'c'd,y-P-R-c0y4t4vS*]${*cS/g*^*eQ/p*fQ0v+wQ3y/oR3|/rlqOXs!Y#b%e&h&j&k&m,a,f1f1iQ&o!]Q'l!vS(h#s9xQ+[%qQ+y&TQ+z&VQ-W'YQ-e'eS.[(m:eS/}*w:nQ0]+]Q0x+xQ1m,hQ1o,iQ1w,tQ2U-XQ2X-]S4T0O:tQ4Y0^S4]0`:uQ5l1yQ5p2VQ5u2^Q6v4ZQ7s5nQ7t5qQ7w5vR8w7p$d$^c#W#c%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;US(e#n'_U*h$|(l3YS+R%i.iQ2k0VQ5}2jQ7}6QR9O8O$d$]c#W#c%j%l'w'}(i(p(x(y(z({(|(})O)P)Q)R)S)U)X)])g+S+h,w-f-k-p-r.].c.g.j.k.z/|1u1x2Y2a2u2z2{2|2}3O3P3Q3R3S3T3U3V3W3Z3[3a4S4[5m5s5x6U6V6[6]7T7r7v8P8T8U8z9Y9a9r;US(d#n'_S(v#y$^S+Q%i.iS.P(c(eQ.l)WQ0S+RR2h.Q&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bS#o]9qQ&j!WQ&k!XQ&m!ZQ&n![R1e,dQ'V!gQ+T%nQ-U'XS.R(f+WQ2S-TW2l.U.V0U0WQ5o2TU5|2i2k2oS7z5}6PS8|7|7}S9c8{9OQ9k9dR9n9lU!uQ'U-RT4r0y4t!O_OXZ`s!U!Y#b#f%]%e&_&a&h&j&k&m(_,a,f-x1f1i]!oQ!q'U-R0y4tT#o]9q%WzOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xS(t#x#yS.O(b(c!s:{$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bY!sQ'U-R0y4tQ'a!qS'k!t!wS'm!x4vS-b'b'cQ-d'dR2_-cQ'j!sS(Z#e1`S-a'a'mQ/X*QQ/e*]Q2`-dQ3k/YS3t/f/pQ6b3fS6m3z3|Q8Y6cR8a6pQ#ubQ'i!sS(Y#e1`S([#k*vQ*x%^Q+Y%oQ+`%uU-`'a'j'mQ-t(ZQ/W*QQ/d*]Q/j*`Q0[+ZQ1P+}S2]-a-dQ2e-|S3j/X/YS3s/e/pQ3v/iQ3x/kQ5O1QQ5w2`Q6a3fQ6e3kS6i3t3|Q6n3{Q7a5PS8X6b6cQ8]6jQ8_6mQ8n7bQ9S8YQ9T8^Q9V8aQ9_8oQ9g9UQ;O:yQ;Z;SR;[;TV!uQ'U-R%WaOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xS#uy!i!r:x$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bR;O;a%WbOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xQ%^j!S%ox!h!s%r%s%t&{'Z'[']'a'k*]+^+_,v-Y-Z-b/g0_2P2W2_3yS%uy!iQ+Z%pQ+}&YW1Q,O,P,Q,RU5P1R1S1TS7b5Q5RQ8o7c!r:y$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ;S;`R;T;a$zeOPXYstuv!Y!_!f!n#Q#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7xY#`WZ#U#X'x!S%bm#f#g#j%]%`(R(](^(_*y*z*|,],s-q-w-x-y-{1n2f2g5j5{Q,[&e!p:z$Z$l)i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bR:}&}S'R!d%aR1},|$|dOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{,^,a,f-V-_-m-s.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2v4q4{5]5^5a5t7Y7_7n7x!r)V$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bQ,Z&eQ0V+VQ2j.TQ6Q2nR8O6R!f$Tc#W%i'w'}(i(p)P)Q)R)S)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9r!T:P)U)g,w.i1u1x2z3S3T3U3V3Z3a5m6V6[6]7T7r8P8T8U9Y9a;U!b$Vc#W%i'w'}(i(p)R)S)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9r!P:R)U)g,w.i1u1x2z3U3V3Z3a5m6V6[6]7T7r8P8T8U9Y9a;U!^$Zc#W%i'w'}(i(p)X)]+h-f-k-p-r.].c.z/|2Y2a2u3W4S4[5s5x6U7v8z9rQ3e/Sz;b)U)g,w.i1u1x2z3Z3a5m6V6[6]7T7r8P8T8U9Y9a;UQ;g;iR;h;j&zkOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bS$mh$nR3^.o'RgOPWXYZhstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l$n%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.o.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bT$if$oQ$gfS)`$j)dR)l$oT$hf$oT)b$j)d'RhOPWXYZhstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$Z$`$d$l$n%e%k%x&a&d&e&h&j&k&m&q&y&}'W'h'x'z(Q(X(m(q(u)i)t*w*{+V,^,a,f,r,u-V-_-m-s.T.a.h.o.p/y0O0`0|1^1_1a1c1f1i1k1z2[2b2n2v3]4o4q4{5]5^5a5k5t6R7Y7_7n7x8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;bT$mh$nQ$phR)k$n%WjOPWXYZstuv!Y!_!f!n#Q#U#X#b#m#s#w#z#}$O$P$Q$R$S$T$U$V$W$X$`$d%e%k%x&a&d&e&h&j&k&m&q&y'W'h'x'z(Q(X(m(q(u)t*w*{+V,^,a,f-V-_-m-s.T.a.h/y0O0`0|1^1_1a1c1f1i1k2[2b2n2v4q4{5]5^5a5t6R7Y7_7n7x!s;`$Z$l&})i,r,u.p1z3]4o5k8g8x9p9s9t9w9x9y9z9{9|9}:O:P:Q:R:S:T:U:Y:c:d:e:g:n:o:t:u;b#alOPXZs!Y!_!n#Q#b#m#z$l%e&a&d&e&h&j&k&m&q&y'W(u)i*{+V,^,a,f-V.T.p/y0|1^1_1a1c1f1i1k2n3]4q4{5]5^5a6R7Y7_7nv$|i#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h!z(l#t$b$c$w$z)p)|*Z+U+X+p+s.S/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lQ*s%YQ.{)ug3Y:W:X:^:`:b:i:k:m:q:s:wv$xi#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;hQ*V$yS*`${*cQ*t%ZQ/k*a!z;Q#t$b$c$w$z)p)|*Z+U+X+p+s.S/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lf;R:W:X:^:`:b:i:k:m:q:s:wQ;V;cQ;W;dQ;X;eR;Y;fv$|i#v%V%W%[)y){*T*i*j.^/]/{3e3}8W;_;g;h!z(l#t$b$c$w$z)p)|*Z+U+X+p+s.S/^/`0p0s0{2m3o3w4V4X4z6O6f6o7[7{8k8}9]9e:]:_:a:h:j:l:p:r:v;k;lg3Y:W:X:^:`:b:i:k:m:q:s:wloOXs!Y#b%e&h&j&k&m,a,f1f1iQ*Y$zQ,o&tQ,p&vR3n/^$Y$}i#t#v$b$c$w$z%V%W%[)p)y){)|*T*Z*i*j+U+X+p+s.S.^/]/^/`/{0p0s0{2m3e3o3w3}4V4X4z6O6f6o7[7{8W8k8}9]9e:W:X:]:^:_:`:a:b:h:i:j:k:l:m:p:q:r:s:v:w;_;g;h;k;lQ+r&RQ0r+tQ4k0qR7Q4lT*b${*cS*b${*cT4s0y4tS/i*_4qT3{/q7YQ+Y%oQ/j*`Q0[+ZQ1P+}Q5O1QQ7a5PQ8n7bR9_8on)y$u(n*u/[/s/t2s3l4R6`6q9R;P;];^!W:h(j)Z*P*X.Z.w/S/a0T0o0q2r3m3q4j4l6S6T6g6k6s6u8[8`9f;i;j]:i3X6Z8Q9P9Q9op){$u(n*u/Q/[/s/t2s3l4R6`6q9R;P;];^!Y:j(j)Z*P*X.Z.w/S/a0T0o0q2p2r3m3q4j4l6S6T6g6k6s6u8[8`9f;i;j_:k3X6Z8Q8R9P9Q9opnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iQ&[!TR,^&epnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iR&[!TQ+v&SR0n+oqnOXs!U!Y#b%e&_&h&j&k&m,a,f1f1iQ0z+{S4y0}1OU7Z4w4x4|S8j7]7^S9Z8i8lQ9h9[R9m9iQ&c!UR,V&_R5V1WS%w{%|R0g+fQ&h!VR,a&iR,g&nT1g,f1iR,k&oQ,j&oR1p,kQ'o!yR-g'oQsOQ#bXT%hs#bQ!|TR'q!|Q#PUR's#PQ)r$tR.x)rQ#SVR'u#SQ#VWU'{#V'|-nQ'|#WR-n'}Q,z'OR1|,zQ._(nR2t._Q.b(pS2w.b2xR2x.cQ-R'UR2Q-RY!qQ'U-R0y4tR'`!qS#]W%`U(S#](T-oQ(T#^R-o(OQ,}'RR2O,}r`OXs!U!Y#b%e&_&a&h&j&k&m,a,f1f1iS#fZ%]U#p`#f-xR-x(_Q(`#hQ-u([W-}(`-u2c5yQ2c-vR5y2dQ)d$jR.q)dQ$nhR)j$nQ$acU)Y$a-j:VQ-j9rR:V)gQ/V*QW3h/V3i6d8ZU3i/W/X/YS6d3j3kR8Z6e#m)w$u(j(n)Z*P*X*p*q*u.X.Y.Z.w/Q/R/S/[/a/s/t0T0o0q2p2q2r2s3X3l3m3q4R4j4l6S6T6X6Y6Z6`6g6k6q6s6u8Q8R8S8[8`9P9Q9R9f9o;P;];^;i;jQ/_*XU3p/_3r6hQ3r/aR6h3qQ*c${R/m*cQ*l%PR/v*lQ4W0TR6t4WQ*}%cR0R*}Q4n0tS7S4n8hR8h7TQ+x&TR0w+xQ4t0yR7W4tQ1V,SS5T1V7eR7e5VQ0b+bW4a0b4c6z8dQ4c0eQ6z4bR8d6{Q+g%wR0h+gQ1i,fR5e1iWrOXs#bQ&l!YQ+P%eQ,`&hQ,b&jQ,c&kQ,e&mQ1d,aS1g,f1iR5d1fQ%gpQ&p!^Q&s!`Q&u!aQ&w!bQ'g!sQ+O%dQ+[%qQ+n%}Q,U&cQ,m&rW-^'a'i'j'mQ-e'eQ/l*bQ0]+]S1Y,V,YQ1q,lQ1r,oQ1s,pQ2X-]W2Z-`-a-d-fQ4Y0^Q4f0kQ4i0oQ4}1PQ5X1[Q5c1eU5r2Y2]2`Q5u2^Q6v4ZQ7O4hQ7P4jQ7V4sQ7`5OQ7f5WS7u5s5wQ7w5vQ8e6|Q8m7aQ8r7gQ8y7vQ9X8fQ9^8nQ9b8zR9j9_Q%qxQ'Y!hQ'e!sU+]%r%s%tQ,t&{U-X'Z'[']S-]'a'kQ/c*]S0^+^+_Q1y,vS2V-Y-ZQ2^-bQ3u/gQ4Z0_Q5n2PQ5q2WQ5v2_R6l3yS$vi;_R*m%QU%Pi%Q;_R/u*kQ$uiS(j#t+XQ(n#vS)Z$b$cQ*P$wQ*X$zQ*p%VQ*q%WQ*u%[Q.X:]Q.Y:_Q.Z:aQ.w)pQ/Q)yQ/R){Q/S)|Q/[*TQ/a*ZQ/s*iQ/t*jh0T+U.S0{2m4z6O7[7{8k8}9]9eQ0o+pQ0q+sQ2p:hQ2q:jQ2r:lQ2s.^S3X:W:XQ3l/]Q3m/^Q3q/`Q4R/{Q4j0pQ4l0sQ6S:pQ6T:rQ6X:^Q6Y:`Q6Z:bQ6`3eQ6g3oQ6k3wQ6q3}Q6s4VQ6u4XQ8Q:mQ8R:iQ8S:kQ8[6fQ8`6oQ9P:qQ9Q:sQ9R8WQ9f:vQ9o:wQ;P;_Q;];gQ;^;hQ;i;kR;j;llpOXs!Y#b%e&h&j&k&m,a,f1f1iQ!ePS#dZ#mQ&r!_U'^!n4q7YQ't#QQ(w#zQ)h$lS,Y&a&dQ,_&eQ,l&qQ,q&yQ-T'WQ.e(uQ.u)iQ0P*{Q0W+VQ1b,^Q2T-VQ2k.TQ3`.pQ4P/yQ4x0|Q5Z1^Q5[1_Q5`1aQ5b1cQ5g1kQ5}2nQ6^3]Q7^4{Q7j5]Q7k5^Q7m5aQ7}6RQ8l7_R8v7n#UcOPXZs!Y!_!n#b#m#z%e&a&d&e&h&j&k&m&q&y'W(u*{+V,^,a,f-V.T/y0|1^1_1a1c1f1i1k2n4q4{5]5^5a6R7Y7_7nQ#WWQ#cYQ%itQ%juS%lv!fS'w#U'zQ'}#XQ(i#sQ(p#wQ(x#}Q(y$OQ(z$PQ({$QQ(|$RQ(}$SQ)O$TQ)P$UQ)Q$VQ)R$WQ)S$XQ)U$ZQ)X$`Q)]$dW)g$l)i.p3]Q+S%kQ+h%xS,w&}1zQ-f'hS-k'x-mQ-p(QQ-r(XQ.](mQ.c(qQ.g9pQ.i9sQ.j9tQ.k9wQ.z)tQ/|*wQ1u,rQ1x,uQ2Y-_Q2a-sQ2u.aQ2z9xQ2{9yQ2|9zQ2}9{Q3O9|Q3P9}Q3Q:OQ3R:PQ3S:QQ3T:RQ3U:SQ3V:TQ3W.hQ3Z:YQ3[:cQ3a:UQ4S0OQ4[0`Q5m:dQ5s2[Q5x2bQ6U2vQ6V:eQ6[:gQ6]:nQ7T4oQ7r5kQ7v5tQ8P:oQ8T:tQ8U:uQ8z7xQ9Y8gQ9a8xQ9r#QR;U;bR#YWR'P!dY!sQ'U-R0y4tS&{!d,yQ'a!qS'k!t!wS'm!x4vS,v&|'TS-b'b'cQ-d'dQ2P-PR2_-cR(o#vR(r#wQ!eQT-Q'U-R]!pQ!q'U-R0y4tQ#n]R'_9qT#iZ%]S#hZ%]S%cm,]U([#f#g#jS-v(](^Q-z(_Q0Q*|Q2d-wU2e-x-y-{S5z2f2gR7y5{`#[W#U#X%`'x(R*y-qr#eZm#f#g#j%](](^(_*|-w-x-y-{2f2g5{Q1`,]Q1v,sQ5i1nQ7q5jT:|&}*zT#_W%`S#^W%`S'y#U(RS(O#X*yS,x&}*zT-l'x-qT'S!d%aQ$jfR)n$oT)c$j)dR3_.oT*S$w*UR*[$zQ0U+UQ2i.SQ4w0{Q6P2mQ7]4zQ7|6OQ8i7[Q8{7{Q9[8kQ9d8}Q9i9]R9l9elqOXs!Y#b%e&h&j&k&m,a,f1f1iQ&b!UR,U&_rmOXs!T!U!Y#b%e&_&h&j&k&m,a,f1f1iR,]&eT%dm,]R0u+uR,T&]Q%{{R+m%|R+c%vT&f!V&iT&g!V&iT1h,f1i",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:366,context:Vi,nodeProps:[["group",-26,6,14,16,62,199,203,207,208,210,213,216,226,228,234,236,238,240,243,249,255,257,259,261,263,265,266,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[Wi],skippedNodes:[0,3,4,269],repeatNodeCount:33,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'{!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'{!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'xpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'xpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'xp'{!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'xp'{!b'n(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'y#S$d&j'o(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'xp'{!b'o(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'w$(n$d&j'{!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'{!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'{!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'{!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'{!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'xp'{!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'xp'{!b(V!LY'u&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'xp'{!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'xp'{!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'xp'{!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(k%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'xp'{!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'xp'{!b'o(;d(V!LY'u&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[_i,Ci,2,3,4,5,6,7,8,9,10,11,12,13,Ri,new te("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(U~~",141,327),new te("j~RQYZXz{^~^O'r~~aP!P!Qd~iO's~~",25,309)],topRules:{Script:[0,5],SingleExpression:[1,267],SingleClassItem:[2,268]},dialects:{jsx:12810,ts:12812},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:313,get:O=>qi[O]||-1},{term:329,get:O=>ji[O]||-1},{term:67,get:O=>zi[O]||-1}],tokenPrec:12836}),Ii=[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-47c2e1d1.js b/ui/dist/assets/ConfirmEmailChangeDocs-1ba40b3f.js similarity index 97% rename from ui/dist/assets/ConfirmEmailChangeDocs-47c2e1d1.js rename to ui/dist/assets/ConfirmEmailChangeDocs-1ba40b3f.js index 232430ab..e3b052e9 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs-47c2e1d1.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs-1ba40b3f.js @@ -1,4 +1,4 @@ -import{S as Ce,i as $e,s as we,e as r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,P as Pe,k as Se,Q as Oe,n as Te,t as Z,a as x,o as m,d as ge,T as Re,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-f2972fa8.js";import{S as Ae}from"./SdkTabs-ad20c86c.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=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(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&&m(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=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(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&&m(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,T,L,P,M,te,N,R,le,Q,K=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,v=[],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 r,w as g,b as h,c as he,f as b,g as f,h as n,m as ve,x as Y,N as pe,P as Pe,k as Se,Q as Oe,n as Te,t as Z,a as x,o as m,d as ge,T as Re,C as Ee,p as ye,r as j,u as Be,M as qe}from"./index-1097b3a4.js";import{S as Ae}from"./SdkTabs-cc2b5912.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=r("button"),_=g(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){f(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&&m(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=r("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){f(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&&m(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,F,w,I,T,L,P,M,te,N,R,le,Q,K=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,v=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmPasswordResetDocs-dee08d33.js b/ui/dist/assets/ConfirmPasswordResetDocs-95a862f9.js similarity index 98% rename from ui/dist/assets/ConfirmPasswordResetDocs-dee08d33.js rename to ui/dist/assets/ConfirmPasswordResetDocs-95a862f9.js index cfeb3a24..b341299f 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs-dee08d33.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs-95a862f9.js @@ -1,4 +1,4 @@ -import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,P as Ne,k as Oe,Q as Ce,n as We,t as Z,a as x,o as f,d as Pe,T as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-f2972fa8.js";import{S as De}from"./SdkTabs-ad20c86c.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=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(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&&f(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=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,Q,N,q,te,B,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,O,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` +import{S as Se,i as he,s as Re,e as r,w as P,b as v,c as ve,f as b,g as d,h as n,m as we,x as K,N as me,P as Ne,k as Oe,Q as Ce,n as We,t as Z,a as x,o as f,d as Pe,T as $e,C as Ee,p as Te,r as U,u as ge,M as Ae}from"./index-1097b3a4.js";import{S as De}from"./SdkTabs-cc2b5912.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=r("button"),_=P(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){d(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&&f(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=r("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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&&f(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,M=o[0].name+"",j,ee,H,R,L,W,Q,N,q,te,B,$,se,z,F=o[0].name+"",G,le,J,E,V,T,X,g,Y,O,A,w=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmVerificationDocs-25b0cae5.js b/ui/dist/assets/ConfirmVerificationDocs-70b00c0a.js similarity index 97% rename from ui/dist/assets/ConfirmVerificationDocs-25b0cae5.js rename to ui/dist/assets/ConfirmVerificationDocs-70b00c0a.js index 8c8be8c6..48b8abb0 100644 --- a/ui/dist/assets/ConfirmVerificationDocs-25b0cae5.js +++ b/ui/dist/assets/ConfirmVerificationDocs-70b00c0a.js @@ -1,4 +1,4 @@ -import{S as Pe,i as Te,s as Se,e as r,w,b as k,c as ge,f as b,g as f,h as i,m as ye,x as D,N as _e,P as Be,k as qe,Q as Re,n as Ee,t as Z,a as x,o as p,d as Ce,T as Me,C as Ne,p as Oe,r as H,u as Ve,M as Ke}from"./index-f2972fa8.js";import{S as Ae}from"./SdkTabs-ad20c86c.js";function ke(a,l,s){const o=a.slice();return o[5]=l[s],o}function ve(a,l,s){const o=a.slice();return o[5]=l[s],o}function we(a,l){let s,o=l[5].code+"",h,d,n,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),h=w(o),d=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m($,g){f($,s,g),i(s,h),i(s,d),n||(u=Ve(s,"click",m),n=!0)},p($,g){l=$,g&4&&o!==(o=l[5].code+"")&&D(h,o),g&6&&H(s,"active",l[1]===l[5].code)},d($){$&&p(s),n=!1,u()}}}function $e(a,l){let s,o,h,d;return o=new Ke({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ge(o.$$.fragment),h=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),ye(o,s,null),i(s,h),d=!0},p(n,u){l=n;const m={};u&4&&(m.content=l[5].body),o.$set(m),(!d||u&6)&&H(s,"active",l[1]===l[5].code)},i(n){d||(Z(o.$$.fragment,n),d=!0)},o(n){x(o.$$.fragment,n),d=!1},d(n){n&&p(s),Ce(o)}}}function Ue(a){var re,fe,pe,ue;let l,s,o=a[0].name+"",h,d,n,u,m,$,g,V=a[0].name+"",F,ee,I,y,L,S,Q,C,K,te,A,B,le,z,U=a[0].name+"",G,se,J,q,W,R,X,E,Y,P,M,v=[],oe=new Map,ae,N,_=[],ie=new Map,T;y=new Ae({props:{js:` +import{S as Pe,i as Te,s as Se,e as r,w,b as k,c as ge,f as b,g as f,h as i,m as ye,x as D,N as _e,P as Be,k as qe,Q as Re,n as Ee,t as Z,a as x,o as p,d as Ce,T as Me,C as Ne,p as Oe,r as H,u as Ve,M as Ke}from"./index-1097b3a4.js";import{S as Ae}from"./SdkTabs-cc2b5912.js";function ke(a,l,s){const o=a.slice();return o[5]=l[s],o}function ve(a,l,s){const o=a.slice();return o[5]=l[s],o}function we(a,l){let s,o=l[5].code+"",h,d,n,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),h=w(o),d=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m($,g){f($,s,g),i(s,h),i(s,d),n||(u=Ve(s,"click",m),n=!0)},p($,g){l=$,g&4&&o!==(o=l[5].code+"")&&D(h,o),g&6&&H(s,"active",l[1]===l[5].code)},d($){$&&p(s),n=!1,u()}}}function $e(a,l){let s,o,h,d;return o=new Ke({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ge(o.$$.fragment),h=k(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(n,u){f(n,s,u),ye(o,s,null),i(s,h),d=!0},p(n,u){l=n;const m={};u&4&&(m.content=l[5].body),o.$set(m),(!d||u&6)&&H(s,"active",l[1]===l[5].code)},i(n){d||(Z(o.$$.fragment,n),d=!0)},o(n){x(o.$$.fragment,n),d=!1},d(n){n&&p(s),Ce(o)}}}function Ue(a){var re,fe,pe,ue;let l,s,o=a[0].name+"",h,d,n,u,m,$,g,V=a[0].name+"",F,ee,I,y,L,S,Q,C,K,te,A,B,le,z,U=a[0].name+"",G,se,J,q,W,R,X,E,Y,P,M,v=[],oe=new Map,ae,N,_=[],ie=new Map,T;y=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/CreateApiDocs-5fb73b64.js b/ui/dist/assets/CreateApiDocs-8f33628d.js similarity index 98% rename from ui/dist/assets/CreateApiDocs-5fb73b64.js rename to ui/dist/assets/CreateApiDocs-8f33628d.js index 96f34e40..15ad6285 100644 --- a/ui/dist/assets/CreateApiDocs-5fb73b64.js +++ b/ui/dist/assets/CreateApiDocs-8f33628d.js @@ -1,4 +1,4 @@ -import{S as Pt,i as gt,s as Ft,C as Q,M as Lt,e as a,w as k,b as m,c as be,f as h,g as r,h as n,m as _e,x,N as Be,P as $t,k as Bt,Q as Rt,n as jt,t as fe,a as pe,o as d,d as ke,T as Dt,p as Nt,r as ye,u as Vt,y as ne}from"./index-f2972fa8.js";import{S as Jt}from"./SdkTabs-ad20c86c.js";import{F as Et}from"./FieldsQueryParam-38f60100.js";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[7]=e[l],s}function Tt(o,e,l){const s=o.slice();return s[12]=e[l],s}function qt(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 Mt(o){let e,l,s,b,p,c,f,v,T,w,M,R,D,E,L,I,j,B,C,N,q,$,_;function O(u,S){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?Ut:It}let z=O(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional +import{S as Pt,i as gt,s as Ft,C as Q,M as Lt,e as a,w as k,b as m,c as be,f as h,g as r,h as n,m as _e,x,N as Be,P as $t,k as Bt,Q as Rt,n as jt,t as fe,a as pe,o as d,d as ke,T as Dt,p as Nt,r as ye,u as Vt,y as ne}from"./index-1097b3a4.js";import{S as Jt}from"./SdkTabs-cc2b5912.js";import{F as Et}from"./FieldsQueryParam-b7007fe9.js";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[7]=e[l],s}function Tt(o,e,l){const s=o.slice();return s[12]=e[l],s}function qt(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 Mt(o){let e,l,s,b,p,c,f,v,T,w,M,R,D,E,L,I,j,B,C,N,q,$,_;function O(u,S){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?Ut:It}let z=O(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional username
String The username of the auth record. diff --git a/ui/dist/assets/DeleteApiDocs-b77c2bda.js b/ui/dist/assets/DeleteApiDocs-0c4ec69e.js similarity index 97% rename from ui/dist/assets/DeleteApiDocs-b77c2bda.js rename to ui/dist/assets/DeleteApiDocs-0c4ec69e.js index c69a9d10..ebb73e03 100644 --- a/ui/dist/assets/DeleteApiDocs-b77c2bda.js +++ b/ui/dist/assets/DeleteApiDocs-0c4ec69e.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,P as Ee,k as Te,Q as Be,n as Oe,t as ee,a as te,o as u,d as ge,T as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-f2972fa8.js";import{S as He}from"./SdkTabs-ad20c86c.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){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&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&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,T,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,B,X,O,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as $,b as h,c as $e,f as m,g as f,h as n,m as we,x,N as _e,P as Ee,k as Te,Q as Be,n as Oe,t as ee,a as te,o as u,d as ge,T as Ie,C as Me,p as Ae,r as N,u as Se,M as qe}from"./index-1097b3a4.js";import{S as He}from"./SdkTabs-cc2b5912.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){f(s,l,a)},d(s){s&&u(l)}}}function ye(o,l){let s,a=l[6].code+"",v,i,r,p;function w(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),v=$(a),i=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){f(b,s,g),n(s,v),n(s,i),r||(p=Se(s,"click",w),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&u(s),r=!1,p()}}}function De(o,l){let s,a,v,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),v=h(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,p){f(r,s,p),we(a,s,null),n(s,v),i=!0},p(r,p){l=r,(!i||p&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&&u(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",v,i,r,p,w,b,g,q=o[0].name+"",z,le,F,C,K,T,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,B,X,O,Y,I,Z,R,M,D=[],ie=new Map,re,A,_=[],ce=new Map,P;C=new He({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/FieldsQueryParam-38f60100.js b/ui/dist/assets/FieldsQueryParam-b7007fe9.js similarity index 88% rename from ui/dist/assets/FieldsQueryParam-38f60100.js rename to ui/dist/assets/FieldsQueryParam-b7007fe9.js index a57e1f7d..4b191a46 100644 --- a/ui/dist/assets/FieldsQueryParam-38f60100.js +++ b/ui/dist/assets/FieldsQueryParam-b7007fe9.js @@ -1,4 +1,4 @@ -import{S as d,i as n,s as i,e as l,g as o,y as s,o as p}from"./index-f2972fa8.js";function c(a){let e;return{c(){e=l("tr"),e.innerHTML=`fields +import{S as d,i as n,s as i,e as l,g as o,y as s,o as p}from"./index-1097b3a4.js";function c(a){let e;return{c(){e=l("tr"),e.innerHTML=`fields String Comma separated string of the fields to return in the JSON response (by default returns all fields). For example: diff --git a/ui/dist/assets/FilterAutocompleteInput-49490f14.js b/ui/dist/assets/FilterAutocompleteInput-0a8b8b21.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput-49490f14.js rename to ui/dist/assets/FilterAutocompleteInput-0a8b8b21.js index cb7d5abf..87ee09e0 100644 --- a/ui/dist/assets/FilterAutocompleteInput-49490f14.js +++ b/ui/dist/assets/FilterAutocompleteInput-0a8b8b21.js @@ -1 +1 @@ -import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-f2972fa8.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-fd4289fb.js";function Me(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],s=0;s2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.headers."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.define(Me({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:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,s=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,R=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; +import{S as oe,i as ae,s as le,e as ue,f as ce,g as fe,y as H,o as de,I as he,J as ge,K as pe,H as ye,C as q,L as me}from"./index-1097b3a4.js";import{E as S,a as w,h as be,b as ke,c as xe,d as Ke,e as Ce,s as qe,f as Se,g as we,r as Le,i as Ie,k as Ee,j as Re,l as Ae,m as Be,n as Oe,o as _e,p as ve,q as Y,C as E,S as He,t as De}from"./index-fd4289fb.js";function Me(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],s=0;s2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:s=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:R=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,A=s,D=new E,M=new E,F=new E,T=new E,L=[],U=[],W=[],N=[],I="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{L=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let r=t.slice();return a&&q.pushOrReplaceByKey(r,a,"id"),r}function J(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function P(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.removeEventListener("click",O)}function V(){if(!d)return;P();const t=document.querySelectorAll('[for="'+d+'"]');for(let r of t)r.addEventListener("click",O)}function C(t,r="",c=0){var m,z,Q;let h=L.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=q.getAllCollectionIdentifiers(h,r);for(const y of h.schema){const v=r+y.name;if(y.type==="relation"&&((m=y.options)!=null&&m.collectionId)){const X=C(y.options.collectionId,v+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(v+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(v+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.headers."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const r=L.filter(h=>h.$isAuth);for(const h of r){const u=C(h.id,"@request.auth.");for(const m of u)q.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const r of L){const c="@collection."+r.name+".",h=C(r.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,r=!0){let c=[].concat(R);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),r&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let r=t.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&r.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:r.from,options:c}}function G(){return He.define(Me({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:q.escapeRegExp("@now"),token:"keyword"},{regex:q.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:r=>{b&&p("submit",o)}};return V(),n(11,f=new S({parent:k,state:w.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),w.allowMultipleSelections.of(!0),qe(De,{fallback:!0}),Se(),we(),Le(),Ie(),Ee.of([t,...Re,...Ae,Be.find(r=>r.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,ve({override:[se],icons:!1}),T.of(Y(l)),M.of(S.editable.of(!s)),F.of(w.readOnly.of(s)),D.of(G()),w.transactionFilter.of(r=>b&&r.newDoc.lines>1?[]:r),S.updateListener.of(r=>{!r.docChanged||s||(n(1,o=r.state.doc.toString()),J())})]})})),()=>{clearTimeout(_),P(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,s=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,R=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,I=Pe(a)),e.$$.dirty[0]&25352&&!s&&(B!=I||x!==-1||K!==-1)&&(n(14,B=I),j()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&a!=null&&a.schema&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&A!=s&&(f.dispatch({effects:[M.reconfigure(S.editable.of(!s)),F.reconfigure(w.readOnly.of(s))]}),n(12,A=s),J()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,s,l,a,b,R,x,K,O,f,A,I,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Ve,Je,le,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; diff --git a/ui/dist/assets/ListApiDocs-9496970d.js b/ui/dist/assets/ListApiDocs-b3571a57.js similarity index 99% rename from ui/dist/assets/ListApiDocs-9496970d.js rename to ui/dist/assets/ListApiDocs-b3571a57.js index c043b9ad..8d161596 100644 --- a/ui/dist/assets/ListApiDocs-9496970d.js +++ b/ui/dist/assets/ListApiDocs-b3571a57.js @@ -1,4 +1,4 @@ -import{S as We,i as Xe,s as Ye,e,b as s,E as tl,f as i,g as u,u as Ze,y as Ie,o as m,w,h as t,M as ke,c as Zt,m as te,x as ge,N as Be,P as el,k as ll,Q as sl,n as nl,t as Bt,a as Gt,d as ee,R as ol,T as il,C as $e,p as al,r as ye}from"./index-f2972fa8.js";import{S as rl}from"./SdkTabs-ad20c86c.js";function cl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function dl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ge(c){let n,o,a,p,b,d,h,g,x,_,f,Z,Ct,Ut,O,jt,H,at,R,tt,le,U,j,se,rt,$t,et,kt,ne,ct,dt,lt,E,Jt,yt,L,st,vt,Qt,Ft,J,nt,Lt,zt,At,T,ft,Tt,oe,pt,ie,D,Pt,ot,Rt,S,ut,ae,Q,St,Kt,Ot,re,N,Vt,z,mt,ce,I,de,B,fe,P,Et,K,bt,pe,ht,ue,$,Nt,it,qt,me,Mt,Wt,V,_t,be,Ht,he,xt,_e,W,wt,Xt,X,Yt,q,gt,y,Dt,xe,Y,A,It,G,v;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format +import{S as We,i as Xe,s as Ye,e,b as s,E as tl,f as i,g as u,u as Ze,y as Ie,o as m,w,h as t,M as ke,c as Zt,m as te,x as ge,N as Be,P as el,k as ll,Q as sl,n as nl,t as Bt,a as Gt,d as ee,R as ol,T as il,C as $e,p as al,r as ye}from"./index-1097b3a4.js";import{S as rl}from"./SdkTabs-cc2b5912.js";function cl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Show details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-down-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function dl(c){let n,o,a;return{c(){n=e("span"),n.textContent="Hide details",o=s(),a=e("i"),i(n,"class","txt"),i(a,"class","ri-arrow-up-s-line")},m(p,b){u(p,n,b),u(p,o,b),u(p,a,b)},d(p){p&&m(n),p&&m(o),p&&m(a)}}}function Ge(c){let n,o,a,p,b,d,h,g,x,_,f,Z,Ct,Ut,O,jt,H,at,R,tt,le,U,j,se,rt,$t,et,kt,ne,ct,dt,lt,E,Jt,yt,L,st,vt,Qt,Ft,J,nt,Lt,zt,At,T,ft,Tt,oe,pt,ie,D,Pt,ot,Rt,S,ut,ae,Q,St,Kt,Ot,re,N,Vt,z,mt,ce,I,de,B,fe,P,Et,K,bt,pe,ht,ue,$,Nt,it,qt,me,Mt,Wt,V,_t,be,Ht,he,xt,_e,W,wt,Xt,X,Yt,q,gt,y,Dt,xe,Y,A,It,G,v;return{c(){n=e("p"),n.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,o=s(),a=e("ul"),p=e("li"),p.innerHTML=`OPERAND - could be any of the above field literal, string (single diff --git a/ui/dist/assets/ListExternalAuthsDocs-2d8d09bd.js b/ui/dist/assets/ListExternalAuthsDocs-ad614d24.js similarity index 97% rename from ui/dist/assets/ListExternalAuthsDocs-2d8d09bd.js rename to ui/dist/assets/ListExternalAuthsDocs-ad614d24.js index 700ad051..66206bd4 100644 --- a/ui/dist/assets/ListExternalAuthsDocs-2d8d09bd.js +++ b/ui/dist/assets/ListExternalAuthsDocs-ad614d24.js @@ -1,4 +1,4 @@ -import{S as ze,i as Qe,s as Re,e as n,w as v,b as f,c as de,f as m,g as r,h as o,m as pe,x as F,N as Le,P as Ue,k as je,Q as Fe,n as Ne,t as N,a as G,o as c,d as ue,T as Ge,C as Ke,p as Je,r as K,u as Ve,M as Xe}from"./index-f2972fa8.js";import{S as Ye}from"./SdkTabs-ad20c86c.js";import{F as Ze}from"./FieldsQueryParam-38f60100.js";function De(a,l,s){const i=a.slice();return i[5]=l[s],i}function He(a,l,s){const i=a.slice();return i[5]=l[s],i}function Oe(a,l){let s,i=l[5].code+"",b,_,d,u;function h(){return l[4](l[5])}return{key:a,first:null,c(){s=n("button"),b=v(i),_=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(y,P){r(y,s,P),o(s,b),o(s,_),d||(u=Ve(s,"click",h),d=!0)},p(y,P){l=y,P&4&&i!==(i=l[5].code+"")&&F(b,i),P&6&&K(s,"active",l[1]===l[5].code)},d(y){y&&c(s),d=!1,u()}}}function We(a,l){let s,i,b,_;return i=new Xe({props:{content:l[5].body}}),{key:a,first:null,c(){s=n("div"),de(i.$$.fragment),b=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(d,u){r(d,s,u),pe(i,s,null),o(s,b),_=!0},p(d,u){l=d;const h={};u&4&&(h.content=l[5].body),i.$set(h),(!_||u&6)&&K(s,"active",l[1]===l[5].code)},i(d){_||(N(i.$$.fragment,d),_=!0)},o(d){G(i.$$.fragment,d),_=!1},d(d){d&&c(s),ue(i)}}}function xe(a){var Ce,ge,Se,Ee;let l,s,i=a[0].name+"",b,_,d,u,h,y,P,W=a[0].name+"",J,fe,me,V,X,T,Y,I,Z,$,z,be,Q,A,he,x,R=a[0].name+"",ee,_e,te,ke,ve,U,le,B,se,q,oe,M,ae,C,ie,we,ne,E,re,L,ce,g,D,w=[],$e=new Map,ye,H,k=[],Pe=new Map,S;T=new Ye({props:{js:` +import{S as ze,i as Qe,s as Re,e as n,w as v,b as f,c as de,f as m,g as r,h as o,m as pe,x as F,N as Le,P as Ue,k as je,Q as Fe,n as Ne,t as N,a as G,o as c,d as ue,T as Ge,C as Ke,p as Je,r as K,u as Ve,M as Xe}from"./index-1097b3a4.js";import{S as Ye}from"./SdkTabs-cc2b5912.js";import{F as Ze}from"./FieldsQueryParam-b7007fe9.js";function De(a,l,s){const i=a.slice();return i[5]=l[s],i}function He(a,l,s){const i=a.slice();return i[5]=l[s],i}function Oe(a,l){let s,i=l[5].code+"",b,_,d,u;function h(){return l[4](l[5])}return{key:a,first:null,c(){s=n("button"),b=v(i),_=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(y,P){r(y,s,P),o(s,b),o(s,_),d||(u=Ve(s,"click",h),d=!0)},p(y,P){l=y,P&4&&i!==(i=l[5].code+"")&&F(b,i),P&6&&K(s,"active",l[1]===l[5].code)},d(y){y&&c(s),d=!1,u()}}}function We(a,l){let s,i,b,_;return i=new Xe({props:{content:l[5].body}}),{key:a,first:null,c(){s=n("div"),de(i.$$.fragment),b=f(),m(s,"class","tab-item"),K(s,"active",l[1]===l[5].code),this.first=s},m(d,u){r(d,s,u),pe(i,s,null),o(s,b),_=!0},p(d,u){l=d;const h={};u&4&&(h.content=l[5].body),i.$set(h),(!_||u&6)&&K(s,"active",l[1]===l[5].code)},i(d){_||(N(i.$$.fragment,d),_=!0)},o(d){G(i.$$.fragment,d),_=!1},d(d){d&&c(s),ue(i)}}}function xe(a){var Ce,ge,Se,Ee;let l,s,i=a[0].name+"",b,_,d,u,h,y,P,W=a[0].name+"",J,fe,me,V,X,T,Y,I,Z,$,z,be,Q,A,he,x,R=a[0].name+"",ee,_e,te,ke,ve,U,le,B,se,q,oe,M,ae,C,ie,we,ne,E,re,L,ce,g,D,w=[],$e=new Map,ye,H,k=[],Pe=new Map,S;T=new Ye({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset-2ddacfe8.js b/ui/dist/assets/PageAdminConfirmPasswordReset-1f7edcea.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset-2ddacfe8.js rename to ui/dist/assets/PageAdminConfirmPasswordReset-1f7edcea.js index 6bbbb652..79d8ae48 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset-2ddacfe8.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset-1f7edcea.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 N,a as T,d as h,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 j,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-f2972fa8.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=j(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=j(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,F,P,v,k,R,z,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 N,a as T,d as h,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 j,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index-1097b3a4.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=j(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=j(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,F,P,v,k,R,z,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",F=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,F,$),b(a,P,$),_(P,v),k=!0,R||(z=[j(e,"submit",O(f[4])),Q(U.call(null,v))],R=!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 D={};$&769&&(D.$$scope={dirty:$,ctx:a}),r.$set(D);const H={};$&770&&(H.$$scope={dirty:$,ctx:a}),d.$set(H),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(N(r.$$.fragment,a),N(d.$$.fragment,a),k=!0)},o(a){T(r.$$.fragment,a),T(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),h(r),h(d),a&&w(F),a&&w(P),R=!1,V(z)}}}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||(N(e.$$.fragment,s),o=!0)},o(s){T(e.$$.fragment,s),o=!1},d(s){h(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.error(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-39ec325e.js b/ui/dist/assets/PageAdminRequestPasswordReset-de9101ef.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset-39ec325e.js rename to ui/dist/assets/PageAdminRequestPasswordReset-de9101ef.js index dc7b197c..ee4ef046 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset-39ec325e.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset-de9101ef.js @@ -1,2 +1,2 @@ -import{S as M,i as T,s as j,F as z,c as R,m as S,t as w,a as y,d as E,b as 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 H,v as I,w as h,x as J,y as P,z as L}from"./index-f2972fa8.js";function K(c){let e,s,n,l,t,i,f,m,o,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 R,m as S,t as w,a as y,d as E,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 H,v as I,w as h,x as J,y as P,z as L}from"./index-1097b3a4.js";function K(c){let e,s,n,l,t,i,f,m,o,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

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

`,n=g(),R(l.$$.fragment),t=g(),i=_("button"),f=_("i"),m=g(),o=_("span"),o.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(o,"class","txt"),p(i,"type","submit"),p(i,"class","btn btn-lg btn-block"),i.disabled=c[1],F(i,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),S(l,e,null),d(e,t),d(e,i),d(i,f),d(i,m),d(i,o),a=!0,b||(u=H(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(i.disabled=r[1]),(!a||$&2)&&F(i,"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),E(l),b=!1,u()}}}function O(c){let e,s,n,l,t,i,f,m,o;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=g(),l=_("div"),t=_("p"),i=h("Check "),f=_("strong"),m=h(c[0]),o=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,i),d(t,f),d(f,m),d(t,o)},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,i,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",i=c[5]),t.required=!0,t.autofocus=!0},m(o,a){k(o,e,a),d(e,s),k(o,l,a),k(o,t,a),L(t,c[0]),t.focus(),f||(m=H(t,"input",c[4]),f=!0)},p(o,a){a&32&&n!==(n=o[5])&&p(e,"for",n),a&32&&i!==(i=o[5])&&p(t,"id",i),a&1&&t.value!==o[0]&&L(t,o[0])},d(o){o&&v(e),o&&v(l),o&&v(t),f=!1,m()}}}function U(c){let e,s,n,l,t,i,f,m;const o=[O,K],a=[];function b(u,r){return u[2]?0:1}return e=b(c),s=a[e]=o[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),i=!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]=o[e](u),s.c()),w(s,1),s.m(n.parentNode,n))},i(u){i||(w(s),i=!0)},o(u){y(s),i=!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(){R(e.$$.fragment)},m(n,l){S(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){E(e,n)}}}function W(c,e,s){let n="",l=!1,t=!1;async function i(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.error(m)}s(1,l=!1)}}function f(){n=this.value,s(0,n)}return[n,l,t,i,f]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageOAuth2Redirect-88044748.js b/ui/dist/assets/PageOAuth2Redirect-b6ce072a.js similarity index 87% rename from ui/dist/assets/PageOAuth2Redirect-88044748.js rename to ui/dist/assets/PageOAuth2Redirect-b6ce072a.js index e0c7682a..f390ac47 100644 --- a/ui/dist/assets/PageOAuth2Redirect-88044748.js +++ b/ui/dist/assets/PageOAuth2Redirect-b6ce072a.js @@ -1,2 +1,2 @@ -import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,H as h}from"./index-f2972fa8.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML=`

Auth completed.

+import{S as o,i,s as c,e as r,f as l,g as u,y as s,o as d,H as h}from"./index-1097b3a4.js";function f(n){let t;return{c(){t=r("div"),t.innerHTML=`

Auth completed.

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

Successfully changed the user email address.

You can now sign in with your new email address.

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

Invalid or expired verification token.

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

Successfully verified email address.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-transparent btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function V(o){let t;function s(l,i){return l[1]?I:l[0]?F:S}let e=s(o),n=e(o);return{c(){n.c(),t=M()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function q(o){let t,s;return t=new g({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:o}}}),{c(){x(t.$$.fragment)},m(e,n){C(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){L(t.$$.fragment,e),s=!1},d(e){P(t,e)}}}function E(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new T("../");try{const m=H(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class N extends v{constructor(t){super(),y(this,t,E,q,w,{params:2})}}export{N as default}; diff --git a/ui/dist/assets/RealtimeApiDocs-fa350ca2.js b/ui/dist/assets/RealtimeApiDocs-32f89e17.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs-fa350ca2.js rename to ui/dist/assets/RealtimeApiDocs-32f89e17.js index c4cecd5a..6605f935 100644 --- a/ui/dist/assets/RealtimeApiDocs-fa350ca2.js +++ b/ui/dist/assets/RealtimeApiDocs-32f89e17.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,M as pe,C as P,e as p,w as y,b as a,c as te,f as u,g as t,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,T as me,p as de}from"./index-f2972fa8.js";import{S as fe}from"./SdkTabs-ad20c86c.js";function $e(s){var B,U,W,T,A,H,L,M,q,j,J,N;let i,m,c=s[0].name+"",b,d,h,f,_,$,k,l,S,v,w,R,C,g,E,r,D;return l=new fe({props:{js:` +import{S as re,i as ae,s as be,M as pe,C as P,e as p,w as y,b as a,c as te,f as u,g as t,h as I,m as ne,x as ue,t as ie,a as ce,o as n,d as le,T as me,p as de}from"./index-1097b3a4.js";import{S as fe}from"./SdkTabs-cc2b5912.js";function $e(s){var B,U,W,T,A,H,L,M,q,j,J,N;let i,m,c=s[0].name+"",b,d,h,f,_,$,k,l,S,v,w,R,C,g,E,r,D;return l=new fe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${s[1]}'); diff --git a/ui/dist/assets/RequestEmailChangeDocs-b770c6f7.js b/ui/dist/assets/RequestEmailChangeDocs-e46a24c9.js similarity index 98% rename from ui/dist/assets/RequestEmailChangeDocs-b770c6f7.js rename to ui/dist/assets/RequestEmailChangeDocs-e46a24c9.js index ea4f662e..8fa2bb04 100644 --- a/ui/dist/assets/RequestEmailChangeDocs-b770c6f7.js +++ b/ui/dist/assets/RequestEmailChangeDocs-e46a24c9.js @@ -1,4 +1,4 @@ -import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as N,N as ve,P as Se,k as Me,Q as Re,n as Ae,t as x,a as ee,o as d,d as ye,T as We,C as ze,p as He,r as O,u as Ue,M as je}from"./index-f2972fa8.js";import{S as De}from"./SdkTabs-ad20c86c.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=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),O(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=Ue(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&N(_,a),q&6&&O(s,"active",l[1]===l[5].code)},d($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new je({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),O(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(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)&&O(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&&d(s),ye(a)}}}function Le(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,Q,g,H,le,U,E,se,G,j=o[0].name+"",J,ae,oe,D,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new De({props:{js:` +import{S as Te,i as Ee,s as Be,e as r,w,b as k,c as Pe,f,g as m,h as n,m as Ce,x as N,N as ve,P as Se,k as Me,Q as Re,n as Ae,t as x,a as ee,o as d,d as ye,T as We,C as ze,p as He,r as O,u as Ue,M as je}from"./index-1097b3a4.js";import{S as De}from"./SdkTabs-cc2b5912.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=r("button"),_=w(a),b=k(),f(s,"class","tab-item"),O(s,"active",l[1]===l[5].code),this.first=s},m($,q){m($,s,q),n(s,_),n(s,b),i||(p=Ue(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&N(_,a),q&6&&O(s,"active",l[1]===l[5].code)},d($){$&&d(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new je({props:{content:l[5].body}}),{key:o,first:null,c(){s=r("div"),Pe(a.$$.fragment),_=k(),f(s,"class","tab-item"),O(s,"active",l[1]===l[5].code),this.first=s},m(i,p){m(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)&&O(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&&d(s),ye(a)}}}function Le(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,I,P,K,T,Q,g,H,le,U,E,se,G,j=o[0].name+"",J,ae,oe,D,V,B,X,S,Y,M,Z,C,R,v=[],ne=new Map,ie,A,h=[],ce=new Map,y;P=new De({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/RequestPasswordResetDocs-288fb230.js b/ui/dist/assets/RequestPasswordResetDocs-60d01d4d.js similarity index 97% rename from ui/dist/assets/RequestPasswordResetDocs-288fb230.js rename to ui/dist/assets/RequestPasswordResetDocs-60d01d4d.js index 70fe5d5f..0f2e8c0e 100644 --- a/ui/dist/assets/RequestPasswordResetDocs-288fb230.js +++ b/ui/dist/assets/RequestPasswordResetDocs-60d01d4d.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as L,N as ue,P as ge,k as ye,Q as Re,n as Be,t as Z,a as x,o as f,d as he,T as Ce,C as Se,p as Te,r as N,u as Me,M as Ae}from"./index-f2972fa8.js";import{S as Ue}from"./SdkTabs-ad20c86c.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=r("button"),_=h(o),m=v(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(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+"")&&L(_,o),$&6&&N(l,"active",s[1]===s[5].code)},d(P){P&&f(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=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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)&&N(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&&f(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+"",O,ee,Q,q,z,B,G,g,H,te,E,C,se,J,F=a[0].name+"",K,le,V,S,W,T,X,M,Y,y,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as r,w as h,b as v,c as ve,f as b,g as d,h as n,m as we,x as L,N as ue,P as ge,k as ye,Q as Re,n as Be,t as Z,a as x,o as f,d as he,T as Ce,C as Se,p as Te,r as N,u as Me,M as Ae}from"./index-1097b3a4.js";import{S as Ue}from"./SdkTabs-cc2b5912.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=r("button"),_=h(o),m=v(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(P,$){d(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+"")&&L(_,o),$&6&&N(l,"active",s[1]===s[5].code)},d(P){P&&f(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=r("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),N(l,"active",s[1]===s[5].code),this.first=l},m(i,p){d(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)&&N(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&&f(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+"",O,ee,Q,q,z,B,G,g,H,te,E,C,se,J,F=a[0].name+"",K,le,V,S,W,T,X,M,Y,y,A,w=[],oe=new Map,ae,U,k=[],ne=new Map,R;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/RequestVerificationDocs-0ec5a242.js b/ui/dist/assets/RequestVerificationDocs-6ccba240.js similarity index 97% rename from ui/dist/assets/RequestVerificationDocs-0ec5a242.js rename to ui/dist/assets/RequestVerificationDocs-6ccba240.js index b5b9c969..963b5818 100644 --- a/ui/dist/assets/RequestVerificationDocs-0ec5a242.js +++ b/ui/dist/assets/RequestVerificationDocs-6ccba240.js @@ -1,4 +1,4 @@ -import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as I,N as me,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as u,d as $e,T as Se,C as Te,p as Me,r as L,u as Ve,M as Re}from"./index-f2972fa8.js";import{S as Ae}from"./SdkTabs-ad20c86c.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,d;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,p),n||(d=Ve(s,"click",m),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&I(_,o),w&6&&L(s,"active",l[1]===l[5].code)},d(q){q&&u(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Re({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(n,d){f(n,s,d),he(o,s,null),i(s,_),p=!0},p(n,d){l=n;const m={};d&4&&(m.content=l[5].body),o.$set(m),(!p||d&6)&&L(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&u(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,d,m,q,w,j=a[0].name+"",N,ee,O,P,Q,C,z,g,D,te,H,S,le,G,E=a[0].name+"",J,se,K,T,W,M,X,V,Y,y,R,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` +import{S as qe,i as we,s as Pe,e as r,w as $,b as v,c as ve,f as b,g as f,h as i,m as he,x as I,N as me,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as u,d as $e,T as Se,C as Te,p as Me,r as L,u as Ve,M as Re}from"./index-1097b3a4.js";import{S as Ae}from"./SdkTabs-cc2b5912.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,d;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=r("button"),_=$(o),p=v(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(q,w){f(q,s,w),i(s,_),i(s,p),n||(d=Ve(s,"click",m),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&I(_,o),w&6&&L(s,"active",l[1]===l[5].code)},d(q){q&&u(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Re({props:{content:l[5].body}}),{key:a,first:null,c(){s=r("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(n,d){f(n,s,d),he(o,s,null),i(s,_),p=!0},p(n,d){l=n;const m={};d&4&&(m.content=l[5].body),o.$set(m),(!p||d&6)&&L(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&u(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,d,m,q,w,j=a[0].name+"",N,ee,O,P,Q,C,z,g,D,te,H,S,le,G,E=a[0].name+"",J,se,K,T,W,M,X,V,Y,y,R,h=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/SdkTabs-ad20c86c.js b/ui/dist/assets/SdkTabs-cc2b5912.js similarity index 96% rename from ui/dist/assets/SdkTabs-ad20c86c.js rename to ui/dist/assets/SdkTabs-cc2b5912.js index 9dab359f..f92b7bc5 100644 --- a/ui/dist/assets/SdkTabs-ad20c86c.js +++ b/ui/dist/assets/SdkTabs-cc2b5912.js @@ -1 +1 @@ -import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,N as C,P as J,k as Q,Q as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as O}from"./index-f2972fa8.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function M(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),O(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(I,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; +import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,N as C,P as J,k as Q,Q as Y,n as z,t as N,a as P,o as w,w as E,r as S,u as A,x as R,M as G,c as H,m as L,d as O}from"./index-1097b3a4.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function M(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(_,f){y(_,l,f),m(l,s),m(s,r),m(l,i),n||(k=A(l,"click",c),n=!0)},p(_,f){e=_,f&4&&g!==(g=e[6].title+"")&&R(r,g),f&6&&S(l,"active",e[1]===e[6].language)},d(_){_&&w(l),n=!1,k()}}}function T(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,_,f,p,d;return s=new G({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),H(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),_=E(" SDK"),p=j(),h(n,"href",f=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),L(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,_),m(l,p),d=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!d||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!d||t&4&&f!==(f=e[6].url))&&h(n,"href",f),(!d||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){d||(N(s.$$.fragment,b),d=!0)},o(b){P(s.$$.fragment,b),d=!1},d(b){b&&w(l),O(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,_,f=o[2];const p=t=>t[6].language;for(let t=0;tt[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(I,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs-c61aed44.js b/ui/dist/assets/UnlinkExternalAuthDocs-f29fdf14.js similarity index 98% rename from ui/dist/assets/UnlinkExternalAuthDocs-c61aed44.js rename to ui/dist/assets/UnlinkExternalAuthDocs-f29fdf14.js index 3ba5224f..93f658a9 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs-c61aed44.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs-f29fdf14.js @@ -1,4 +1,4 @@ -import{S as qe,i as Me,s as De,e as i,w as v,b as h,c as Se,f as m,g as d,h as s,m as Be,x as I,N as Te,P as Oe,k as We,Q as ze,n as He,t as le,a as oe,o as u,d as Ue,T as Le,C as je,p as Ie,r as N,u as Ne,M as Re}from"./index-f2972fa8.js";import{S as Ke}from"./SdkTabs-ad20c86c.js";function ye(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l){let o,a=l[5].code+"",_,b,c,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ne(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Re({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(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&&u(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,O=n[0].name+"",R,se,ae,K,Q,y,F,E,G,w,W,ne,z,T,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,A,q,g=[],ue=new Map,pe,M,k=[],fe=new Map,C;y=new Ke({props:{js:` +import{S as qe,i as Me,s as De,e as i,w as v,b as h,c as Se,f as m,g as d,h as s,m as Be,x as I,N as Te,P as Oe,k as We,Q as ze,n as He,t as le,a as oe,o as u,d as Ue,T as Le,C as je,p as Ie,r as N,u as Ne,M as Re}from"./index-1097b3a4.js";import{S as Ke}from"./SdkTabs-cc2b5912.js";function ye(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l){let o,a=l[5].code+"",_,b,c,p;function f(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m($,P){d($,o,P),s(o,_),s(o,b),c||(p=Ne(o,"click",f),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&I(_,a),P&6&&N(o,"active",l[1]===l[5].code)},d($){$&&u(o),c=!1,p()}}}function Ee(n,l){let o,a,_,b;return a=new Re({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),m(o,"class","tab-item"),N(o,"active",l[1]===l[5].code),this.first=o},m(c,p){d(c,o,p),Be(a,o,null),s(o,_),b=!0},p(c,p){l=c;const f={};p&4&&(f.content=l[5].body),a.$set(f),(!b||p&6)&&N(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&&u(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,p,f,$,P,O=n[0].name+"",R,se,ae,K,Q,y,F,E,G,w,W,ne,z,T,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,L,Z,S,x,B,ee,U,te,A,q,g=[],ue=new Map,pe,M,k=[],fe=new Map,C;y=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/UpdateApiDocs-da4d34d2.js b/ui/dist/assets/UpdateApiDocs-97d4a9f2.js similarity index 98% rename from ui/dist/assets/UpdateApiDocs-da4d34d2.js rename to ui/dist/assets/UpdateApiDocs-97d4a9f2.js index e1c507cb..eec37ce0 100644 --- a/ui/dist/assets/UpdateApiDocs-da4d34d2.js +++ b/ui/dist/assets/UpdateApiDocs-97d4a9f2.js @@ -1,4 +1,4 @@ -import{S as $t,i as Ot,s as Mt,C as E,M as St,e as r,w as y,b as m,c as be,f as T,g as a,h as i,m as me,x as U,N as Ne,P as mt,k as qt,Q as Dt,n as Ht,t as de,a as re,o,d as _e,T as Pt,p as Rt,r as ye,u as Lt,y as X}from"./index-f2972fa8.js";import{S as Ft}from"./SdkTabs-ad20c86c.js";import{F as At}from"./FieldsQueryParam-38f60100.js";function _t(f,t,l){const s=f.slice();return s[7]=t[l],s}function yt(f,t,l){const s=f.slice();return s[7]=t[l],s}function kt(f,t,l){const s=f.slice();return s[12]=t[l],s}function ht(f){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 vt(f){let t,l,s,b,u,d,p,k,C,w,$,P,F,j,O,g,A;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional +import{S as $t,i as Ot,s as Mt,C as E,M as St,e as r,w as y,b as m,c as be,f as T,g as a,h as i,m as me,x as U,N as Ne,P as mt,k as qt,Q as Dt,n as Ht,t as de,a as re,o,d as _e,T as Pt,p as Rt,r as ye,u as Lt,y as X}from"./index-1097b3a4.js";import{S as Ft}from"./SdkTabs-cc2b5912.js";import{F as At}from"./FieldsQueryParam-b7007fe9.js";function _t(f,t,l){const s=f.slice();return s[7]=t[l],s}function yt(f,t,l){const s=f.slice();return s[7]=t[l],s}function kt(f,t,l){const s=f.slice();return s[12]=t[l],s}function ht(f){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 vt(f){let t,l,s,b,u,d,p,k,C,w,$,P,F,j,O,g,A;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional username
String The username of the auth record.`,b=m(),u=r("tr"),u.innerHTML=`
Optional diff --git a/ui/dist/assets/ViewApiDocs-4c8d969c.js b/ui/dist/assets/ViewApiDocs-0b86dfe3.js similarity index 97% rename from ui/dist/assets/ViewApiDocs-4c8d969c.js rename to ui/dist/assets/ViewApiDocs-0b86dfe3.js index d8f45b6b..6b9043be 100644 --- a/ui/dist/assets/ViewApiDocs-4c8d969c.js +++ b/ui/dist/assets/ViewApiDocs-0b86dfe3.js @@ -1,4 +1,4 @@ -import{S as tt,i as lt,s as st,M as et,e as o,w as b,b as u,c as W,f as _,g as r,h as l,m as X,x as ve,N as Ge,P as nt,k as ot,Q as it,n as at,t as U,a as j,o as d,d as Y,T as rt,C as Je,p as dt,r as Z,u as ct}from"./index-f2972fa8.js";import{S as ft}from"./SdkTabs-ad20c86c.js";import{F as pt}from"./FieldsQueryParam-38f60100.js";function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function We(i,s,n){const a=i.slice();return a[6]=s[n],a}function Xe(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 Ye(i,s){let n,a=s[6].code+"",w,c,f,m;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=b(a),c=u(),_(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(h,g){r(h,n,g),l(n,w),l(n,c),f||(m=ct(n,"click",F),f=!0)},p(h,g){s=h,g&20&&Z(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,m()}}}function Ze(i,s){let n,a,w,c;return a=new et({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),W(a.$$.fragment),w=u(),_(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(f,m){r(f,n,m),X(a,n,null),l(n,w),c=!0},p(f,m){s=f,(!c||m&20)&&Z(n,"active",s[2]===s[6].code)},i(f){c||(U(a.$$.fragment,f),c=!0)},o(f){j(a.$$.fragment,f),c=!1},d(f){f&&d(n),Y(a)}}}function ut(i){var Ue,je;let s,n,a=i[0].name+"",w,c,f,m,F,h,g,V=i[0].name+"",ee,$e,te,R,le,M,se,y,z,we,G,E,ye,ne,J=i[0].name+"",oe,Ce,ie,Fe,ae,x,re,A,de,I,ce,O,fe,ge,q,P,pe,Re,ue,Oe,k,Pe,S,Te,De,Ee,me,Se,be,Be,Me,xe,_e,Ae,Ie,B,ke,H,he,T,L,C=[],qe=new Map,He,N,v=[],Le=new Map,D;R=new ft({props:{js:` +import{S as tt,i as lt,s as st,M as et,e as o,w as b,b as u,c as W,f as _,g as r,h as l,m as X,x as ve,N as Ge,P as nt,k as ot,Q as it,n as at,t as U,a as j,o as d,d as Y,T as rt,C as Je,p as dt,r as Z,u as ct}from"./index-1097b3a4.js";import{S as ft}from"./SdkTabs-cc2b5912.js";import{F as pt}from"./FieldsQueryParam-b7007fe9.js";function Ke(i,s,n){const a=i.slice();return a[6]=s[n],a}function We(i,s,n){const a=i.slice();return a[6]=s[n],a}function Xe(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 Ye(i,s){let n,a=s[6].code+"",w,c,f,m;function F(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=b(a),c=u(),_(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(h,g){r(h,n,g),l(n,w),l(n,c),f||(m=ct(n,"click",F),f=!0)},p(h,g){s=h,g&20&&Z(n,"active",s[2]===s[6].code)},d(h){h&&d(n),f=!1,m()}}}function Ze(i,s){let n,a,w,c;return a=new et({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),W(a.$$.fragment),w=u(),_(n,"class","tab-item"),Z(n,"active",s[2]===s[6].code),this.first=n},m(f,m){r(f,n,m),X(a,n,null),l(n,w),c=!0},p(f,m){s=f,(!c||m&20)&&Z(n,"active",s[2]===s[6].code)},i(f){c||(U(a.$$.fragment,f),c=!0)},o(f){j(a.$$.fragment,f),c=!1},d(f){f&&d(n),Y(a)}}}function ut(i){var Ue,je;let s,n,a=i[0].name+"",w,c,f,m,F,h,g,V=i[0].name+"",ee,$e,te,R,le,M,se,y,z,we,G,E,ye,ne,J=i[0].name+"",oe,Ce,ie,Fe,ae,x,re,A,de,I,ce,O,fe,ge,q,P,pe,Re,ue,Oe,k,Pe,S,Te,De,Ee,me,Se,be,Be,Me,xe,_e,Ae,Ie,B,ke,H,he,T,L,C=[],qe=new Map,He,N,v=[],Le=new Map,D;R=new ft({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/index-f2972fa8.js b/ui/dist/assets/index-1097b3a4.js similarity index 67% rename from ui/dist/assets/index-f2972fa8.js rename to ui/dist/assets/index-1097b3a4.js index 0e673104..177f70a3 100644 --- a/ui/dist/assets/index-f2972fa8.js +++ b/ui/dist/assets/index-1097b3a4.js @@ -1,70 +1,70 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function x(){}const Sl=n=>n;function qe(n,e){for(const t in e)n[t]=e[t];return n}function q1(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function Q_(n){return n()}function hu(){return Object.create(null)}function Ee(n){n.forEach(Q_)}function qt(n){return typeof n=="function"}function me(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let ql;function hn(n,e){return ql||(ql=document.createElement("a")),ql.href=e,n===ql.href}function j1(n){return Object.keys(n).length===0}function va(n,...e){if(n==null)return x;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function V1(n){let e;return va(n,t=>e=t)(),e}function Je(n,e,t){n.$$.on_destroy.push(va(e,t))}function yt(n,e,t,i){if(n){const s=x_(n,e,t,i);return n[0](s)}}function x_(n,e,t,i){return n[1]&&i?qe(t.ctx.slice(),n[1](i(e))):t.ctx}function kt(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),ya=eg?n=>requestAnimationFrame(n):x;const ws=new Set;function tg(n){ws.forEach(e=>{e.c(n)||(ws.delete(e),e.f())}),ws.size!==0&&ya(tg)}function qo(n){let e;return ws.size===0&&ya(tg),{promise:new Promise(t=>{ws.add(e={c:n,f:t})}),abort(){ws.delete(e)}}}function g(n,e){n.appendChild(e)}function ng(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function z1(n){const e=v("style");return H1(ng(n),e),e.sheet}function H1(n,e){return g(n.head||n,e),e.sheet}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode&&n.parentNode.removeChild(n)}function mt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function et(n){return function(e){return e.preventDefault(),n.call(this,e)}}function An(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}const B1=["width","height"];function ri(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set&&B1.indexOf(i)===-1?n[i]=e[i]:p(n,i,e[i])}function U1(n){let e;return{p(...t){e=t,e.forEach(i=>n.push(i))},r(){e.forEach(t=>n.splice(n.indexOf(t),1))}}}function dt(n){return n===""?null:+n}function W1(n){return Array.from(n.childNodes)}function se(n,e){e=""+e,n.data!==e&&(n.data=e)}function re(n,e){n.value=e??""}function zr(n,e,t,i){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Q(n,e,t){n.classList[t?"add":"remove"](e)}function ig(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Ft(n,e){return new n(e)}const ho=new Map;let _o=0;function Y1(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function K1(n,e){const t={stylesheet:z1(e),rules:{}};return ho.set(n,t),t}function dl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function x(){}const Sl=n=>n;function qe(n,e){for(const t in e)n[t]=e[t];return n}function V1(n){return!!n&&(typeof n=="object"||typeof n=="function")&&typeof n.then=="function"}function eg(n){return n()}function hu(){return Object.create(null)}function Ee(n){n.forEach(eg)}function jt(n){return typeof n=="function"}function me(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let ql;function hn(n,e){return ql||(ql=document.createElement("a")),ql.href=e,n===ql.href}function z1(n){return Object.keys(n).length===0}function va(n,...e){if(n==null)return x;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function H1(n){let e;return va(n,t=>e=t)(),e}function Je(n,e,t){n.$$.on_destroy.push(va(e,t))}function yt(n,e,t,i){if(n){const s=tg(n,e,t,i);return n[0](s)}}function tg(n,e,t,i){return n[1]&&i?qe(t.ctx.slice(),n[1](i(e))):t.ctx}function kt(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),ya=ng?n=>requestAnimationFrame(n):x;const ws=new Set;function ig(n){ws.forEach(e=>{e.c(n)||(ws.delete(e),e.f())}),ws.size!==0&&ya(ig)}function jo(n){let e;return ws.size===0&&ya(ig),{promise:new Promise(t=>{ws.add(e={c:n,f:t})}),abort(){ws.delete(e)}}}function g(n,e){n.appendChild(e)}function sg(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function B1(n){const e=v("style");return U1(sg(n),e),e.sheet}function U1(n,e){return g(n.head||n,e),e.sheet}function w(n,e,t){n.insertBefore(e,t||null)}function k(n){n.parentNode&&n.parentNode.removeChild(n)}function mt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function et(n){return function(e){return e.preventDefault(),n.call(this,e)}}function An(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}const W1=["width","height"];function ri(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set&&W1.indexOf(i)===-1?n[i]=e[i]:p(n,i,e[i])}function Y1(n){let e;return{p(...t){e=t,e.forEach(i=>n.push(i))},r(){e.forEach(t=>n.splice(n.indexOf(t),1))}}}function dt(n){return n===""?null:+n}function K1(n){return Array.from(n.childNodes)}function se(n,e){e=""+e,n.data!==e&&(n.data=e)}function re(n,e){n.value=e??""}function zr(n,e,t,i){t==null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function Q(n,e,t){n.classList[t?"add":"remove"](e)}function lg(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function Rt(n,e){return new n(e)}const _o=new Map;let go=0;function J1(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Z1(n,e){const t={stylesheet:B1(e),rules:{}};return _o.set(n,t),t}function dl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ `;for(let b=0;b<=1;b+=a){const y=e+(t-e)*l(b);u+=b*100+`%{${o(y,1-y)}} `}const f=u+`100% {${o(t,1-t)}} -}`,c=`__svelte_${Y1(f)}_${r}`,d=ng(n),{stylesheet:m,rules:_}=ho.get(d)||K1(d,n);_[c]||(_[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const h=n.style.animation||"";return n.style.animation=`${h?`${h}, `:""}${c} ${i}ms linear ${s}ms 1 both`,_o+=1,c}function pl(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),_o-=s,_o||J1())}function J1(){ya(()=>{_o||(ho.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&k(e)}),ho.clear())})}function Z1(n,e,t,i){if(!e)return x;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return x;const{delay:l=0,duration:o=300,easing:r=Sl,start:a=Ro()+l,end:u=a+o,tick:f=x,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,_;function h(){c&&(_=dl(n,0,1,o,l,r,c)),l||(m=!0)}function b(){c&&pl(n,_),d=!1}return qo(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),b()),!d)return!1;if(m){const S=y-a,C=0+1*r(S/o);f(C,1-C)}return!0}),h(),f(0,1),b}function G1(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,sg(n,s)}}function sg(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ml;function bi(n){ml=n}function $l(){if(!ml)throw new Error("Function called outside component initialization");return ml}function Gt(n){$l().$$.on_mount.push(n)}function X1(n){$l().$$.after_update.push(n)}function jo(n){$l().$$.on_destroy.push(n)}function $t(){const n=$l();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=ig(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Ne(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ks=[],ee=[];let Ss=[];const Hr=[],lg=Promise.resolve();let Br=!1;function og(){Br||(Br=!0,lg.then(ka))}function fn(){return og(),lg}function Qe(n){Ss.push(n)}function he(n){Hr.push(n)}const sr=new Set;let hs=0;function ka(){if(hs!==0)return;const n=ml;do{try{for(;hsn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ss=e}let Hs;function wa(){return Hs||(Hs=Promise.resolve(),Hs.then(()=>{Hs=null})),Hs}function ts(n,e,t){n.dispatchEvent(ig(`${e?"intro":"outro"}${t}`))}const oo=new Set;let si;function ae(){si={r:0,c:[],p:si}}function ue(){si.r||Ee(si.c),si=si.p}function A(n,e){n&&n.i&&(oo.delete(n),n.i(e))}function I(n,e,t,i){if(n&&n.o){if(oo.has(n))return;oo.add(n),si.c.push(()=>{oo.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const Sa={duration:0};function rg(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&pl(n,o)}function f(){const{delay:d=0,duration:m=300,easing:_=Sl,tick:h=x,css:b}=s||Sa;b&&(o=dl(n,0,1,m,d,_,b,a++)),h(0,1);const y=Ro()+d,S=y+m;r&&r.abort(),l=!0,Qe(()=>ts(n,!0,"start")),r=qo(C=>{if(l){if(C>=S)return h(1,0),ts(n,!0,"end"),u(),l=!1;if(C>=y){const $=_((C-y)/m);h($,1-$)}}return l})}let c=!1;return{start(){c||(c=!0,pl(n),qt(s)?(s=s(i),wa().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function $a(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=si;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:c=Sl,tick:d=x,css:m}=s||Sa;m&&(o=dl(n,1,0,f,u,c,m));const _=Ro()+u,h=_+f;Qe(()=>ts(n,!1,"start")),qo(b=>{if(l){if(b>=h)return d(0,1),ts(n,!1,"end"),--r.r||Ee(r.c),!1;if(b>=_){const y=c((b-_)/f);d(1-y,y)}}return l})}return qt(s)?wa().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&pl(n,o),l=!1)}}}function je(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&pl(n,u)}function c(m,_){const h=m.b-o;return _*=Math.abs(h),{a:o,b:m.b,d:h,duration:_,start:m.start,end:m.start+_,group:m.group}}function d(m){const{delay:_=0,duration:h=300,easing:b=Sl,tick:y=x,css:S}=l||Sa,C={start:Ro()+_,b:m};m||(C.group=si,si.r+=1),r||a?a=C:(S&&(f(),u=dl(n,o,m,h,_,b,S)),m&&y(0,1),r=c(C,h),Qe(()=>ts(n,m,"start")),qo($=>{if(a&&$>a.start&&(r=c(a,h),a=null,ts(n,r.b,"start"),S&&(f(),u=dl(n,o,r.b,r.duration,0,b,l.css))),r){if($>=r.end)y(o=r.b,1-o),ts(n,r.b,"end"),a||(r.b?f():--r.group.r||Ee(r.group.c)),r=null;else if($>=r.start){const T=$-r.start;o=r.a+r.d*b(T/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){qt(l)?wa().then(()=>{l=l(s),d(m)}):d(m)},end(){f(),r=a=null}}}function gu(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(ae(),I(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),ue())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ka()}if(q1(n)){const s=$l();if(n.then(l=>{bi(s),i(e.then,1,e.value,l),bi(null)},l=>{if(bi(s),i(e.catch,2,e.error,l),bi(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function e0(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function as(n,e){n.d(1),e.delete(n.key)}function Bt(n,e){I(n,1,1,()=>{e.delete(n.key)})}function t0(n,e){n.f(),Bt(n,e)}function bt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,m=l.length,_=d;const h={};for(;_--;)h[n[_].key]=_;const b=[],y=new Map,S=new Map,C=[];for(_=m;_--;){const O=c(s,l,_),D=t(O);let L=o.get(D);L?i&&C.push(()=>L.p(O,e)):(L=u(D,O),L.c()),y.set(D,b[_]=L),D in h&&S.set(D,Math.abs(_-h[D]))}const $=new Set,T=new Set;function M(O){A(O,1),O.m(r,f),o.set(O.key,O),f=O.first,m--}for(;d&&m;){const O=b[m-1],D=n[d-1],L=O.key,P=D.key;O===D?(f=O.first,d--,m--):y.has(P)?!o.has(L)||$.has(L)?M(O):T.has(P)?d--:S.get(L)>S.get(P)?(T.add(L),M(O)):($.add(P),d--):(a(D,o),d--)}for(;d--;){const O=n[d];y.has(O.key)||a(O,o)}for(;m;)M(b[m-1]);return Ee(C),b}function Mt(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Xt(n){return typeof n=="object"&&n!==null?n:{}}function de(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function z(n){n&&n.c()}function j(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||Qe(()=>{const o=n.$$.on_mount.map(Q_).filter(qt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Ee(o),n.$$.on_mount=[]}),l.forEach(Qe)}function V(n,e){const t=n.$$;t.fragment!==null&&(x1(t.after_update),Ee(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function n0(n,e){n.$$.dirty[0]===-1&&(ks.push(n),og(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const _=m.length?m[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=_)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](_),f&&n0(n,c)),d}):[],u.update(),f=!0,Ee(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=W1(e.target);u.fragment&&u.fragment.l(c),c.forEach(k)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),j(n,e.target,e.anchor,e.customElement),ka()}bi(a)}class ge{$destroy(){V(this,1),this.$destroy=x}$on(e,t){if(!qt(t))return x;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!j1(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function It(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&t&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function ug(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return ag(t,o=>{let r=!1;const a=[];let u=0,f=x;const c=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=qt(m)?m:x},d=s.map((m,_)=>va(m,h=>{a[_]=h,u&=~(1<<_),r&&c()},()=>{u|=1<<_}));return r=!0,c(),function(){Ee(d),f(),r=!1}})}function fg(n,e){if(n instanceof RegExp)return{keys:!1,pattern:n};var t,i,s,l,o=[],r="",a=n.split("/");for(a[0]||a.shift();s=a.shift();)t=s[0],t==="*"?(o.push("wild"),r+="/(.*)"):t===":"?(i=s.indexOf("?",1),l=s.indexOf(".",1),o.push(s.substring(1,~i?i:~l?l:s.length)),r+=~i&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(r+=(~i?"?":"")+"\\"+s.substring(l))):r+="/"+s;return{keys:o,pattern:new RegExp("^"+r+(e?"(?=$|/)":"/?$"),"i")}}function i0(n){let e,t,i;const s=[n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{V(f,1)}),ue()}l?(e=Ft(l,o()),e.$on("routeEvent",r[7]),z(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function s0(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{V(f,1)}),ue()}l?(e=Ft(l,o()),e.$on("routeEvent",r[6]),z(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function l0(n){let e,t,i,s;const l=[s0,i0],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function bu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Vo=ag(null,function(e){e(bu());const t=()=>{e(bu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});ug(Vo,n=>n.location);const Ca=ug(Vo,n=>n.querystring),vu=In(void 0);async function ji(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await fn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function on(n,e){if(e=ku(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return yu(n,e),{update(t){t=ku(t),yu(n,t)}}}function o0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function yu(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||r0(i.currentTarget.getAttribute("href"))})}function ku(n){return n&&typeof n=="string"?{href:n}:n||{}}function r0(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function a0(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(T,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!T||typeof T=="string"&&(T.length<1||T.charAt(0)!="/"&&T.charAt(0)!="*")||typeof T=="object"&&!(T instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:D}=fg(T);this.path=T,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=O,this._keys=D}match(T){if(s){if(typeof s=="string")if(T.startsWith(s))T=T.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const L=T.match(s);if(L&&L[0])T=T.substr(L[0].length)||"/";else return null}}const M=this._pattern.exec(T);if(M===null)return null;if(this._keys===!1)return M;const O={};let D=0;for(;D{r.push(new o(T,$))}):Object.keys(i).forEach($=>{r.push(new o($,i[$]))});let a=null,u=null,f={};const c=$t();async function d($,T){await fn(),c($,T)}let m=null,_=null;l&&(_=$=>{$.state&&($.state.__svelte_spa_router_scrollY||$.state.__svelte_spa_router_scrollX)?m=$.state:m=null},window.addEventListener("popstate",_),X1(()=>{o0(m)}));let h=null,b=null;const y=Vo.subscribe(async $=>{h=$;let T=0;for(;T{vu.set(u)});return}t(0,a=null),b=null,vu.set(void 0)});jo(()=>{y(),_&&window.removeEventListener("popstate",_)});function S($){Ne.call(this,n,$)}function C($){Ne.call(this,n,$)}return n.$$set=$=>{"routes"in $&&t(3,i=$.routes),"prefix"in $&&t(4,s=$.prefix),"restoreScrollState"in $&&t(5,l=$.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,S,C]}class u0 extends ge{constructor(e){super(),_e(this,e,a0,l0,me,{routes:3,prefix:4,restoreScrollState:5})}}const ro=[];let cg;function dg(n){const e=n.pattern.test(cg);wu(n,n.className,e),wu(n,n.inactiveClassName,!e)}function wu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Vo.subscribe(n=>{cg=n.location+(n.querystring?"?"+n.querystring:""),ro.map(dg)});function Vn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?fg(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ro.push(i),dg(i),{destroy(){ro.splice(ro.indexOf(i),1)}}}const f0="modulepreload",c0=function(n,e){return new URL(n,e).href},Su={},at=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=c0(l,i),l in Su)return;Su[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":f0,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e()).catch(l=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l})};var Ur=function(n,e){return Ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Ur(n,e)};function tn(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Ur(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Wr=function(){return Wr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&(!t.exp||t.exp-e>Date.now()/1e3))}pg=typeof atob=="function"?atob:function(n){var e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Cl=function(){function n(e){e===void 0&&(e={}),this.$load(e||{})}return n.prototype.load=function(e){return this.$load(e)},n.prototype.$load=function(e){for(var t=0,i=Object.entries(e);t4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof yi&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=$u(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},Ta=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return tn(e,n),e.prototype.getFullList=function(t,i){if(typeof t=="number")return this._getFullList(this.baseCrudPath,t,i);var s=Object.assign({},t,i);return this._getFullList(this.baseCrudPath,s.batch||200,s)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return tn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=200),s===void 0&&(s={});var o=[],r=function(a){return Qt(l,void 0,void 0,function(){return xt(this,function(u){return[2,this._getList(t,a,i||200,s).then(function(f){var c=f,d=c.items,m=c.totalItems;return o=o.concat(d),d.length&&m>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u1||typeof(t==null?void 0:t[0])=="string"?(console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),[2,this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{})]):(s=(t==null?void 0:t[0])||{},[4,this.listAuthMethods()]);case 1:if(l=u.sent(),!(o=l.authProviders.find(function(f){return f.name===s.provider})))throw new Ai(new Error('Missing or invalid provider "'.concat(s.provider,'".')));return r=this.client.buildUrl("/api/oauth2-redirect"),[2,new Promise(function(f,c){return Qt(a,void 0,void 0,function(){var d,m,_,h,b,y=this;return xt(this,function(S){switch(S.label){case 0:return S.trys.push([0,3,,4]),[4,this.client.realtime.subscribe("@oauth2",function(C){return Qt(y,void 0,void 0,function(){var $,T,M;return xt(this,function(O){switch(O.label){case 0:$=this.client.realtime.clientId,O.label=1;case 1:if(O.trys.push([1,3,,4]),d(),!C.state||$!==C.state)throw new Error("State parameters don't match.");return[4,this.authWithOAuth2Code(o.name,C.code,o.codeVerifier,r,s.createData,s.body,s.query)];case 2:return T=O.sent(),f(T),[3,4];case 3:return M=O.sent(),c(new Ai(M)),[3,4];case 4:return[2]}})})})];case 1:return d=S.sent(),m={state:this.client.realtime.clientId},!((b=s.scopes)===null||b===void 0)&&b.length&&(m.scope=s.scopes.join(" ")),_=this._replaceQueryParams(o.authUrl+r,m),[4,s.urlCallback?s.urlCallback(_):this._defaultUrlCallback(_)];case 2:return S.sent(),[3,4];case 3:return h=S.sent(),c(new Ai(h)),[3,4];case 4:return[2]}})})})]}})})},e.prototype.authRefresh=function(t,i){var s=this;return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send(this.baseCollectionPath+"/auth-refresh",{method:"POST",params:i,body:t}).then(function(l){return s.authResponse(l)})},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-password-reset",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,o){return l===void 0&&(l={}),o===void 0&&(o={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",{method:"POST",params:o,body:l}).then(function(){return!0})},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send(this.baseCollectionPath+"/confirm-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send(this.baseCollectionPath+"/request-email-change",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send(this.baseCollectionPath+"/confirm-email-change",{method:"POST",params:l,body:s}).then(function(){return!0})},e.prototype.listExternalAuths=function(t,i){return i===void 0&&(i={}),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",{method:"GET",params:i}).then(function(s){var l=[];if(Array.isArray(s))for(var o=0,r=s;o=0&&(s=t.substring(0,t.indexOf("?")),l=t.substring(t.indexOf("?")+1));for(var o={},r=0,a=l.split("&");r"u"||!(window!=null&&window.open))throw new Ai(new Error("Not in a browser context - please pass a custom urlCallback function."));var i=1024,s=768,l=window.innerWidth,o=window.innerHeight,r=l/2-(i=i>l?l:i)/2,a=o/2-(s=s>o?o:s)/2;window.open(t,"oauth2-popup","width="+i+",height="+s+",top="+a+",left="+r+",resizable,menubar=no")},e}(Ta),kn=function(e){e===void 0&&(e={}),this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},yn=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return tn(e,n),e.prototype.$load=function(t){n.prototype.$load.call(this,t),this.system=!!t.system,this.name=typeof t.name=="string"?t.name:"",this.type=typeof t.type=="string"?t.type:"base",this.options=t.options!==void 0&&t.options!==null?t.options:{},this.indexes=Array.isArray(t.indexes)?t.indexes:[],this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return Qt(this,void 0,void 0,function(){return xt(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:this.getSubscriptionsCancelKey()}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getSubscriptionsCancelKey=function(){return"realtime_"+this.clientId},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return Qt(t,void 0,void 0,function(){var l;return xt(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new Ai({url:M.url,status:M.status,data:O});return[2,O]}})})}).catch(function(M){throw new Ai(M)})]}})})},n.prototype.getFileUrl=function(e,t,i){return i===void 0&&(i={}),this.files.getUrl(e,t,i)},n.prototype.buildUrl=function(e){var t,i=this.baseUrl;return typeof window>"u"||!window.location||i.startsWith("https://")||i.startsWith("http://")||(i=!((t=window.location.origin)===null||t===void 0)&&t.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(i+=window.location.pathname||"/",i+=i.endsWith("/")?"":"/"),i+=this.baseUrl),e&&(i+=i.endsWith("/")?"":"/",i+=e.startsWith("/")?e.substring(1):e),i},n.prototype.isFormData=function(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function ns(n){return typeof n=="number"}function Ho(n){return typeof n=="number"&&n%1===0}function D0(n){return typeof n=="string"}function A0(n){return Object.prototype.toString.call(n)==="[object Date]"}function qg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function I0(n){return Array.isArray(n)?n:[n]}function Tu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function L0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Es(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function vi(n,e,t){return Ho(n)&&n>=e&&n<=t}function P0(n,e){return n-e*Math.floor(n/e)}function Wt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ei(n){if(!(it(n)||n===null||n===""))return parseInt(n,10)}function Ui(n){if(!(it(n)||n===null||n===""))return parseFloat(n)}function Ma(n){if(!(it(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Oa(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Tl(n){return n%4===0&&(n%100!==0||n%400===0)}function sl(n){return Tl(n)?366:365}function go(n,e){const t=P0(e-1,12)+1,i=n+(e-t)/12;return t===2?Tl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ea(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function bo(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function Jr(n){return n>99?n:n>60?1900+n:2e3+n}function jg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Bo(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function Vg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Hn(`Invalid unit value ${n}`);return e}function vo(n,e){const t={};for(const i in n)if(Es(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Vg(s)}return t}function ll(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Wt(t,2)}:${Wt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Wt(t,2)}${Wt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Uo(n){return L0(n,["hour","minute","second","millisecond"])}const zg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,N0=["January","February","March","April","May","June","July","August","September","October","November","December"],Hg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],F0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Bg(n){switch(n){case"narrow":return[...F0];case"short":return[...Hg];case"long":return[...N0];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Ug=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Wg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],R0=["M","T","W","T","F","S","S"];function Yg(n){switch(n){case"narrow":return[...R0];case"short":return[...Wg];case"long":return[...Ug];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Kg=["AM","PM"],q0=["Before Christ","Anno Domini"],j0=["BC","AD"],V0=["B","A"];function Jg(n){switch(n){case"narrow":return[...V0];case"short":return[...j0];case"long":return[...q0];default:return null}}function z0(n){return Kg[n.hour<12?0:1]}function H0(n,e){return Yg(e)[n.weekday-1]}function B0(n,e){return Bg(e)[n.month-1]}function U0(n,e){return Jg(e)[n.year<0?0:1]}function W0(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function Mu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const Y0={D:Kr,DD:vg,DDD:yg,DDDD:kg,t:wg,tt:Sg,ttt:$g,tttt:Cg,T:Tg,TT:Mg,TTT:Og,TTTT:Eg,f:Dg,ff:Ig,fff:Pg,ffff:Fg,F:Ag,FF:Lg,FFF:Ng,FFFF:Rg};class vn{static create(e,t={}){return new vn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return Y0[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Wt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(m,_)=>this.loc.extract(e,m,_),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?z0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,_)=>i?B0(e,m):l(_?{month:m}:{month:m,day:"numeric"},"month"),u=(m,_)=>i?H0(e,m):l(_?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const _=vn.macroTokenToFormatOpts(m);return _?this.formatWithSystemDefault(e,_):m},c=m=>i?U0(e,m):l({era:m},"era"),d=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return Mu(vn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=vn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return Mu(l,s(r))}}class Gn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ml{get type(){throw new Mi}get name(){throw new Mi}get ianaName(){return this.name}get isUniversal(){throw new Mi}offsetName(e,t){throw new Mi}formatOffset(e,t){throw new Mi}offset(e){throw new Mi}equals(e){throw new Mi}get isValid(){throw new Mi}}let lr=null;class Da extends Ml{static get instance(){return lr===null&&(lr=new Da),lr}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return jg(e,t,i)}formatOffset(e,t){return ll(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let ao={};function K0(n){return ao[n]||(ao[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),ao[n]}const J0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Z0(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function G0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?_:1e3+_,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let or=null;class mn extends Ml{static get utcInstance(){return or===null&&(or=new mn(0)),or}static instance(e){return e===0?mn.utcInstance:new mn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new mn(Bo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ll(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ll(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ll(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class X0 extends Ml{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Di(n,e){if(it(n)||n===null)return e;if(n instanceof Ml)return n;if(D0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?mn.utcInstance:mn.parseSpecifier(t)||ki.create(n)}else return ns(n)?mn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new X0(n)}let Ou=()=>Date.now(),Eu="system",Du=null,Au=null,Iu=null,Lu;class Jt{static get now(){return Ou}static set now(e){Ou=e}static set defaultZone(e){Eu=e}static get defaultZone(){return Di(Eu,Da.instance)}static get defaultLocale(){return Du}static set defaultLocale(e){Du=e}static get defaultNumberingSystem(){return Au}static set defaultNumberingSystem(e){Au=e}static get defaultOutputCalendar(){return Iu}static set defaultOutputCalendar(e){Iu=e}static get throwOnInvalid(){return Lu}static set throwOnInvalid(e){Lu=e}static resetCaches(){Et.resetCache(),ki.resetCache()}}let Pu={};function Q0(n,e={}){const t=JSON.stringify([n,e]);let i=Pu[t];return i||(i=new Intl.ListFormat(n,e),Pu[t]=i),i}let Zr={};function Gr(n,e={}){const t=JSON.stringify([n,e]);let i=Zr[t];return i||(i=new Intl.DateTimeFormat(n,e),Zr[t]=i),i}let Xr={};function x0(n,e={}){const t=JSON.stringify([n,e]);let i=Xr[t];return i||(i=new Intl.NumberFormat(n,e),Xr[t]=i),i}let Qr={};function ev(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Qr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Qr[s]=l),l}let tl=null;function tv(){return tl||(tl=new Intl.DateTimeFormat().resolvedOptions().locale,tl)}function nv(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Gr(n).resolvedOptions()}catch{t=Gr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function iv(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function sv(n){const e=[];for(let t=1;t<=12;t++){const i=Ue.utc(2016,t,1);e.push(n(i))}return e}function lv(n){const e=[];for(let t=1;t<=7;t++){const i=Ue.utc(2016,11,13+t);e.push(n(i))}return e}function zl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function ov(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class rv{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=x0(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Oa(e,3);return Wt(t,this.padTo)}}}class av{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ki.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Ue.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Gr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class uv{constructor(e,t,i){this.opts={style:"long",...i},!t&&qg()&&(this.rtf=ev(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):W0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Et{static fromOpts(e){return Et.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Jt.defaultLocale,o=l||(s?"en-US":tv()),r=t||Jt.defaultNumberingSystem,a=i||Jt.defaultOutputCalendar;return new Et(o,r,a,l)}static resetCache(){tl=null,Zr={},Xr={},Qr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Et.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=nv(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=iv(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=ov(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Et.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return zl(this,e,i,Bg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=sv(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return zl(this,e,i,Yg,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=lv(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return zl(this,void 0,e,()=>Kg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ue.utc(2016,11,13,9),Ue.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return zl(this,e,t,Jg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ue.utc(-40,1,1),Ue.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new rv(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new av(e,this.intl,t)}relFormatter(e={}){return new uv(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Q0(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Fs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Rs(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function qs(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function Zg(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(_||m&&f)?-m:m;return[{years:d(Ui(t)),months:d(Ui(i)),weeks:d(Ui(s)),days:d(Ui(l)),hours:d(Ui(o)),minutes:d(Ui(r)),seconds:d(Ui(a),a==="-0"),milliseconds:d(Ma(u),c)}]}const wv={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function La(n,e,t,i,s,l,o){const r={year:e.length===2?Jr(Ei(e)):Ei(e),month:Hg.indexOf(t)+1,day:Ei(i),hour:Ei(s),minute:Ei(l)};return o&&(r.second=Ei(o)),n&&(r.weekday=n.length>3?Ug.indexOf(n)+1:Wg.indexOf(n)+1),r}const Sv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function $v(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=La(e,s,i,t,l,o,r);let m;return a?m=wv[a]:u?m=0:m=Bo(f,c),[d,new mn(m)]}function Cv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Tv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Mv=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Ov=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Nu(n){const[,e,t,i,s,l,o,r]=n;return[La(e,s,i,t,l,o,r),mn.utcInstance]}function Ev(n){const[,e,t,i,s,l,o,r]=n;return[La(e,r,t,i,s,l,o),mn.utcInstance]}const Dv=Fs(cv,Ia),Av=Fs(dv,Ia),Iv=Fs(pv,Ia),Lv=Fs(Xg),xg=Rs(bv,js,Ol,El),Pv=Rs(mv,js,Ol,El),Nv=Rs(hv,js,Ol,El),Fv=Rs(js,Ol,El);function Rv(n){return qs(n,[Dv,xg],[Av,Pv],[Iv,Nv],[Lv,Fv])}function qv(n){return qs(Cv(n),[Sv,$v])}function jv(n){return qs(n,[Tv,Nu],[Mv,Nu],[Ov,Ev])}function Vv(n){return qs(n,[yv,kv])}const zv=Rs(js);function Hv(n){return qs(n,[vv,zv])}const Bv=Fs(_v,gv),Uv=Fs(Qg),Wv=Rs(js,Ol,El);function Yv(n){return qs(n,[Bv,xg],[Uv,Wv])}const Kv="Invalid Duration",eb={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Jv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...eb},Fn=146097/400,gs=146097/4800,Zv={years:{quarters:4,months:12,weeks:Fn/7,days:Fn,hours:Fn*24,minutes:Fn*24*60,seconds:Fn*24*60*60,milliseconds:Fn*24*60*60*1e3},quarters:{months:3,weeks:Fn/28,days:Fn/4,hours:Fn*24/4,minutes:Fn*24*60/4,seconds:Fn*24*60*60/4,milliseconds:Fn*24*60*60*1e3/4},months:{weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},...eb},Gi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Gv=Gi.slice(0).reverse();function Wi(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new rt(i)}function Xv(n){return n<0?Math.floor(n):Math.ceil(n)}function tb(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?Xv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function Qv(n,e){Gv.reduce((t,i)=>it(e[i])?t:(t&&tb(n,e,t,e,i),i),null)}class rt{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Et.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Zv:Jv,this.isLuxonDuration=!0}static fromMillis(e,t){return rt.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Hn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new rt({values:vo(e,rt.normalizeUnit),loc:Et.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ns(e))return rt.fromMillis(e);if(rt.isDuration(e))return e;if(typeof e=="object")return rt.fromObject(e);throw new Hn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Vv(e);return i?rt.fromObject(i,t):rt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Hv(e);return i?rt.fromObject(i,t):rt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Hn("need to specify a reason the Duration is invalid");const i=e instanceof Gn?e:new Gn(e,t);if(Jt.throwOnInvalid)throw new M0(i);return new rt({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new bg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?vn.create(this.loc,i).formatDurationFromString(this,e):Kv}toHuman(e={}){const t=Gi.map(i=>{const s=this.values[i];return it(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Oa(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e),i={};for(const s of Gi)(Es(t.values,s)||Es(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Wi(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Vg(e(this.values[i],i));return Wi(this,{values:t},!0)}get(e){return this[rt.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...vo(e,rt.normalizeUnit)};return Wi(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Wi(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Qv(this.matrix,e),Wi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>rt.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Gi)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;ns(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)Gi.indexOf(u)>Gi.indexOf(o)&&tb(this.matrix,s,u,t,o)}else ns(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Wi(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Wi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Gi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Bs="Invalid Interval";function xv(n,e){return!n||!n.isValid?Lt.invalid("missing or invalid start"):!e||!e.isValid?Lt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?Lt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ys).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(Lt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=rt.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(Lt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:Lt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Lt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(Lt.fromDateTimes(t,a.time)),t=null);return Lt.merge(s)}difference(...e){return Lt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Bs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Bs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Bs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Bs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Bs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):rt.invalid(this.invalidReason)}mapEndpoints(e){return Lt.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Jt.defaultZone){const t=Ue.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ki.isValidZone(e)}static normalizeZone(e){return Di(e,Jt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Et.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Et.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Et.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Et.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Et.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Et.create(t,null,"gregory").eras(e)}static features(){return{relative:qg()}}}function Fu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(rt.fromMillis(i).as("days"))}function ey(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=Fu(r,a);return(u-u%7)/7}],["days",Fu]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function ty(n,e,t,i){let[s,l,o,r]=ey(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?rt.fromMillis(a,i).shiftTo(...u).plus(f):f}const Pa={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Ru={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ny=Pa.hanidec.replace(/[\[|\]]/g,"").split("");function iy(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Jn({numberingSystem:n},e=""){return new RegExp(`${Pa[n||"latn"]}${e}`)}const sy="missing Intl.DateTimeFormat.formatToParts support";function ut(n,e=t=>t){return{regex:n,deser:([t])=>e(iy(t))}}const ly=String.fromCharCode(160),nb=`[ ${ly}]`,ib=new RegExp(nb,"g");function oy(n){return n.replace(/\./g,"\\.?").replace(ib,nb)}function qu(n){return n.replace(/\./g,"").replace(ib," ").toLowerCase()}function Zn(n,e){return n===null?null:{regex:RegExp(n.map(oy).join("|")),deser:([t])=>n.findIndex(i=>qu(t)===qu(i))+e}}function ju(n,e){return{regex:n,deser:([,t,i])=>Bo(t,i),groups:e}}function rr(n){return{regex:n,deser:([e])=>e}}function ry(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ay(n,e){const t=Jn(e),i=Jn(e,"{2}"),s=Jn(e,"{3}"),l=Jn(e,"{4}"),o=Jn(e,"{6}"),r=Jn(e,"{1,2}"),a=Jn(e,"{1,3}"),u=Jn(e,"{1,6}"),f=Jn(e,"{1,9}"),c=Jn(e,"{2,4}"),d=Jn(e,"{4,6}"),m=b=>({regex:RegExp(ry(b.val)),deser:([y])=>y,literal:!0}),h=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Zn(e.eras("short",!1),0);case"GG":return Zn(e.eras("long",!1),0);case"y":return ut(u);case"yy":return ut(c,Jr);case"yyyy":return ut(l);case"yyyyy":return ut(d);case"yyyyyy":return ut(o);case"M":return ut(r);case"MM":return ut(i);case"MMM":return Zn(e.months("short",!0,!1),1);case"MMMM":return Zn(e.months("long",!0,!1),1);case"L":return ut(r);case"LL":return ut(i);case"LLL":return Zn(e.months("short",!1,!1),1);case"LLLL":return Zn(e.months("long",!1,!1),1);case"d":return ut(r);case"dd":return ut(i);case"o":return ut(a);case"ooo":return ut(s);case"HH":return ut(i);case"H":return ut(r);case"hh":return ut(i);case"h":return ut(r);case"mm":return ut(i);case"m":return ut(r);case"q":return ut(r);case"qq":return ut(i);case"s":return ut(r);case"ss":return ut(i);case"S":return ut(a);case"SSS":return ut(s);case"u":return rr(f);case"uu":return rr(r);case"uuu":return ut(t);case"a":return Zn(e.meridiems(),0);case"kkkk":return ut(l);case"kk":return ut(c,Jr);case"W":return ut(r);case"WW":return ut(i);case"E":case"c":return ut(t);case"EEE":return Zn(e.weekdays("short",!1,!1),1);case"EEEE":return Zn(e.weekdays("long",!1,!1),1);case"ccc":return Zn(e.weekdays("short",!0,!1),1);case"cccc":return Zn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return ju(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return ju(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return rr(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:sy};return h.token=n,h}const uy={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function fy(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=uy[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function cy(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function dy(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Es(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function py(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return it(n.z)||(t=ki.create(n.z)),it(n.Z)||(t||(t=new mn(n.Z)),i=n.Z),it(n.q)||(n.M=(n.q-1)*3+1),it(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),it(n.u)||(n.S=Ma(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let ar=null;function my(){return ar||(ar=Ue.fromMillis(1555555555555)),ar}function hy(n,e){if(n.literal)return n;const t=vn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=vn.create(e,t).formatDateTimeParts(my()).map(o=>fy(o,e,t));return l.includes(void 0)?n:l}function _y(n,e){return Array.prototype.concat(...n.map(t=>hy(t,e)))}function sb(n,e,t){const i=_y(vn.parseFormat(t),n),s=i.map(o=>ay(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=cy(s),a=RegExp(o,"i"),[u,f]=dy(e,a,r),[c,d,m]=f?py(f):[null,null,void 0];if(Es(f,"a")&&Es(f,"H"))throw new el("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:m}}}function gy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=sb(n,e,t);return[i,s,l,o]}const lb=[0,31,59,90,120,151,181,212,243,273,304,334],ob=[0,31,60,91,121,152,182,213,244,274,305,335];function Un(n,e){return new Gn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function rb(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function ab(n,e,t){return t+(Tl(n)?ob:lb)[e-1]}function ub(n,e){const t=Tl(n)?ob:lb,i=t.findIndex(l=>lbo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Uo(n)}}function Vu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=rb(e,1,4),l=sl(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=sl(r)):o>l?(r=e+1,o-=sl(e)):r=e;const{month:a,day:u}=ub(r,o);return{year:r,month:a,day:u,...Uo(n)}}function ur(n){const{year:e,month:t,day:i}=n,s=ab(e,t,i);return{year:e,ordinal:s,...Uo(n)}}function zu(n){const{year:e,ordinal:t}=n,{month:i,day:s}=ub(e,t);return{year:e,month:i,day:s,...Uo(n)}}function by(n){const e=Ho(n.weekYear),t=vi(n.weekNumber,1,bo(n.weekYear)),i=vi(n.weekday,1,7);return e?t?i?!1:Un("weekday",n.weekday):Un("week",n.week):Un("weekYear",n.weekYear)}function vy(n){const e=Ho(n.year),t=vi(n.ordinal,1,sl(n.year));return e?t?!1:Un("ordinal",n.ordinal):Un("year",n.year)}function fb(n){const e=Ho(n.year),t=vi(n.month,1,12),i=vi(n.day,1,go(n.year,n.month));return e?t?i?!1:Un("day",n.day):Un("month",n.month):Un("year",n.year)}function cb(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=vi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=vi(t,0,59),r=vi(i,0,59),a=vi(s,0,999);return l?o?r?a?!1:Un("millisecond",s):Un("second",i):Un("minute",t):Un("hour",e)}const fr="Invalid DateTime",Hu=864e13;function Bl(n){return new Gn("unsupported zone",`the zone "${n.name}" is not supported`)}function cr(n){return n.weekData===null&&(n.weekData=xr(n.c)),n.weekData}function Us(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Ue({...t,...e,old:t})}function db(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Bu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function uo(n,e,t){return db(Ea(n),e,t)}function Uu(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,go(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=rt.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=Ea(l);let[a,u]=db(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Ws(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Ue.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Ue.invalid(new Gn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Ul(n,e,t=!0){return n.isValid?vn.create(Et.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function dr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Wt(n.c.year,t?6:4),e?(i+="-",i+=Wt(n.c.month),i+="-",i+=Wt(n.c.day)):(i+=Wt(n.c.month),i+=Wt(n.c.day)),i}function Wu(n,e,t,i,s,l){let o=Wt(n.c.hour);return e?(o+=":",o+=Wt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Wt(n.c.minute),(n.c.second!==0||!t)&&(o+=Wt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Wt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Wt(Math.trunc(-n.o/60)),o+=":",o+=Wt(Math.trunc(-n.o%60))):(o+="+",o+=Wt(Math.trunc(n.o/60)),o+=":",o+=Wt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const pb={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},yy={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ky={ordinal:1,hour:0,minute:0,second:0,millisecond:0},mb=["year","month","day","hour","minute","second","millisecond"],wy=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Sy=["year","ordinal","hour","minute","second","millisecond"];function Yu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new bg(n);return e}function Ku(n,e){const t=Di(e.zone,Jt.defaultZone),i=Et.fromObject(e),s=Jt.now();let l,o;if(it(n.year))l=s;else{for(const u of mb)it(n[u])&&(n[u]=pb[u]);const r=fb(n)||cb(n);if(r)return Ue.invalid(r);const a=t.offset(s);[l,o]=uo(n,a,t)}return new Ue({ts:l,zone:t,loc:i,o})}function Ju(n,e,t){const i=it(t.round)?!0:t.round,s=(o,r)=>(o=Oa(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Zu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class Ue{constructor(e){const t=e.zone||Jt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Gn("invalid input"):null)||(t.isValid?null:Bl(t));this.ts=it(e.ts)?Jt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Bu(this.ts,r),i=Number.isNaN(s.year)?new Gn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Et.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Ue({})}static local(){const[e,t]=Zu(arguments),[i,s,l,o,r,a,u]=t;return Ku({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Zu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=mn.utcInstance,Ku({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=A0(e)?e.valueOf():NaN;if(Number.isNaN(i))return Ue.invalid("invalid input");const s=Di(t.zone,Jt.defaultZone);return s.isValid?new Ue({ts:i,zone:s,loc:Et.fromObject(t)}):Ue.invalid(Bl(s))}static fromMillis(e,t={}){if(ns(e))return e<-Hu||e>Hu?Ue.invalid("Timestamp out of range"):new Ue({ts:e,zone:Di(t.zone,Jt.defaultZone),loc:Et.fromObject(t)});throw new Hn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ns(e))return new Ue({ts:e*1e3,zone:Di(t.zone,Jt.defaultZone),loc:Et.fromObject(t)});throw new Hn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Di(t.zone,Jt.defaultZone);if(!i.isValid)return Ue.invalid(Bl(i));const s=Jt.now(),l=it(t.specificOffset)?i.offset(s):t.specificOffset,o=vo(e,Yu),r=!it(o.ordinal),a=!it(o.year),u=!it(o.month)||!it(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=Et.fromObject(t);if((f||r)&&c)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new el("Can't mix ordinal dates with month/day");const m=c||o.weekday&&!f;let _,h,b=Bu(s,l);m?(_=wy,h=yy,b=xr(b)):r?(_=Sy,h=ky,b=ur(b)):(_=mb,h=pb);let y=!1;for(const D of _){const L=o[D];it(L)?y?o[D]=h[D]:o[D]=b[D]:y=!0}const S=m?by(o):r?vy(o):fb(o),C=S||cb(o);if(C)return Ue.invalid(C);const $=m?Vu(o):r?zu(o):o,[T,M]=uo($,l,i),O=new Ue({ts:T,zone:i,o:M,loc:d});return o.weekday&&f&&e.weekday!==O.weekday?Ue.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=Rv(e);return Ws(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=qv(e);return Ws(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=jv(e);return Ws(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(it(e)||it(t))throw new Hn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Et.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=gy(o,e,t);return f?Ue.invalid(f):Ws(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Ue.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Yv(e);return Ws(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Hn("need to specify a reason the DateTime is invalid");const i=e instanceof Gn?e:new Gn(e,t);if(Jt.throwOnInvalid)throw new C0(i);return new Ue({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?cr(this).weekYear:NaN}get weekNumber(){return this.isValid?cr(this).weekNumber:NaN}get weekday(){return this.isValid?cr(this).weekday:NaN}get ordinal(){return this.isValid?ur(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Tl(this.year)}get daysInMonth(){return go(this.year,this.month)}get daysInYear(){return this.isValid?sl(this.year):NaN}get weeksInWeekYear(){return this.isValid?bo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=vn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(mn.instance(e),t)}toLocal(){return this.setZone(Jt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Di(e,Jt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=uo(o,l,e)}return Us(this,{ts:s,zone:e})}else return Ue.invalid(Bl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Us(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=vo(e,Yu),i=!it(t.weekYear)||!it(t.weekNumber)||!it(t.weekday),s=!it(t.ordinal),l=!it(t.year),o=!it(t.month)||!it(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new el("Can't mix ordinal dates with month/day");let u;i?u=Vu({...xr(this.c),...t}):it(t.ordinal)?(u={...this.toObject(),...t},it(t.day)&&(u.day=Math.min(go(u.year,u.month),u.day))):u=zu({...ur(this.c),...t});const[f,c]=uo(u,this.o,this.zone);return Us(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e);return Us(this,Uu(this,t))}minus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e).negate();return Us(this,Uu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=rt.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?vn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):fr}toLocaleString(e=Kr,t={}){return this.isValid?vn.create(this.loc.clone(t),e).formatDateTime(this):fr}toLocaleParts(e={}){return this.isValid?vn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=dr(this,o);return r+="T",r+=Wu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?dr(this,e==="extended"):null}toISOWeekDate(){return Ul(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Wu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Ul(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ul(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?dr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Ul(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():fr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return rt.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=I0(t).map(rt.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=ty(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Ue.now(),e,t)}until(e){return this.isValid?Lt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Ue.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Ue.isDateTime))throw new Hn("max requires all arguments be DateTimes");return Tu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Et.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return sb(o,e,t)}static fromStringExplain(e,t,i={}){return Ue.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Kr}static get DATE_MED(){return vg}static get DATE_MED_WITH_WEEKDAY(){return O0}static get DATE_FULL(){return yg}static get DATE_HUGE(){return kg}static get TIME_SIMPLE(){return wg}static get TIME_WITH_SECONDS(){return Sg}static get TIME_WITH_SHORT_OFFSET(){return $g}static get TIME_WITH_LONG_OFFSET(){return Cg}static get TIME_24_SIMPLE(){return Tg}static get TIME_24_WITH_SECONDS(){return Mg}static get TIME_24_WITH_SHORT_OFFSET(){return Og}static get TIME_24_WITH_LONG_OFFSET(){return Eg}static get DATETIME_SHORT(){return Dg}static get DATETIME_SHORT_WITH_SECONDS(){return Ag}static get DATETIME_MED(){return Ig}static get DATETIME_MED_WITH_SECONDS(){return Lg}static get DATETIME_MED_WITH_WEEKDAY(){return E0}static get DATETIME_FULL(){return Pg}static get DATETIME_FULL_WITH_SECONDS(){return Ng}static get DATETIME_HUGE(){return Fg}static get DATETIME_HUGE_WITH_SECONDS(){return Rg}}function Ys(n){if(Ue.isDateTime(n))return n;if(n&&n.valueOf&&ns(n.valueOf()))return Ue.fromJSDate(n);if(n&&typeof n=="object")return Ue.fromObject(n);throw new Hn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const $y=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],Cy=[".mp4",".avi",".mov",".3gp",".wmv"],Ty=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],My=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class B{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||B.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return B.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!B.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!B.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){B.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=B.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!B.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!B.isObject(l)&&!Array.isArray(l)||!B.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!B.isObject(s)&&!Array.isArray(s)||!B.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):B.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||B.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||B.isObject(e)&&Object.keys(e).length>0)&&B.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static formattedFileSize(e){const t=e?Math.floor(Math.log(e)/Math.log(1024)):0;return(e/Math.pow(1024,t)).toFixed(2)*1+" "+["B","KB","MB","GB","TB"][t]}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ss'Z'",24:"yyyy-MM-dd HH:mm:ss.SSS'Z'"},i=t[e.length]||t[19];return Ue.fromFormat(e,i,{zone:"UTC"})}return Ue.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return B.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return B.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{console.warn("Failed to copy.",i)})}static download(e,t){const i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download",t),i.click(),i.remove()}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2));t=t.endsWith(".json")?t:t+".json",B.download(i,t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!$y.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!Cy.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!Ty.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!My.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return B.hasImageExtension(e)?"image":B.hasDocumentExtension(e)?"document":B.hasVideoExtension(e)?"video":B.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(B.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)B.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):B.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var o,r,a,u,f,c,d;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com"),(!(e!=null&&e.$isView)||B.extractColumnsFromQuery((o=e==null?void 0:e.options)==null?void 0:o.query).includes("created"))&&(i.created="2022-01-01 01:00:00.123Z"),(!(e!=null&&e.$isView)||B.extractColumnsFromQuery((r=e==null?void 0:e.options)==null?void 0:r.query).includes("updated"))&&(i.updated="2022-01-01 23:59:59.456Z");for(const m of t){let _=null;m.type==="number"?_=123:m.type==="date"?_="2022-01-01 10:00:00.123Z":m.type==="bool"?_=!0:m.type==="email"?_="test@example.com":m.type==="url"?_="https://example.com":m.type==="json"?_="JSON":m.type==="file"?(_="filename.jpg",((a=m.options)==null?void 0:a.maxSelect)!==1&&(_=[_])):m.type==="select"?(_=(f=(u=m.options)==null?void 0:u.values)==null?void 0:f[0],((c=m.options)==null?void 0:c.maxSelect)!==1&&(_=[_])):m.type==="relation"?(_="RELATION_RECORD_ID",((d=m.options)==null?void 0:d.maxSelect)!==1&&(_=[_])):_="test",i[m.name]=_}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"view":return"ri-table-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=B.isObject(u)&&B.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const o of e)o.type==="auth"?t.push(o):o.type==="base"?i.push(o):s.push(o);function l(o,r){return o.name>r.name?1:o.name{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],c=u.create(a,o,f);u.add(c),e(c.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.code=="KeyS"&&e.formElement&&(i.preventDefault(),i.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",i)))});const t="tinymce_last_direction";e.on("init",()=>{var s;const i=(s=window==null?void 0:window.localStorage)==null?void 0:s.getItem(t);!e.isDirty()&&e.getContent()==""&&i=="rtl"&&e.execCommand("mceDirectionRTL")}),e.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:i=>{i([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"ltr"),tinymce.activeEditor.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTL content",icon:"rtl",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"rtl"),tinymce.activeEditor.execCommand("mceDirectionRTL")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(r=B.stringifyValue(r,i),s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","slug","email","username","label","heading","message","key","id"];for(const o of l){let r=B.stringifyValue(e[o],"");if(r)return r}return i}static stringifyValue(e,t="N/A"){if(B.isEmpty(e))return t;if(typeof e=="boolean")return e?"True":"False";if(typeof e=="string")return e=e.indexOf("<")>=0?B.plainText(e):e,B.truncate(e)||t;if(Array.isArray(e))return e.join(",");if(typeof e=="object")try{return B.truncate(JSON.stringify(e))||t}catch{return t}return""+e}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.$isView)for(let l of B.extractColumnsFromQuery(e.options.query))B.pushUnique(i,t+l);else e.$isAuth?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)B.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,c,d;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s*\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!B.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let m of r){m=m.trim().replaceAll("{PB_TEMP}",",");const h=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(m);if((h==null?void 0:h.length)!=4)continue;const b=(c=(f=h[1])==null?void 0:f.trim())==null?void 0:c.replace(l,"");b&&t.columns.push({name:b,collate:h[2]||"",sort:((d=h[3])==null?void 0:d.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+B.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` +}`,c=`__svelte_${J1(f)}_${r}`,d=sg(n),{stylesheet:m,rules:_}=_o.get(d)||Z1(d,n);_[c]||(_[c]=!0,m.insertRule(`@keyframes ${c} ${f}`,m.cssRules.length));const h=n.style.animation||"";return n.style.animation=`${h?`${h}, `:""}${c} ${i}ms linear ${s}ms 1 both`,go+=1,c}function pl(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),go-=s,go||G1())}function G1(){ya(()=>{go||(_o.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&k(e)}),_o.clear())})}function X1(n,e,t,i){if(!e)return x;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return x;const{delay:l=0,duration:o=300,easing:r=Sl,start:a=qo()+l,end:u=a+o,tick:f=x,css:c}=t(n,{from:e,to:s},i);let d=!0,m=!1,_;function h(){c&&(_=dl(n,0,1,o,l,r,c)),l||(m=!0)}function b(){c&&pl(n,_),d=!1}return jo(y=>{if(!m&&y>=a&&(m=!0),m&&y>=u&&(f(1,0),b()),!d)return!1;if(m){const S=y-a,C=0+1*r(S/o);f(C,1-C)}return!0}),h(),f(0,1),b}function Q1(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,og(n,s)}}function og(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ml;function bi(n){ml=n}function $l(){if(!ml)throw new Error("Function called outside component initialization");return ml}function Gt(n){$l().$$.on_mount.push(n)}function x1(n){$l().$$.after_update.push(n)}function Vo(n){$l().$$.on_destroy.push(n)}function $t(){const n=$l();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=lg(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Ne(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const ks=[],ee=[];let Ss=[];const Hr=[],rg=Promise.resolve();let Br=!1;function ag(){Br||(Br=!0,rg.then(ka))}function fn(){return ag(),rg}function Qe(n){Ss.push(n)}function he(n){Hr.push(n)}const lr=new Set;let hs=0;function ka(){if(hs!==0)return;const n=ml;do{try{for(;hsn.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ss=e}let Hs;function wa(){return Hs||(Hs=Promise.resolve(),Hs.then(()=>{Hs=null})),Hs}function ts(n,e,t){n.dispatchEvent(lg(`${e?"intro":"outro"}${t}`))}const ro=new Set;let si;function ae(){si={r:0,c:[],p:si}}function ue(){si.r||Ee(si.c),si=si.p}function A(n,e){n&&n.i&&(ro.delete(n),n.i(e))}function I(n,e,t,i){if(n&&n.o){if(ro.has(n))return;ro.add(n),si.c.push(()=>{ro.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const Sa={duration:0};function ug(n,e,t){const i={direction:"in"};let s=e(n,t,i),l=!1,o,r,a=0;function u(){o&&pl(n,o)}function f(){const{delay:d=0,duration:m=300,easing:_=Sl,tick:h=x,css:b}=s||Sa;b&&(o=dl(n,0,1,m,d,_,b,a++)),h(0,1);const y=qo()+d,S=y+m;r&&r.abort(),l=!0,Qe(()=>ts(n,!0,"start")),r=jo(C=>{if(l){if(C>=S)return h(1,0),ts(n,!0,"end"),u(),l=!1;if(C>=y){const $=_((C-y)/m);h($,1-$)}}return l})}let c=!1;return{start(){c||(c=!0,pl(n),jt(s)?(s=s(i),wa().then(f)):f())},invalidate(){c=!1},end(){l&&(u(),l=!1)}}}function $a(n,e,t){const i={direction:"out"};let s=e(n,t,i),l=!0,o;const r=si;r.r+=1;function a(){const{delay:u=0,duration:f=300,easing:c=Sl,tick:d=x,css:m}=s||Sa;m&&(o=dl(n,1,0,f,u,c,m));const _=qo()+u,h=_+f;Qe(()=>ts(n,!1,"start")),jo(b=>{if(l){if(b>=h)return d(0,1),ts(n,!1,"end"),--r.r||Ee(r.c),!1;if(b>=_){const y=c((b-_)/f);d(1-y,y)}}return l})}return jt(s)?wa().then(()=>{s=s(i),a()}):a(),{end(u){u&&s.tick&&s.tick(1,0),l&&(o&&pl(n,o),l=!1)}}}function je(n,e,t,i){const s={direction:"both"};let l=e(n,t,s),o=i?0:1,r=null,a=null,u=null;function f(){u&&pl(n,u)}function c(m,_){const h=m.b-o;return _*=Math.abs(h),{a:o,b:m.b,d:h,duration:_,start:m.start,end:m.start+_,group:m.group}}function d(m){const{delay:_=0,duration:h=300,easing:b=Sl,tick:y=x,css:S}=l||Sa,C={start:qo()+_,b:m};m||(C.group=si,si.r+=1),r||a?a=C:(S&&(f(),u=dl(n,o,m,h,_,b,S)),m&&y(0,1),r=c(C,h),Qe(()=>ts(n,m,"start")),jo($=>{if(a&&$>a.start&&(r=c(a,h),a=null,ts(n,r.b,"start"),S&&(f(),u=dl(n,o,r.b,r.duration,0,b,l.css))),r){if($>=r.end)y(o=r.b,1-o),ts(n,r.b,"end"),a||(r.b?f():--r.group.r||Ee(r.group.c)),r=null;else if($>=r.start){const T=$-r.start;o=r.a+r.d*b(T/r.duration),y(o,1-o)}}return!!(r||a)}))}return{run(m){jt(l)?wa().then(()=>{l=l(s),d(m)}):d(m)},end(){f(),r=a=null}}}function gu(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(ae(),I(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),ue())}):e.block.d(1),u.c(),A(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&ka()}if(V1(n)){const s=$l();if(n.then(l=>{bi(s),i(e.then,1,e.value,l),bi(null)},l=>{if(bi(s),i(e.catch,2,e.error,l),bi(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function n0(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function as(n,e){n.d(1),e.delete(n.key)}function Bt(n,e){I(n,1,1,()=>{e.delete(n.key)})}function i0(n,e){n.f(),Bt(n,e)}function bt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,m=l.length,_=d;const h={};for(;_--;)h[n[_].key]=_;const b=[],y=new Map,S=new Map,C=[];for(_=m;_--;){const O=c(s,l,_),D=t(O);let L=o.get(D);L?i&&C.push(()=>L.p(O,e)):(L=u(D,O),L.c()),y.set(D,b[_]=L),D in h&&S.set(D,Math.abs(_-h[D]))}const $=new Set,T=new Set;function M(O){A(O,1),O.m(r,f),o.set(O.key,O),f=O.first,m--}for(;d&&m;){const O=b[m-1],D=n[d-1],L=O.key,P=D.key;O===D?(f=O.first,d--,m--):y.has(P)?!o.has(L)||$.has(L)?M(O):T.has(P)?d--:S.get(L)>S.get(P)?(T.add(L),M(O)):($.add(P),d--):(a(D,o),d--)}for(;d--;){const O=n[d];y.has(O.key)||a(O,o)}for(;m;)M(b[m-1]);return Ee(C),b}function Mt(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Xt(n){return typeof n=="object"&&n!==null?n:{}}function de(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function H(n){n&&n.c()}function V(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||Qe(()=>{const o=n.$$.on_mount.map(eg).filter(jt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Ee(o),n.$$.on_mount=[]}),l.forEach(Qe)}function z(n,e){const t=n.$$;t.fragment!==null&&(t0(t.after_update),Ee(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function s0(n,e){n.$$.dirty[0]===-1&&(ks.push(n),ag(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const _=m.length?m[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=_)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](_),f&&s0(n,c)),d}):[],u.update(),f=!0,Ee(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=K1(e.target);u.fragment&&u.fragment.l(c),c.forEach(k)}else u.fragment&&u.fragment.c();e.intro&&A(n.$$.fragment),V(n,e.target,e.anchor,e.customElement),ka()}bi(a)}class ge{$destroy(){z(this,1),this.$destroy=x}$on(e,t){if(!jt(t))return x;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!z1(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function Lt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&t&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function cg(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return fg(t,o=>{let r=!1;const a=[];let u=0,f=x;const c=()=>{if(u)return;f();const m=e(i?a[0]:a,o);l?o(m):f=jt(m)?m:x},d=s.map((m,_)=>va(m,h=>{a[_]=h,u&=~(1<<_),r&&c()},()=>{u|=1<<_}));return r=!0,c(),function(){Ee(d),f(),r=!1}})}function dg(n,e){if(n instanceof RegExp)return{keys:!1,pattern:n};var t,i,s,l,o=[],r="",a=n.split("/");for(a[0]||a.shift();s=a.shift();)t=s[0],t==="*"?(o.push("wild"),r+="/(.*)"):t===":"?(i=s.indexOf("?",1),l=s.indexOf(".",1),o.push(s.substring(1,~i?i:~l?l:s.length)),r+=~i&&!~l?"(?:/([^/]+?))?":"/([^/]+?)",~l&&(r+=(~i?"?":"")+"\\"+s.substring(l))):r+="/"+s;return{keys:o,pattern:new RegExp("^"+r+(e?"(?=$|/)":"/?$"),"i")}}function l0(n){let e,t,i;const s=[n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{z(f,1)}),ue()}l?(e=Rt(l,o()),e.$on("routeEvent",r[7]),H(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&z(e,r)}}}function o0(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{z(f,1)}),ue()}l?(e=Rt(l,o()),e.$on("routeEvent",r[6]),H(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&z(e,r)}}}function r0(n){let e,t,i,s;const l=[o0,l0],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function bu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const zo=fg(null,function(e){e(bu());const t=()=>{e(bu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});cg(zo,n=>n.location);const Ca=cg(zo,n=>n.querystring),vu=In(void 0);async function ji(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await fn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function on(n,e){if(e=ku(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return yu(n,e),{update(t){t=ku(t),yu(n,t)}}}function a0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function yu(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||u0(i.currentTarget.getAttribute("href"))})}function ku(n){return n&&typeof n=="string"?{href:n}:n||{}}function u0(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function f0(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(T,M){if(!M||typeof M!="function"&&(typeof M!="object"||M._sveltesparouter!==!0))throw Error("Invalid component object");if(!T||typeof T=="string"&&(T.length<1||T.charAt(0)!="/"&&T.charAt(0)!="*")||typeof T=="object"&&!(T instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:O,keys:D}=dg(T);this.path=T,typeof M=="object"&&M._sveltesparouter===!0?(this.component=M.component,this.conditions=M.conditions||[],this.userData=M.userData,this.props=M.props||{}):(this.component=()=>Promise.resolve(M),this.conditions=[],this.props={}),this._pattern=O,this._keys=D}match(T){if(s){if(typeof s=="string")if(T.startsWith(s))T=T.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const L=T.match(s);if(L&&L[0])T=T.substr(L[0].length)||"/";else return null}}const M=this._pattern.exec(T);if(M===null)return null;if(this._keys===!1)return M;const O={};let D=0;for(;D{r.push(new o(T,$))}):Object.keys(i).forEach($=>{r.push(new o($,i[$]))});let a=null,u=null,f={};const c=$t();async function d($,T){await fn(),c($,T)}let m=null,_=null;l&&(_=$=>{$.state&&($.state.__svelte_spa_router_scrollY||$.state.__svelte_spa_router_scrollX)?m=$.state:m=null},window.addEventListener("popstate",_),x1(()=>{a0(m)}));let h=null,b=null;const y=zo.subscribe(async $=>{h=$;let T=0;for(;T{vu.set(u)});return}t(0,a=null),b=null,vu.set(void 0)});Vo(()=>{y(),_&&window.removeEventListener("popstate",_)});function S($){Ne.call(this,n,$)}function C($){Ne.call(this,n,$)}return n.$$set=$=>{"routes"in $&&t(3,i=$.routes),"prefix"in $&&t(4,s=$.prefix),"restoreScrollState"in $&&t(5,l=$.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,S,C]}class c0 extends ge{constructor(e){super(),_e(this,e,f0,r0,me,{routes:3,prefix:4,restoreScrollState:5})}}const ao=[];let pg;function mg(n){const e=n.pattern.test(pg);wu(n,n.className,e),wu(n,n.inactiveClassName,!e)}function wu(n,e,t){(e||"").split(" ").forEach(i=>{i&&(n.node.classList.remove(i),t&&n.node.classList.add(i))})}zo.subscribe(n=>{pg=n.location+(n.querystring?"?"+n.querystring:""),ao.map(mg)});function Vn(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?dg(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ao.push(i),mg(i),{destroy(){ao.splice(ao.indexOf(i),1)}}}const d0="modulepreload",p0=function(n,e){return new URL(n,e).href},Su={},at=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=p0(l,i),l in Su)return;Su[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":d0,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e()).catch(l=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l})};var Ur=function(n,e){return Ur=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Ur(n,e)};function tn(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Ur(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Wr=function(){return Wr=Object.assign||function(e){for(var t,i=1,s=arguments.length;i0&&s[s.length-1])||c[0]!==6&&c[0]!==2)){o=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0&&(!t.exp||t.exp-e>Date.now()/1e3))}hg=typeof atob=="function"?atob:function(n){var e=String(n).replace(/=+$/,"");if(e.length%4==1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(var t,i,s=0,l=0,o="";i=e.charAt(l++);~i&&(t=s%4?64*t+i:i,s++%4)?o+=String.fromCharCode(255&t>>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Cl=function(){function n(e){e===void 0&&(e={}),this.$load(e||{})}return n.prototype.load=function(e){return this.$load(e)},n.prototype.$load=function(e){for(var t=0,i=Object.entries(e);t4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof yi&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=$u(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?e:1,this.perPage=t>=0?t:0,this.totalItems=i>=0?i:0,this.totalPages=s>=0?s:0,this.items=l||[]},Ta=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return tn(e,n),e.prototype.getFullList=function(t,i){if(typeof t=="number")return this._getFullList(this.baseCrudPath,t,i);var s=Object.assign({},t,i),l=500;return s.batch&&(l=s.batch,delete s.batch),this._getFullList(this.baseCrudPath,l,s)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return tn(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=500),s===void 0&&(s={}),s=Object.assign({skipTotal:1},s);var o=[],r=function(a){return Qt(l,void 0,void 0,function(){return xt(this,function(u){return[2,this._getList(t,a,i||500,s).then(function(f){var c=f.items;return o=o.concat(c),c.length==f.perPage?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u1||typeof(t==null?void 0:t[0])=="string"?(console.warn("PocketBase: This form of authWithOAuth2() is deprecated and may get removed in the future. Please replace with authWithOAuth2Code() OR use the authWithOAuth2() realtime form as shown in https://pocketbase.io/docs/authentication/#oauth2-integration."),[2,this.authWithOAuth2Code((t==null?void 0:t[0])||"",(t==null?void 0:t[1])||"",(t==null?void 0:t[2])||"",(t==null?void 0:t[3])||"",(t==null?void 0:t[4])||{},(t==null?void 0:t[5])||{},(t==null?void 0:t[6])||{})]):(s=(t==null?void 0:t[0])||{},[4,this.listAuthMethods()]);case 1:if(l=u.sent(),!(o=l.authProviders.find(function(f){return f.name===s.provider})))throw new Ai(new Error('Missing or invalid provider "'.concat(s.provider,'".')));return r=this.client.buildUrl("/api/oauth2-redirect"),[2,new Promise(function(f,c){return Qt(a,void 0,void 0,function(){var d,m,_,h,b,y=this;return xt(this,function(S){switch(S.label){case 0:return S.trys.push([0,3,,4]),[4,this.client.realtime.subscribe("@oauth2",function(C){return Qt(y,void 0,void 0,function(){var $,T,M;return xt(this,function(O){switch(O.label){case 0:$=this.client.realtime.clientId,O.label=1;case 1:if(O.trys.push([1,3,,4]),d(),!C.state||$!==C.state)throw new Error("State parameters don't match.");return[4,this.authWithOAuth2Code(o.name,C.code,o.codeVerifier,r,s.createData,s.body,s.query)];case 2:return T=O.sent(),f(T),[3,4];case 3:return M=O.sent(),c(new Ai(M)),[3,4];case 4:return[2]}})})})];case 1:return d=S.sent(),m={state:this.client.realtime.clientId},!((b=s.scopes)===null||b===void 0)&&b.length&&(m.scope=s.scopes.join(" ")),_=this._replaceQueryParams(o.authUrl+r,m),[4,s.urlCallback?s.urlCallback(_):this._defaultUrlCallback(_)];case 2:return S.sent(),[3,4];case 3:return h=S.sent(),c(new Ai(h)),[3,4];case 4:return[2]}})})})]}})})},e.prototype.authRefresh=function(t,i){var s=this;return t===void 0&&(t={}),i===void 0&&(i={}),this.client.send(this.baseCollectionPath+"/auth-refresh",{method:"POST",params:i,body:t}).then(function(l){return s.authResponse(l)})},e.prototype.requestPasswordReset=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-password-reset",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmPasswordReset=function(t,i,s,l,o){return l===void 0&&(l={}),o===void 0&&(o={}),l=Object.assign({token:t,password:i,passwordConfirm:s},l),this.client.send(this.baseCollectionPath+"/confirm-password-reset",{method:"POST",params:o,body:l}).then(function(){return!0})},e.prototype.requestVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({email:t},i),this.client.send(this.baseCollectionPath+"/request-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmVerification=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({token:t},i),this.client.send(this.baseCollectionPath+"/confirm-verification",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.requestEmailChange=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),i=Object.assign({newEmail:t},i),this.client.send(this.baseCollectionPath+"/request-email-change",{method:"POST",params:s,body:i}).then(function(){return!0})},e.prototype.confirmEmailChange=function(t,i,s,l){return s===void 0&&(s={}),l===void 0&&(l={}),s=Object.assign({token:t,password:i},s),this.client.send(this.baseCollectionPath+"/confirm-email-change",{method:"POST",params:l,body:s}).then(function(){return!0})},e.prototype.listExternalAuths=function(t,i){return i===void 0&&(i={}),this.client.send(this.baseCrudPath+"/"+encodeURIComponent(t)+"/external-auths",{method:"GET",params:i}).then(function(s){var l=[];if(Array.isArray(s))for(var o=0,r=s;o=0&&(s=t.substring(0,t.indexOf("?")),l=t.substring(t.indexOf("?")+1));for(var o={},r=0,a=l.split("&");r"u"||!(window!=null&&window.open))throw new Ai(new Error("Not in a browser context - please pass a custom urlCallback function."));var i=1024,s=768,l=window.innerWidth,o=window.innerHeight,r=l/2-(i=i>l?l:i)/2,a=o/2-(s=s>o?o:s)/2;window.open(t,"oauth2-popup","width="+i+",height="+s+",top="+a+",left="+r+",resizable,menubar=no")},e}(Ta),kn=function(e){e===void 0&&(e={}),this.id=e.id!==void 0?e.id:"",this.name=e.name!==void 0?e.name:"",this.type=e.type!==void 0?e.type:"text",this.system=!!e.system,this.required=!!e.required,this.options=typeof e.options=="object"&&e.options!==null?e.options:{}},yn=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return tn(e,n),e.prototype.$load=function(t){n.prototype.$load.call(this,t),this.system=!!t.system,this.name=typeof t.name=="string"?t.name:"",this.type=typeof t.type=="string"?t.type:"base",this.options=t.options!==void 0&&t.options!==null?t.options:{},this.indexes=Array.isArray(t.indexes)?t.indexes:[],this.listRule=typeof t.listRule=="string"?t.listRule:null,this.viewRule=typeof t.viewRule=="string"?t.viewRule:null,this.createRule=typeof t.createRule=="string"?t.createRule:null,this.updateRule=typeof t.updateRule=="string"?t.updateRule:null,this.deleteRule=typeof t.deleteRule=="string"?t.deleteRule:null,t.schema=Array.isArray(t.schema)?t.schema:[],this.schema=[];for(var i=0,s=t.schema;i=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return Qt(this,void 0,void 0,function(){return xt(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:this.getSubscriptionsCancelKey()}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getSubscriptionsCancelKey=function(){return"realtime_"+this.clientId},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return Qt(t,void 0,void 0,function(){var l;return xt(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new Ai({url:M.url,status:M.status,data:O});return[2,O]}})})}).catch(function(M){throw new Ai(M)})]}})})},n.prototype.getFileUrl=function(e,t,i){return i===void 0&&(i={}),this.files.getUrl(e,t,i)},n.prototype.buildUrl=function(e){var t,i=this.baseUrl;return typeof window>"u"||!window.location||i.startsWith("https://")||i.startsWith("http://")||(i=!((t=window.location.origin)===null||t===void 0)&&t.endsWith("/")?window.location.origin.substring(0,window.location.origin.length-1):window.location.origin||"",this.baseUrl.startsWith("/")||(i+=window.location.pathname||"/",i+=i.endsWith("/")?"":"/"),i+=this.baseUrl),e&&(i+=i.endsWith("/")?"":"/",i+=e.startsWith("/")?e.substring(1):e),i},n.prototype.isFormData=function(e){return e&&(e.constructor.name==="FormData"||typeof FormData<"u"&&e instanceof FormData)},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function ns(n){return typeof n=="number"}function Bo(n){return typeof n=="number"&&n%1===0}function I0(n){return typeof n=="string"}function L0(n){return Object.prototype.toString.call(n)==="[object Date]"}function Vg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function P0(n){return Array.isArray(n)?n:[n]}function Tu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function N0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Es(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function vi(n,e,t){return Bo(n)&&n>=e&&n<=t}function F0(n,e){return n-e*Math.floor(n/e)}function Wt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function Ei(n){if(!(it(n)||n===null||n===""))return parseInt(n,10)}function Ui(n){if(!(it(n)||n===null||n===""))return parseFloat(n)}function Ma(n){if(!(it(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function Oa(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Tl(n){return n%4===0&&(n%100!==0||n%400===0)}function sl(n){return Tl(n)?366:365}function bo(n,e){const t=F0(e-1,12)+1,i=n+(e-t)/12;return t===2?Tl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ea(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function vo(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function Jr(n){return n>99?n:n>60?1900+n:2e3+n}function zg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Uo(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function Hg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new Hn(`Invalid unit value ${n}`);return e}function yo(n,e){const t={};for(const i in n)if(Es(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Hg(s)}return t}function ll(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${Wt(t,2)}:${Wt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${Wt(t,2)}${Wt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Wo(n){return N0(n,["hour","minute","second","millisecond"])}const Bg=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,R0=["January","February","March","April","May","June","July","August","September","October","November","December"],Ug=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],q0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Wg(n){switch(n){case"narrow":return[...q0];case"short":return[...Ug];case"long":return[...R0];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Yg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Kg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],j0=["M","T","W","T","F","S","S"];function Jg(n){switch(n){case"narrow":return[...j0];case"short":return[...Kg];case"long":return[...Yg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Zg=["AM","PM"],V0=["Before Christ","Anno Domini"],z0=["BC","AD"],H0=["B","A"];function Gg(n){switch(n){case"narrow":return[...H0];case"short":return[...z0];case"long":return[...V0];default:return null}}function B0(n){return Zg[n.hour<12?0:1]}function U0(n,e){return Jg(e)[n.weekday-1]}function W0(n,e){return Wg(e)[n.month-1]}function Y0(n,e){return Gg(e)[n.year<0?0:1]}function K0(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function Mu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const J0={D:Kr,DD:kg,DDD:wg,DDDD:Sg,t:$g,tt:Cg,ttt:Tg,tttt:Mg,T:Og,TT:Eg,TTT:Dg,TTTT:Ag,f:Ig,ff:Pg,fff:Fg,ffff:qg,F:Lg,FF:Ng,FFF:Rg,FFFF:jg};class vn{static create(e,t={}){return new vn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return J0[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return Wt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(m,_)=>this.loc.extract(e,m,_),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",r=()=>i?B0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,_)=>i?W0(e,m):l(_?{month:m}:{month:m,day:"numeric"},"month"),u=(m,_)=>i?U0(e,m):l(_?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),f=m=>{const _=vn.macroTokenToFormatOpts(m);return _?this.formatWithSystemDefault(e,_):m},c=m=>i?Y0(e,m):l({era:m},"era"),d=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(m)}};return Mu(vn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=vn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return Mu(l,s(r))}}class Gn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ml{get type(){throw new Mi}get name(){throw new Mi}get ianaName(){return this.name}get isUniversal(){throw new Mi}offsetName(e,t){throw new Mi}formatOffset(e,t){throw new Mi}offset(e){throw new Mi}equals(e){throw new Mi}get isValid(){throw new Mi}}let or=null;class Da extends Ml{static get instance(){return or===null&&(or=new Da),or}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return zg(e,t,i)}formatOffset(e,t){return ll(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let uo={};function Z0(n){return uo[n]||(uo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),uo[n]}const G0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function X0(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function Q0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?_:1e3+_,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let rr=null;class mn extends Ml{static get utcInstance(){return rr===null&&(rr=new mn(0)),rr}static instance(e){return e===0?mn.utcInstance:new mn(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new mn(Uo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ll(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ll(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ll(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class x0 extends Ml{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Di(n,e){if(it(n)||n===null)return e;if(n instanceof Ml)return n;if(I0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?mn.utcInstance:mn.parseSpecifier(t)||ki.create(n)}else return ns(n)?mn.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new x0(n)}let Ou=()=>Date.now(),Eu="system",Du=null,Au=null,Iu=null,Lu;class Jt{static get now(){return Ou}static set now(e){Ou=e}static set defaultZone(e){Eu=e}static get defaultZone(){return Di(Eu,Da.instance)}static get defaultLocale(){return Du}static set defaultLocale(e){Du=e}static get defaultNumberingSystem(){return Au}static set defaultNumberingSystem(e){Au=e}static get defaultOutputCalendar(){return Iu}static set defaultOutputCalendar(e){Iu=e}static get throwOnInvalid(){return Lu}static set throwOnInvalid(e){Lu=e}static resetCaches(){Et.resetCache(),ki.resetCache()}}let Pu={};function ev(n,e={}){const t=JSON.stringify([n,e]);let i=Pu[t];return i||(i=new Intl.ListFormat(n,e),Pu[t]=i),i}let Zr={};function Gr(n,e={}){const t=JSON.stringify([n,e]);let i=Zr[t];return i||(i=new Intl.DateTimeFormat(n,e),Zr[t]=i),i}let Xr={};function tv(n,e={}){const t=JSON.stringify([n,e]);let i=Xr[t];return i||(i=new Intl.NumberFormat(n,e),Xr[t]=i),i}let Qr={};function nv(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Qr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Qr[s]=l),l}let tl=null;function iv(){return tl||(tl=new Intl.DateTimeFormat().resolvedOptions().locale,tl)}function sv(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Gr(n).resolvedOptions()}catch{t=Gr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function lv(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function ov(n){const e=[];for(let t=1;t<=12;t++){const i=Ue.utc(2016,t,1);e.push(n(i))}return e}function rv(n){const e=[];for(let t=1;t<=7;t++){const i=Ue.utc(2016,11,13+t);e.push(n(i))}return e}function zl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function av(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class uv{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=tv(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Oa(e,3);return Wt(t,this.padTo)}}}class fv{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ki.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:Ue.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Gr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class cv{constructor(e,t,i){this.opts={style:"long",...i},!t&&Vg()&&(this.rtf=nv(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):K0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Et{static fromOpts(e){return Et.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Jt.defaultLocale,o=l||(s?"en-US":iv()),r=t||Jt.defaultNumberingSystem,a=i||Jt.defaultOutputCalendar;return new Et(o,r,a,l)}static resetCache(){tl=null,Zr={},Xr={},Qr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return Et.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=sv(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=lv(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=av(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Et.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return zl(this,e,i,Wg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=ov(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return zl(this,e,i,Jg,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=rv(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return zl(this,void 0,e,()=>Zg,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ue.utc(2016,11,13,9),Ue.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return zl(this,e,t,Gg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ue.utc(-40,1,1),Ue.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new uv(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new fv(e,this.intl,t)}relFormatter(e={}){return new cv(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ev(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Fs(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Rs(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function qs(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function Xg(...n){return(e,t)=>{const i={};let s;for(s=0;sm!==void 0&&(_||m&&f)?-m:m;return[{years:d(Ui(t)),months:d(Ui(i)),weeks:d(Ui(s)),days:d(Ui(l)),hours:d(Ui(o)),minutes:d(Ui(r)),seconds:d(Ui(a),a==="-0"),milliseconds:d(Ma(u),c)}]}const $v={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function La(n,e,t,i,s,l,o){const r={year:e.length===2?Jr(Ei(e)):Ei(e),month:Ug.indexOf(t)+1,day:Ei(i),hour:Ei(s),minute:Ei(l)};return o&&(r.second=Ei(o)),n&&(r.weekday=n.length>3?Yg.indexOf(n)+1:Kg.indexOf(n)+1),r}const Cv=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Tv(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=La(e,s,i,t,l,o,r);let m;return a?m=$v[a]:u?m=0:m=Uo(f,c),[d,new mn(m)]}function Mv(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Ov=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ev=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Dv=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Nu(n){const[,e,t,i,s,l,o,r]=n;return[La(e,s,i,t,l,o,r),mn.utcInstance]}function Av(n){const[,e,t,i,s,l,o,r]=n;return[La(e,r,t,i,s,l,o),mn.utcInstance]}const Iv=Fs(pv,Ia),Lv=Fs(mv,Ia),Pv=Fs(hv,Ia),Nv=Fs(xg),tb=Rs(yv,js,Ol,El),Fv=Rs(_v,js,Ol,El),Rv=Rs(gv,js,Ol,El),qv=Rs(js,Ol,El);function jv(n){return qs(n,[Iv,tb],[Lv,Fv],[Pv,Rv],[Nv,qv])}function Vv(n){return qs(Mv(n),[Cv,Tv])}function zv(n){return qs(n,[Ov,Nu],[Ev,Nu],[Dv,Av])}function Hv(n){return qs(n,[wv,Sv])}const Bv=Rs(js);function Uv(n){return qs(n,[kv,Bv])}const Wv=Fs(bv,vv),Yv=Fs(eb),Kv=Rs(js,Ol,El);function Jv(n){return qs(n,[Wv,tb],[Yv,Kv])}const Zv="Invalid Duration",nb={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Gv={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...nb},Fn=146097/400,gs=146097/4800,Xv={years:{quarters:4,months:12,weeks:Fn/7,days:Fn,hours:Fn*24,minutes:Fn*24*60,seconds:Fn*24*60*60,milliseconds:Fn*24*60*60*1e3},quarters:{months:3,weeks:Fn/28,days:Fn/4,hours:Fn*24/4,minutes:Fn*24*60/4,seconds:Fn*24*60*60/4,milliseconds:Fn*24*60*60*1e3/4},months:{weeks:gs/7,days:gs,hours:gs*24,minutes:gs*24*60,seconds:gs*24*60*60,milliseconds:gs*24*60*60*1e3},...nb},Gi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Qv=Gi.slice(0).reverse();function Wi(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new rt(i)}function xv(n){return n<0?Math.floor(n):Math.ceil(n)}function ib(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?xv(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function ey(n,e){Qv.reduce((t,i)=>it(e[i])?t:(t&&ib(n,e,t,e,i),i),null)}class rt{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||Et.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Xv:Gv,this.isLuxonDuration=!0}static fromMillis(e,t){return rt.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Hn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new rt({values:yo(e,rt.normalizeUnit),loc:Et.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(ns(e))return rt.fromMillis(e);if(rt.isDuration(e))return e;if(typeof e=="object")return rt.fromObject(e);throw new Hn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Hv(e);return i?rt.fromObject(i,t):rt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Uv(e);return i?rt.fromObject(i,t):rt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Hn("need to specify a reason the Duration is invalid");const i=e instanceof Gn?e:new Gn(e,t);if(Jt.throwOnInvalid)throw new E0(i);return new rt({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new yg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?vn.create(this.loc,i).formatDurationFromString(this,e):Zv}toHuman(e={}){const t=Gi.map(i=>{const s=this.values[i];return it(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Oa(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e),i={};for(const s of Gi)(Es(t.values,s)||Es(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Wi(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=Hg(e(this.values[i],i));return Wi(this,{values:t},!0)}get(e){return this[rt.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...yo(e,rt.normalizeUnit)};return Wi(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Wi(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return ey(this.matrix,e),Wi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>rt.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Gi)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;ns(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)Gi.indexOf(u)>Gi.indexOf(o)&&ib(this.matrix,s,u,t,o)}else ns(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Wi(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Wi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Gi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Bs="Invalid Interval";function ty(n,e){return!n||!n.isValid?Pt.invalid("missing or invalid start"):!e||!e.isValid?Pt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?Pt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Ys).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(Pt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=rt.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(Pt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:Pt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Pt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(Pt.fromDateTimes(t,a.time)),t=null);return Pt.merge(s)}difference(...e){return Pt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Bs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Bs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Bs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Bs}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Bs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):rt.invalid(this.invalidReason)}mapEndpoints(e){return Pt.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Jt.defaultZone){const t=Ue.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ki.isValidZone(e)}static normalizeZone(e){return Di(e,Jt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Et.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||Et.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Et.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Et.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Et.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Et.create(t,null,"gregory").eras(e)}static features(){return{relative:Vg()}}}function Fu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(rt.fromMillis(i).as("days"))}function ny(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=Fu(r,a);return(u-u%7)/7}],["days",Fu]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function iy(n,e,t,i){let[s,l,o,r]=ny(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?rt.fromMillis(a,i).shiftTo(...u).plus(f):f}const Pa={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Ru={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},sy=Pa.hanidec.replace(/[\[|\]]/g,"").split("");function ly(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function Jn({numberingSystem:n},e=""){return new RegExp(`${Pa[n||"latn"]}${e}`)}const oy="missing Intl.DateTimeFormat.formatToParts support";function ut(n,e=t=>t){return{regex:n,deser:([t])=>e(ly(t))}}const ry=String.fromCharCode(160),sb=`[ ${ry}]`,lb=new RegExp(sb,"g");function ay(n){return n.replace(/\./g,"\\.?").replace(lb,sb)}function qu(n){return n.replace(/\./g,"").replace(lb," ").toLowerCase()}function Zn(n,e){return n===null?null:{regex:RegExp(n.map(ay).join("|")),deser:([t])=>n.findIndex(i=>qu(t)===qu(i))+e}}function ju(n,e){return{regex:n,deser:([,t,i])=>Uo(t,i),groups:e}}function ar(n){return{regex:n,deser:([e])=>e}}function uy(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function fy(n,e){const t=Jn(e),i=Jn(e,"{2}"),s=Jn(e,"{3}"),l=Jn(e,"{4}"),o=Jn(e,"{6}"),r=Jn(e,"{1,2}"),a=Jn(e,"{1,3}"),u=Jn(e,"{1,6}"),f=Jn(e,"{1,9}"),c=Jn(e,"{2,4}"),d=Jn(e,"{4,6}"),m=b=>({regex:RegExp(uy(b.val)),deser:([y])=>y,literal:!0}),h=(b=>{if(n.literal)return m(b);switch(b.val){case"G":return Zn(e.eras("short",!1),0);case"GG":return Zn(e.eras("long",!1),0);case"y":return ut(u);case"yy":return ut(c,Jr);case"yyyy":return ut(l);case"yyyyy":return ut(d);case"yyyyyy":return ut(o);case"M":return ut(r);case"MM":return ut(i);case"MMM":return Zn(e.months("short",!0,!1),1);case"MMMM":return Zn(e.months("long",!0,!1),1);case"L":return ut(r);case"LL":return ut(i);case"LLL":return Zn(e.months("short",!1,!1),1);case"LLLL":return Zn(e.months("long",!1,!1),1);case"d":return ut(r);case"dd":return ut(i);case"o":return ut(a);case"ooo":return ut(s);case"HH":return ut(i);case"H":return ut(r);case"hh":return ut(i);case"h":return ut(r);case"mm":return ut(i);case"m":return ut(r);case"q":return ut(r);case"qq":return ut(i);case"s":return ut(r);case"ss":return ut(i);case"S":return ut(a);case"SSS":return ut(s);case"u":return ar(f);case"uu":return ar(r);case"uuu":return ut(t);case"a":return Zn(e.meridiems(),0);case"kkkk":return ut(l);case"kk":return ut(c,Jr);case"W":return ut(r);case"WW":return ut(i);case"E":case"c":return ut(t);case"EEE":return Zn(e.weekdays("short",!1,!1),1);case"EEEE":return Zn(e.weekdays("long",!1,!1),1);case"ccc":return Zn(e.weekdays("short",!0,!1),1);case"cccc":return Zn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return ju(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return ju(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return ar(/[a-z_+-/]{1,256}?/i);default:return m(b)}})(n)||{invalidReason:oy};return h.token=n,h}const cy={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function dy(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=cy[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function py(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function my(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Es(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function hy(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return it(n.z)||(t=ki.create(n.z)),it(n.Z)||(t||(t=new mn(n.Z)),i=n.Z),it(n.q)||(n.M=(n.q-1)*3+1),it(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),it(n.u)||(n.S=Ma(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let ur=null;function _y(){return ur||(ur=Ue.fromMillis(1555555555555)),ur}function gy(n,e){if(n.literal)return n;const t=vn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=vn.create(e,t).formatDateTimeParts(_y()).map(o=>dy(o,e,t));return l.includes(void 0)?n:l}function by(n,e){return Array.prototype.concat(...n.map(t=>gy(t,e)))}function ob(n,e,t){const i=by(vn.parseFormat(t),n),s=i.map(o=>fy(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=py(s),a=RegExp(o,"i"),[u,f]=my(e,a,r),[c,d,m]=f?hy(f):[null,null,void 0];if(Es(f,"a")&&Es(f,"H"))throw new el("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:m}}}function vy(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=ob(n,e,t);return[i,s,l,o]}const rb=[0,31,59,90,120,151,181,212,243,273,304,334],ab=[0,31,60,91,121,152,182,213,244,274,305,335];function Un(n,e){return new Gn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function ub(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function fb(n,e,t){return t+(Tl(n)?ab:rb)[e-1]}function cb(n,e){const t=Tl(n)?ab:rb,i=t.findIndex(l=>lvo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Wo(n)}}function Vu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=ub(e,1,4),l=sl(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=sl(r)):o>l?(r=e+1,o-=sl(e)):r=e;const{month:a,day:u}=cb(r,o);return{year:r,month:a,day:u,...Wo(n)}}function fr(n){const{year:e,month:t,day:i}=n,s=fb(e,t,i);return{year:e,ordinal:s,...Wo(n)}}function zu(n){const{year:e,ordinal:t}=n,{month:i,day:s}=cb(e,t);return{year:e,month:i,day:s,...Wo(n)}}function yy(n){const e=Bo(n.weekYear),t=vi(n.weekNumber,1,vo(n.weekYear)),i=vi(n.weekday,1,7);return e?t?i?!1:Un("weekday",n.weekday):Un("week",n.week):Un("weekYear",n.weekYear)}function ky(n){const e=Bo(n.year),t=vi(n.ordinal,1,sl(n.year));return e?t?!1:Un("ordinal",n.ordinal):Un("year",n.year)}function db(n){const e=Bo(n.year),t=vi(n.month,1,12),i=vi(n.day,1,bo(n.year,n.month));return e?t?i?!1:Un("day",n.day):Un("month",n.month):Un("year",n.year)}function pb(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=vi(e,0,23)||e===24&&t===0&&i===0&&s===0,o=vi(t,0,59),r=vi(i,0,59),a=vi(s,0,999);return l?o?r?a?!1:Un("millisecond",s):Un("second",i):Un("minute",t):Un("hour",e)}const cr="Invalid DateTime",Hu=864e13;function Bl(n){return new Gn("unsupported zone",`the zone "${n.name}" is not supported`)}function dr(n){return n.weekData===null&&(n.weekData=xr(n.c)),n.weekData}function Us(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new Ue({...t,...e,old:t})}function mb(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Bu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function fo(n,e,t){return mb(Ea(n),e,t)}function Uu(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,bo(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=rt.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=Ea(l);let[a,u]=mb(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Ws(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=Ue.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return Ue.invalid(new Gn("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Ul(n,e,t=!0){return n.isValid?vn.create(Et.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function pr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=Wt(n.c.year,t?6:4),e?(i+="-",i+=Wt(n.c.month),i+="-",i+=Wt(n.c.day)):(i+=Wt(n.c.month),i+=Wt(n.c.day)),i}function Wu(n,e,t,i,s,l){let o=Wt(n.c.hour);return e?(o+=":",o+=Wt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=Wt(n.c.minute),(n.c.second!==0||!t)&&(o+=Wt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=Wt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=Wt(Math.trunc(-n.o/60)),o+=":",o+=Wt(Math.trunc(-n.o%60))):(o+="+",o+=Wt(Math.trunc(n.o/60)),o+=":",o+=Wt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const hb={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},wy={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Sy={ordinal:1,hour:0,minute:0,second:0,millisecond:0},_b=["year","month","day","hour","minute","second","millisecond"],$y=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Cy=["year","ordinal","hour","minute","second","millisecond"];function Yu(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new yg(n);return e}function Ku(n,e){const t=Di(e.zone,Jt.defaultZone),i=Et.fromObject(e),s=Jt.now();let l,o;if(it(n.year))l=s;else{for(const u of _b)it(n[u])&&(n[u]=hb[u]);const r=db(n)||pb(n);if(r)return Ue.invalid(r);const a=t.offset(s);[l,o]=fo(n,a,t)}return new Ue({ts:l,zone:t,loc:i,o})}function Ju(n,e,t){const i=it(t.round)?!0:t.round,s=(o,r)=>(o=Oa(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Zu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class Ue{constructor(e){const t=e.zone||Jt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new Gn("invalid input"):null)||(t.isValid?null:Bl(t));this.ts=it(e.ts)?Jt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Bu(this.ts,r),i=Number.isNaN(s.year)?new Gn("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||Et.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new Ue({})}static local(){const[e,t]=Zu(arguments),[i,s,l,o,r,a,u]=t;return Ku({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Zu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=mn.utcInstance,Ku({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=L0(e)?e.valueOf():NaN;if(Number.isNaN(i))return Ue.invalid("invalid input");const s=Di(t.zone,Jt.defaultZone);return s.isValid?new Ue({ts:i,zone:s,loc:Et.fromObject(t)}):Ue.invalid(Bl(s))}static fromMillis(e,t={}){if(ns(e))return e<-Hu||e>Hu?Ue.invalid("Timestamp out of range"):new Ue({ts:e,zone:Di(t.zone,Jt.defaultZone),loc:Et.fromObject(t)});throw new Hn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ns(e))return new Ue({ts:e*1e3,zone:Di(t.zone,Jt.defaultZone),loc:Et.fromObject(t)});throw new Hn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=Di(t.zone,Jt.defaultZone);if(!i.isValid)return Ue.invalid(Bl(i));const s=Jt.now(),l=it(t.specificOffset)?i.offset(s):t.specificOffset,o=yo(e,Yu),r=!it(o.ordinal),a=!it(o.year),u=!it(o.month)||!it(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=Et.fromObject(t);if((f||r)&&c)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new el("Can't mix ordinal dates with month/day");const m=c||o.weekday&&!f;let _,h,b=Bu(s,l);m?(_=$y,h=wy,b=xr(b)):r?(_=Cy,h=Sy,b=fr(b)):(_=_b,h=hb);let y=!1;for(const D of _){const L=o[D];it(L)?y?o[D]=h[D]:o[D]=b[D]:y=!0}const S=m?yy(o):r?ky(o):db(o),C=S||pb(o);if(C)return Ue.invalid(C);const $=m?Vu(o):r?zu(o):o,[T,M]=fo($,l,i),O=new Ue({ts:T,zone:i,o:M,loc:d});return o.weekday&&f&&e.weekday!==O.weekday?Ue.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${O.toISO()}`):O}static fromISO(e,t={}){const[i,s]=jv(e);return Ws(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Vv(e);return Ws(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=zv(e);return Ws(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(it(e)||it(t))throw new Hn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=Et.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=vy(o,e,t);return f?Ue.invalid(f):Ws(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return Ue.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Jv(e);return Ws(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Hn("need to specify a reason the DateTime is invalid");const i=e instanceof Gn?e:new Gn(e,t);if(Jt.throwOnInvalid)throw new M0(i);return new Ue({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?dr(this).weekYear:NaN}get weekNumber(){return this.isValid?dr(this).weekNumber:NaN}get weekday(){return this.isValid?dr(this).weekday:NaN}get ordinal(){return this.isValid?fr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Tl(this.year)}get daysInMonth(){return bo(this.year,this.month)}get daysInYear(){return this.isValid?sl(this.year):NaN}get weeksInWeekYear(){return this.isValid?vo(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=vn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(mn.instance(e),t)}toLocal(){return this.setZone(Jt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Di(e,Jt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=fo(o,l,e)}return Us(this,{ts:s,zone:e})}else return Ue.invalid(Bl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Us(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=yo(e,Yu),i=!it(t.weekYear)||!it(t.weekNumber)||!it(t.weekday),s=!it(t.ordinal),l=!it(t.year),o=!it(t.month)||!it(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new el("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new el("Can't mix ordinal dates with month/day");let u;i?u=Vu({...xr(this.c),...t}):it(t.ordinal)?(u={...this.toObject(),...t},it(t.day)&&(u.day=Math.min(bo(u.year,u.month),u.day))):u=zu({...fr(this.c),...t});const[f,c]=fo(u,this.o,this.zone);return Us(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e);return Us(this,Uu(this,t))}minus(e){if(!this.isValid)return this;const t=rt.fromDurationLike(e).negate();return Us(this,Uu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=rt.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?vn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):cr}toLocaleString(e=Kr,t={}){return this.isValid?vn.create(this.loc.clone(t),e).formatDateTime(this):cr}toLocaleParts(e={}){return this.isValid?vn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=pr(this,o);return r+="T",r+=Wu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?pr(this,e==="extended"):null}toISOWeekDate(){return Ul(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Wu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Ul(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ul(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?pr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Ul(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():cr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return rt.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=P0(t).map(rt.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=iy(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(Ue.now(),e,t)}until(e){return this.isValid?Pt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Ue.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(Ue.isDateTime))throw new Hn("max requires all arguments be DateTimes");return Tu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=Et.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return ob(o,e,t)}static fromStringExplain(e,t,i={}){return Ue.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Kr}static get DATE_MED(){return kg}static get DATE_MED_WITH_WEEKDAY(){return D0}static get DATE_FULL(){return wg}static get DATE_HUGE(){return Sg}static get TIME_SIMPLE(){return $g}static get TIME_WITH_SECONDS(){return Cg}static get TIME_WITH_SHORT_OFFSET(){return Tg}static get TIME_WITH_LONG_OFFSET(){return Mg}static get TIME_24_SIMPLE(){return Og}static get TIME_24_WITH_SECONDS(){return Eg}static get TIME_24_WITH_SHORT_OFFSET(){return Dg}static get TIME_24_WITH_LONG_OFFSET(){return Ag}static get DATETIME_SHORT(){return Ig}static get DATETIME_SHORT_WITH_SECONDS(){return Lg}static get DATETIME_MED(){return Pg}static get DATETIME_MED_WITH_SECONDS(){return Ng}static get DATETIME_MED_WITH_WEEKDAY(){return A0}static get DATETIME_FULL(){return Fg}static get DATETIME_FULL_WITH_SECONDS(){return Rg}static get DATETIME_HUGE(){return qg}static get DATETIME_HUGE_WITH_SECONDS(){return jg}}function Ys(n){if(Ue.isDateTime(n))return n;if(n&&n.valueOf&&ns(n.valueOf()))return Ue.fromJSDate(n);if(n&&typeof n=="object")return Ue.fromObject(n);throw new Hn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const Ty=[".jpg",".jpeg",".png",".svg",".gif",".jfif",".webp",".avif"],My=[".mp4",".avi",".mov",".3gp",".wmv"],Oy=[".aa",".aac",".m4v",".mp3",".ogg",".oga",".mogg",".amr"],Ey=[".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".odp",".odt",".ods",".txt"];class B{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static clone(e){return typeof structuredClone<"u"?structuredClone(e):JSON.parse(JSON.stringify(e))}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||B.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return B.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!B.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e.slice():(t||!B.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){B.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=B.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!B.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!B.isObject(l)&&!Array.isArray(l)||!B.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!B.isObject(s)&&!Array.isArray(s)||!B.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):B.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||B.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||B.isObject(e)&&Object.keys(e).length>0)&&B.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s=2?(t[0][0]+t[1][0]).toUpperCase():e[0].toUpperCase()}static formattedFileSize(e){const t=e?Math.floor(Math.log(e)/Math.log(1024)):0;return(e/Math.pow(1024,t)).toFixed(2)*1+" "+["B","KB","MB","GB","TB"][t]}static getDateTime(e){if(typeof e=="string"){const t={19:"yyyy-MM-dd HH:mm:ss",23:"yyyy-MM-dd HH:mm:ss.SSS",20:"yyyy-MM-dd HH:mm:ss'Z'",24:"yyyy-MM-dd HH:mm:ss.SSS'Z'"},i=t[e.length]||t[19];return Ue.fromFormat(e,i,{zone:"UTC"})}return Ue.fromJSDate(e)}static formatToUTCDate(e,t="yyyy-MM-dd HH:mm:ss"){return B.getDateTime(e).toUTC().toFormat(t)}static formatToLocalDate(e,t="yyyy-MM-dd HH:mm:ss"){return B.getDateTime(e).toLocal().toFormat(t)}static async copyToClipboard(e){var t;if(e=""+e,!(!e.length||!((t=window==null?void 0:window.navigator)!=null&&t.clipboard)))return window.navigator.clipboard.writeText(e).catch(i=>{console.warn("Failed to copy.",i)})}static download(e,t){const i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download",t),i.click(),i.remove()}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2));t=t.endsWith(".json")?t:t+".json",B.download(i,t)}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return!!Ty.find(t=>e.toLowerCase().endsWith(t))}static hasVideoExtension(e){return!!My.find(t=>e.toLowerCase().endsWith(t))}static hasAudioExtension(e){return!!Oy.find(t=>e.toLowerCase().endsWith(t))}static hasDocumentExtension(e){return!!Ey.find(t=>e.toLowerCase().endsWith(t))}static getFileType(e){return B.hasImageExtension(e)?"image":B.hasDocumentExtension(e)?"document":B.hasVideoExtension(e)?"video":B.hasAudioExtension(e)?"audio":"file"}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(B.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)B.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):B.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static dummyCollectionRecord(e){var o,r,a,u,f,c,d;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com"),(!(e!=null&&e.$isView)||B.extractColumnsFromQuery((o=e==null?void 0:e.options)==null?void 0:o.query).includes("created"))&&(i.created="2022-01-01 01:00:00.123Z"),(!(e!=null&&e.$isView)||B.extractColumnsFromQuery((r=e==null?void 0:e.options)==null?void 0:r.query).includes("updated"))&&(i.updated="2022-01-01 23:59:59.456Z");for(const m of t){let _=null;m.type==="number"?_=123:m.type==="date"?_="2022-01-01 10:00:00.123Z":m.type==="bool"?_=!0:m.type==="email"?_="test@example.com":m.type==="url"?_="https://example.com":m.type==="json"?_="JSON":m.type==="file"?(_="filename.jpg",((a=m.options)==null?void 0:a.maxSelect)!==1&&(_=[_])):m.type==="select"?(_=(f=(u=m.options)==null?void 0:u.values)==null?void 0:f[0],((c=m.options)==null?void 0:c.maxSelect)!==1&&(_=[_])):m.type==="relation"?(_="RELATION_RECORD_ID",((d=m.options)==null?void 0:d.maxSelect)!==1&&(_=[_])):_="test",i[m.name]=_}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"view":return"ri-table-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"editor":return"ri-edit-2-line";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":(e==null?void 0:e.type)==="json"?'null, "", [], {}':["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=B.isObject(u)&&B.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const o of e)o.type==="auth"?t.push(o):o.type==="base"?i.push(o):s.push(o);function l(o,r){return o.name>r.name?1:o.name{setTimeout(e,0)})}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static defaultEditorOptions(){return{branding:!1,promotion:!1,menubar:!1,min_height:270,height:270,max_height:700,autoresize_bottom_margin:30,skin:"pocketbase",content_style:"body { font-size: 14px }",plugins:["autoresize","autolink","lists","link","image","searchreplace","fullscreen","media","table","code","codesample","directionality"],toolbar:"styles | alignleft aligncenter alignright | bold italic forecolor backcolor | bullist numlist | link image table codesample direction | code fullscreen",file_picker_types:"image",file_picker_callback:(e,t,i)=>{const s=document.createElement("input");s.setAttribute("type","file"),s.setAttribute("accept","image/*"),s.addEventListener("change",l=>{const o=l.target.files[0],r=new FileReader;r.addEventListener("load",()=>{if(!tinymce)return;const a="blobid"+new Date().getTime(),u=tinymce.activeEditor.editorUpload.blobCache,f=r.result.split(",")[1],c=u.create(a,o,f);u.add(c),e(c.blobUri(),{title:o.name})}),r.readAsDataURL(o)}),s.click()},setup:e=>{e.on("keydown",i=>{(i.ctrlKey||i.metaKey)&&i.code=="KeyS"&&e.formElement&&(i.preventDefault(),i.stopPropagation(),e.formElement.dispatchEvent(new KeyboardEvent("keydown",i)))});const t="tinymce_last_direction";e.on("init",()=>{var s;const i=(s=window==null?void 0:window.localStorage)==null?void 0:s.getItem(t);!e.isDirty()&&e.getContent()==""&&i=="rtl"&&e.execCommand("mceDirectionRTL")}),e.ui.registry.addMenuButton("direction",{icon:"visualchars",fetch:i=>{i([{type:"menuitem",text:"LTR content",icon:"ltr",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"ltr"),tinymce.activeEditor.execCommand("mceDirectionLTR")}},{type:"menuitem",text:"RTL content",icon:"rtl",onAction:()=>{var l;(l=window==null?void 0:window.localStorage)==null||l.setItem(t,"rtl"),tinymce.activeEditor.execCommand("mceDirectionRTL")}}])}})}}}static displayValue(e,t,i="N/A"){e=e||{},t=t||[];let s=[];for(const o of t){let r=e[o];typeof r>"u"||(r=B.stringifyValue(r,i),s.push(r))}if(s.length>0)return s.join(", ");const l=["title","name","slug","email","username","label","heading","message","key","id"];for(const o of l){let r=B.stringifyValue(e[o],"");if(r)return r}return i}static stringifyValue(e,t="N/A"){if(B.isEmpty(e))return t;if(typeof e=="boolean")return e?"True":"False";if(typeof e=="string")return e=e.indexOf("<")>=0?B.plainText(e):e,B.truncate(e)||t;if(Array.isArray(e))return e.join(",");if(typeof e=="object")try{return B.truncate(JSON.stringify(e))||t}catch{return t}return""+e}static extractColumnsFromQuery(e){var o;const t="__GROUP__";e=(e||"").replace(/\([\s\S]+?\)/gm,t).replace(/[\t\r\n]|(?:\s\s)+/g," ");const i=e.match(/select\s+([\s\S]+)\s+from/),s=((o=i==null?void 0:i[1])==null?void 0:o.split(","))||[],l=[];for(let r of s){const a=r.trim().split(" ").pop();a!=""&&a!=t&&l.push(a.replace(/[\'\"\`\[\]\s]/g,""))}return l}static getAllCollectionIdentifiers(e,t=""){if(!e)return[];let i=[t+"id"];if(e.$isView)for(let l of B.extractColumnsFromQuery(e.options.query))B.pushUnique(i,t+l);else e.$isAuth?(i.push(t+"username"),i.push(t+"email"),i.push(t+"emailVisibility"),i.push(t+"verified"),i.push(t+"created"),i.push(t+"updated")):(i.push(t+"created"),i.push(t+"updated"));const s=e.schema||[];for(const l of s)B.pushUnique(i,t+l.name);return i}static parseIndex(e){var a,u,f,c,d;const t={unique:!1,optional:!1,schemaName:"",indexName:"",tableName:"",columns:[],where:""},s=/create\s+(unique\s+)?\s*index\s*(if\s+not\s+exists\s+)?(\S*)\s+on\s+(\S*)\s*\(([\s\S]*)\)(?:\s*where\s+([\s\S]*))?/gmi.exec((e||"").trim());if((s==null?void 0:s.length)!=7)return t;const l=/^[\"\'\`\[\{}]|[\"\'\`\]\}]$/gm;t.unique=((a=s[1])==null?void 0:a.trim().toLowerCase())==="unique",t.optional=!B.isEmpty((u=s[2])==null?void 0:u.trim());const o=(s[3]||"").split(".");o.length==2?(t.schemaName=o[0].replace(l,""),t.indexName=o[1].replace(l,"")):(t.schemaName="",t.indexName=o[0].replace(l,"")),t.tableName=(s[4]||"").replace(l,"");const r=(s[5]||"").replace(/,(?=[^\(]*\))/gmi,"{PB_TEMP}").split(",");for(let m of r){m=m.trim().replaceAll("{PB_TEMP}",",");const h=/^([\s\S]+?)(?:\s+collate\s+([\w]+))?(?:\s+(asc|desc))?$/gmi.exec(m);if((h==null?void 0:h.length)!=4)continue;const b=(c=(f=h[1])==null?void 0:f.trim())==null?void 0:c.replace(l,"");b&&t.columns.push({name:b,collate:h[2]||"",sort:((d=h[3])==null?void 0:d.toUpperCase())||""})}return t.where=s[6]||"",t}static buildIndex(e){let t="CREATE ";e.unique&&(t+="UNIQUE "),t+="INDEX ",e.optional&&(t+="IF NOT EXISTS "),e.schemaName&&(t+=`\`${e.schemaName}\`.`),t+=`\`${e.indexName||"idx_"+B.randomString(7)}\` `,t+=`ON \`${e.tableName}\` (`;const i=e.columns.filter(s=>!!(s!=null&&s.name));return i.length>1&&(t+=` `),t+=i.map(s=>{let l="";return s.name.includes("(")||s.name.includes(" ")?l+=s.name:l+="`"+s.name+"`",s.collate&&(l+=" COLLATE "+s.collate),s.sort&&(l+=" "+s.sort.toUpperCase()),l}).join(`, `),i.length>1&&(t+=` -`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=B.parseIndex(e);return i.tableName=t,B.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=B.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?B.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}}const Wo=In([]);function yo(n,e=4e3){return Yo(n,"info",e)}function zt(n,e=3e3){return Yo(n,"success",e)}function Ds(n,e=4500){return Yo(n,"error",e)}function Oy(n,e=4500){return Yo(n,"warning",e)}function Yo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{hb(i)},t)};Wo.update(s=>(Fa(s,i.message),B.pushOrReplaceByKey(s,i,"message"),s))}function hb(n){Wo.update(e=>(Fa(e,n),e))}function Na(){Wo.update(n=>{for(let e of n)Fa(n,e);return[]})}function Fa(n,e){let t;typeof e=="string"?t=B.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),B.removeByKey(n,"message",t.message))}const Si=In({});function en(n){Si.set(n||{})}function ai(n){Si.update(e=>(B.deleteByPath(e,n),e))}const Ra=In({});function ea(n){Ra.set(n||{})}const ci=In([]),ui=In({}),ko=In(!1),_b=In({});function Ey(n){ci.update(e=>{const t=B.findByKey(e,"id",n);return t?ui.set(t):e.length&&ui.set(e[0]),e})}function Dy(n){ui.update(e=>B.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ci.update(e=>(B.pushOrReplaceByKey(e,n,"id"),qa(),B.sortCollections(e)))}function Ay(n){ci.update(e=>(B.removeByKey(e,"id",n.id),ui.update(t=>t.id===n.id?e[0]:t),qa(),e))}async function Iy(n=null){ko.set(!0);try{let e=await ce.collections.getFullList(200,{sort:"+name"});e=B.sortCollections(e),ci.set(e);const t=n&&B.findByKey(e,"id",n);t?ui.set(t):e.length&&ui.set(e[0]),qa()}catch(e){ce.error(e)}ko.set(!1)}function qa(){_b.update(n=>(ci.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const pr="pb_admin_file_token";zo.prototype.logout=function(n=!0){this.authStore.clear(),n&&ji("/login")};zo.prototype.error=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{},l=s.message||n.message||t;if(e&&l&&Ds(l),B.isEmpty(s.data)||en(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),ji("/")};zo.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=V1(_b);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(pr)||"";return(!t||hg(t,10))&&(t&&localStorage.removeItem(pr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(pr,t),this._adminFileTokenRequest=null),t};class Ly extends _g{save(e,t){super.save(e,t),t instanceof os&&ea(t)}clear(){super.clear(),ea(null)}}const ce=new zo("../",new Ly("pb_admin_auth"));ce.authStore.model instanceof os&&ea(ce.authStore.model);function Py(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=n[3].default,_=yt(m,n,n[2],null);return{c(){e=v("div"),t=v("main"),_&&_.c(),i=E(),s=v("footer"),l=v("a"),l.innerHTML=` - Docs`,o=E(),r=v("span"),r.textContent="|",a=E(),u=v("a"),f=v("span"),f.textContent="PocketBase v0.17.0",p(t,"class","page-content"),p(l,"href","https://pocketbase.io/docs/"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(r,"class","delimiter"),p(f,"class","txt"),p(u,"href","https://github.com/pocketbase/pocketbase/releases"),p(u,"target","_blank"),p(u,"rel","noopener noreferrer"),p(u,"title","Releases"),p(s,"class","page-footer"),p(e,"class",c="page-wrapper "+n[1]),Q(e,"center-content",n[0])},m(h,b){w(h,e,b),g(e,t),_&&_.m(t,null),g(e,i),g(e,s),g(s,l),g(s,o),g(s,r),g(s,a),g(s,u),g(u,f),d=!0},p(h,[b]){_&&_.p&&(!d||b&4)&&wt(_,m,h,h[2],d?kt(m,h[2],b,null):St(h[2]),null),(!d||b&2&&c!==(c="page-wrapper "+h[1]))&&p(e,"class",c),(!d||b&3)&&Q(e,"center-content",h[0])},i(h){d||(A(_,h),d=!0)},o(h){I(_,h),d=!1},d(h){h&&k(e),_&&_.d(h)}}}function Ny(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class wn extends ge{constructor(e){super(),_e(this,e,Ny,Py,me,{center:0,class:1})}}function Gu(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=E(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function Fy(n){let e,t,i,s=!n[0]&&Gu();const l=n[1].default,o=yt(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=E(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){w(r,e,a),s&&s.m(e,null),g(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Gu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&wt(o,l,r,r[2],i?kt(l,r[2],a,null):St(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){I(o,r),i=!1},d(r){r&&k(e),s&&s.d(),o&&o.d(r)}}}function Ry(n){let e,t;return e=new wn({props:{class:"full-page",center:!0,$$slots:{default:[Fy]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function qy(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class gb extends ge{constructor(e){super(),_e(this,e,qy,Ry,me,{nobranding:0})}}function Ko(n){const e=n-1;return e*e*e+1}function ta(n,{delay:e=0,duration:t=400,easing:i=Sl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function fi(n,{delay:e=0,duration:t=400,easing:i=Ko,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o),[c,d]=_u(s),[m,_]=_u(l);return{delay:e,duration:t,easing:i,css:(h,b)=>` +`),t+=")",e.where&&(t+=` WHERE ${e.where}`),t}static replaceIndexTableName(e,t){const i=B.parseIndex(e);return i.tableName=t,B.buildIndex(i)}static replaceIndexColumn(e,t,i){if(t===i)return e;const s=B.parseIndex(e);let l=!1;for(let o of s.columns)o.name===t&&(o.name=i,l=!0);return l?B.buildIndex(s):e}static normalizeSearchFilter(e,t){if(e=(e||"").trim(),!e||!t.length)return e;const i=["=","!=","~","!~",">",">=","<","<="];for(const s of i)if(e.includes(s))return e;return e=isNaN(e)&&e!="true"&&e!="false"?`"${e.replace(/^[\"\'\`]|[\"\'\`]$/gm,"")}"`:e,t.map(s=>`${s}~${e}`).join("||")}}const Yo=In([]);function ko(n,e=4e3){return Ko(n,"info",e)}function zt(n,e=3e3){return Ko(n,"success",e)}function Ds(n,e=4500){return Ko(n,"error",e)}function Dy(n,e=4500){return Ko(n,"warning",e)}function Ko(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{gb(i)},t)};Yo.update(s=>(Fa(s,i.message),B.pushOrReplaceByKey(s,i,"message"),s))}function gb(n){Yo.update(e=>(Fa(e,n),e))}function Na(){Yo.update(n=>{for(let e of n)Fa(n,e);return[]})}function Fa(n,e){let t;typeof e=="string"?t=B.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),B.removeByKey(n,"message",t.message))}const Si=In({});function en(n){Si.set(n||{})}function ai(n){Si.update(e=>(B.deleteByPath(e,n),e))}const Ra=In({});function ea(n){Ra.set(n||{})}const ci=In([]),ui=In({}),wo=In(!1),bb=In({});function Ay(n){ci.update(e=>{const t=B.findByKey(e,"id",n);return t?ui.set(t):e.length&&ui.set(e[0]),e})}function Iy(n){ui.update(e=>B.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),ci.update(e=>(B.pushOrReplaceByKey(e,n,"id"),qa(),B.sortCollections(e)))}function Ly(n){ci.update(e=>(B.removeByKey(e,"id",n.id),ui.update(t=>t.id===n.id?e[0]:t),qa(),e))}async function Py(n=null){wo.set(!0);try{let e=await ce.collections.getFullList(200,{sort:"+name"});e=B.sortCollections(e),ci.set(e);const t=n&&B.findByKey(e,"id",n);t?ui.set(t):e.length&&ui.set(e[0]),qa()}catch(e){ce.error(e)}wo.set(!1)}function qa(){bb.update(n=>(ci.update(e=>{var t;for(let i of e)n[i.id]=!!((t=i.schema)!=null&&t.find(s=>{var l;return s.type=="file"&&((l=s.options)==null?void 0:l.protected)}));return e}),n))}const mr="pb_admin_file_token";Ho.prototype.logout=function(n=!0){this.authStore.clear(),n&&ji("/login")};Ho.prototype.error=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{},l=s.message||n.message||t;if(e&&l&&Ds(l),B.isEmpty(s.data)||en(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),ji("/")};Ho.prototype.getAdminFileToken=async function(n=""){let e=!0;if(n){const i=H1(bb);e=typeof i[n]<"u"?i[n]:!0}if(!e)return"";let t=localStorage.getItem(mr)||"";return(!t||gg(t,10))&&(t&&localStorage.removeItem(mr),this._adminFileTokenRequest||(this._adminFileTokenRequest=this.files.getToken()),t=await this._adminFileTokenRequest,localStorage.setItem(mr,t),this._adminFileTokenRequest=null),t};class Ny extends bg{save(e,t){super.save(e,t),t instanceof os&&ea(t)}clear(){super.clear(),ea(null)}}const ce=new Ho("../",new Ny("pb_admin_auth"));ce.authStore.model instanceof os&&ea(ce.authStore.model);function Fy(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=n[3].default,_=yt(m,n,n[2],null);return{c(){e=v("div"),t=v("main"),_&&_.c(),i=E(),s=v("footer"),l=v("a"),l.innerHTML=` + Docs`,o=E(),r=v("span"),r.textContent="|",a=E(),u=v("a"),f=v("span"),f.textContent="PocketBase v0.17.0",p(t,"class","page-content"),p(l,"href","https://pocketbase.io/docs/"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(r,"class","delimiter"),p(f,"class","txt"),p(u,"href","https://github.com/pocketbase/pocketbase/releases"),p(u,"target","_blank"),p(u,"rel","noopener noreferrer"),p(u,"title","Releases"),p(s,"class","page-footer"),p(e,"class",c="page-wrapper "+n[1]),Q(e,"center-content",n[0])},m(h,b){w(h,e,b),g(e,t),_&&_.m(t,null),g(e,i),g(e,s),g(s,l),g(s,o),g(s,r),g(s,a),g(s,u),g(u,f),d=!0},p(h,[b]){_&&_.p&&(!d||b&4)&&wt(_,m,h,h[2],d?kt(m,h[2],b,null):St(h[2]),null),(!d||b&2&&c!==(c="page-wrapper "+h[1]))&&p(e,"class",c),(!d||b&3)&&Q(e,"center-content",h[0])},i(h){d||(A(_,h),d=!0)},o(h){I(_,h),d=!1},d(h){h&&k(e),_&&_.d(h)}}}function Ry(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class wn extends ge{constructor(e){super(),_e(this,e,Ry,Fy,me,{center:0,class:1})}}function Gu(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=E(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function qy(n){let e,t,i,s=!n[0]&&Gu();const l=n[1].default,o=yt(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=E(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){w(r,e,a),s&&s.m(e,null),g(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Gu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&wt(o,l,r,r[2],i?kt(l,r[2],a,null):St(r[2]),null)},i(r){i||(A(o,r),i=!0)},o(r){I(o,r),i=!1},d(r){r&&k(e),s&&s.d(),o&&o.d(r)}}}function jy(n){let e,t;return e=new wn({props:{class:"full-page",center:!0,$$slots:{default:[qy]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function Vy(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class vb extends ge{constructor(e){super(),_e(this,e,Vy,jy,me,{nobranding:0})}}function Jo(n){const e=n-1;return e*e*e+1}function ta(n,{delay:e=0,duration:t=400,easing:i=Sl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function fi(n,{delay:e=0,duration:t=400,easing:i=Jo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o),[c,d]=_u(s),[m,_]=_u(l);return{delay:e,duration:t,easing:i,css:(h,b)=>` transform: ${u} translate(${(1-h)*c}${d}, ${(1-h)*m}${_}); - opacity: ${a-f*b}`}}function ot(n,{delay:e=0,duration:t=400,easing:i=Ko,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),u=s==="y"?["top","bottom"]:["left","right"],f=u.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(l[`padding${f[0]}`]),d=parseFloat(l[`padding${f[1]}`]),m=parseFloat(l[`margin${f[0]}`]),_=parseFloat(l[`margin${f[1]}`]),h=parseFloat(l[`border${f[0]}Width`]),b=parseFloat(l[`border${f[1]}Width`]);return{delay:e,duration:t,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${r}: ${y*a}px;padding-${u[0]}: ${y*c}px;padding-${u[1]}: ${y*d}px;margin-${u[0]}: ${y*m}px;margin-${u[1]}: ${y*_}px;border-${u[0]}-width: ${y*h}px;border-${u[1]}-width: ${y*b}px;`}}function Kt(n,{delay:e=0,duration:t=400,easing:i=Ko,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` + opacity: ${a-f*b}`}}function ot(n,{delay:e=0,duration:t=400,easing:i=Jo,axis:s="y"}={}){const l=getComputedStyle(n),o=+l.opacity,r=s==="y"?"height":"width",a=parseFloat(l[r]),u=s==="y"?["top","bottom"]:["left","right"],f=u.map(y=>`${y[0].toUpperCase()}${y.slice(1)}`),c=parseFloat(l[`padding${f[0]}`]),d=parseFloat(l[`padding${f[1]}`]),m=parseFloat(l[`margin${f[0]}`]),_=parseFloat(l[`margin${f[1]}`]),h=parseFloat(l[`border${f[0]}Width`]),b=parseFloat(l[`border${f[1]}Width`]);return{delay:e,duration:t,easing:i,css:y=>`overflow: hidden;opacity: ${Math.min(y*20,1)*o};${r}: ${y*a}px;padding-${u[0]}: ${y*c}px;padding-${u[1]}: ${y*d}px;margin-${u[0]}: ${y*m}px;margin-${u[1]}: ${y*_}px;border-${u[0]}-width: ${y*h}px;border-${u[1]}-width: ${y*b}px;`}}function Kt(n,{delay:e=0,duration:t=400,easing:i=Jo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` transform: ${a} scale(${1-u*d}); opacity: ${r-f*d} - `}}let na,Yi;const ia="app-tooltip";function Xu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ni(){return Yi=Yi||document.querySelector("."+ia),Yi||(Yi=document.createElement("div"),Yi.classList.add(ia),document.body.appendChild(Yi)),Yi}function bb(n,e){let t=Ni();if(!t.classList.contains("active")||!(e!=null&&e.text)){sa();return}t.textContent=e.text,t.className=ia+" 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 sa(){clearTimeout(na),Ni().classList.remove("active"),Ni().activeNode=void 0}function jy(n,e){Ni().activeNode=n,clearTimeout(na),na=setTimeout(()=>{Ni().classList.add("active"),bb(n,e)},isNaN(e.delay)?0:e.delay)}function He(n,e){let t=Xu(e);function i(){jy(n,t)}function s(){sa()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&B.isFocusable(n))&&n.addEventListener("click",s),Ni(),{update(l){var o,r;t=Xu(l),(r=(o=Ni())==null?void 0:o.activeNode)!=null&&r.contains(n)&&bb(n,t)},destroy(){var l,o;(o=(l=Ni())==null?void 0:l.activeNode)!=null&&o.contains(n)&&sa(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Qu(n,e,t){const i=n.slice();return i[12]=e[t],i}const Vy=n=>({}),xu=n=>({uniqueId:n[4]});function zy(n){let e,t,i=n[3],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=je(t,Kt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=je(t,Kt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&k(e),a&&s&&s.end(),o=!1,r()}}}function ef(n){let e,t,i=wo(n[12])+"",s,l,o,r;return{c(){e=v("div"),t=v("pre"),s=U(i),l=E(),p(e,"class","help-block help-block-error")},m(a,u){w(a,e,u),g(e,t),g(t,s),g(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=wo(a[12])+"")&&se(s,i)},i(a){r||(a&&Qe(()=>{r&&(o||(o=je(e,ot,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=je(e,ot,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&k(e),a&&o&&o.end()}}}function By(n){let e,t,i,s,l,o,r;const a=n[9].default,u=yt(a,n,n[8],xu),f=[Hy,zy],c=[];function d(m,_){return m[0]&&m[3].length?0:1}return i=d(n),s=c[i]=f[i](n),{c(){e=v("div"),u&&u.c(),t=E(),s.c(),p(e,"class",n[1]),Q(e,"error",n[3].length)},m(m,_){w(m,e,_),u&&u.m(e,null),g(e,t),c[i].m(e,null),n[11](e),l=!0,o||(r=K(e,"click",n[10]),o=!0)},p(m,[_]){u&&u.p&&(!l||_&256)&&wt(u,a,m,m[8],l?kt(a,m[8],_,Vy):St(m[8]),xu);let h=i;i=d(m),i===h?c[i].p(m,_):(ae(),I(c[h],1,1,()=>{c[h]=null}),ue(),s=c[i],s?s.p(m,_):(s=c[i]=f[i](m),s.c()),A(s,1),s.m(e,null)),(!l||_&2)&&p(e,"class",m[1]),(!l||_&10)&&Q(e,"error",m[3].length)},i(m){l||(A(u,m),A(s),l=!0)},o(m){I(u,m),I(s),l=!1},d(m){m&&k(e),u&&u.d(m),c[i].d(),n[11](null),o=!1,r()}}}const tf="Invalid value";function wo(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||tf:n||tf}function Uy(n,e,t){let i;Je(n,Si,h=>t(7,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+B.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,c=[];function d(){ai(r)}Gt(()=>(f.addEventListener("input",d),f.addEventListener("change",d),()=>{f.removeEventListener("input",d),f.removeEventListener("change",d)}));function m(h){Ne.call(this,n,h)}function _(h){ee[h?"unshift":"push"](()=>{f=h,t(2,f)})}return n.$$set=h=>{"name"in h&&t(5,r=h.name),"inlineError"in h&&t(0,a=h.inlineError),"class"in h&&t(1,u=h.class),"$$scope"in h&&t(8,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,c=B.toArray(B.getNestedVal(i,r)))},[a,u,f,c,o,r,d,i,l,s,m,_]}class pe extends ge{constructor(e){super(),_e(this,e,Uy,By,me,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function Wy(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0]),l.focus(),r||(a=K(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&re(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function Yy(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Password"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),g(e,t),w(c,s,d),w(c,l,d),re(l,n[1]),w(c,r,d),w(c,a,d),u||(f=K(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&re(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function Ky(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Password confirm"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[2]),r||(a=K(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&re(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function Jy(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return s=new pe({props:{class:"form-field required",name:"email",$$slots:{default:[Wy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[Yy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),a=new pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Ky,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=E(),z(s.$$.fragment),l=E(),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),f=v("button"),f.innerHTML=`Create and login - `,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),Q(f,"btn-disabled",n[3]),Q(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(_,h){w(_,e,h),g(e,t),g(e,i),j(s,e,null),g(e,l),j(o,e,null),g(e,r),j(a,e,null),g(e,u),g(e,f),c=!0,d||(m=K(e,"submit",et(n[4])),d=!0)},p(_,[h]){const b={};h&1537&&(b.$$scope={dirty:h,ctx:_}),s.$set(b);const y={};h&1538&&(y.$$scope={dirty:h,ctx:_}),o.$set(y);const S={};h&1540&&(S.$$scope={dirty:h,ctx:_}),a.$set(S),(!c||h&8)&&Q(f,"btn-disabled",_[3]),(!c||h&8)&&Q(f,"btn-loading",_[3])},i(_){c||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),c=!0)},o(_){I(s.$$.fragment,_),I(o.$$.fragment,_),I(a.$$.fragment,_),c=!1},d(_){_&&k(e),V(s),V(o),V(a),d=!1,m()}}}function Zy(n,e,t){const i=$t();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await ce.admins.create({email:s,password:l,passwordConfirm:o}),await ce.admins.authWithPassword(s,l),i("submit")}catch(d){ce.error(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class Gy extends ge{constructor(e){super(),_e(this,e,Zy,Jy,me,{})}}function nf(n){let e,t;return e=new gb({props:{$$slots:{default:[Xy]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Xy(n){let e,t;return e=new Gy({}),e.$on("submit",n[1]),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p:x,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Qy(n){let e,t,i=n[0]&&nf(n);return{c(){i&&i.c(),e=ye()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=nf(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),I(i,1,1,()=>{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function xy(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ce.logout(!1),t(0,i=!0);return}ce.authStore.isValid?ji("/collections"):ce.logout()}return[i,async()=>{t(0,i=!1),await fn(),window.location.search=""}]}class ek extends ge{constructor(e){super(),_e(this,e,xy,Qy,me,{})}}const Tt=In(""),So=In(""),As=In(!1);function tk(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){w(l,e,o),n[13](e),re(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]&&re(e,l[7])},i:x,o:x,d(l){l&&k(e),n[13](null),i=!1,s()}}}function nk(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=Ft(o,r(n)),ee.push(()=>de(e,"value",l)),e.$on("submit",n[10])),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&j(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],he(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){ae();const c=e;I(c.$$.fragment,1,0,()=>{V(c,1)}),ue()}o?(e=Ft(o,r(a)),ee.push(()=>de(e,"value",l)),e.$on("submit",a[10]),z(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&V(e,a)}}}function sf(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){w(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{i&&(t||(t=je(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=je(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function lf(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){w(o,e,r),i=!0,s||(l=K(e,"click",n[15]),s=!0)},p:x,i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function ik(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[nk,tk],m=[];function _(y,S){return y[4]&&!y[5]?0:1}l=_(n),o=m[l]=d[l](n);let h=(n[0].length||n[7].length)&&n[7]!=n[0]&&sf(),b=(n[0].length||n[7].length)&&lf(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=E(),o.c(),r=E(),h&&h.c(),a=E(),b&&b.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(y,S){w(y,e,S),g(e,t),g(t,i),g(e,s),m[l].m(e,null),g(e,r),h&&h.m(e,null),g(e,a),b&&b.m(e,null),u=!0,f||(c=[K(e,"click",An(n[11])),K(e,"submit",et(n[10]))],f=!0)},p(y,[S]){let C=l;l=_(y),l===C?m[l].p(y,S):(ae(),I(m[C],1,1,()=>{m[C]=null}),ue(),o=m[l],o?o.p(y,S):(o=m[l]=d[l](y),o.c()),A(o,1),o.m(e,r)),(y[0].length||y[7].length)&&y[7]!=y[0]?h?S&129&&A(h,1):(h=sf(),h.c(),A(h,1),h.m(e,a)):h&&(ae(),I(h,1,1,()=>{h=null}),ue()),y[0].length||y[7].length?b?(b.p(y,S),S&129&&A(b,1)):(b=lf(y),b.c(),A(b,1),b.m(e,null)):b&&(ae(),I(b,1,1,()=>{b=null}),ue())},i(y){u||(A(o),A(h),A(b),u=!0)},o(y){I(o),I(h),I(b),u=!1},d(y){y&&k(e),m[l].d(),h&&h.d(),b&&b.d(),f=!1,Ee(c)}}}function sk(n,e,t){const i=$t(),s="search_"+B.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=new yn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(T=!0){t(7,d=""),T&&(c==null||c.focus()),i("clear")}function _(){t(0,l=d),i("submit",l)}async function h(){u||f||(t(5,f=!0),t(4,u=(await at(()=>import("./FilterAutocompleteInput-49490f14.js"),["./FilterAutocompleteInput-49490f14.js","./index-fd4289fb.js"],import.meta.url)).default),t(5,f=!1))}Gt(()=>{h()});function b(T){Ne.call(this,n,T)}function y(T){d=T,t(7,d),t(0,l)}function S(T){ee[T?"unshift":"push"](()=>{c=T,t(6,c)})}function C(){d=this.value,t(7,d),t(0,l)}const $=()=>{m(!1),_()};return n.$$set=T=>{"value"in T&&t(0,l=T.value),"placeholder"in T&&t(1,o=T.placeholder),"autocompleteCollection"in T&&t(2,r=T.autocompleteCollection),"extraAutocompleteKeys"in T&&t(3,a=T.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,m,_,b,y,S,C,$]}class Jo extends ge{constructor(e){super(),_e(this,e,sk,ik,me,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function lk(n){let e,t,i,s,l,o;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-refresh-line svelte-1bvelc2"),p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class",i="btn btn-transparent btn-circle "+n[1]+" svelte-1bvelc2"),Q(e,"refreshing",n[2])},m(r,a){w(r,e,a),g(e,t),l||(o=[Me(s=He.call(null,e,n[0])),K(e,"click",n[3])],l=!0)},p(r,[a]){a&2&&i!==(i="btn btn-transparent btn-circle "+r[1]+" svelte-1bvelc2")&&p(e,"class",i),s&&qt(s.update)&&a&1&&s.update.call(null,r[0]),a&6&&Q(e,"refreshing",r[2])},i:x,o:x,d(r){r&&k(e),l=!1,Ee(o)}}}function ok(n,e,t){const i=$t();let{tooltip:s={text:"Refresh",position:"right"}}=e,{class:l=""}=e,o=null;function r(){i("refresh");const a=s;t(0,s=null),clearTimeout(o),t(2,o=setTimeout(()=>{t(2,o=null),t(0,s=a)},150))}return Gt(()=>()=>clearTimeout(o)),n.$$set=a=>{"tooltip"in a&&t(0,s=a.tooltip),"class"in a&&t(1,l=a.class)},[s,l,o,r]}class Zo extends ge{constructor(e){super(),_e(this,e,ok,lk,me,{tooltip:0,class:1})}}function rk(n){let e,t,i,s,l;const o=n[6].default,r=yt(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){w(a,e,u),r&&r.m(e,null),i=!0,s||(l=[K(e,"click",n[7]),K(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&wt(r,o,a,a[5],i?kt(o,a[5],u,null):St(a[5]),null),(!i||u&4)&&p(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&Q(e,"col-sort-disabled",a[3]),(!i||u&7)&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&Q(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&Q(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){I(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),s=!1,Ee(l)}}}function ak(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 an extends ge{constructor(e){super(),_e(this,e,ak,rk,me,{class:1,name:2,sort:0,disable:3})}}function uk(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function fk(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=U(n[2]),s=E(),l=v("div"),o=U(n[1]),r=U(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){w(a,e,u),g(e,t),g(t,i),g(e,s),g(e,l),g(l,o),g(l,r)},p(a,u){u&4&&se(i,a[2]),u&2&&se(o,a[1])},d(a){a&&k(e)}}}function ck(n){let e;function t(l,o){return l[0]?fk:uk}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&k(e)}}}function dk(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 wi extends ge{constructor(e){super(),_e(this,e,dk,ck,me,{date:0})}}const pk=n=>({}),of=n=>({}),mk=n=>({}),rf=n=>({});function hk(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=yt(u,n,n[4],rf),c=n[5].default,d=yt(c,n,n[4],null),m=n[5].after,_=yt(m,n,n[4],of);return{c(){e=v("div"),f&&f.c(),t=E(),i=v("div"),d&&d.c(),l=E(),_&&_.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(h,b){w(h,e,b),f&&f.m(e,null),g(e,t),g(e,i),d&&d.m(i,null),n[6](i),g(e,l),_&&_.m(e,null),o=!0,r||(a=[K(window,"resize",n[1]),K(i,"scroll",n[1])],r=!0)},p(h,[b]){f&&f.p&&(!o||b&16)&&wt(f,u,h,h[4],o?kt(u,h[4],b,mk):St(h[4]),rf),d&&d.p&&(!o||b&16)&&wt(d,c,h,h[4],o?kt(c,h[4],b,null):St(h[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+h[0]+" "+h[3]+" svelte-wc2j9h"))&&p(i,"class",s),_&&_.p&&(!o||b&16)&&wt(_,m,h,h[4],o?kt(m,h[4],b,pk):St(h[4]),of)},i(h){o||(A(f,h),A(d,h),A(_,h),o=!0)},o(h){I(f,h),I(d,h),I(_,h),o=!1},d(h){h&&k(e),f&&f.d(h),d&&d.d(h),n[6](null),_&&_.d(h),r=!1,Ee(a)}}}function _k(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,m=o.scrollWidth;m-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}Gt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){ee[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 ja extends ge{constructor(e){super(),_e(this,e,_k,hk,me,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function af(n,e,t){const i=n.slice();return i[23]=e[t],i}function gk(n){let e;return{c(){e=v("div"),e.innerHTML=` - Method`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function bk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="URL",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function vk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Referer",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function yk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="User IP",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function kk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Status",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function wk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function uf(n){let e;function t(l,o){return l[6]?$k:Sk}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function Sk(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&ff(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),g(e,t),g(t,i),g(t,s),o&&o.m(t,null),g(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=ff(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function $k(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function ff(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[19]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function cf(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function df(n,e){var Te,Ze,ht;let t,i,s,l=((Te=e[23].method)==null?void 0:Te.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,m,_,h,b,y,S=(e[23].referer||"N/A")+"",C,$,T,M,O,D=(e[23].userIp||"N/A")+"",L,P,N,F,R,q=e[23].status+"",H,W,X,J,Z,le,ne,ie,be,Se,Ve=(((Ze=e[23].meta)==null?void 0:Ze.errorMessage)||((ht=e[23].meta)==null?void 0:ht.errorData))&&cf();J=new wi({props:{date:e[23].created}});function Be(){return e[17](e[23])}function ke(...Ge){return e[18](e[23],...Ge)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=U(l),a=E(),u=v("td"),f=v("span"),d=U(c),_=E(),Ve&&Ve.c(),h=E(),b=v("td"),y=v("span"),C=U(S),T=E(),M=v("td"),O=v("span"),L=U(D),N=E(),F=v("td"),R=v("span"),H=U(q),W=E(),X=v("td"),z(J.$$.fragment),Z=E(),le=v("td"),le.innerHTML='',ne=E(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",m=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",$=e[23].referer),Q(y,"txt-hint",!e[23].referer),p(b,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",P=e[23].userIp),Q(O,"txt-hint",!e[23].userIp),p(M,"class","col-type-number col-field-userIp"),p(R,"class","label"),Q(R,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(X,"class","col-type-date col-field-created"),p(le,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Ge,Ye){w(Ge,t,Ye),g(t,i),g(i,s),g(s,o),g(t,a),g(t,u),g(u,f),g(f,d),g(u,_),Ve&&Ve.m(u,null),g(t,h),g(t,b),g(b,y),g(y,C),g(t,T),g(t,M),g(M,O),g(O,L),g(t,N),g(t,F),g(F,R),g(R,H),g(t,W),g(t,X),j(J,X,null),g(t,Z),g(t,le),g(t,ne),ie=!0,be||(Se=[K(t,"click",Be),K(t,"keydown",ke)],be=!0)},p(Ge,Ye){var fe,ze,Dt;e=Ge,(!ie||Ye&8)&&l!==(l=((fe=e[23].method)==null?void 0:fe.toUpperCase())+"")&&se(o,l),(!ie||Ye&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!ie||Ye&8)&&c!==(c=e[23].url+"")&&se(d,c),(!ie||Ye&8&&m!==(m=e[23].url))&&p(f,"title",m),(ze=e[23].meta)!=null&&ze.errorMessage||(Dt=e[23].meta)!=null&&Dt.errorData?Ve||(Ve=cf(),Ve.c(),Ve.m(u,null)):Ve&&(Ve.d(1),Ve=null),(!ie||Ye&8)&&S!==(S=(e[23].referer||"N/A")+"")&&se(C,S),(!ie||Ye&8&&$!==($=e[23].referer))&&p(y,"title",$),(!ie||Ye&8)&&Q(y,"txt-hint",!e[23].referer),(!ie||Ye&8)&&D!==(D=(e[23].userIp||"N/A")+"")&&se(L,D),(!ie||Ye&8&&P!==(P=e[23].userIp))&&p(O,"title",P),(!ie||Ye&8)&&Q(O,"txt-hint",!e[23].userIp),(!ie||Ye&8)&&q!==(q=e[23].status+"")&&se(H,q),(!ie||Ye&8)&&Q(R,"label-danger",e[23].status>=400);const we={};Ye&8&&(we.date=e[23].created),J.$set(we)},i(Ge){ie||(A(J.$$.fragment,Ge),ie=!0)},o(Ge){I(J.$$.fragment,Ge),ie=!1},d(Ge){Ge&&k(t),Ve&&Ve.d(),V(J),be=!1,Ee(Se)}}}function Ck(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L=[],P=new Map,N;function F(ke){n[11](ke)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[gk]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new an({props:R}),ee.push(()=>de(s,"sort",F));function q(ke){n[12](ke)}let H={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[bk]},$$scope:{ctx:n}};n[1]!==void 0&&(H.sort=n[1]),r=new an({props:H}),ee.push(()=>de(r,"sort",q));function W(ke){n[13](ke)}let X={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[vk]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),f=new an({props:X}),ee.push(()=>de(f,"sort",W));function J(ke){n[14](ke)}let Z={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[yk]},$$scope:{ctx:n}};n[1]!==void 0&&(Z.sort=n[1]),m=new an({props:Z}),ee.push(()=>de(m,"sort",J));function le(ke){n[15](ke)}let ne={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[kk]},$$scope:{ctx:n}};n[1]!==void 0&&(ne.sort=n[1]),b=new an({props:ne}),ee.push(()=>de(b,"sort",le));function ie(ke){n[16](ke)}let be={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[wk]},$$scope:{ctx:n}};n[1]!==void 0&&(be.sort=n[1]),C=new an({props:be}),ee.push(()=>de(C,"sort",ie));let Se=n[3];const Ve=ke=>ke[23].id;for(let ke=0;kel=!1)),s.$set(Ze);const ht={};Te&67108864&&(ht.$$scope={dirty:Te,ctx:ke}),!a&&Te&2&&(a=!0,ht.sort=ke[1],he(()=>a=!1)),r.$set(ht);const Ge={};Te&67108864&&(Ge.$$scope={dirty:Te,ctx:ke}),!c&&Te&2&&(c=!0,Ge.sort=ke[1],he(()=>c=!1)),f.$set(Ge);const Ye={};Te&67108864&&(Ye.$$scope={dirty:Te,ctx:ke}),!_&&Te&2&&(_=!0,Ye.sort=ke[1],he(()=>_=!1)),m.$set(Ye);const we={};Te&67108864&&(we.$$scope={dirty:Te,ctx:ke}),!y&&Te&2&&(y=!0,we.sort=ke[1],he(()=>y=!1)),b.$set(we);const fe={};Te&67108864&&(fe.$$scope={dirty:Te,ctx:ke}),!$&&Te&2&&($=!0,fe.sort=ke[1],he(()=>$=!1)),C.$set(fe),Te&841&&(Se=ke[3],ae(),L=bt(L,Te,Ve,1,ke,Se,P,D,Bt,df,null,af),ue(),!Se.length&&Be?Be.p(ke,Te):Se.length?Be&&(Be.d(1),Be=null):(Be=uf(ke),Be.c(),Be.m(D,null))),(!N||Te&64)&&Q(e,"table-loading",ke[6])},i(ke){if(!N){A(s.$$.fragment,ke),A(r.$$.fragment,ke),A(f.$$.fragment,ke),A(m.$$.fragment,ke),A(b.$$.fragment,ke),A(C.$$.fragment,ke);for(let Te=0;Te{if(P<=1&&h(),t(6,d=!1),t(5,f=F.page),t(4,c=F.totalItems),s("load",u.concat(F.items)),N){const R=++m;for(;F.items.length&&m==R;)t(3,u=u.concat(F.items.splice(0,10))),await B.yieldToMain()}else t(3,u=u.concat(F.items))}).catch(F=>{F!=null&&F.isAbort||(t(6,d=!1),console.warn(F),h(),ce.error(F,!1))})}function h(){t(3,u=[]),t(5,f=1),t(4,c=0)}function b(P){a=P,t(1,a)}function y(P){a=P,t(1,a)}function S(P){a=P,t(1,a)}function C(P){a=P,t(1,a)}function $(P){a=P,t(1,a)}function T(P){a=P,t(1,a)}const M=P=>s("select",P),O=(P,N)=>{N.code==="Enter"&&(N.preventDefault(),s("select",P))},D=()=>t(0,o=""),L=()=>_(f+1);return n.$$set=P=>{"filter"in P&&t(0,o=P.filter),"presets"in P&&t(10,r=P.presets),"sort"in P&&t(1,a=P.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(h(),_(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,_,u,c,f,d,i,s,l,r,b,y,S,C,$,T,M,O,D,L]}class Ok extends ge{constructor(e){super(),_e(this,e,Mk,Tk,me,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! + `}}let na,Yi;const ia="app-tooltip";function Xu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function Ni(){return Yi=Yi||document.querySelector("."+ia),Yi||(Yi=document.createElement("div"),Yi.classList.add(ia),document.body.appendChild(Yi)),Yi}function yb(n,e){let t=Ni();if(!t.classList.contains("active")||!(e!=null&&e.text)){sa();return}t.textContent=e.text,t.className=ia+" 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 sa(){clearTimeout(na),Ni().classList.remove("active"),Ni().activeNode=void 0}function zy(n,e){Ni().activeNode=n,clearTimeout(na),na=setTimeout(()=>{Ni().classList.add("active"),yb(n,e)},isNaN(e.delay)?0:e.delay)}function He(n,e){let t=Xu(e);function i(){zy(n,t)}function s(){sa()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&B.isFocusable(n))&&n.addEventListener("click",s),Ni(),{update(l){var o,r;t=Xu(l),(r=(o=Ni())==null?void 0:o.activeNode)!=null&&r.contains(n)&&yb(n,t)},destroy(){var l,o;(o=(l=Ni())==null?void 0:l.activeNode)!=null&&o.contains(n)&&sa(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function Qu(n,e,t){const i=n.slice();return i[12]=e[t],i}const Hy=n=>({}),xu=n=>({uniqueId:n[4]});function By(n){let e,t,i=n[3],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{l&&(s||(s=je(t,Kt,{duration:150,start:.7},!0)),s.run(1))}),l=!0)},o(a){a&&(s||(s=je(t,Kt,{duration:150,start:.7},!1)),s.run(0)),l=!1},d(a){a&&k(e),a&&s&&s.end(),o=!1,r()}}}function ef(n){let e,t,i=So(n[12])+"",s,l,o,r;return{c(){e=v("div"),t=v("pre"),s=U(i),l=E(),p(e,"class","help-block help-block-error")},m(a,u){w(a,e,u),g(e,t),g(t,s),g(e,l),r=!0},p(a,u){(!r||u&8)&&i!==(i=So(a[12])+"")&&se(s,i)},i(a){r||(a&&Qe(()=>{r&&(o||(o=je(e,ot,{duration:150},!0)),o.run(1))}),r=!0)},o(a){a&&(o||(o=je(e,ot,{duration:150},!1)),o.run(0)),r=!1},d(a){a&&k(e),a&&o&&o.end()}}}function Wy(n){let e,t,i,s,l,o,r;const a=n[9].default,u=yt(a,n,n[8],xu),f=[Uy,By],c=[];function d(m,_){return m[0]&&m[3].length?0:1}return i=d(n),s=c[i]=f[i](n),{c(){e=v("div"),u&&u.c(),t=E(),s.c(),p(e,"class",n[1]),Q(e,"error",n[3].length)},m(m,_){w(m,e,_),u&&u.m(e,null),g(e,t),c[i].m(e,null),n[11](e),l=!0,o||(r=J(e,"click",n[10]),o=!0)},p(m,[_]){u&&u.p&&(!l||_&256)&&wt(u,a,m,m[8],l?kt(a,m[8],_,Hy):St(m[8]),xu);let h=i;i=d(m),i===h?c[i].p(m,_):(ae(),I(c[h],1,1,()=>{c[h]=null}),ue(),s=c[i],s?s.p(m,_):(s=c[i]=f[i](m),s.c()),A(s,1),s.m(e,null)),(!l||_&2)&&p(e,"class",m[1]),(!l||_&10)&&Q(e,"error",m[3].length)},i(m){l||(A(u,m),A(s),l=!0)},o(m){I(u,m),I(s),l=!1},d(m){m&&k(e),u&&u.d(m),c[i].d(),n[11](null),o=!1,r()}}}const tf="Invalid value";function So(n){return typeof n=="object"?(n==null?void 0:n.message)||(n==null?void 0:n.code)||tf:n||tf}function Yy(n,e,t){let i;Je(n,Si,h=>t(7,i=h));let{$$slots:s={},$$scope:l}=e;const o="field_"+B.randomString(7);let{name:r=""}=e,{inlineError:a=!1}=e,{class:u=void 0}=e,f,c=[];function d(){ai(r)}Gt(()=>(f.addEventListener("input",d),f.addEventListener("change",d),()=>{f.removeEventListener("input",d),f.removeEventListener("change",d)}));function m(h){Ne.call(this,n,h)}function _(h){ee[h?"unshift":"push"](()=>{f=h,t(2,f)})}return n.$$set=h=>{"name"in h&&t(5,r=h.name),"inlineError"in h&&t(0,a=h.inlineError),"class"in h&&t(1,u=h.class),"$$scope"in h&&t(8,l=h.$$scope)},n.$$.update=()=>{n.$$.dirty&160&&t(3,c=B.toArray(B.getNestedVal(i,r)))},[a,u,f,c,o,r,d,i,l,s,m,_]}class pe extends ge{constructor(e){super(),_e(this,e,Yy,Wy,me,{name:5,inlineError:0,class:1,changed:6})}get changed(){return this.$$.ctx[6]}}function Ky(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0]),l.focus(),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&re(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function Jy(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Password"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){w(c,e,d),g(e,t),w(c,s,d),w(c,l,d),re(l,n[1]),w(c,r,d),w(c,a,d),u||(f=J(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&re(l,c[1])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function Zy(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Password confirm"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[2]),r||(a=J(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&re(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function Gy(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;return s=new pe({props:{class:"form-field required",name:"email",$$slots:{default:[Ky,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[Jy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),a=new pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Zy,({uniqueId:_})=>({9:_}),({uniqueId:_})=>_?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=E(),H(s.$$.fragment),l=E(),H(o.$$.fragment),r=E(),H(a.$$.fragment),u=E(),f=v("button"),f.innerHTML=`Create and login + `,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),Q(f,"btn-disabled",n[3]),Q(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(_,h){w(_,e,h),g(e,t),g(e,i),V(s,e,null),g(e,l),V(o,e,null),g(e,r),V(a,e,null),g(e,u),g(e,f),c=!0,d||(m=J(e,"submit",et(n[4])),d=!0)},p(_,[h]){const b={};h&1537&&(b.$$scope={dirty:h,ctx:_}),s.$set(b);const y={};h&1538&&(y.$$scope={dirty:h,ctx:_}),o.$set(y);const S={};h&1540&&(S.$$scope={dirty:h,ctx:_}),a.$set(S),(!c||h&8)&&Q(f,"btn-disabled",_[3]),(!c||h&8)&&Q(f,"btn-loading",_[3])},i(_){c||(A(s.$$.fragment,_),A(o.$$.fragment,_),A(a.$$.fragment,_),c=!0)},o(_){I(s.$$.fragment,_),I(o.$$.fragment,_),I(a.$$.fragment,_),c=!1},d(_){_&&k(e),z(s),z(o),z(a),d=!1,m()}}}function Xy(n,e,t){const i=$t();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await ce.admins.create({email:s,password:l,passwordConfirm:o}),await ce.admins.authWithPassword(s,l),i("submit")}catch(d){ce.error(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class Qy extends ge{constructor(e){super(),_e(this,e,Xy,Gy,me,{})}}function nf(n){let e,t;return e=new vb({props:{$$slots:{default:[xy]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function xy(n){let e,t;return e=new Qy({}),e.$on("submit",n[1]),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p:x,i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function ek(n){let e,t,i=n[0]&&nf(n);return{c(){i&&i.c(),e=ye()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&A(i,1)):(i=nf(s),i.c(),A(i,1),i.m(e.parentNode,e)):i&&(ae(),I(i,1,1,()=>{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function tk(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){ce.logout(!1),t(0,i=!0);return}ce.authStore.isValid?ji("/collections"):ce.logout()}return[i,async()=>{t(0,i=!1),await fn(),window.location.search=""}]}class nk extends ge{constructor(e){super(),_e(this,e,tk,ek,me,{})}}const Tt=In(""),$o=In(""),As=In(!1);function ik(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){w(l,e,o),n[13](e),re(e,n[7]),i||(s=J(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&re(e,l[7])},i:x,o:x,d(l){l&&k(e),n[13](null),i=!1,s()}}}function sk(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=Rt(o,r(n)),ee.push(()=>de(e,"value",l)),e.$on("submit",n[10])),{c(){e&&H(e.$$.fragment),i=ye()},m(a,u){e&&V(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],he(()=>t=!1)),u&16&&o!==(o=a[4])){if(e){ae();const c=e;I(c.$$.fragment,1,0,()=>{z(c,1)}),ue()}o?(e=Rt(o,r(a)),ee.push(()=>de(e,"value",l)),e.$on("submit",a[10]),H(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function sf(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){w(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{i&&(t||(t=je(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=je(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function lf(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(o,r){w(o,e,r),i=!0,s||(l=J(e,"click",n[15]),s=!0)},p:x,i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,fi,{duration:150,x:5},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,fi,{duration:150,x:5},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function lk(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[sk,ik],m=[];function _(y,S){return y[4]&&!y[5]?0:1}l=_(n),o=m[l]=d[l](n);let h=(n[0].length||n[7].length)&&n[7]!=n[0]&&sf(),b=(n[0].length||n[7].length)&&lf(n);return{c(){e=v("form"),t=v("label"),i=v("i"),s=E(),o.c(),r=E(),h&&h.c(),a=E(),b&&b.c(),p(i,"class","ri-search-line"),p(t,"for",n[8]),p(t,"class","m-l-10 txt-xl"),p(e,"class","searchbar")},m(y,S){w(y,e,S),g(e,t),g(t,i),g(e,s),m[l].m(e,null),g(e,r),h&&h.m(e,null),g(e,a),b&&b.m(e,null),u=!0,f||(c=[J(e,"click",An(n[11])),J(e,"submit",et(n[10]))],f=!0)},p(y,[S]){let C=l;l=_(y),l===C?m[l].p(y,S):(ae(),I(m[C],1,1,()=>{m[C]=null}),ue(),o=m[l],o?o.p(y,S):(o=m[l]=d[l](y),o.c()),A(o,1),o.m(e,r)),(y[0].length||y[7].length)&&y[7]!=y[0]?h?S&129&&A(h,1):(h=sf(),h.c(),A(h,1),h.m(e,a)):h&&(ae(),I(h,1,1,()=>{h=null}),ue()),y[0].length||y[7].length?b?(b.p(y,S),S&129&&A(b,1)):(b=lf(y),b.c(),A(b,1),b.m(e,null)):b&&(ae(),I(b,1,1,()=>{b=null}),ue())},i(y){u||(A(o),A(h),A(b),u=!0)},o(y){I(o),I(h),I(b),u=!1},d(y){y&&k(e),m[l].d(),h&&h.d(),b&&b.d(),f=!1,Ee(c)}}}function ok(n,e,t){const i=$t(),s="search_"+B.randomString(7);let{value:l=""}=e,{placeholder:o='Search term or filter like created > "2022-01-01"...'}=e,{autocompleteCollection:r=new yn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function m(T=!0){t(7,d=""),T&&(c==null||c.focus()),i("clear")}function _(){t(0,l=d),i("submit",l)}async function h(){u||f||(t(5,f=!0),t(4,u=(await at(()=>import("./FilterAutocompleteInput-0a8b8b21.js"),["./FilterAutocompleteInput-0a8b8b21.js","./index-fd4289fb.js"],import.meta.url)).default),t(5,f=!1))}Gt(()=>{h()});function b(T){Ne.call(this,n,T)}function y(T){d=T,t(7,d),t(0,l)}function S(T){ee[T?"unshift":"push"](()=>{c=T,t(6,c)})}function C(){d=this.value,t(7,d),t(0,l)}const $=()=>{m(!1),_()};return n.$$set=T=>{"value"in T&&t(0,l=T.value),"placeholder"in T&&t(1,o=T.placeholder),"autocompleteCollection"in T&&t(2,r=T.autocompleteCollection),"extraAutocompleteKeys"in T&&t(3,a=T.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,m,_,b,y,S,C,$]}class Zo extends ge{constructor(e){super(),_e(this,e,ok,lk,me,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}function rk(n){let e,t,i,s,l,o;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-refresh-line svelte-1bvelc2"),p(e,"type","button"),p(e,"aria-label","Refresh"),p(e,"class",i="btn btn-transparent btn-circle "+n[1]+" svelte-1bvelc2"),Q(e,"refreshing",n[2])},m(r,a){w(r,e,a),g(e,t),l||(o=[Me(s=He.call(null,e,n[0])),J(e,"click",n[3])],l=!0)},p(r,[a]){a&2&&i!==(i="btn btn-transparent btn-circle "+r[1]+" svelte-1bvelc2")&&p(e,"class",i),s&&jt(s.update)&&a&1&&s.update.call(null,r[0]),a&6&&Q(e,"refreshing",r[2])},i:x,o:x,d(r){r&&k(e),l=!1,Ee(o)}}}function ak(n,e,t){const i=$t();let{tooltip:s={text:"Refresh",position:"right"}}=e,{class:l=""}=e,o=null;function r(){i("refresh");const a=s;t(0,s=null),clearTimeout(o),t(2,o=setTimeout(()=>{t(2,o=null),t(0,s=a)},150))}return Gt(()=>()=>clearTimeout(o)),n.$$set=a=>{"tooltip"in a&&t(0,s=a.tooltip),"class"in a&&t(1,l=a.class)},[s,l,o,r]}class Go extends ge{constructor(e){super(),_e(this,e,ak,rk,me,{tooltip:0,class:1})}}function uk(n){let e,t,i,s,l;const o=n[6].default,r=yt(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"title",n[2]),p(e,"class",t="col-sort "+n[1]),Q(e,"col-sort-disabled",n[3]),Q(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),Q(e,"sort-desc",n[0]==="-"+n[2]),Q(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){w(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"click",n[7]),J(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&wt(r,o,a,a[5],i?kt(o,a[5],u,null):St(a[5]),null),(!i||u&4)&&p(e,"title",a[2]),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&Q(e,"col-sort-disabled",a[3]),(!i||u&7)&&Q(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&Q(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&Q(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(A(r,a),i=!0)},o(a){I(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),s=!1,Ee(l)}}}function fk(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 an extends ge{constructor(e){super(),_e(this,e,fk,uk,me,{class:1,name:2,sort:0,disable:3})}}function ck(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function dk(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=U(n[2]),s=E(),l=v("div"),o=U(n[1]),r=U(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){w(a,e,u),g(e,t),g(t,i),g(e,s),g(e,l),g(l,o),g(l,r)},p(a,u){u&4&&se(i,a[2]),u&2&&se(o,a[1])},d(a){a&&k(e)}}}function pk(n){let e;function t(l,o){return l[0]?dk:ck}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&k(e)}}}function mk(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 wi extends ge{constructor(e){super(),_e(this,e,mk,pk,me,{date:0})}}const hk=n=>({}),of=n=>({}),_k=n=>({}),rf=n=>({});function gk(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=yt(u,n,n[4],rf),c=n[5].default,d=yt(c,n,n[4],null),m=n[5].after,_=yt(m,n,n[4],of);return{c(){e=v("div"),f&&f.c(),t=E(),i=v("div"),d&&d.c(),l=E(),_&&_.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(h,b){w(h,e,b),f&&f.m(e,null),g(e,t),g(e,i),d&&d.m(i,null),n[6](i),g(e,l),_&&_.m(e,null),o=!0,r||(a=[J(window,"resize",n[1]),J(i,"scroll",n[1])],r=!0)},p(h,[b]){f&&f.p&&(!o||b&16)&&wt(f,u,h,h[4],o?kt(u,h[4],b,_k):St(h[4]),rf),d&&d.p&&(!o||b&16)&&wt(d,c,h,h[4],o?kt(c,h[4],b,null):St(h[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+h[0]+" "+h[3]+" svelte-wc2j9h"))&&p(i,"class",s),_&&_.p&&(!o||b&16)&&wt(_,m,h,h[4],o?kt(m,h[4],b,hk):St(h[4]),of)},i(h){o||(A(f,h),A(d,h),A(_,h),o=!0)},o(h){I(f,h),I(d,h),I(_,h),o=!1},d(h){h&&k(e),f&&f.d(h),d&&d.d(h),n[6](null),_&&_.d(h),r=!1,Ee(a)}}}function bk(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){o&&(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,m=o.scrollWidth;m-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==m&&t(3,r+=" scroll-end")):t(3,r="")},100))}Gt(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){ee[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 ja extends ge{constructor(e){super(),_e(this,e,bk,gk,me,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function af(n,e,t){const i=n.slice();return i[23]=e[t],i}function vk(n){let e;return{c(){e=v("div"),e.innerHTML=` + Method`,p(e,"class","col-header-content")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function yk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="URL",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function kk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Referer",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function wk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="User IP",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function Sk(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Status",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function $k(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="Created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function uf(n){let e;function t(l,o){return l[6]?Tk:Ck}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function Ck(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&ff(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),g(e,t),g(t,i),g(t,s),o&&o.m(t,null),g(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=ff(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function Tk(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function ff(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[19]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function cf(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function df(n,e){var Te,Ze,ht;let t,i,s,l=((Te=e[23].method)==null?void 0:Te.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,m,_,h,b,y,S=(e[23].referer||"N/A")+"",C,$,T,M,O,D=(e[23].userIp||"N/A")+"",L,P,N,F,R,q=e[23].status+"",j,W,X,K,Z,le,ne,ie,be,Se,Ve=(((Ze=e[23].meta)==null?void 0:Ze.errorMessage)||((ht=e[23].meta)==null?void 0:ht.errorData))&&cf();K=new wi({props:{date:e[23].created}});function Be(){return e[17](e[23])}function ke(...Ge){return e[18](e[23],...Ge)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=U(l),a=E(),u=v("td"),f=v("span"),d=U(c),_=E(),Ve&&Ve.c(),h=E(),b=v("td"),y=v("span"),C=U(S),T=E(),M=v("td"),O=v("span"),L=U(D),N=E(),F=v("td"),R=v("span"),j=U(q),W=E(),X=v("td"),H(K.$$.fragment),Z=E(),le=v("td"),le.innerHTML='',ne=E(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",m=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",$=e[23].referer),Q(y,"txt-hint",!e[23].referer),p(b,"class","col-type-text col-field-referer"),p(O,"class","txt txt-ellipsis"),p(O,"title",P=e[23].userIp),Q(O,"txt-hint",!e[23].userIp),p(M,"class","col-type-number col-field-userIp"),p(R,"class","label"),Q(R,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(X,"class","col-type-date col-field-created"),p(le,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Ge,Ye){w(Ge,t,Ye),g(t,i),g(i,s),g(s,o),g(t,a),g(t,u),g(u,f),g(f,d),g(u,_),Ve&&Ve.m(u,null),g(t,h),g(t,b),g(b,y),g(y,C),g(t,T),g(t,M),g(M,O),g(O,L),g(t,N),g(t,F),g(F,R),g(R,j),g(t,W),g(t,X),V(K,X,null),g(t,Z),g(t,le),g(t,ne),ie=!0,be||(Se=[J(t,"click",Be),J(t,"keydown",ke)],be=!0)},p(Ge,Ye){var fe,ze,Dt;e=Ge,(!ie||Ye&8)&&l!==(l=((fe=e[23].method)==null?void 0:fe.toUpperCase())+"")&&se(o,l),(!ie||Ye&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!ie||Ye&8)&&c!==(c=e[23].url+"")&&se(d,c),(!ie||Ye&8&&m!==(m=e[23].url))&&p(f,"title",m),(ze=e[23].meta)!=null&&ze.errorMessage||(Dt=e[23].meta)!=null&&Dt.errorData?Ve||(Ve=cf(),Ve.c(),Ve.m(u,null)):Ve&&(Ve.d(1),Ve=null),(!ie||Ye&8)&&S!==(S=(e[23].referer||"N/A")+"")&&se(C,S),(!ie||Ye&8&&$!==($=e[23].referer))&&p(y,"title",$),(!ie||Ye&8)&&Q(y,"txt-hint",!e[23].referer),(!ie||Ye&8)&&D!==(D=(e[23].userIp||"N/A")+"")&&se(L,D),(!ie||Ye&8&&P!==(P=e[23].userIp))&&p(O,"title",P),(!ie||Ye&8)&&Q(O,"txt-hint",!e[23].userIp),(!ie||Ye&8)&&q!==(q=e[23].status+"")&&se(j,q),(!ie||Ye&8)&&Q(R,"label-danger",e[23].status>=400);const we={};Ye&8&&(we.date=e[23].created),K.$set(we)},i(Ge){ie||(A(K.$$.fragment,Ge),ie=!0)},o(Ge){I(K.$$.fragment,Ge),ie=!1},d(Ge){Ge&&k(t),Ve&&Ve.d(),z(K),be=!1,Ee(Se)}}}function Mk(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L=[],P=new Map,N;function F(ke){n[11](ke)}let R={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[vk]},$$scope:{ctx:n}};n[1]!==void 0&&(R.sort=n[1]),s=new an({props:R}),ee.push(()=>de(s,"sort",F));function q(ke){n[12](ke)}let j={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[yk]},$$scope:{ctx:n}};n[1]!==void 0&&(j.sort=n[1]),r=new an({props:j}),ee.push(()=>de(r,"sort",q));function W(ke){n[13](ke)}let X={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[kk]},$$scope:{ctx:n}};n[1]!==void 0&&(X.sort=n[1]),f=new an({props:X}),ee.push(()=>de(f,"sort",W));function K(ke){n[14](ke)}let Z={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[wk]},$$scope:{ctx:n}};n[1]!==void 0&&(Z.sort=n[1]),m=new an({props:Z}),ee.push(()=>de(m,"sort",K));function le(ke){n[15](ke)}let ne={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[Sk]},$$scope:{ctx:n}};n[1]!==void 0&&(ne.sort=n[1]),b=new an({props:ne}),ee.push(()=>de(b,"sort",le));function ie(ke){n[16](ke)}let be={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[$k]},$$scope:{ctx:n}};n[1]!==void 0&&(be.sort=n[1]),C=new an({props:be}),ee.push(()=>de(C,"sort",ie));let Se=n[3];const Ve=ke=>ke[23].id;for(let ke=0;kel=!1)),s.$set(Ze);const ht={};Te&67108864&&(ht.$$scope={dirty:Te,ctx:ke}),!a&&Te&2&&(a=!0,ht.sort=ke[1],he(()=>a=!1)),r.$set(ht);const Ge={};Te&67108864&&(Ge.$$scope={dirty:Te,ctx:ke}),!c&&Te&2&&(c=!0,Ge.sort=ke[1],he(()=>c=!1)),f.$set(Ge);const Ye={};Te&67108864&&(Ye.$$scope={dirty:Te,ctx:ke}),!_&&Te&2&&(_=!0,Ye.sort=ke[1],he(()=>_=!1)),m.$set(Ye);const we={};Te&67108864&&(we.$$scope={dirty:Te,ctx:ke}),!y&&Te&2&&(y=!0,we.sort=ke[1],he(()=>y=!1)),b.$set(we);const fe={};Te&67108864&&(fe.$$scope={dirty:Te,ctx:ke}),!$&&Te&2&&($=!0,fe.sort=ke[1],he(()=>$=!1)),C.$set(fe),Te&841&&(Se=ke[3],ae(),L=bt(L,Te,Ve,1,ke,Se,P,D,Bt,df,null,af),ue(),!Se.length&&Be?Be.p(ke,Te):Se.length?Be&&(Be.d(1),Be=null):(Be=uf(ke),Be.c(),Be.m(D,null))),(!N||Te&64)&&Q(e,"table-loading",ke[6])},i(ke){if(!N){A(s.$$.fragment,ke),A(r.$$.fragment,ke),A(f.$$.fragment,ke),A(m.$$.fragment,ke),A(b.$$.fragment,ke),A(C.$$.fragment,ke);for(let Te=0;Te{if(P<=1&&h(),t(6,d=!1),t(5,f=F.page),t(4,c=F.totalItems),s("load",u.concat(F.items)),N){const R=++m;for(;F.items.length&&m==R;)t(3,u=u.concat(F.items.splice(0,10))),await B.yieldToMain()}else t(3,u=u.concat(F.items))}).catch(F=>{F!=null&&F.isAbort||(t(6,d=!1),console.warn(F),h(),ce.error(F,!1))})}function h(){t(3,u=[]),t(5,f=1),t(4,c=0)}function b(P){a=P,t(1,a)}function y(P){a=P,t(1,a)}function S(P){a=P,t(1,a)}function C(P){a=P,t(1,a)}function $(P){a=P,t(1,a)}function T(P){a=P,t(1,a)}const M=P=>s("select",P),O=(P,N)=>{N.code==="Enter"&&(N.preventDefault(),s("select",P))},D=()=>t(0,o=""),L=()=>_(f+1);return n.$$set=P=>{"filter"in P&&t(0,o=P.filter),"presets"in P&&t(10,r=P.presets),"sort"in P&&t(1,a=P.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(h(),_(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,_,u,c,f,d,i,s,l,r,b,y,S,C,$,T,M,O,D,L]}class Dk extends ge{constructor(e){super(),_e(this,e,Ek,Ok,me,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! * Chart.js v3.9.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License - */function mi(){}const Ek=function(){let n=0;return function(){return n++}}();function ct(n){return n===null||typeof n>"u"}function Ct(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function tt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Ht=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function qn(n,e){return Ht(n)?n:e}function st(n,e){return typeof n>"u"?e:n}const Dk=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,vb=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Pt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function pt(n,e,t,i){let s,l,o;if(Ct(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function Ri(n,e){return(hf[e]||(hf[e]=Lk(e)))(n)}function Lk(n){const e=Pk(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Pk(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function Va(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Wn=n=>typeof n<"u",qi=n=>typeof n=="function",_f=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function Nk(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const Rt=Math.PI,gt=2*Rt,Fk=gt+Rt,To=Number.POSITIVE_INFINITY,Rk=Rt/180,Nt=Rt/2,Ks=Rt/4,gf=Rt*2/3,Bn=Math.log10,oi=Math.sign;function bf(n){const e=Math.round(n);n=rl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Bn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function qk(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function Is(n){return!isNaN(parseFloat(n))&&isFinite(n)}function rl(n,e,t){return Math.abs(n-e)=n}function kb(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&u=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ha(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const es=(n,e,t,i)=>Ha(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ha(n,t,i=>n[i][e]>=t);function Bk(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+Va(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function yf(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(Sb.forEach(l=>{delete n[l]}),delete n._chartjs)}function $b(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function Tb(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,Cb.call(window,()=>{s=!1,n.apply(e,l)}))}}function Wk(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Yk=n=>n==="start"?"left":n==="end"?"right":"center",kf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function Mb(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:u,max:f,minDefined:c,maxDefined:d}=o.getUserBounds();c&&(s=un(Math.min(es(r,o.axis,u).lo,t?i:es(e,a,o.getPixelForValue(u)).lo),0,i-1)),d?l=un(Math.max(es(r,o.axis,f,!0).hi+1,t?0:es(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function Ob(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Wl=n=>n===0||n===1,wf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*gt/t)),Sf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*gt/t)+1,al={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Nt)+1,easeOutSine:n=>Math.sin(n*Nt),easeInOutSine:n=>-.5*(Math.cos(Rt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Wl(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Wl(n)?n:wf(n,.075,.3),easeOutElastic:n=>Wl(n)?n:Sf(n,.075,.3),easeInOutElastic(n){return Wl(n)?n:n<.5?.5*wf(n*2,.1125,.45):.5+.5*Sf(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-al.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?al.easeInBounce(n*2)*.5:al.easeOutBounce(n*2-1)*.5+.5};/*! + */function mi(){}const Ak=function(){let n=0;return function(){return n++}}();function ct(n){return n===null||typeof n>"u"}function Ct(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function tt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const Ht=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function qn(n,e){return Ht(n)?n:e}function st(n,e){return typeof n>"u"?e:n}const Ik=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,kb=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function Nt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function pt(n,e,t,i){let s,l,o;if(Ct(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function Ri(n,e){return(hf[e]||(hf[e]=Nk(e)))(n)}function Nk(n){const e=Fk(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Fk(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function Va(n){return n.charAt(0).toUpperCase()+n.slice(1)}const Wn=n=>typeof n<"u",qi=n=>typeof n=="function",_f=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function Rk(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const qt=Math.PI,gt=2*qt,qk=gt+qt,Mo=Number.POSITIVE_INFINITY,jk=qt/180,Ft=qt/2,Ks=qt/4,gf=qt*2/3,Bn=Math.log10,oi=Math.sign;function bf(n){const e=Math.round(n);n=rl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(Bn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function Vk(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function Is(n){return!isNaN(parseFloat(n))&&isFinite(n)}function rl(n,e,t){return Math.abs(n-e)=n}function Sb(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&u=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ha(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const es=(n,e,t,i)=>Ha(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ha(n,t,i=>n[i][e]>=t);function Wk(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+Va(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function yf(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(Cb.forEach(l=>{delete n[l]}),delete n._chartjs)}function Tb(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function Ob(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,Mb.call(window,()=>{s=!1,n.apply(e,l)}))}}function Kk(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Jk=n=>n==="start"?"left":n==="end"?"right":"center",kf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function Eb(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:u,max:f,minDefined:c,maxDefined:d}=o.getUserBounds();c&&(s=un(Math.min(es(r,o.axis,u).lo,t?i:es(e,a,o.getPixelForValue(u)).lo),0,i-1)),d?l=un(Math.max(es(r,o.axis,f,!0).hi+1,t?0:es(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function Db(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Wl=n=>n===0||n===1,wf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*gt/t)),Sf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*gt/t)+1,al={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Ft)+1,easeOutSine:n=>Math.sin(n*Ft),easeInOutSine:n=>-.5*(Math.cos(qt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Wl(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Wl(n)?n:wf(n,.075,.3),easeOutElastic:n=>Wl(n)?n:Sf(n,.075,.3),easeInOutElastic(n){return Wl(n)?n:n<.5?.5*wf(n*2,.1125,.45):.5+.5*Sf(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-al.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?al.easeInBounce(n*2)*.5:al.easeOutBounce(n*2-1)*.5+.5};/*! * @kurkle/color v0.2.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela * Released under the MIT License - */function Dl(n){return n+.5|0}const Ii=(n,e,t)=>Math.max(Math.min(n,t),e);function nl(n){return Ii(Dl(n*2.55),0,255)}function Fi(n){return Ii(Dl(n*255),0,255)}function gi(n){return Ii(Dl(n/2.55)/100,0,1)}function $f(n){return Ii(Dl(n*100),0,100)}const Rn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},oa=[..."0123456789ABCDEF"],Kk=n=>oa[n&15],Jk=n=>oa[(n&240)>>4]+oa[n&15],Yl=n=>(n&240)>>4===(n&15),Zk=n=>Yl(n.r)&&Yl(n.g)&&Yl(n.b)&&Yl(n.a);function Gk(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Rn[n[1]]*17,g:255&Rn[n[2]]*17,b:255&Rn[n[3]]*17,a:e===5?Rn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Rn[n[1]]<<4|Rn[n[2]],g:Rn[n[3]]<<4|Rn[n[4]],b:Rn[n[5]]<<4|Rn[n[6]],a:e===9?Rn[n[7]]<<4|Rn[n[8]]:255})),t}const Xk=(n,e)=>n<255?e(n):"";function Qk(n){var e=Zk(n)?Kk:Jk;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Xk(n.a,e):void 0}const xk=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Eb(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function e2(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function t2(n,e,t){const i=Eb(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function n2(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=n2(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Ua(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Fi)}function Wa(n,e,t){return Ua(Eb,n,e,t)}function i2(n,e,t){return Ua(t2,n,e,t)}function s2(n,e,t){return Ua(e2,n,e,t)}function Db(n){return(n%360+360)%360}function l2(n){const e=xk.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?nl(+e[5]):Fi(+e[5]));const s=Db(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=i2(s,l,o):e[1]==="hsv"?i=s2(s,l,o):i=Wa(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function o2(n,e){var t=Ba(n);t[0]=Db(t[0]+e),t=Wa(t),n.r=t[0],n.g=t[1],n.b=t[2]}function r2(n){if(!n)return;const e=Ba(n),t=e[0],i=$f(e[1]),s=$f(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${gi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Cf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Tf={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function a2(){const n={},e=Object.keys(Tf),t=Object.keys(Cf);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Kl;function u2(n){Kl||(Kl=a2(),Kl.transparent=[0,0,0,0]);const e=Kl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const f2=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function c2(n){const e=f2.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?nl(o):Ii(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?nl(i):Ii(i,0,255)),s=255&(e[4]?nl(s):Ii(s,0,255)),l=255&(e[6]?nl(l):Ii(l,0,255)),{r:i,g:s,b:l,a:t}}}function d2(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${gi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const mr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,bs=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function p2(n,e,t){const i=bs(gi(n.r)),s=bs(gi(n.g)),l=bs(gi(n.b));return{r:Fi(mr(i+t*(bs(gi(e.r))-i))),g:Fi(mr(s+t*(bs(gi(e.g))-s))),b:Fi(mr(l+t*(bs(gi(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Jl(n,e,t){if(n){let i=Ba(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Wa(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Ab(n,e){return n&&Object.assign(e||{},n)}function Mf(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=Fi(n[3]))):(e=Ab(n,{r:0,g:0,b:0,a:1}),e.a=Fi(e.a)),e}function m2(n){return n.charAt(0)==="r"?c2(n):l2(n)}class Mo{constructor(e){if(e instanceof Mo)return e;const t=typeof e;let i;t==="object"?i=Mf(e):t==="string"&&(i=Gk(e)||u2(e)||m2(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Ab(this._rgb);return e&&(e.a=gi(e.a)),e}set rgb(e){this._rgb=Mf(e)}rgbString(){return this._valid?d2(this._rgb):void 0}hexString(){return this._valid?Qk(this._rgb):void 0}hslString(){return this._valid?r2(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,u=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-u,i.r=255&u*i.r+l*s.r+.5,i.g=255&u*i.g+l*s.g+.5,i.b=255&u*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=p2(this._rgb,e._rgb,t)),this}clone(){return new Mo(this.rgb)}alpha(e){return this._rgb.a=Fi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Dl(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Jl(this._rgb,2,e),this}darken(e){return Jl(this._rgb,2,-e),this}saturate(e){return Jl(this._rgb,1,e),this}desaturate(e){return Jl(this._rgb,1,-e),this}rotate(e){return o2(this._rgb,e),this}}function Ib(n){return new Mo(n)}function Lb(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Of(n){return Lb(n)?n:Ib(n)}function hr(n){return Lb(n)?n:Ib(n).saturate(.5).darken(.1).hexString()}const rs=Object.create(null),ra=Object.create(null);function ul(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>hr(i.backgroundColor),this.hoverBorderColor=(t,i)=>hr(i.borderColor),this.hoverColor=(t,i)=>hr(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return _r(this,e,t)}get(e){return ul(this,e)}describe(e,t){return _r(ra,e,t)}override(e,t){return _r(rs,e,t)}route(e,t,i,s){const l=ul(this,e),o=ul(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],u=o[s];return tt(a)?Object.assign({},u,a):st(a,u)},set(a){this[r]=a}}})}}var lt=new h2({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function _2(n){return!n||ct(n.size)||ct(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Oo(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function g2(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,u,f,c,d;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function bl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,k2(n,l),a=0;a+n||0;function Ja(n,e){const t={},i=tt(e),s=i?Object.keys(e):e,l=tt(n)?i?o=>st(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=T2(l(o));return t}function Pb(n){return Ja(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Cs(n){return Ja(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Yn(n){const e=Pb(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function En(n,e){n=n||{},e=e||lt.font;let t=st(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=st(n.style,e.style);i&&!(""+i).match($2)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:st(n.family,e.family),lineHeight:C2(st(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:st(n.weight,e.weight),string:""};return s.string=_2(s),s}function Zl(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function Vi(n,e){return Object.assign(Object.create(n),e)}function Za(n,e=[""],t=n,i,s=()=>n[0]){Wn(i)||(i=qb("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Za([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return Fb(o,r,()=>N2(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return Af(o).includes(r)},ownKeys(o){return Af(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Ls(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:Nb(n,i),setContext:l=>Ls(n,l,t,i),override:l=>Ls(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return Fb(l,o,()=>E2(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function Nb(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:qi(t)?t:()=>t,isIndexable:qi(i)?i:()=>i}}const O2=(n,e)=>n?n+Va(e):e,Ga=(n,e)=>tt(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Fb(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function E2(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return qi(r)&&o.isScriptable(e)&&(r=D2(e,r,n,t)),Ct(r)&&r.length&&(r=A2(e,r,n,o.isIndexable)),Ga(e,r)&&(r=Ls(r,s,l&&l[e],o)),r}function D2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),Ga(n,e)&&(e=Xa(s._scopes,s,n,e)),e}function A2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(Wn(l.index)&&i(n))e=e[l.index%e.length];else if(tt(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Xa(u,s,n,f);e.push(Ls(c,l,o&&o[n],r))}}return e}function Rb(n,e,t){return qi(n)?n(e,t):n}const I2=(n,e)=>n===!0?e:typeof n=="string"?Ri(e,n):void 0;function L2(n,e,t,i,s){for(const l of e){const o=I2(t,l);if(o){n.add(o);const r=Rb(o._fallback,t,s);if(Wn(r)&&r!==t&&r!==i)return r}else if(o===!1&&Wn(i)&&t!==i)return null}return!1}function Xa(n,e,t,i){const s=e._rootScopes,l=Rb(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=Df(r,o,t,l||t,i);return a===null||Wn(l)&&l!==t&&(a=Df(r,o,l,a,i),a===null)?!1:Za(Array.from(r),[""],s,l,()=>P2(e,t,i))}function Df(n,e,t,i,s){for(;t;)t=L2(n,e,t,i,s);return t}function P2(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return Ct(s)&&tt(t)?t:s}function N2(n,e,t,i){let s;for(const l of e)if(s=qb(O2(l,n),t),Wn(s))return Ga(n,s)?Xa(t,i,n,s):s}function qb(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Wn(i))return i}}function Af(n){let e=n._keys;return e||(e=n._keys=F2(n._scopes)),e}function F2(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function jb(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,u,f;for(r=0,a=i;ren==="x"?"y":"x";function q2(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=la(l,s),a=la(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const c=i*u,d=i*f;return{previous:{x:l.x-c*(o.x-s.x),y:l.y-c*(o.y-s.y)},next:{x:l.x+d*(o.x-s.x),y:l.y+d*(o.y-s.y)}}}function j2(n,e,t){const i=n.length;let s,l,o,r,a,u=Ps(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")z2(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function U2(n,e){return Go(n).getPropertyValue(e)}const W2=["top","right","bottom","left"];function is(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=W2[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Y2=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function K2(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(Y2(s,l,n.target))r=s,a=l;else{const u=e.getBoundingClientRect();r=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:r,y:a,box:o}}function Xi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Go(t),l=s.boxSizing==="border-box",o=is(s,"padding"),r=is(s,"border","width"),{x:a,y:u,box:f}=K2(n,t),c=o.left+(f&&r.left),d=o.top+(f&&r.top);let{width:m,height:_}=e;return l&&(m-=o.width+r.width,_-=o.height+r.height),{x:Math.round((a-c)/m*t.width/i),y:Math.round((u-d)/_*t.height/i)}}function J2(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Qa(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Go(l),a=is(r,"border","width"),u=is(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Ao(r.maxWidth,l,"clientWidth"),s=Ao(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||To,maxHeight:s||To}}const gr=n=>Math.round(n*10)/10;function Z2(n,e,t,i){const s=Go(n),l=is(s,"margin"),o=Ao(s.maxWidth,n,"clientWidth")||To,r=Ao(s.maxHeight,n,"clientHeight")||To,a=J2(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=is(s,"border","width"),d=is(s,"padding");u-=d.width+c.width,f-=d.height+c.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=gr(Math.min(u,o,a.maxWidth)),f=gr(Math.min(f,r,a.maxHeight)),u&&!f&&(f=gr(u/2)),{width:u,height:f}}function If(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const G2=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function Lf(n,e){const t=U2(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Qi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function X2(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function Q2(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=Qi(n,s,t),r=Qi(s,l,t),a=Qi(l,e,t),u=Qi(o,r,t),f=Qi(r,a,t);return Qi(u,f,t)}const Pf=new Map;function x2(n,e){e=e||{};const t=n+JSON.stringify(e);let i=Pf.get(t);return i||(i=new Intl.NumberFormat(n,e),Pf.set(t,i)),i}function Al(n,e,t){return x2(e,t).format(n)}const ew=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},tw=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function br(n,e,t){return n?ew(e,t):tw()}function nw(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function iw(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function Hb(n){return n==="angle"?{between:_l,compare:Vk,normalize:On}:{between:gl,compare:(e,t)=>e-t,normalize:e=>e}}function Nf({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function sw(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=Hb(i),a=e.length;let{start:u,end:f,loop:c}=n,d,m;if(c){for(u+=a,f+=a,d=0,m=a;da(s,C,y)&&r(s,C)!==0,T=()=>r(l,y)===0||a(l,C,y),M=()=>h||$(),O=()=>!h||T();for(let D=f,L=f;D<=c;++D)S=e[D%o],!S.skip&&(y=u(S[i]),y!==C&&(h=a(y,s,l),b===null&&M()&&(b=r(y,s)===0?D:L),b!==null&&O()&&(_.push(Nf({start:b,end:D,loop:d,count:o,style:m})),b=null),L=D,C=y));return b!==null&&_.push(Nf({start:b,end:c,loop:d,count:o,style:m})),_}function Ub(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function ow(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=u.stop?a:null):(o=a,r.skip&&(e=a)),r=u}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function rw(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=lw(t,s,l,i);if(i===!0)return Ff(n,[{start:o,end:r,loop:l}],t,e);const a=rMath.max(Math.min(n,t),e);function nl(n){return Ii(Dl(n*2.55),0,255)}function Fi(n){return Ii(Dl(n*255),0,255)}function gi(n){return Ii(Dl(n/2.55)/100,0,1)}function $f(n){return Ii(Dl(n*100),0,100)}const Rn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},oa=[..."0123456789ABCDEF"],Zk=n=>oa[n&15],Gk=n=>oa[(n&240)>>4]+oa[n&15],Yl=n=>(n&240)>>4===(n&15),Xk=n=>Yl(n.r)&&Yl(n.g)&&Yl(n.b)&&Yl(n.a);function Qk(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&Rn[n[1]]*17,g:255&Rn[n[2]]*17,b:255&Rn[n[3]]*17,a:e===5?Rn[n[4]]*17:255}:(e===7||e===9)&&(t={r:Rn[n[1]]<<4|Rn[n[2]],g:Rn[n[3]]<<4|Rn[n[4]],b:Rn[n[5]]<<4|Rn[n[6]],a:e===9?Rn[n[7]]<<4|Rn[n[8]]:255})),t}const xk=(n,e)=>n<255?e(n):"";function e2(n){var e=Xk(n)?Zk:Gk;return n?"#"+e(n.r)+e(n.g)+e(n.b)+xk(n.a,e):void 0}const t2=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Ab(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function n2(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function i2(n,e,t){const i=Ab(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function s2(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=s2(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Ua(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(Fi)}function Wa(n,e,t){return Ua(Ab,n,e,t)}function l2(n,e,t){return Ua(i2,n,e,t)}function o2(n,e,t){return Ua(n2,n,e,t)}function Ib(n){return(n%360+360)%360}function r2(n){const e=t2.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?nl(+e[5]):Fi(+e[5]));const s=Ib(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=l2(s,l,o):e[1]==="hsv"?i=o2(s,l,o):i=Wa(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function a2(n,e){var t=Ba(n);t[0]=Ib(t[0]+e),t=Wa(t),n.r=t[0],n.g=t[1],n.b=t[2]}function u2(n){if(!n)return;const e=Ba(n),t=e[0],i=$f(e[1]),s=$f(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${gi(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const Cf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Tf={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function f2(){const n={},e=Object.keys(Tf),t=Object.keys(Cf);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Kl;function c2(n){Kl||(Kl=f2(),Kl.transparent=[0,0,0,0]);const e=Kl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const d2=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function p2(n){const e=d2.exec(n);let t=255,i,s,l;if(e){if(e[7]!==i){const o=+e[7];t=e[8]?nl(o):Ii(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?nl(i):Ii(i,0,255)),s=255&(e[4]?nl(s):Ii(s,0,255)),l=255&(e[6]?nl(l):Ii(l,0,255)),{r:i,g:s,b:l,a:t}}}function m2(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${gi(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const hr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,bs=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function h2(n,e,t){const i=bs(gi(n.r)),s=bs(gi(n.g)),l=bs(gi(n.b));return{r:Fi(hr(i+t*(bs(gi(e.r))-i))),g:Fi(hr(s+t*(bs(gi(e.g))-s))),b:Fi(hr(l+t*(bs(gi(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Jl(n,e,t){if(n){let i=Ba(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Wa(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Lb(n,e){return n&&Object.assign(e||{},n)}function Mf(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=Fi(n[3]))):(e=Lb(n,{r:0,g:0,b:0,a:1}),e.a=Fi(e.a)),e}function _2(n){return n.charAt(0)==="r"?p2(n):r2(n)}class Oo{constructor(e){if(e instanceof Oo)return e;const t=typeof e;let i;t==="object"?i=Mf(e):t==="string"&&(i=Qk(e)||c2(e)||_2(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Lb(this._rgb);return e&&(e.a=gi(e.a)),e}set rgb(e){this._rgb=Mf(e)}rgbString(){return this._valid?m2(this._rgb):void 0}hexString(){return this._valid?e2(this._rgb):void 0}hslString(){return this._valid?u2(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,u=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-u,i.r=255&u*i.r+l*s.r+.5,i.g=255&u*i.g+l*s.g+.5,i.b=255&u*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=h2(this._rgb,e._rgb,t)),this}clone(){return new Oo(this.rgb)}alpha(e){return this._rgb.a=Fi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Dl(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Jl(this._rgb,2,e),this}darken(e){return Jl(this._rgb,2,-e),this}saturate(e){return Jl(this._rgb,1,e),this}desaturate(e){return Jl(this._rgb,1,-e),this}rotate(e){return a2(this._rgb,e),this}}function Pb(n){return new Oo(n)}function Nb(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Of(n){return Nb(n)?n:Pb(n)}function _r(n){return Nb(n)?n:Pb(n).saturate(.5).darken(.1).hexString()}const rs=Object.create(null),ra=Object.create(null);function ul(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>_r(i.backgroundColor),this.hoverBorderColor=(t,i)=>_r(i.borderColor),this.hoverColor=(t,i)=>_r(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return gr(this,e,t)}get(e){return ul(this,e)}describe(e,t){return gr(ra,e,t)}override(e,t){return gr(rs,e,t)}route(e,t,i,s){const l=ul(this,e),o=ul(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],u=o[s];return tt(a)?Object.assign({},u,a):st(a,u)},set(a){this[r]=a}}})}}var lt=new g2({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function b2(n){return!n||ct(n.size)||ct(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Eo(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function v2(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,u,f,c,d;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function bl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,S2(n,l),a=0;a+n||0;function Ja(n,e){const t={},i=tt(e),s=i?Object.keys(e):e,l=tt(n)?i?o=>st(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=O2(l(o));return t}function Fb(n){return Ja(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Cs(n){return Ja(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Yn(n){const e=Fb(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function En(n,e){n=n||{},e=e||lt.font;let t=st(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=st(n.style,e.style);i&&!(""+i).match(T2)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:st(n.family,e.family),lineHeight:M2(st(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:st(n.weight,e.weight),string:""};return s.string=b2(s),s}function Zl(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function Vi(n,e){return Object.assign(Object.create(n),e)}function Za(n,e=[""],t=n,i,s=()=>n[0]){Wn(i)||(i=Vb("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Za([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return qb(o,r,()=>R2(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return Af(o).includes(r)},ownKeys(o){return Af(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Ls(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:Rb(n,i),setContext:l=>Ls(n,l,t,i),override:l=>Ls(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return qb(l,o,()=>A2(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function Rb(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:qi(t)?t:()=>t,isIndexable:qi(i)?i:()=>i}}const D2=(n,e)=>n?n+Va(e):e,Ga=(n,e)=>tt(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function qb(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function A2(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return qi(r)&&o.isScriptable(e)&&(r=I2(e,r,n,t)),Ct(r)&&r.length&&(r=L2(e,r,n,o.isIndexable)),Ga(e,r)&&(r=Ls(r,s,l&&l[e],o)),r}function I2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),Ga(n,e)&&(e=Xa(s._scopes,s,n,e)),e}function L2(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if(Wn(l.index)&&i(n))e=e[l.index%e.length];else if(tt(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Xa(u,s,n,f);e.push(Ls(c,l,o&&o[n],r))}}return e}function jb(n,e,t){return qi(n)?n(e,t):n}const P2=(n,e)=>n===!0?e:typeof n=="string"?Ri(e,n):void 0;function N2(n,e,t,i,s){for(const l of e){const o=P2(t,l);if(o){n.add(o);const r=jb(o._fallback,t,s);if(Wn(r)&&r!==t&&r!==i)return r}else if(o===!1&&Wn(i)&&t!==i)return null}return!1}function Xa(n,e,t,i){const s=e._rootScopes,l=jb(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=Df(r,o,t,l||t,i);return a===null||Wn(l)&&l!==t&&(a=Df(r,o,l,a,i),a===null)?!1:Za(Array.from(r),[""],s,l,()=>F2(e,t,i))}function Df(n,e,t,i,s){for(;t;)t=N2(n,e,t,i,s);return t}function F2(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return Ct(s)&&tt(t)?t:s}function R2(n,e,t,i){let s;for(const l of e)if(s=Vb(D2(l,n),t),Wn(s))return Ga(n,s)?Xa(t,i,n,s):s}function Vb(n,e){for(const t of e){if(!t)continue;const i=t[n];if(Wn(i))return i}}function Af(n){let e=n._keys;return e||(e=n._keys=q2(n._scopes)),e}function q2(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function zb(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,u,f;for(r=0,a=i;ren==="x"?"y":"x";function V2(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=la(l,s),a=la(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const c=i*u,d=i*f;return{previous:{x:l.x-c*(o.x-s.x),y:l.y-c*(o.y-s.y)},next:{x:l.x+d*(o.x-s.x),y:l.y+d*(o.y-s.y)}}}function z2(n,e,t){const i=n.length;let s,l,o,r,a,u=Ps(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")B2(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Y2(n,e){return Xo(n).getPropertyValue(e)}const K2=["top","right","bottom","left"];function is(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=K2[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const J2=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Z2(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(J2(s,l,n.target))r=s,a=l;else{const u=e.getBoundingClientRect();r=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:r,y:a,box:o}}function Xi(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Xo(t),l=s.boxSizing==="border-box",o=is(s,"padding"),r=is(s,"border","width"),{x:a,y:u,box:f}=Z2(n,t),c=o.left+(f&&r.left),d=o.top+(f&&r.top);let{width:m,height:_}=e;return l&&(m-=o.width+r.width,_-=o.height+r.height),{x:Math.round((a-c)/m*t.width/i),y:Math.round((u-d)/_*t.height/i)}}function G2(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Qa(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Xo(l),a=is(r,"border","width"),u=is(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Io(r.maxWidth,l,"clientWidth"),s=Io(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||Mo,maxHeight:s||Mo}}const br=n=>Math.round(n*10)/10;function X2(n,e,t,i){const s=Xo(n),l=is(s,"margin"),o=Io(s.maxWidth,n,"clientWidth")||Mo,r=Io(s.maxHeight,n,"clientHeight")||Mo,a=G2(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=is(s,"border","width"),d=is(s,"padding");u-=d.width+c.width,f-=d.height+c.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=br(Math.min(u,o,a.maxWidth)),f=br(Math.min(f,r,a.maxHeight)),u&&!f&&(f=br(u/2)),{width:u,height:f}}function If(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Q2=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function Lf(n,e){const t=Y2(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Qi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function x2(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function ew(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=Qi(n,s,t),r=Qi(s,l,t),a=Qi(l,e,t),u=Qi(o,r,t),f=Qi(r,a,t);return Qi(u,f,t)}const Pf=new Map;function tw(n,e){e=e||{};const t=n+JSON.stringify(e);let i=Pf.get(t);return i||(i=new Intl.NumberFormat(n,e),Pf.set(t,i)),i}function Al(n,e,t){return tw(e,t).format(n)}const nw=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},iw=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function vr(n,e,t){return n?nw(e,t):iw()}function sw(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function lw(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function Ub(n){return n==="angle"?{between:_l,compare:Hk,normalize:On}:{between:gl,compare:(e,t)=>e-t,normalize:e=>e}}function Nf({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function ow(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=Ub(i),a=e.length;let{start:u,end:f,loop:c}=n,d,m;if(c){for(u+=a,f+=a,d=0,m=a;da(s,C,y)&&r(s,C)!==0,T=()=>r(l,y)===0||a(l,C,y),M=()=>h||$(),O=()=>!h||T();for(let D=f,L=f;D<=c;++D)S=e[D%o],!S.skip&&(y=u(S[i]),y!==C&&(h=a(y,s,l),b===null&&M()&&(b=r(y,s)===0?D:L),b!==null&&O()&&(_.push(Nf({start:b,end:D,loop:d,count:o,style:m})),b=null),L=D,C=y));return b!==null&&_.push(Nf({start:b,end:c,loop:d,count:o,style:m})),_}function Yb(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function aw(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=u.stop?a:null):(o=a,r.skip&&(e=a)),r=u}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function uw(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=rw(t,s,l,i);if(i===!0)return Ff(n,[{start:o,end:r,loop:l}],t,e);const a=rr({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Cb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var hi=new fw;const qf="transparent",cw={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Of(n||qf),s=i.valid&&Of(e||qf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class dw{constructor(e,t,i,s){const l=t[i];s=Zl([e.to,s,l,e.from]);const o=Zl([e.from,l,s]);this._active=!0,this._fn=e.fn||cw[e.type||typeof o],this._easing=al[e.easing]||al.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Zl([e.to,t,s,e.from]),this._from=Zl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});lt.set("animations",{colors:{type:"color",properties:mw},numbers:{type:"number",properties:pw}});lt.describe("animations",{_fallback:"animation"});lt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class Wb{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!tt(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!tt(s))return;const l={};for(const o of hw)l[o]=s[o];(Ct(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=gw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&_w(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new dw(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return hi.add(this._chart,i),!0}}function _w(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Bf(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,u=o.axis,f=kw(l,o,i),c=e.length;let d;for(let m=0;mt[i].axis===e).shift()}function $w(n,e){return Vi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Cw(n,e,t){return Vi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Js(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const yr=n=>n==="reset"||n==="none",Uf=(n,e)=>e?n:Object.assign({},n),Tw=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:Yb(t,!0),values:null};class xn{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=zf(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Js(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,m,_)=>c==="x"?d:c==="r"?_:m,l=t.xAxisID=st(i.xAxisID,vr(e,"x")),o=t.yAxisID=st(i.yAxisID,vr(e,"y")),r=t.rAxisID=st(i.rAxisID,vr(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,o,r),f=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&yf(this._data,this),e._stacked&&Js(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(tt(t))this._data=yw(t);else if(i!==t){if(i){yf(i,this);const s=this._cachedMeta;Js(s),s._parsed=[]}t&&Object.isExtensible(t)&&Uk(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=zf(t.vScale,t),t.stack!==i.stack&&(s=!0,Js(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Bf(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,u=e>0&&i._parsed[e-1],f,c,d;if(this._parsing===!1)i._parsed=s,i._sorted=!0,d=s;else{Ct(s[e])?d=this.parseArrayData(i,s,e,t):tt(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const m=()=>c[r]===null||u&&c[r]h||c=0;--d)if(!_()){this.updateRangeFromParsed(u,e,m,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),h=u.resolveNamedOptions(d,m,_,c);return h.$shared&&(h.$shared=a,l[o]=Object.freeze(Uf(h,a))),h}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const f=this.chart.config,c=f.datasetAnimationScopeKeys(this._type,t),d=f.getOptionScopes(this.getDataset(),c);a=f.createResolver(d,this.getContext(e,i,t))}const u=new Wb(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||yr(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){yr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!yr(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,u]of this._syncList)this[r](a,u);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(u.length+=t,r=u.length-1;r>=o;r--)u[r]=u[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function Ow(n){const e=n.iScale,t=Mw(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(Wn(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,u=o),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:o,max:r}}function Kb(n,e,t,i){return Ct(n)?Aw(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Wf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,c,d;for(u=t,f=t+i;u=t?1:-1)}function Lw(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const u=a.controller.getParsed(t),f=u&&u[a.vScale.axis];if(ct(f)||isNaN(f))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:u}=this._getSharedOptions(t,s),f=o.axis,c=r.axis;for(let d=t;d_l(C,r,a,!0)?1:Math.max($,$*t,T,T*t),_=(C,$,T)=>_l(C,r,a,!0)?-1:Math.min($,$*t,T,T*t),h=m(0,u,c),b=m(Nt,f,d),y=_(Rt,u,c),S=_(Rt+Nt,f,d);i=(h-y)/2,s=(b-S)/2,l=-(h+y)/2,o=-(b+S)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Il extends xn{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(tt(i[e])){const{key:a="value"}=this._parsing;l=u=>+Ri(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?gt*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Al(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};Il.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return Ct(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Xo extends xn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=Mb(t,s,o);this._drawStart=r,this._drawCount=a,Ob(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:c}=this._getSharedOptions(t,s),d=o.axis,m=r.axis,{spanGaps:_,segment:h}=this.options,b=Is(_)?_:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||l||s==="none";let S=t>0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs(T[d]-S[d])>b,h&&(M.parsed=T,M.raw=u.data[C]),c&&(M.options=f||this.resolveDataElementOptions(C,$.active?"active":s)),y||this.updateElement($,C,M,s),S=T}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Xo.id="line";Xo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Xo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class tu extends xn{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Al(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return jb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,c=u.yCenter,d=u.getIndexAngle(0)-.5*Rt;let m=d,_;const h=360/this.countVisibleElements();for(_=0;_{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Xn(this.resolveDataElementOptions(e,t).angle||i):0}}tu.id="polarArea";tu.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};tu.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Jb extends Il{}Jb.id="pie";Jb.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class nu extends xn{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return jb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}};$i.defaults={};$i.defaultRoutes=void 0;const Zb={values(n){return Ct(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),l=qw(n,t)}const o=Bn(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),Al(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Bn(n)));return i===1||i===2||i===5?Zb.numeric.call(this,n,e,t):""}};function qw(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Qo={formatters:Zb};lt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Qo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});lt.route("scale.ticks","color","","color");lt.route("scale.grid","color","","borderColor");lt.route("scale.grid","borderColor","","borderColor");lt.route("scale.title","color","","color");lt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});lt.describe("scales",{_fallback:"scale"});lt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function jw(n,e){const t=n.options.ticks,i=t.maxTicksLimit||Vw(n),s=t.major.enabled?Hw(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return Bw(e,a,s,l/i),a;const u=zw(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Xl(e,a,u,ct(d)?0:o-d,o),f=0,c=l-1;fs)return a}return Math.max(s,1)}function Hw(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Jf=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Zf(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function Kw(n,e){pt(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:qn(t,qn(i,t)),max:qn(i,qn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Pt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=M2(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),c=f.widest.width,d=f.highest.height,m=un(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:m/(i-1),c+6>r&&(r=m/(i-(e.offset?.5:1)),a=this.maxHeight-Zs(e.grid)-t.padding-Gf(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),o=za(Math.min(Math.asin(un((f.highest.height+6)/r,-1,1)),Math.asin(un(a/u,-1,1))-Math.asin(un(d/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){Pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Pt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Gf(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Zs(l)+a):(e.height=this.maxHeight,e.width=Zs(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),m=i.padding*2,_=Xn(this.labelRotation),h=Math.cos(_),b=Math.sin(_);if(r){const y=i.mirror?0:b*c.width+h*d.height;e.height=Math.min(this.maxHeight,e.height+y+m)}else{const y=i.mirror?0:h*c.width+b*d.height;e.width=Math.min(this.maxWidth,e.width+y+m)}this._calculatePadding(u,f,b,h)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,u=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,m=0;a?u?(d=s*e.width,m=i*t.height):(d=i*e.height,m=s*t.width):l==="start"?m=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,m=t.width/2),this.paddingLeft=Math.max((d-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-c+o)*this.width/(this.width-c),0)}else{let f=t.height/2,c=e.height/2;l==="start"?(f=0,c=e.height):l==="end"&&(f=t.height,c=0),this.paddingTop=f+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Pt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[O]||0,height:o[O]||0});return{first:M(0),last:M(t-1),widest:M($),highest:M(T),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return zk(this._alignToPixels?Ki(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),f=this.ticks.length+(r?1:0),c=Zs(l),d=[],m=l.setContext(this.getContext()),_=m.drawBorder?m.borderWidth:0,h=_/2,b=function(H){return Ki(i,H,_)};let y,S,C,$,T,M,O,D,L,P,N,F;if(o==="top")y=b(this.bottom),M=this.bottom-c,D=y-h,P=b(e.top)+h,F=e.bottom;else if(o==="bottom")y=b(this.top),P=e.top,F=b(e.bottom)-h,M=y+h,D=this.top+c;else if(o==="left")y=b(this.right),T=this.right-c,O=y-h,L=b(e.left)+h,N=e.right;else if(o==="right")y=b(this.left),L=e.left,N=b(e.right)-h,T=y+h,O=this.left+c;else if(t==="x"){if(o==="center")y=b((e.top+e.bottom)/2+.5);else if(tt(o)){const H=Object.keys(o)[0],W=o[H];y=b(this.chart.scales[H].getPixelForValue(W))}P=e.top,F=e.bottom,M=y+h,D=M+c}else if(t==="y"){if(o==="center")y=b((e.left+e.right)/2);else if(tt(o)){const H=Object.keys(o)[0],W=o[H];y=b(this.chart.scales[H].getPixelForValue(W))}T=y-h,O=T-c,L=e.left,N=e.right}const R=st(s.ticks.maxTicksLimit,f),q=Math.max(1,Math.ceil(f/R));for(S=0;Sl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");lt.route(l,s,a,r)})}function e3(n){return"id"in n&&"defaults"in n}class t3{constructor(){this.controllers=new Ql(xn,"datasets",!0),this.elements=new Ql($i,"elements"),this.plugins=new Ql(Object,"plugins"),this.scales=new Ql(cs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):pt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=Va(e);Pt(i["before"+s],[],i),t[e](i),Pt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let $=t;$0&&Math.abs(M[m]-C[m])>y,b&&(O.parsed=M,O.raw=u.data[$]),d&&(O.options=c||this.resolveDataElementOptions($,T.active?"active":s)),S||this.updateElement(T,$,O,s),C=M}this.updateSharedOptions(c,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}iu.id="scatter";iu.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};iu.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Ji(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ua{constructor(e){this.options=e||{}}init(e){}formats(){return Ji()}parse(e,t){return Ji()}format(e,t){return Ji()}add(e,t,i){return Ji()}diff(e,t,i){return Ji()}startOf(e,t,i){return Ji()}endOf(e,t){return Ji()}}ua.override=function(n){Object.assign(ua.prototype,n)};var Gb={_date:ua};function n3(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?Hk:es;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const c=a(l,e,t-f),d=a(l,e,t+f);return{lo:c.lo,hi:d.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Ll(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var o3={evaluateInteractionItems:Ll,modes:{index(n,e,t,i){const s=Xi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?wr(n,s,l,i,o):Sr(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,c=u.data[f];c&&!c.skip&&a.push({element:c,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=Xi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?wr(n,s,l,i,o):Sr(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,u=n.getDatasetMeta(a).data;r=[];for(let f=0;ft.pos===e)}function Qf(n,e){return n.filter(t=>Xb.indexOf(t.pos)===-1&&t.box.axis===e)}function Xs(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function r3(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Xs(Gs(e,"left"),!0),s=Xs(Gs(e,"right")),l=Xs(Gs(e,"top"),!0),o=Xs(Gs(e,"bottom")),r=Qf(e,"x"),a=Qf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Gs(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function xf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function Qb(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function c3(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!tt(s)){t.size&&(n[s]-=t.size);const c=i[t.stack]||{size:0,count:1};c.size=Math.max(c.size,t.horizontal?l.height:l.width),t.size=c.size/c.count,n[s]+=t.size}l.getPadding&&Qb(o,l.getPadding());const r=Math.max(0,e.outerWidth-xf(o,n,"left","right")),a=Math.max(0,e.outerHeight-xf(o,n,"top","bottom")),u=r!==n.w,f=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function d3(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function p3(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function il(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof h.beforeLayout=="function"&&h.beforeLayout()});const f=a.reduce((h,b)=>b.box.options&&b.box.options.display===!1?h:h+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),d=Object.assign({},s);Qb(d,Yn(i));const m=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),_=u3(a.concat(u),c);il(r.fullSize,m,c,_),il(a,m,c,_),il(u,m,c,_)&&il(a,m,c,_),d3(m),ec(r.leftAndTop,m,c,_),m.x+=m.w,m.y+=m.h,ec(r.rightAndBottom,m,c,_),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},pt(r.chartArea,h=>{const b=h.box;Object.assign(b,n.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class xb{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class m3 extends xb{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const fo="$chartjs",h3={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},tc=n=>n===null||n==="";function _3(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[fo]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",tc(s)){const l=Lf(n,"width");l!==void 0&&(n.width=l)}if(tc(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=Lf(n,"height");l!==void 0&&(n.height=l)}return n}const e1=G2?{passive:!0}:!1;function g3(n,e,t){n.addEventListener(e,t,e1)}function b3(n,e,t){n.canvas.removeEventListener(e,t,e1)}function v3(n,e){const t=h3[n.type]||n.type,{x:i,y:s}=Xi(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Io(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function y3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Io(r.addedNodes,i),o=o&&!Io(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function k3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Io(r.removedNodes,i),o=o&&!Io(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const vl=new Map;let nc=0;function t1(){const n=window.devicePixelRatio;n!==nc&&(nc=n,vl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function w3(n,e){vl.size||window.addEventListener("resize",t1),vl.set(n,e)}function S3(n){vl.delete(n),vl.size||window.removeEventListener("resize",t1)}function $3(n,e,t){const i=n.canvas,s=i&&Qa(i);if(!s)return;const l=Tb((r,a)=>{const u=s.clientWidth;t(r,a),u{const a=r[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return o.observe(s),w3(n,l),o}function $r(n,e,t){t&&t.disconnect(),e==="resize"&&S3(n)}function C3(n,e,t){const i=n.canvas,s=Tb(l=>{n.ctx!==null&&t(v3(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return g3(i,e,s),s}class T3 extends xb{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(_3(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[fo])return!1;const i=t[fo].initial;["height","width"].forEach(l=>{const o=i[l];ct(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[fo],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:y3,detach:k3,resize:$3}[t]||C3;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:$r,detach:$r,resize:$r}[t]||b3)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Z2(e,t,i,s)}isAttached(e){const t=Qa(e);return!!(t&&t.isConnected)}}function M3(n){return!zb()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?m3:T3}class O3{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(Pt(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){ct(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=st(i.options&&i.options.plugins,{}),l=E3(i);return s===!1&&!t?[]:A3(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function E3(n){const e={},t=[],i=Object.keys(li.plugins.items);for(let l=0;l{const a=i[r];if(!tt(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const u=ca(r,a),f=P3(u,s),c=t.scales||{};l[u]=l[u]||r,o[r]=ol(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||fa(a,e),c=(rs[a]||{}).scales||{};Object.keys(c).forEach(d=>{const m=L3(d,u),_=r[m+"AxisID"]||l[m]||m;o[_]=o[_]||Object.create(null),ol(o[_],[{axis:m},i[_],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];ol(a,[lt.scales[a.type],lt.scale])}),o}function n1(n){const e=n.options||(n.options={});e.plugins=st(e.plugins,{}),e.scales=F3(n,e)}function i1(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function R3(n){return n=n||{},n.data=i1(n.data),n1(n),n}const ic=new Map,s1=new Set;function to(n,e){let t=ic.get(n);return t||(t=e(),ic.set(n,t),s1.add(t)),t}const Qs=(n,e,t)=>{const i=Ri(e,t);i!==void 0&&n.add(i)};class q3{constructor(e){this._config=R3(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=i1(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),n1(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return to(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return to(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return to(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return to(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(c=>Qs(a,e,c))),f.forEach(c=>Qs(a,s,c)),f.forEach(c=>Qs(a,rs[l]||{},c)),f.forEach(c=>Qs(a,lt,c)),f.forEach(c=>Qs(a,ra,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),s1.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,rs[t]||{},lt.datasets[t]||{},{type:t},lt,ra]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=sc(this._resolverCache,e,s);let a=o;if(V3(o,t)){l.$shared=!1,i=qi(i)?i():i;const u=this.createResolver(e,i,r);a=Ls(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=sc(this._resolverCache,e,i);return tt(t)?Ls(l,t,void 0,s):l}}function sc(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:Za(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const j3=n=>tt(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||qi(n[t]),!1);function V3(n,e){const{isScriptable:t,isIndexable:i}=Nb(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(qi(r)||j3(r))||o&&Ct(r))return!0}return!1}var z3="3.9.1";const H3=["top","bottom","left","right","chartArea"];function lc(n,e){return n==="top"||n==="bottom"||H3.indexOf(n)===-1&&e==="x"}function oc(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function rc(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Pt(t&&t.onComplete,[n],e)}function B3(n){const e=n.chart,t=e.options.animation;Pt(t&&t.onProgress,[n],e)}function l1(n){return zb()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Lo={},o1=n=>{const e=l1(n);return Object.values(Lo).filter(t=>t.canvas===e).pop()};function U3(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function W3(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Po{constructor(e,t){const i=this.config=new q3(t),s=l1(e),l=o1(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||M3(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,u=a&&a.height,f=a&&a.width;if(this.id=Ek(),this.ctx=r,this.canvas=a,this.width=f,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new O3,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Wk(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Lo[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}hi.listen(this,"complete",rc),hi.listen(this,"progress",B3),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return ct(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():If(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ef(this.canvas,this.ctx),this}stop(){return hi.stop(this),this}resize(e,t){hi.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,If(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),Pt(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};pt(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=ca(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),pt(l,o=>{const r=o.options,a=r.id,u=ca(a,r),f=st(r.type,o.dtype);(r.position===void 0||lc(r.position,u)!==lc(o.dposition))&&(r.position=o.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===f)c=i[a];else{const d=li.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),pt(s,(o,r)=>{o||delete i[r]}),pt(i,o=>{eo.configure(this,o,o.options),eo.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,f=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(oc("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){pt(this.scales,e=>{eo.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!_f(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;U3(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;eo.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],pt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Ya(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&Ka(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return bl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=o3.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Vi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);Wn(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),hi.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};pt(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,u)=>{t.addEventListener(this,a,u),e[a]=u},s=(a,u)=>{e[a]&&(t.removeEventListener(this,a,u),delete e[a])},l=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){pt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},pt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!$o(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,u)=>a.filter(f=>!u.some(c=>f.datasetIndex===c.datasetIndex&&f.index===c.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=Nk(e),u=W3(e,this._lastEvent,i,a);i&&(this._lastEvent=null,Pt(l.onHover,[e,r,this],this),a&&Pt(l.onClick,[e,r,this],this));const f=!$o(r,s);return(f||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=u,f}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const ac=()=>pt(Po.instances,n=>n._plugins.invalidate()),Oi=!0;Object.defineProperties(Po,{defaults:{enumerable:Oi,value:lt},instances:{enumerable:Oi,value:Lo},overrides:{enumerable:Oi,value:rs},registry:{enumerable:Oi,value:li},version:{enumerable:Oi,value:z3},getChart:{enumerable:Oi,value:o1},register:{enumerable:Oi,value:(...n)=>{li.add(...n),ac()}},unregister:{enumerable:Oi,value:(...n)=>{li.remove(...n),ac()}}});function r1(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let u=s/r;n.beginPath(),n.arc(l,o,r,i-u,t+u),a>s?(u=s/a,n.arc(l,o,a,t+u,i-u,!0)):n.arc(l,o,s,t+Nt,i-Nt),n.closePath(),n.clip()}function Y3(n){return Ja(n,["outerStart","outerEnd","innerStart","innerEnd"])}function K3(n,e,t,i){const s=Y3(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const u=(t-Math.min(l,a))*i/2;return un(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:un(s.innerStart,0,o),innerEnd:un(s.innerEnd,0,o)}}function vs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function da(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,c=Math.max(e.outerRadius+i+t-u,0),d=f>0?f+i+t+u:0;let m=0;const _=s-a;if(i){const H=f>0?f-i:0,W=c>0?c-i:0,X=(H+W)/2,J=X!==0?_*X/(X+i):_;m=(_-J)/2}const h=Math.max(.001,_*c-t/Rt)/c,b=(_-h)/2,y=a+b+m,S=s-b-m,{outerStart:C,outerEnd:$,innerStart:T,innerEnd:M}=K3(e,d,c,S-y),O=c-C,D=c-$,L=y+C/O,P=S-$/D,N=d+T,F=d+M,R=y+T/N,q=S-M/F;if(n.beginPath(),l){if(n.arc(o,r,c,L,P),$>0){const X=vs(D,P,o,r);n.arc(X.x,X.y,$,P,S+Nt)}const H=vs(F,S,o,r);if(n.lineTo(H.x,H.y),M>0){const X=vs(F,q,o,r);n.arc(X.x,X.y,M,S+Nt,q+Math.PI)}if(n.arc(o,r,d,S-M/d,y+T/d,!0),T>0){const X=vs(N,R,o,r);n.arc(X.x,X.y,T,R+Math.PI,y-Nt)}const W=vs(O,y,o,r);if(n.lineTo(W.x,W.y),C>0){const X=vs(O,L,o,r);n.arc(X.x,X.y,C,y-Nt,L)}}else{n.moveTo(o,r);const H=Math.cos(L)*c+o,W=Math.sin(L)*c+r;n.lineTo(H,W);const X=Math.cos(P)*c+o,J=Math.sin(P)*c+r;n.lineTo(X,J)}n.closePath()}function J3(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){da(n,e,t,i,o+gt,s);for(let u=0;u=gt||_l(l,r,a),h=gl(o,u+d,f+d);return _&&h}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,c=(o+r+u+a)/2;return{x:t+Math.cos(f)*c,y:i+Math.sin(f)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>gt?Math.floor(i/gt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*r,Math.sin(u)*r),this.circumference>=Rt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=J3(e,this,r,l,o);G3(e,this,r,l,a,o),e.restore()}}su.id="arc";su.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};su.defaultRoutes={backgroundColor:"backgroundColor"};function a1(n,e,t=e){n.lineCap=st(t.borderCapStyle,e.borderCapStyle),n.setLineDash(st(t.borderDash,e.borderDash)),n.lineDashOffset=st(t.borderDashOffset,e.borderDashOffset),n.lineJoin=st(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=st(t.borderWidth,e.borderWidth),n.strokeStyle=st(t.borderColor,e.borderColor)}function X3(n,e,t){n.lineTo(t.x,t.y)}function Q3(n){return n.stepped?v2:n.tension||n.cubicInterpolationMode==="monotone"?y2:X3}function u1(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-$:$))%l,C=()=>{h!==b&&(n.lineTo(f,b),n.lineTo(f,h),n.lineTo(f,y))};for(a&&(m=s[S(0)],n.moveTo(m.x,m.y)),d=0;d<=r;++d){if(m=s[S(d)],m.skip)continue;const $=m.x,T=m.y,M=$|0;M===_?(Tb&&(b=T),f=(c*f+$)/++c):(C(),n.lineTo($,T),_=M,c=0,h=b=T),y=T}C()}function pa(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?eS:x3}function tS(n){return n.stepped?X2:n.tension||n.cubicInterpolationMode==="monotone"?Q2:Qi}function nS(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),a1(n,e.options),n.stroke(s)}function iS(n,e,t,i){const{segments:s,options:l}=e,o=pa(e);for(const r of s)a1(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const sS=typeof Path2D=="function";function lS(n,e,t,i){sS&&!e.options.segment?nS(n,e,t,i):iS(n,e,t,i)}class zi extends $i{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;B2(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=rw(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=Ub(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=tS(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function uc(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=ou(o,r,s);const a=s[o],u=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:u.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:u.y}))}),l}function ou(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function fc(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function c1(n,e){let t=[],i=!1;return Ct(n)?(i=!0,t=n):t=dS(n,e),t.length?new zi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function cc(n){return n&&n.fill!==!1}function pS(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!Ht(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function mS(n,e,t){const i=bS(n);if(tt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Ht(s)&&Math.floor(s)===s?hS(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function hS(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function _S(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:tt(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function gS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:tt(n)?i=n.value:i=e.getBaseValue(),i}function bS(n){const e=n.options,t=e.fill;let i=st(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function vS(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=yS(e,t);r.push(c1({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;r&&(r.line.updateControlPoints(l,r.axis),i&&r.fill&&Mr(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;cc(l)&&Mr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!cc(i)||t.drawTime!=="beforeDatasetDraw"||Mr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const fl={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;er({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Mb.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var hi=new dw;const qf="transparent",pw={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=Of(n||qf),s=i.valid&&Of(e||qf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class mw{constructor(e,t,i,s){const l=t[i];s=Zl([e.to,s,l,e.from]);const o=Zl([e.from,l,s]);this._active=!0,this._fn=e.fn||pw[e.type||typeof o],this._easing=al[e.easing]||al.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Zl([e.to,t,s,e.from]),this._from=Zl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});lt.set("animations",{colors:{type:"color",properties:_w},numbers:{type:"number",properties:hw}});lt.describe("animations",{_fallback:"animation"});lt.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class Kb{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!tt(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!tt(s))return;const l={};for(const o of gw)l[o]=s[o];(Ct(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=vw(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&bw(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new mw(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return hi.add(this._chart,i),!0}}function bw(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Bf(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,u=o.axis,f=Sw(l,o,i),c=e.length;let d;for(let m=0;mt[i].axis===e).shift()}function Tw(n,e){return Vi(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Mw(n,e,t){return Vi(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Js(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const kr=n=>n==="reset"||n==="none",Uf=(n,e)=>e?n:Object.assign({},n),Ow=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:Jb(t,!0),values:null};class xn{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=zf(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Js(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,m,_)=>c==="x"?d:c==="r"?_:m,l=t.xAxisID=st(i.xAxisID,yr(e,"x")),o=t.yAxisID=st(i.yAxisID,yr(e,"y")),r=t.rAxisID=st(i.rAxisID,yr(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,o,r),f=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&yf(this._data,this),e._stacked&&Js(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(tt(t))this._data=ww(t);else if(i!==t){if(i){yf(i,this);const s=this._cachedMeta;Js(s),s._parsed=[]}t&&Object.isExtensible(t)&&Yk(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=zf(t.vScale,t),t.stack!==i.stack&&(s=!0,Js(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Bf(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,u=e>0&&i._parsed[e-1],f,c,d;if(this._parsing===!1)i._parsed=s,i._sorted=!0,d=s;else{Ct(s[e])?d=this.parseArrayData(i,s,e,t):tt(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const m=()=>c[r]===null||u&&c[r]h||c=0;--d)if(!_()){this.updateRangeFromParsed(u,e,m,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),h=u.resolveNamedOptions(d,m,_,c);return h.$shared&&(h.$shared=a,l[o]=Object.freeze(Uf(h,a))),h}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const f=this.chart.config,c=f.datasetAnimationScopeKeys(this._type,t),d=f.getOptionScopes(this.getDataset(),c);a=f.createResolver(d,this.getContext(e,i,t))}const u=new Kb(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||kr(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){kr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!kr(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,u]of this._syncList)this[r](a,u);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(u.length+=t,r=u.length-1;r>=o;r--)u[r]=u[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function Dw(n){const e=n.iScale,t=Ew(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||(Wn(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,u=o),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:o,max:r}}function Zb(n,e,t,i){return Ct(n)?Lw(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Wf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,c,d;for(u=t,f=t+i;u=t?1:-1)}function Nw(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const u=a.controller.getParsed(t),f=u&&u[a.vScale.axis];if(ct(f)||isNaN(f))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:u}=this._getSharedOptions(t,s),f=o.axis,c=r.axis;for(let d=t;d_l(C,r,a,!0)?1:Math.max($,$*t,T,T*t),_=(C,$,T)=>_l(C,r,a,!0)?-1:Math.min($,$*t,T,T*t),h=m(0,u,c),b=m(Ft,f,d),y=_(qt,u,c),S=_(qt+Ft,f,d);i=(h-y)/2,s=(b-S)/2,l=-(h+y)/2,o=-(b+S)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Il extends xn{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(tt(i[e])){const{key:a="value"}=this._parsing;l=u=>+Ri(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?gt*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Al(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};Il.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return Ct(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Qo extends xn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=Eb(t,s,o);this._drawStart=r,this._drawCount=a,Db(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:c}=this._getSharedOptions(t,s),d=o.axis,m=r.axis,{spanGaps:_,segment:h}=this.options,b=Is(_)?_:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||l||s==="none";let S=t>0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs(T[d]-S[d])>b,h&&(M.parsed=T,M.raw=u.data[C]),c&&(M.options=f||this.resolveDataElementOptions(C,$.active?"active":s)),y||this.updateElement($,C,M,s),S=T}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Qo.id="line";Qo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Qo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class tu extends xn{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Al(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return zb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,c=u.yCenter,d=u.getIndexAngle(0)-.5*qt;let m=d,_;const h=360/this.countVisibleElements();for(_=0;_{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?Xn(this.resolveDataElementOptions(e,t).angle||i):0}}tu.id="polarArea";tu.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};tu.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Gb extends Il{}Gb.id="pie";Gb.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class nu extends xn{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return zb.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}};$i.defaults={};$i.defaultRoutes=void 0;const Xb={values(n){return Ct(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),l=Vw(n,t)}const o=Bn(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),Al(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(Bn(n)));return i===1||i===2||i===5?Xb.numeric.call(this,n,e,t):""}};function Vw(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var xo={formatters:Xb};lt.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:xo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});lt.route("scale.ticks","color","","color");lt.route("scale.grid","color","","borderColor");lt.route("scale.grid","borderColor","","borderColor");lt.route("scale.title","color","","color");lt.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});lt.describe("scales",{_fallback:"scale"});lt.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function zw(n,e){const t=n.options.ticks,i=t.maxTicksLimit||Hw(n),s=t.major.enabled?Uw(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return Ww(e,a,s,l/i),a;const u=Bw(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Xl(e,a,u,ct(d)?0:o-d,o),f=0,c=l-1;fs)return a}return Math.max(s,1)}function Uw(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Jf=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Zf(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function Zw(n,e){pt(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:qn(t,qn(i,t)),max:qn(i,qn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Nt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=E2(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),c=f.widest.width,d=f.highest.height,m=un(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:m/(i-1),c+6>r&&(r=m/(i-(e.offset?.5:1)),a=this.maxHeight-Zs(e.grid)-t.padding-Gf(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),o=za(Math.min(Math.asin(un((f.highest.height+6)/r,-1,1)),Math.asin(un(a/u,-1,1))-Math.asin(un(d/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){Nt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Nt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Gf(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Zs(l)+a):(e.height=this.maxHeight,e.width=Zs(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),m=i.padding*2,_=Xn(this.labelRotation),h=Math.cos(_),b=Math.sin(_);if(r){const y=i.mirror?0:b*c.width+h*d.height;e.height=Math.min(this.maxHeight,e.height+y+m)}else{const y=i.mirror?0:h*c.width+b*d.height;e.width=Math.min(this.maxWidth,e.width+y+m)}this._calculatePadding(u,f,b,h)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,u=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,m=0;a?u?(d=s*e.width,m=i*t.height):(d=i*e.height,m=s*t.width):l==="start"?m=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,m=t.width/2),this.paddingLeft=Math.max((d-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-c+o)*this.width/(this.width-c),0)}else{let f=t.height/2,c=e.height/2;l==="start"?(f=0,c=e.height):l==="end"&&(f=t.height,c=0),this.paddingTop=f+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Nt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[O]||0,height:o[O]||0});return{first:M(0),last:M(t-1),widest:M($),highest:M(T),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Bk(this._alignToPixels?Ki(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),f=this.ticks.length+(r?1:0),c=Zs(l),d=[],m=l.setContext(this.getContext()),_=m.drawBorder?m.borderWidth:0,h=_/2,b=function(j){return Ki(i,j,_)};let y,S,C,$,T,M,O,D,L,P,N,F;if(o==="top")y=b(this.bottom),M=this.bottom-c,D=y-h,P=b(e.top)+h,F=e.bottom;else if(o==="bottom")y=b(this.top),P=e.top,F=b(e.bottom)-h,M=y+h,D=this.top+c;else if(o==="left")y=b(this.right),T=this.right-c,O=y-h,L=b(e.left)+h,N=e.right;else if(o==="right")y=b(this.left),L=e.left,N=b(e.right)-h,T=y+h,O=this.left+c;else if(t==="x"){if(o==="center")y=b((e.top+e.bottom)/2+.5);else if(tt(o)){const j=Object.keys(o)[0],W=o[j];y=b(this.chart.scales[j].getPixelForValue(W))}P=e.top,F=e.bottom,M=y+h,D=M+c}else if(t==="y"){if(o==="center")y=b((e.left+e.right)/2);else if(tt(o)){const j=Object.keys(o)[0],W=o[j];y=b(this.chart.scales[j].getPixelForValue(W))}T=y-h,O=T-c,L=e.left,N=e.right}const R=st(s.ticks.maxTicksLimit,f),q=Math.max(1,Math.ceil(f/R));for(S=0;Sl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");lt.route(l,s,a,r)})}function n3(n){return"id"in n&&"defaults"in n}class i3{constructor(){this.controllers=new Ql(xn,"datasets",!0),this.elements=new Ql($i,"elements"),this.plugins=new Ql(Object,"plugins"),this.scales=new Ql(cs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):pt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=Va(e);Nt(i["before"+s],[],i),t[e](i),Nt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let $=t;$0&&Math.abs(M[m]-C[m])>y,b&&(O.parsed=M,O.raw=u.data[$]),d&&(O.options=c||this.resolveDataElementOptions($,T.active?"active":s)),S||this.updateElement(T,$,O,s),C=M}this.updateSharedOptions(c,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}iu.id="scatter";iu.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};iu.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Ji(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ua{constructor(e){this.options=e||{}}init(e){}formats(){return Ji()}parse(e,t){return Ji()}format(e,t){return Ji()}add(e,t,i){return Ji()}diff(e,t,i){return Ji()}startOf(e,t,i){return Ji()}endOf(e,t){return Ji()}}ua.override=function(n){Object.assign(ua.prototype,n)};var Qb={_date:ua};function s3(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?Uk:es;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const c=a(l,e,t-f),d=a(l,e,t+f);return{lo:c.lo,hi:d.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Ll(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var a3={evaluateInteractionItems:Ll,modes:{index(n,e,t,i){const s=Xi(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?Sr(n,s,l,i,o):$r(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,c=u.data[f];c&&!c.skip&&a.push({element:c,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=Xi(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?Sr(n,s,l,i,o):$r(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,u=n.getDatasetMeta(a).data;r=[];for(let f=0;ft.pos===e)}function Qf(n,e){return n.filter(t=>xb.indexOf(t.pos)===-1&&t.box.axis===e)}function Xs(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function u3(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Xs(Gs(e,"left"),!0),s=Xs(Gs(e,"right")),l=Xs(Gs(e,"top"),!0),o=Xs(Gs(e,"bottom")),r=Qf(e,"x"),a=Qf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Gs(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function xf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function e1(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function p3(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!tt(s)){t.size&&(n[s]-=t.size);const c=i[t.stack]||{size:0,count:1};c.size=Math.max(c.size,t.horizontal?l.height:l.width),t.size=c.size/c.count,n[s]+=t.size}l.getPadding&&e1(o,l.getPadding());const r=Math.max(0,e.outerWidth-xf(o,n,"left","right")),a=Math.max(0,e.outerHeight-xf(o,n,"top","bottom")),u=r!==n.w,f=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function m3(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function h3(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function il(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof h.beforeLayout=="function"&&h.beforeLayout()});const f=a.reduce((h,b)=>b.box.options&&b.box.options.display===!1?h:h+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),d=Object.assign({},s);e1(d,Yn(i));const m=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),_=c3(a.concat(u),c);il(r.fullSize,m,c,_),il(a,m,c,_),il(u,m,c,_)&&il(a,m,c,_),m3(m),ec(r.leftAndTop,m,c,_),m.x+=m.w,m.y+=m.h,ec(r.rightAndBottom,m,c,_),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},pt(r.chartArea,h=>{const b=h.box;Object.assign(b,n.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class t1{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class _3 extends t1{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const co="$chartjs",g3={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},tc=n=>n===null||n==="";function b3(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[co]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",tc(s)){const l=Lf(n,"width");l!==void 0&&(n.width=l)}if(tc(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=Lf(n,"height");l!==void 0&&(n.height=l)}return n}const n1=Q2?{passive:!0}:!1;function v3(n,e,t){n.addEventListener(e,t,n1)}function y3(n,e,t){n.canvas.removeEventListener(e,t,n1)}function k3(n,e){const t=g3[n.type]||n.type,{x:i,y:s}=Xi(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Lo(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function w3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Lo(r.addedNodes,i),o=o&&!Lo(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function S3(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Lo(r.removedNodes,i),o=o&&!Lo(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const vl=new Map;let nc=0;function i1(){const n=window.devicePixelRatio;n!==nc&&(nc=n,vl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function $3(n,e){vl.size||window.addEventListener("resize",i1),vl.set(n,e)}function C3(n){vl.delete(n),vl.size||window.removeEventListener("resize",i1)}function T3(n,e,t){const i=n.canvas,s=i&&Qa(i);if(!s)return;const l=Ob((r,a)=>{const u=s.clientWidth;t(r,a),u{const a=r[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return o.observe(s),$3(n,l),o}function Cr(n,e,t){t&&t.disconnect(),e==="resize"&&C3(n)}function M3(n,e,t){const i=n.canvas,s=Ob(l=>{n.ctx!==null&&t(k3(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return v3(i,e,s),s}class O3 extends t1{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(b3(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[co])return!1;const i=t[co].initial;["height","width"].forEach(l=>{const o=i[l];ct(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[co],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:w3,detach:S3,resize:T3}[t]||M3;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:Cr,detach:Cr,resize:Cr}[t]||y3)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return X2(e,t,i,s)}isAttached(e){const t=Qa(e);return!!(t&&t.isConnected)}}function E3(n){return!Bb()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?_3:O3}class D3{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(Nt(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){ct(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=st(i.options&&i.options.plugins,{}),l=A3(i);return s===!1&&!t?[]:L3(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function A3(n){const e={},t=[],i=Object.keys(li.plugins.items);for(let l=0;l{const a=i[r];if(!tt(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const u=ca(r,a),f=F3(u,s),c=t.scales||{};l[u]=l[u]||r,o[r]=ol(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||fa(a,e),c=(rs[a]||{}).scales||{};Object.keys(c).forEach(d=>{const m=N3(d,u),_=r[m+"AxisID"]||l[m]||m;o[_]=o[_]||Object.create(null),ol(o[_],[{axis:m},i[_],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];ol(a,[lt.scales[a.type],lt.scale])}),o}function s1(n){const e=n.options||(n.options={});e.plugins=st(e.plugins,{}),e.scales=q3(n,e)}function l1(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function j3(n){return n=n||{},n.data=l1(n.data),s1(n),n}const ic=new Map,o1=new Set;function to(n,e){let t=ic.get(n);return t||(t=e(),ic.set(n,t),o1.add(t)),t}const Qs=(n,e,t)=>{const i=Ri(e,t);i!==void 0&&n.add(i)};class V3{constructor(e){this._config=j3(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=l1(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),s1(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return to(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return to(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return to(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return to(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(c=>Qs(a,e,c))),f.forEach(c=>Qs(a,s,c)),f.forEach(c=>Qs(a,rs[l]||{},c)),f.forEach(c=>Qs(a,lt,c)),f.forEach(c=>Qs(a,ra,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),o1.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,rs[t]||{},lt.datasets[t]||{},{type:t},lt,ra]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=sc(this._resolverCache,e,s);let a=o;if(H3(o,t)){l.$shared=!1,i=qi(i)?i():i;const u=this.createResolver(e,i,r);a=Ls(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=sc(this._resolverCache,e,i);return tt(t)?Ls(l,t,void 0,s):l}}function sc(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:Za(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const z3=n=>tt(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||qi(n[t]),!1);function H3(n,e){const{isScriptable:t,isIndexable:i}=Rb(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(qi(r)||z3(r))||o&&Ct(r))return!0}return!1}var B3="3.9.1";const U3=["top","bottom","left","right","chartArea"];function lc(n,e){return n==="top"||n==="bottom"||U3.indexOf(n)===-1&&e==="x"}function oc(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function rc(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),Nt(t&&t.onComplete,[n],e)}function W3(n){const e=n.chart,t=e.options.animation;Nt(t&&t.onProgress,[n],e)}function r1(n){return Bb()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Po={},a1=n=>{const e=r1(n);return Object.values(Po).filter(t=>t.canvas===e).pop()};function Y3(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function K3(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class No{constructor(e,t){const i=this.config=new V3(t),s=r1(e),l=a1(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||E3(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,u=a&&a.height,f=a&&a.width;if(this.id=Ak(),this.ctx=r,this.canvas=a,this.width=f,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new D3,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Kk(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Po[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}hi.listen(this,"complete",rc),hi.listen(this,"progress",W3),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return ct(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():If(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ef(this.canvas,this.ctx),this}stop(){return hi.stop(this),this}resize(e,t){hi.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,If(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),Nt(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};pt(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=ca(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),pt(l,o=>{const r=o.options,a=r.id,u=ca(a,r),f=st(r.type,o.dtype);(r.position===void 0||lc(r.position,u)!==lc(o.dposition))&&(r.position=o.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===f)c=i[a];else{const d=li.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),pt(s,(o,r)=>{o||delete i[r]}),pt(i,o=>{eo.configure(this,o,o.options),eo.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,f=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(oc("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){pt(this.scales,e=>{eo.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!_f(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;Y3(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;eo.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],pt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Ya(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&Ka(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return bl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=a3.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Vi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);Wn(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),hi.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};pt(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,u)=>{t.addEventListener(this,a,u),e[a]=u},s=(a,u)=>{e[a]&&(t.removeEventListener(this,a,u),delete e[a])},l=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){pt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},pt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!Co(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,u)=>a.filter(f=>!u.some(c=>f.datasetIndex===c.datasetIndex&&f.index===c.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=Rk(e),u=K3(e,this._lastEvent,i,a);i&&(this._lastEvent=null,Nt(l.onHover,[e,r,this],this),a&&Nt(l.onClick,[e,r,this],this));const f=!Co(r,s);return(f||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=u,f}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const ac=()=>pt(No.instances,n=>n._plugins.invalidate()),Oi=!0;Object.defineProperties(No,{defaults:{enumerable:Oi,value:lt},instances:{enumerable:Oi,value:Po},overrides:{enumerable:Oi,value:rs},registry:{enumerable:Oi,value:li},version:{enumerable:Oi,value:B3},getChart:{enumerable:Oi,value:a1},register:{enumerable:Oi,value:(...n)=>{li.add(...n),ac()}},unregister:{enumerable:Oi,value:(...n)=>{li.remove(...n),ac()}}});function u1(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let u=s/r;n.beginPath(),n.arc(l,o,r,i-u,t+u),a>s?(u=s/a,n.arc(l,o,a,t+u,i-u,!0)):n.arc(l,o,s,t+Ft,i-Ft),n.closePath(),n.clip()}function J3(n){return Ja(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Z3(n,e,t,i){const s=J3(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const u=(t-Math.min(l,a))*i/2;return un(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:un(s.innerStart,0,o),innerEnd:un(s.innerEnd,0,o)}}function vs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function da(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,c=Math.max(e.outerRadius+i+t-u,0),d=f>0?f+i+t+u:0;let m=0;const _=s-a;if(i){const j=f>0?f-i:0,W=c>0?c-i:0,X=(j+W)/2,K=X!==0?_*X/(X+i):_;m=(_-K)/2}const h=Math.max(.001,_*c-t/qt)/c,b=(_-h)/2,y=a+b+m,S=s-b-m,{outerStart:C,outerEnd:$,innerStart:T,innerEnd:M}=Z3(e,d,c,S-y),O=c-C,D=c-$,L=y+C/O,P=S-$/D,N=d+T,F=d+M,R=y+T/N,q=S-M/F;if(n.beginPath(),l){if(n.arc(o,r,c,L,P),$>0){const X=vs(D,P,o,r);n.arc(X.x,X.y,$,P,S+Ft)}const j=vs(F,S,o,r);if(n.lineTo(j.x,j.y),M>0){const X=vs(F,q,o,r);n.arc(X.x,X.y,M,S+Ft,q+Math.PI)}if(n.arc(o,r,d,S-M/d,y+T/d,!0),T>0){const X=vs(N,R,o,r);n.arc(X.x,X.y,T,R+Math.PI,y-Ft)}const W=vs(O,y,o,r);if(n.lineTo(W.x,W.y),C>0){const X=vs(O,L,o,r);n.arc(X.x,X.y,C,y-Ft,L)}}else{n.moveTo(o,r);const j=Math.cos(L)*c+o,W=Math.sin(L)*c+r;n.lineTo(j,W);const X=Math.cos(P)*c+o,K=Math.sin(P)*c+r;n.lineTo(X,K)}n.closePath()}function G3(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){da(n,e,t,i,o+gt,s);for(let u=0;u=gt||_l(l,r,a),h=gl(o,u+d,f+d);return _&&h}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,c=(o+r+u+a)/2;return{x:t+Math.cos(f)*c,y:i+Math.sin(f)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>gt?Math.floor(i/gt):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*r,Math.sin(u)*r),this.circumference>=qt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=G3(e,this,r,l,o);Q3(e,this,r,l,a,o),e.restore()}}su.id="arc";su.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};su.defaultRoutes={backgroundColor:"backgroundColor"};function f1(n,e,t=e){n.lineCap=st(t.borderCapStyle,e.borderCapStyle),n.setLineDash(st(t.borderDash,e.borderDash)),n.lineDashOffset=st(t.borderDashOffset,e.borderDashOffset),n.lineJoin=st(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=st(t.borderWidth,e.borderWidth),n.strokeStyle=st(t.borderColor,e.borderColor)}function x3(n,e,t){n.lineTo(t.x,t.y)}function eS(n){return n.stepped?k2:n.tension||n.cubicInterpolationMode==="monotone"?w2:x3}function c1(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-$:$))%l,C=()=>{h!==b&&(n.lineTo(f,b),n.lineTo(f,h),n.lineTo(f,y))};for(a&&(m=s[S(0)],n.moveTo(m.x,m.y)),d=0;d<=r;++d){if(m=s[S(d)],m.skip)continue;const $=m.x,T=m.y,M=$|0;M===_?(Tb&&(b=T),f=(c*f+$)/++c):(C(),n.lineTo($,T),_=M,c=0,h=b=T),y=T}C()}function pa(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?nS:tS}function iS(n){return n.stepped?x2:n.tension||n.cubicInterpolationMode==="monotone"?ew:Qi}function sS(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),f1(n,e.options),n.stroke(s)}function lS(n,e,t,i){const{segments:s,options:l}=e,o=pa(e);for(const r of s)f1(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const oS=typeof Path2D=="function";function rS(n,e,t,i){oS&&!e.options.segment?sS(n,e,t,i):lS(n,e,t,i)}class zi extends $i{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;W2(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=uw(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=Yb(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=iS(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function uc(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=ou(o,r,s);const a=s[o],u=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:u.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:u.y}))}),l}function ou(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function fc(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function p1(n,e){let t=[],i=!1;return Ct(n)?(i=!0,t=n):t=mS(n,e),t.length?new zi({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function cc(n){return n&&n.fill!==!1}function hS(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!Ht(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function _S(n,e,t){const i=yS(n);if(tt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Ht(s)&&Math.floor(s)===s?gS(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function gS(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function bS(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:tt(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function vS(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:tt(n)?i=n.value:i=e.getBaseValue(),i}function yS(n){const e=n.options,t=e.fill;let i=st(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function kS(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=wS(e,t);r.push(p1({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;r&&(r.line.updateControlPoints(l,r.axis),i&&r.fill&&Or(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;cc(l)&&Or(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!cc(i)||t.drawTime!=="beforeDatasetDraw"||Or(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const fl={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e-1?n.split(` -`):n}function AS(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function hc(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=En(e.bodyFont),u=En(e.titleFont),f=En(e.footerFont),c=l.length,d=s.length,m=i.length,_=Yn(e.padding);let h=_.height,b=0,y=i.reduce(($,T)=>$+T.before.length+T.lines.length+T.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(h+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const $=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;h+=m*$+(y-m)*a.lineHeight+(y-1)*e.bodySpacing}d&&(h+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let S=0;const C=function($){b=Math.max(b,t.measureText($).width+S)};return t.save(),t.font=u.string,pt(n.title,C),t.font=a.string,pt(n.beforeBody.concat(n.afterBody),C),S=e.displayColors?o+2+e.boxPadding:0,pt(i,$=>{pt($.before,C),pt($.lines,C),pt($.after,C)}),S=0,t.font=f.string,pt(n.footer,C),t.restore(),b+=_.width,{width:b,height:h}}function IS(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function LS(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function PS(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),LS(u,n,e,t)&&(u="center"),u}function _c(n,e,t){const i=t.yAlign||e.yAlign||IS(n,t);return{xAlign:t.xAlign||e.xAlign||PS(n,e,t,i),yAlign:i}}function NS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function FS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function gc(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:m}=Cs(o);let _=NS(e,r);const h=FS(e,a,u);return a==="center"?r==="left"?_+=u:r==="right"&&(_-=u):r==="left"?_-=Math.max(f,d)+s:r==="right"&&(_+=Math.max(c,m)+s),{x:un(_,0,i.width-e.width),y:un(h,0,i.height-e.height)}}function no(n,e,t){const i=Yn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function bc(n){return ii([],_i(n))}function RS(n,e,t){return Vi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function vc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ha extends $i{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new Wb(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=RS(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=ii(r,_i(s)),r=ii(r,_i(l)),r=ii(r,_i(o)),r}getBeforeBody(e,t){return bc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return pt(e,l=>{const o={before:[],lines:[],after:[]},r=vc(i,l);ii(o.before,_i(r.beforeLabel.call(this,l))),ii(o.lines,r.label.call(this,l)),ii(o.after,_i(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return bc(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=ii(r,_i(s)),r=ii(r,_i(l)),r=ii(r,_i(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;ae.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),pt(r,f=>{const c=vc(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=fl[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=hc(this,i),u=Object.assign({},r,a),f=_c(this.chart,i,u),c=gc(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:c.x,y:c.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:c}=Cs(r),{x:d,y:m}=e,{width:_,height:h}=t;let b,y,S,C,$,T;return l==="center"?($=m+h/2,s==="left"?(b=d,y=b-o,C=$+o,T=$-o):(b=d+_,y=b+o,C=$-o,T=$+o),S=b):(s==="left"?y=d+Math.max(a,f)+o:s==="right"?y=d+_-Math.max(u,c)-o:y=this.caretX,l==="top"?(C=m,$=C-o,b=y-o,S=y+o):(C=m+h,$=C+o,b=y+o,S=y-o),T=C),{x1:b,x2:y,x3:S,y1:C,y2:$,y3:T}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=br(i.rtl,this.x,this.width);for(e.x=no(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=En(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aC!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Do(e,{x:b,y:h,w:u,h:a,radius:S}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Do(e,{x:y,y:h+1,w:u-2,h:a-2,radius:S}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,h,u,a),e.strokeRect(b,h,u,a),e.fillStyle=o.backgroundColor,e.fillRect(y,h+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:u,boxPadding:f}=i,c=En(i.bodyFont);let d=c.lineHeight,m=0;const _=br(i.rtl,this.x,this.width),h=function(D){t.fillText(D,_.x(e.x+m),e.y+d/2),e.y+=d+l},b=_.textAlign(o);let y,S,C,$,T,M,O;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=no(this,b,i),t.fillStyle=i.bodyColor,pt(this.beforeBody,h),m=r&&b!=="right"?o==="center"?u/2+f:u+2+f:0,$=0,M=s.length;$0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=fl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=hc(this,e),a=Object.assign({},o,this._size),u=_c(t,e,a),f=gc(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Yn(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),nw(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),iw(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const u=this.chart.getDatasetMeta(r);if(!u)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:u.data[a],index:a}}),l=!$o(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!$o(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=fl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}ha.positioners=fl;var qS={id:"tooltip",_element:ha,positioners:fl,afterInit(n,e,t){t&&(n.tooltip=new ha({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:mi,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const jS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function VS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return jS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const zS=(n,e)=>n===null?null:un(Math.round(n),0,e);class _a extends cs{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(ct(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:VS(i,e,st(t,e),this._addedLabels),zS(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}_a.id="category";_a.defaults={ticks:{callback:_a.prototype.getLabelForValue}};function HS(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,m=l||1,_=f-1,{min:h,max:b}=e,y=!ct(o),S=!ct(r),C=!ct(u),$=(b-h)/(c+1);let T=bf((b-h)/_/m)*m,M,O,D,L;if(T<1e-14&&!y&&!S)return[{value:h},{value:b}];L=Math.ceil(b/T)-Math.floor(h/T),L>_&&(T=bf(L*T/_/m)*m),ct(a)||(M=Math.pow(10,a),T=Math.ceil(T*M)/M),s==="ticks"?(O=Math.floor(h/T)*T,D=Math.ceil(b/T)*T):(O=h,D=b),y&&S&&l&&jk((r-o)/l,T/1e3)?(L=Math.round(Math.min((r-o)/T,f)),T=(r-o)/L,O=o,D=r):C?(O=y?o:O,D=S?r:D,L=u-1,T=(D-O)/L):(L=(D-O)/T,rl(L,Math.round(L),T/1e3)?L=Math.round(L):L=Math.ceil(L));const P=Math.max(vf(T),vf(O));M=Math.pow(10,ct(a)?P:a),O=Math.round(O*M)/M,D=Math.round(D*M)/M;let N=0;for(y&&(d&&O!==o?(t.push({value:o}),Os=t?s:a,r=a=>l=i?l:a;if(e){const a=oi(s),u=oi(l);a<0&&u<0?r(0):a>0&&u>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=HS(s,l);return e.bounds==="ticks"&&kb(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return Al(e,this.chart.options.locale,this.options.ticks.format)}}class ru extends No{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ht(e)?e:0,this.max=Ht(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Xn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ru.id="linear";ru.defaults={ticks:{callback:Qo.formatters.numeric}};function kc(n){return n/Math.pow(10,Math.floor(Bn(n)))===1}function BS(n,e){const t=Math.floor(Bn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=qn(n.min,Math.pow(10,Math.floor(Bn(e.min)))),o=Math.floor(Bn(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:kc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ht(e)?Math.max(0,e):null,this.max=Ht(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(Bn(a))+u);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=BS(t,this);return e.bounds==="ticks"&&kb(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Al(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Bn(e),this._valueRange=Bn(this.max)-Bn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Bn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}p1.id="logarithmic";p1.defaults={ticks:{callback:Qo.formatters.logarithmic,major:{enabled:!0}}};function ga(n){const e=n.ticks;if(e.display&&n.display){const t=Yn(e.backdropPadding);return st(e.font&&e.font.size,lt.font.size)+t.height}return 0}function US(n,e,t){return t=Ct(t)?t:[t],{w:g2(n,e.string,t),h:t.length*e.lineHeight}}function wc(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function WS(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?Rt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function KS(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ga(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?Rt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function XS(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=En(l.font),{x:r,y:a,textAlign:u,left:f,top:c,right:d,bottom:m}=n._pointLabelItems[s],{backdropColor:_}=l;if(!ct(_)){const h=Cs(l.borderRadius),b=Yn(l.backdropPadding);t.fillStyle=_;const y=f-b.left,S=c-b.top,C=d-f+b.width,$=m-c+b.height;Object.values(h).some(T=>T!==0)?(t.beginPath(),Do(t,{x:y,y:S,w:C,h:$,radius:h}),t.fill()):t.fillRect(y,S,C,$)}Eo(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function m1(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,gt);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=Pt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?WS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=gt/(this._pointLabels.length||1),i=this.options.startAngle||0;return On(e*t+Xn(i))}getDistanceFromCenterForValue(e){if(ct(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(ct(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(f!==0){r=this.getDistanceFromCenterForValue(u.value);const c=s.setContext(this.getContext(f-1));QS(this,c,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:c}=u;!c||!f||(e.lineWidth=c,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=En(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,o=e.measureText(r.label).width,e.fillStyle=u.backdropColor;const c=Yn(u.backdropPadding);e.fillRect(-o/2-c.left,-l-f.size/2-c.top,o+c.width,f.size+c.height)}Eo(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}er.id="radialLinear";er.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Qo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};er.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};er.descriptors={angleLines:{_fallback:"grid"}};const tr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},bn=Object.keys(tr);function e$(n,e){return n-e}function Sc(n,e){if(ct(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Ht(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(Is(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function $c(n,e,t,i){const s=bn.length;for(let l=bn.indexOf(n);l=bn.indexOf(t);l--){const o=bn[l];if(tr[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return bn[t?bn.indexOf(t):0]}function n$(n){for(let e=bn.indexOf(n)+1,t=bn.length;e=e?t[i]:t[s];n[l]=!0}}function i$(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function Tc(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=un(t,0,o),i=un(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||$c(l.minUnit,t,i,this._getLabelCapacity(t)),r=st(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=Is(a)||a===!0,f={};let c=t,d,m;if(u&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,u?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const _=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,m=0;dh-b).map(h=>+h)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,u=r&&o[r],f=a&&o[a],c=i[t],d=a&&f&&c&&c.major,m=this._adapter.format(e,s||(d?f:u)),_=l.ticks.callback;return _?Pt(_,[m,t,i],this):m}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=es(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=es(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const u=o-l;return u?r+(a-r)*(e-l)/u:r}class h1 extends Pl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=io(t,this.min),this._tableRange=io(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o$+T.before.length+T.lines.length+T.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(h+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const $=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;h+=m*$+(y-m)*a.lineHeight+(y-1)*e.bodySpacing}d&&(h+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let S=0;const C=function($){b=Math.max(b,t.measureText($).width+S)};return t.save(),t.font=u.string,pt(n.title,C),t.font=a.string,pt(n.beforeBody.concat(n.afterBody),C),S=e.displayColors?o+2+e.boxPadding:0,pt(i,$=>{pt($.before,C),pt($.lines,C),pt($.after,C)}),S=0,t.font=f.string,pt(n.footer,C),t.restore(),b+=_.width,{width:b,height:h}}function PS(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function NS(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function FS(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),NS(u,n,e,t)&&(u="center"),u}function _c(n,e,t){const i=t.yAlign||e.yAlign||PS(n,t);return{xAlign:t.xAlign||e.xAlign||FS(n,e,t,i),yAlign:i}}function RS(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function qS(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function gc(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:m}=Cs(o);let _=RS(e,r);const h=qS(e,a,u);return a==="center"?r==="left"?_+=u:r==="right"&&(_-=u):r==="left"?_-=Math.max(f,d)+s:r==="right"&&(_+=Math.max(c,m)+s),{x:un(_,0,i.width-e.width),y:un(h,0,i.height-e.height)}}function no(n,e,t){const i=Yn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function bc(n){return ii([],_i(n))}function jS(n,e,t){return Vi(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function vc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ha extends $i{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new Kb(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=jS(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=ii(r,_i(s)),r=ii(r,_i(l)),r=ii(r,_i(o)),r}getBeforeBody(e,t){return bc(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return pt(e,l=>{const o={before:[],lines:[],after:[]},r=vc(i,l);ii(o.before,_i(r.beforeLabel.call(this,l))),ii(o.lines,r.label.call(this,l)),ii(o.after,_i(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return bc(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=ii(r,_i(s)),r=ii(r,_i(l)),r=ii(r,_i(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;ae.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),pt(r,f=>{const c=vc(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=fl[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=hc(this,i),u=Object.assign({},r,a),f=_c(this.chart,i,u),c=gc(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:c.x,y:c.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:c}=Cs(r),{x:d,y:m}=e,{width:_,height:h}=t;let b,y,S,C,$,T;return l==="center"?($=m+h/2,s==="left"?(b=d,y=b-o,C=$+o,T=$-o):(b=d+_,y=b+o,C=$-o,T=$+o),S=b):(s==="left"?y=d+Math.max(a,f)+o:s==="right"?y=d+_-Math.max(u,c)-o:y=this.caretX,l==="top"?(C=m,$=C-o,b=y-o,S=y+o):(C=m+h,$=C+o,b=y+o,S=y-o),T=C),{x1:b,x2:y,x3:S,y1:C,y2:$,y3:T}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=vr(i.rtl,this.x,this.width);for(e.x=no(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=En(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aC!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Ao(e,{x:b,y:h,w:u,h:a,radius:S}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Ao(e,{x:y,y:h+1,w:u-2,h:a-2,radius:S}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,h,u,a),e.strokeRect(b,h,u,a),e.fillStyle=o.backgroundColor,e.fillRect(y,h+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:u,boxPadding:f}=i,c=En(i.bodyFont);let d=c.lineHeight,m=0;const _=vr(i.rtl,this.x,this.width),h=function(D){t.fillText(D,_.x(e.x+m),e.y+d/2),e.y+=d+l},b=_.textAlign(o);let y,S,C,$,T,M,O;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=no(this,b,i),t.fillStyle=i.bodyColor,pt(this.beforeBody,h),m=r&&b!=="right"?o==="center"?u/2+f:u+2+f:0,$=0,M=s.length;$0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=fl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=hc(this,e),a=Object.assign({},o,this._size),u=_c(t,e,a),f=gc(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Yn(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),sw(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),lw(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const u=this.chart.getDatasetMeta(r);if(!u)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:u.data[a],index:a}}),l=!Co(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!Co(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=fl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}ha.positioners=fl;var VS={id:"tooltip",_element:ha,positioners:fl,afterInit(n,e,t){t&&(n.tooltip=new ha({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:mi,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const zS=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function HS(n,e,t,i){const s=n.indexOf(e);if(s===-1)return zS(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const BS=(n,e)=>n===null?null:un(Math.round(n),0,e);class _a extends cs{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(ct(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:HS(i,e,st(t,e),this._addedLabels),BS(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}_a.id="category";_a.defaults={ticks:{callback:_a.prototype.getLabelForValue}};function US(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,m=l||1,_=f-1,{min:h,max:b}=e,y=!ct(o),S=!ct(r),C=!ct(u),$=(b-h)/(c+1);let T=bf((b-h)/_/m)*m,M,O,D,L;if(T<1e-14&&!y&&!S)return[{value:h},{value:b}];L=Math.ceil(b/T)-Math.floor(h/T),L>_&&(T=bf(L*T/_/m)*m),ct(a)||(M=Math.pow(10,a),T=Math.ceil(T*M)/M),s==="ticks"?(O=Math.floor(h/T)*T,D=Math.ceil(b/T)*T):(O=h,D=b),y&&S&&l&&zk((r-o)/l,T/1e3)?(L=Math.round(Math.min((r-o)/T,f)),T=(r-o)/L,O=o,D=r):C?(O=y?o:O,D=S?r:D,L=u-1,T=(D-O)/L):(L=(D-O)/T,rl(L,Math.round(L),T/1e3)?L=Math.round(L):L=Math.ceil(L));const P=Math.max(vf(T),vf(O));M=Math.pow(10,ct(a)?P:a),O=Math.round(O*M)/M,D=Math.round(D*M)/M;let N=0;for(y&&(d&&O!==o?(t.push({value:o}),Os=t?s:a,r=a=>l=i?l:a;if(e){const a=oi(s),u=oi(l);a<0&&u<0?r(0):a>0&&u>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=US(s,l);return e.bounds==="ticks"&&Sb(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return Al(e,this.chart.options.locale,this.options.ticks.format)}}class ru extends Fo{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ht(e)?e:0,this.max=Ht(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=Xn(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}ru.id="linear";ru.defaults={ticks:{callback:xo.formatters.numeric}};function kc(n){return n/Math.pow(10,Math.floor(Bn(n)))===1}function WS(n,e){const t=Math.floor(Bn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=qn(n.min,Math.pow(10,Math.floor(Bn(e.min)))),o=Math.floor(Bn(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:kc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=Ht(e)?Math.max(0,e):null,this.max=Ht(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(Bn(a))+u);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=WS(t,this);return e.bounds==="ticks"&&Sb(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Al(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=Bn(e),this._valueRange=Bn(this.max)-Bn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Bn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}h1.id="logarithmic";h1.defaults={ticks:{callback:xo.formatters.logarithmic,major:{enabled:!0}}};function ga(n){const e=n.ticks;if(e.display&&n.display){const t=Yn(e.backdropPadding);return st(e.font&&e.font.size,lt.font.size)+t.height}return 0}function YS(n,e,t){return t=Ct(t)?t:[t],{w:v2(n,e.string,t),h:t.length*e.lineHeight}}function wc(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function KS(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?qt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function ZS(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ga(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?qt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function xS(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=En(l.font),{x:r,y:a,textAlign:u,left:f,top:c,right:d,bottom:m}=n._pointLabelItems[s],{backdropColor:_}=l;if(!ct(_)){const h=Cs(l.borderRadius),b=Yn(l.backdropPadding);t.fillStyle=_;const y=f-b.left,S=c-b.top,C=d-f+b.width,$=m-c+b.height;Object.values(h).some(T=>T!==0)?(t.beginPath(),Ao(t,{x:y,y:S,w:C,h:$,radius:h}),t.fill()):t.fillRect(y,S,C,$)}Do(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function _1(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,gt);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=Nt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?KS(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=gt/(this._pointLabels.length||1),i=this.options.startAngle||0;return On(e*t+Xn(i))}getDistanceFromCenterForValue(e){if(ct(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(ct(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(f!==0){r=this.getDistanceFromCenterForValue(u.value);const c=s.setContext(this.getContext(f-1));e$(this,c,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:c}=u;!c||!f||(e.lineWidth=c,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=En(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,o=e.measureText(r.label).width,e.fillStyle=u.backdropColor;const c=Yn(u.backdropPadding);e.fillRect(-o/2-c.left,-l-f.size/2-c.top,o+c.width,f.size+c.height)}Do(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}tr.id="radialLinear";tr.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:xo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};tr.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};tr.descriptors={angleLines:{_fallback:"grid"}};const nr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},bn=Object.keys(nr);function n$(n,e){return n-e}function Sc(n,e){if(ct(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),Ht(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(Is(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function $c(n,e,t,i){const s=bn.length;for(let l=bn.indexOf(n);l=bn.indexOf(t);l--){const o=bn[l];if(nr[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return bn[t?bn.indexOf(t):0]}function s$(n){for(let e=bn.indexOf(n)+1,t=bn.length;e=e?t[i]:t[s];n[l]=!0}}function l$(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function Tc(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=un(t,0,o),i=un(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||$c(l.minUnit,t,i,this._getLabelCapacity(t)),r=st(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=Is(a)||a===!0,f={};let c=t,d,m;if(u&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,u?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const _=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,m=0;dh-b).map(h=>+h)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,u=r&&o[r],f=a&&o[a],c=i[t],d=a&&f&&c&&c.major,m=this._adapter.format(e,s||(d?f:u)),_=l.ticks.callback;return _?Nt(_,[m,t,i],this):m}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=es(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=es(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const u=o-l;return u?r+(a-r)*(e-l)/u:r}class g1 extends Pl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=io(t,this.min),this._tableRange=io(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o{i&&(t||(t=je(e,Kt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=je(e,Kt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function l$(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=U(n[1]),t=E(),s=U(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&se(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&se(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function o$(n){let e;return{c(){e=U("Loading...")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function r$(n){let e,t,i,s,l,o=n[2]&&Mc();function r(f,c){return f[2]?o$:l$}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=E(),i=v("canvas"),s=E(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),zr(i,"height","250px"),zr(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),Q(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){w(f,e,c),o&&o.m(e,null),g(e,t),g(e,i),n[8](i),w(f,s,c),w(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&A(o,1):(o=Mc(),o.c(),A(o,1),o.m(e,t)):o&&(ae(),I(o,1,1,()=>{o=null}),ue()),c&4&&Q(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(o)},o(f){I(o)},d(f){f&&k(e),o&&o.d(),n[8](null),f&&k(s),f&&k(l),u.d()}}}function a$(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),ce.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{c();for(let _ of m)r.push({x:new Date(_.date),y:_.total}),t(1,a+=_.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(c(),console.warn(m),ce.error(m,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Gt(()=>(Po.register(zi,xo,Xo,ru,Pl,DS,qS),t(6,o=new Po(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:m=>m.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:m=>m.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(m){ee[m?"unshift":"push"](()=>{l=m,t(0,l)})}return n.$$set=m=>{"filter"in m&&t(3,i=m.filter),"presets"in m&&t(4,s=m.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class u$ extends ge{constructor(e){super(),_e(this,e,a$,r$,me,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var Oc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function f$(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var _1={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + */const o$={datetime:Ue.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:Ue.TIME_WITH_SECONDS,minute:Ue.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};Qb._date.override({_id:"luxon",_create:function(n){return Ue.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return o$},parse:function(n,e){const t=this.options,i=typeof n;return n===null||i==="undefined"?null:(i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=Ue.fromFormat(n,e,t):n=Ue.fromISO(n,t):n instanceof Date?n=Ue.fromJSDate(n,t):i==="object"&&!(n instanceof Ue)&&(n=Ue.fromObject(n,t)),n.isValid?n.valueOf():null)},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e):t.toLocaleString(e)},add:function(n,e,t){const i={};return i[t]=e,this._create(n).plus(i).valueOf()},diff:function(n,e,t){return this._create(n).diff(this._create(e)).as(t).valueOf()},startOf:function(n,e,t){if(e==="isoWeek"){t=Math.trunc(Math.min(Math.max(0,t),6));const i=this._create(n);return i.minus({days:(i.weekday-t+7)%7}).startOf("day").valueOf()}return e?this._create(n).startOf(e).valueOf():n},endOf:function(n,e){return this._create(n).endOf(e).valueOf()}});function Mc(n){let e,t,i;return{c(){e=v("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=je(e,Kt,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function r$(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=U(n[1]),t=E(),s=U(i)},m(l,o){w(l,e,o),w(l,t,o),w(l,s,o)},p(l,o){o&2&&se(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&se(s,i)},d(l){l&&k(e),l&&k(t),l&&k(s)}}}function a$(n){let e;return{c(){e=U("Loading...")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function u$(n){let e,t,i,s,l,o=n[2]&&Mc();function r(f,c){return f[2]?a$:r$}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=E(),i=v("canvas"),s=E(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),zr(i,"height","250px"),zr(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),Q(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){w(f,e,c),o&&o.m(e,null),g(e,t),g(e,i),n[8](i),w(f,s,c),w(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&A(o,1):(o=Mc(),o.c(),A(o,1),o.m(e,t)):o&&(ae(),I(o,1,1,()=>{o=null}),ue()),c&4&&Q(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){A(o)},o(f){I(o)},d(f){f&&k(e),o&&o.d(),n[8](null),f&&k(s),f&&k(l),u.d()}}}function f$(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),ce.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(m=>{c();for(let _ of m)r.push({x:new Date(_.date),y:_.total}),t(1,a+=_.total);r.push({x:new Date,y:void 0})}).catch(m=>{m!=null&&m.isAbort||(c(),console.warn(m),ce.error(m,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}Gt(()=>(No.register(zi,er,Qo,ru,Pl,IS,VS),t(6,o=new No(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:m=>m.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:m=>m.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(m){ee[m?"unshift":"push"](()=>{l=m,t(0,l)})}return n.$$set=m=>{"filter"in m&&t(3,i=m.filter),"presets"in m&&t(4,s=m.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class c$ extends ge{constructor(e){super(),_e(this,e,f$,u$,me,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var Oc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d$(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var b1={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** * Prism: Lightweight, robust, elegant syntax highlighting * * @license MIT * @author Lea Verou * @namespace * @public - */var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function S(C){return C instanceof a?new a(C.type,S(C.content),C.alias):Array.isArray(C)?C.map(S):C.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(T){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(T.stack)||[])[1];if(S){var C=document.getElementsByTagName("script");for(var $ in C)if(C[$].src==S)return C[$]}return null}},isActive:function(S,C,$){for(var T="no-"+C;S;){var M=S.classList;if(M.contains(C))return!0;if(M.contains(T))return!1;S=S.parentElement}return!!$}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(S,C){var $=r.util.clone(r.languages[S]);for(var T in C)$[T]=C[T];return $},insertBefore:function(S,C,$,T){T=T||r.languages;var M=T[S],O={};for(var D in M)if(M.hasOwnProperty(D)){if(D==C)for(var L in $)$.hasOwnProperty(L)&&(O[L]=$[L]);$.hasOwnProperty(D)||(O[D]=M[D])}var P=T[S];return T[S]=O,r.languages.DFS(r.languages,function(N,F){F===P&&N!=S&&(this[N]=O)}),O},DFS:function S(C,$,T,M){M=M||{};var O=r.util.objId;for(var D in C)if(C.hasOwnProperty(D)){$.call(C,D,C[D],T||D);var L=C[D],P=r.util.type(L);P==="Object"&&!M[O(L)]?(M[O(L)]=!0,S(L,$,null,M)):P==="Array"&&!M[O(L)]&&(M[O(L)]=!0,S(L,$,D,M))}}},plugins:{},highlightAll:function(S,C){r.highlightAllUnder(document,S,C)},highlightAllUnder:function(S,C,$){var T={callback:$,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",T),T.elements=Array.prototype.slice.apply(T.container.querySelectorAll(T.selector)),r.hooks.run("before-all-elements-highlight",T);for(var M=0,O;O=T.elements[M++];)r.highlightElement(O,C===!0,T.callback)},highlightElement:function(S,C,$){var T=r.util.getLanguage(S),M=r.languages[T];r.util.setLanguage(S,T);var O=S.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,T);var D=S.textContent,L={element:S,language:T,grammar:M,code:D};function P(F){L.highlightedCode=F,r.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,r.hooks.run("after-highlight",L),r.hooks.run("complete",L),$&&$.call(L.element)}if(r.hooks.run("before-sanity-check",L),O=L.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!L.code){r.hooks.run("complete",L),$&&$.call(L.element);return}if(r.hooks.run("before-highlight",L),!L.grammar){P(r.util.encode(L.code));return}if(C&&i.Worker){var N=new Worker(r.filename);N.onmessage=function(F){P(F.data)},N.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else P(r.highlight(L.code,L.grammar,L.language))},highlight:function(S,C,$){var T={code:S,grammar:C,language:$};if(r.hooks.run("before-tokenize",T),!T.grammar)throw new Error('The language "'+T.language+'" has no grammar.');return T.tokens=r.tokenize(T.code,T.grammar),r.hooks.run("after-tokenize",T),a.stringify(r.util.encode(T.tokens),T.language)},tokenize:function(S,C){var $=C.rest;if($){for(var T in $)C[T]=$[T];delete C.rest}var M=new c;return d(M,M.head,S),f(S,M,C,M.head,0),_(M)},hooks:{all:{},add:function(S,C){var $=r.hooks.all;$[S]=$[S]||[],$[S].push(C)},run:function(S,C){var $=r.hooks.all[S];if(!(!$||!$.length))for(var T=0,M;M=$[T++];)M(C)}},Token:a};i.Prism=r;function a(S,C,$,T){this.type=S,this.content=C,this.alias=$,this.length=(T||"").length|0}a.stringify=function S(C,$){if(typeof C=="string")return C;if(Array.isArray(C)){var T="";return C.forEach(function(P){T+=S(P,$)}),T}var M={type:C.type,content:S(C.content,$),tag:"span",classes:["token",C.type],attributes:{},language:$},O=C.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(M.classes,O):M.classes.push(O)),r.hooks.run("wrap",M);var D="";for(var L in M.attributes)D+=" "+L+'="'+(M.attributes[L]||"").replace(/"/g,""")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+D+">"+M.content+""};function u(S,C,$,T){S.lastIndex=C;var M=S.exec($);if(M&&T&&M[1]){var O=M[1].length;M.index+=O,M[0]=M[0].slice(O)}return M}function f(S,C,$,T,M,O){for(var D in $)if(!(!$.hasOwnProperty(D)||!$[D])){var L=$[D];L=Array.isArray(L)?L:[L];for(var P=0;P=O.reach);Z+=J.value.length,J=J.next){var le=J.value;if(C.length>S.length)return;if(!(le instanceof a)){var ne=1,ie;if(q){if(ie=u(X,Z,S,R),!ie||ie.index>=S.length)break;var Be=ie.index,be=ie.index+ie[0].length,Se=Z;for(Se+=J.value.length;Be>=Se;)J=J.next,Se+=J.value.length;if(Se-=J.value.length,Z=Se,J.value instanceof a)continue;for(var Ve=J;Ve!==C.tail&&(SeO.reach&&(O.reach=ht);var Ge=J.prev;Te&&(Ge=d(C,Ge,Te),Z+=Te.length),m(C,Ge,ne);var Ye=new a(D,F?r.tokenize(ke,F):ke,H,ke);if(J=d(C,Ge,Ye),Ze&&d(C,J,Ze),ne>1){var we={cause:D+","+P,reach:ht};f(S,C,$,J.prev,Z,we),O&&we.reach>O.reach&&(O.reach=we.reach)}}}}}}function c(){var S={value:null,prev:null,next:null},C={value:null,prev:S,next:null};S.next=C,this.head=S,this.tail=C,this.length=0}function d(S,C,$){var T=C.next,M={value:$,prev:C,next:T};return C.next=M,T.prev=M,S.length++,M}function m(S,C,$){for(var T=C.next,M=0;M<$&&T!==S.tail;M++)T=T.next;C.next=T,T.prev=C,S.length-=M}function _(S){for(var C=[],$=S.head.next;$!==S.tail;)C.push($.value),$=$.next;return C}if(!i.document)return i.addEventListener&&(r.disableWorkerMessageHandler||i.addEventListener("message",function(S){var C=JSON.parse(S.data),$=C.language,T=C.code,M=C.immediateClose;i.postMessage(r.highlight(T,r.languages[$],$)),M&&i.close()},!1)),r;var h=r.util.currentScript();h&&(r.filename=h.src,h.hasAttribute("data-manual")&&(r.manual=!0));function b(){r.manual||r.highlightAll()}if(!r.manual){var y=document.readyState;y==="loading"||y==="interactive"&&h&&h.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return r}(e);n.exports&&(n.exports=t),typeof Oc<"u"&&(Oc.Prism=t),t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",s=function(h,b){return"✖ Error "+h+" while fetching file: "+b},l="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",u="loaded",f="failed",c="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function d(h,b,y){var S=new XMLHttpRequest;S.open("GET",h,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?b(S.responseText):S.status>=400?y(s(S.status,S.statusText)):y(l))},S.send(null)}function m(h){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(h||"");if(b){var y=Number(b[1]),S=b[2],C=b[3];return S?C?[y,Number(C)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(h){h.selector+=", "+c}),t.hooks.add("before-sanity-check",function(h){var b=h.element;if(b.matches(c)){h.code="",b.setAttribute(r,a);var y=b.appendChild(document.createElement("CODE"));y.textContent=i;var S=b.getAttribute("data-src"),C=h.language;if(C==="none"){var $=(/\.(\w+)$/.exec(S)||[,"none"])[1];C=o[$]||$}t.util.setLanguage(y,C),t.util.setLanguage(b,C);var T=t.plugins.autoloader;T&&T.loadLanguages(C),d(S,function(M){b.setAttribute(r,u);var O=m(b.getAttribute("data-range"));if(O){var D=M.split(/\r\n?|\n/g),L=O[0],P=O[1]==null?D.length:O[1];L<0&&(L+=D.length),L=Math.max(0,Math.min(L-1,D.length)),P<0&&(P+=D.length),P=Math.max(0,Math.min(P,D.length)),M=D.slice(L,P).join(` -`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}y.textContent=M,t.highlightElement(y)},function(M){b.setAttribute(r,f),y.textContent=M})}}),t.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(c),S=0,C;C=y[S++];)t.highlightElement(C)}};var _=!1;t.fileHighlight=function(){_||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),_=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(_1);var c$=_1.exports;const xs=f$(c$);var d$={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;a"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(T){var S=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(T.stack)||[])[1];if(S){var C=document.getElementsByTagName("script");for(var $ in C)if(C[$].src==S)return C[$]}return null}},isActive:function(S,C,$){for(var T="no-"+C;S;){var M=S.classList;if(M.contains(C))return!0;if(M.contains(T))return!1;S=S.parentElement}return!!$}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(S,C){var $=r.util.clone(r.languages[S]);for(var T in C)$[T]=C[T];return $},insertBefore:function(S,C,$,T){T=T||r.languages;var M=T[S],O={};for(var D in M)if(M.hasOwnProperty(D)){if(D==C)for(var L in $)$.hasOwnProperty(L)&&(O[L]=$[L]);$.hasOwnProperty(D)||(O[D]=M[D])}var P=T[S];return T[S]=O,r.languages.DFS(r.languages,function(N,F){F===P&&N!=S&&(this[N]=O)}),O},DFS:function S(C,$,T,M){M=M||{};var O=r.util.objId;for(var D in C)if(C.hasOwnProperty(D)){$.call(C,D,C[D],T||D);var L=C[D],P=r.util.type(L);P==="Object"&&!M[O(L)]?(M[O(L)]=!0,S(L,$,null,M)):P==="Array"&&!M[O(L)]&&(M[O(L)]=!0,S(L,$,D,M))}}},plugins:{},highlightAll:function(S,C){r.highlightAllUnder(document,S,C)},highlightAllUnder:function(S,C,$){var T={callback:$,container:S,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",T),T.elements=Array.prototype.slice.apply(T.container.querySelectorAll(T.selector)),r.hooks.run("before-all-elements-highlight",T);for(var M=0,O;O=T.elements[M++];)r.highlightElement(O,C===!0,T.callback)},highlightElement:function(S,C,$){var T=r.util.getLanguage(S),M=r.languages[T];r.util.setLanguage(S,T);var O=S.parentElement;O&&O.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(O,T);var D=S.textContent,L={element:S,language:T,grammar:M,code:D};function P(F){L.highlightedCode=F,r.hooks.run("before-insert",L),L.element.innerHTML=L.highlightedCode,r.hooks.run("after-highlight",L),r.hooks.run("complete",L),$&&$.call(L.element)}if(r.hooks.run("before-sanity-check",L),O=L.element.parentElement,O&&O.nodeName.toLowerCase()==="pre"&&!O.hasAttribute("tabindex")&&O.setAttribute("tabindex","0"),!L.code){r.hooks.run("complete",L),$&&$.call(L.element);return}if(r.hooks.run("before-highlight",L),!L.grammar){P(r.util.encode(L.code));return}if(C&&i.Worker){var N=new Worker(r.filename);N.onmessage=function(F){P(F.data)},N.postMessage(JSON.stringify({language:L.language,code:L.code,immediateClose:!0}))}else P(r.highlight(L.code,L.grammar,L.language))},highlight:function(S,C,$){var T={code:S,grammar:C,language:$};if(r.hooks.run("before-tokenize",T),!T.grammar)throw new Error('The language "'+T.language+'" has no grammar.');return T.tokens=r.tokenize(T.code,T.grammar),r.hooks.run("after-tokenize",T),a.stringify(r.util.encode(T.tokens),T.language)},tokenize:function(S,C){var $=C.rest;if($){for(var T in $)C[T]=$[T];delete C.rest}var M=new c;return d(M,M.head,S),f(S,M,C,M.head,0),_(M)},hooks:{all:{},add:function(S,C){var $=r.hooks.all;$[S]=$[S]||[],$[S].push(C)},run:function(S,C){var $=r.hooks.all[S];if(!(!$||!$.length))for(var T=0,M;M=$[T++];)M(C)}},Token:a};i.Prism=r;function a(S,C,$,T){this.type=S,this.content=C,this.alias=$,this.length=(T||"").length|0}a.stringify=function S(C,$){if(typeof C=="string")return C;if(Array.isArray(C)){var T="";return C.forEach(function(P){T+=S(P,$)}),T}var M={type:C.type,content:S(C.content,$),tag:"span",classes:["token",C.type],attributes:{},language:$},O=C.alias;O&&(Array.isArray(O)?Array.prototype.push.apply(M.classes,O):M.classes.push(O)),r.hooks.run("wrap",M);var D="";for(var L in M.attributes)D+=" "+L+'="'+(M.attributes[L]||"").replace(/"/g,""")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+D+">"+M.content+""};function u(S,C,$,T){S.lastIndex=C;var M=S.exec($);if(M&&T&&M[1]){var O=M[1].length;M.index+=O,M[0]=M[0].slice(O)}return M}function f(S,C,$,T,M,O){for(var D in $)if(!(!$.hasOwnProperty(D)||!$[D])){var L=$[D];L=Array.isArray(L)?L:[L];for(var P=0;P=O.reach);Z+=K.value.length,K=K.next){var le=K.value;if(C.length>S.length)return;if(!(le instanceof a)){var ne=1,ie;if(q){if(ie=u(X,Z,S,R),!ie||ie.index>=S.length)break;var Be=ie.index,be=ie.index+ie[0].length,Se=Z;for(Se+=K.value.length;Be>=Se;)K=K.next,Se+=K.value.length;if(Se-=K.value.length,Z=Se,K.value instanceof a)continue;for(var Ve=K;Ve!==C.tail&&(SeO.reach&&(O.reach=ht);var Ge=K.prev;Te&&(Ge=d(C,Ge,Te),Z+=Te.length),m(C,Ge,ne);var Ye=new a(D,F?r.tokenize(ke,F):ke,j,ke);if(K=d(C,Ge,Ye),Ze&&d(C,K,Ze),ne>1){var we={cause:D+","+P,reach:ht};f(S,C,$,K.prev,Z,we),O&&we.reach>O.reach&&(O.reach=we.reach)}}}}}}function c(){var S={value:null,prev:null,next:null},C={value:null,prev:S,next:null};S.next=C,this.head=S,this.tail=C,this.length=0}function d(S,C,$){var T=C.next,M={value:$,prev:C,next:T};return C.next=M,T.prev=M,S.length++,M}function m(S,C,$){for(var T=C.next,M=0;M<$&&T!==S.tail;M++)T=T.next;C.next=T,T.prev=C,S.length-=M}function _(S){for(var C=[],$=S.head.next;$!==S.tail;)C.push($.value),$=$.next;return C}if(!i.document)return i.addEventListener&&(r.disableWorkerMessageHandler||i.addEventListener("message",function(S){var C=JSON.parse(S.data),$=C.language,T=C.code,M=C.immediateClose;i.postMessage(r.highlight(T,r.languages[$],$)),M&&i.close()},!1)),r;var h=r.util.currentScript();h&&(r.filename=h.src,h.hasAttribute("data-manual")&&(r.manual=!0));function b(){r.manual||r.highlightAll()}if(!r.manual){var y=document.readyState;y==="loading"||y==="interactive"&&h&&h.defer?document.addEventListener("DOMContentLoaded",b):window.requestAnimationFrame?window.requestAnimationFrame(b):window.setTimeout(b,16)}return r}(e);n.exports&&(n.exports=t),typeof Oc<"u"&&(Oc.Prism=t),t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading…",s=function(h,b){return"✖ Error "+h+" while fetching file: "+b},l="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",u="loaded",f="failed",c="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function d(h,b,y){var S=new XMLHttpRequest;S.open("GET",h,!0),S.onreadystatechange=function(){S.readyState==4&&(S.status<400&&S.responseText?b(S.responseText):S.status>=400?y(s(S.status,S.statusText)):y(l))},S.send(null)}function m(h){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(h||"");if(b){var y=Number(b[1]),S=b[2],C=b[3];return S?C?[y,Number(C)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(h){h.selector+=", "+c}),t.hooks.add("before-sanity-check",function(h){var b=h.element;if(b.matches(c)){h.code="",b.setAttribute(r,a);var y=b.appendChild(document.createElement("CODE"));y.textContent=i;var S=b.getAttribute("data-src"),C=h.language;if(C==="none"){var $=(/\.(\w+)$/.exec(S)||[,"none"])[1];C=o[$]||$}t.util.setLanguage(y,C),t.util.setLanguage(b,C);var T=t.plugins.autoloader;T&&T.loadLanguages(C),d(S,function(M){b.setAttribute(r,u);var O=m(b.getAttribute("data-range"));if(O){var D=M.split(/\r\n?|\n/g),L=O[0],P=O[1]==null?D.length:O[1];L<0&&(L+=D.length),L=Math.max(0,Math.min(L-1,D.length)),P<0&&(P+=D.length),P=Math.max(0,Math.min(P,D.length)),M=D.slice(L,P).join(` +`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(L+1))}y.textContent=M,t.highlightElement(y)},function(M){b.setAttribute(r,f),y.textContent=M})}}),t.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(c),S=0,C;C=y[S++];)t.highlightElement(C)}};var _=!1;t.fileHighlight=function(){_||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),_=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(b1);var p$=b1.exports;const xs=d$(p$);var m$={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;ar&&(f[d]=` `+f[d],c=m)}a[u]=f.join("")}return a.join(` -`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,m="",_="",h=!1,b=0;b>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function p$(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){w(s,e,l),g(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:x,o:x,d(s){s&&k(e)}}}function m$(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=xs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),xs.highlight(a,xs.languages[l]||xs.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof xs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class g1 extends ge{constructor(e){super(),_e(this,e,m$,p$,me,{class:0,content:2,language:3})}}const h$=n=>({}),Ec=n=>({}),_$=n=>({}),Dc=n=>({});function Ac(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C=n[4]&&!n[2]&&Ic(n);const $=n[19].header,T=yt($,n,n[18],Dc);let M=n[4]&&n[2]&&Lc(n);const O=n[19].default,D=yt(O,n,n[18],null),L=n[19].footer,P=yt(L,n,n[18],Ec);return{c(){e=v("div"),t=v("div"),s=E(),l=v("div"),o=v("div"),C&&C.c(),r=E(),T&&T.c(),a=E(),M&&M.c(),u=E(),f=v("div"),D&&D.c(),c=E(),d=v("div"),P&&P.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",m="overlay-panel "+n[1]+" "+n[8]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(N,F){w(N,e,F),g(e,t),g(e,s),g(e,l),g(l,o),C&&C.m(o,null),g(o,r),T&&T.m(o,null),g(o,a),M&&M.m(o,null),g(l,u),g(l,f),D&&D.m(f,null),n[21](f),g(l,c),g(l,d),P&&P.m(d,null),b=!0,y||(S=[K(t,"click",et(n[20])),K(f,"scroll",n[22])],y=!0)},p(N,F){n=N,n[4]&&!n[2]?C?C.p(n,F):(C=Ic(n),C.c(),C.m(o,r)):C&&(C.d(1),C=null),T&&T.p&&(!b||F[0]&262144)&&wt(T,$,n,n[18],b?kt($,n[18],F,_$):St(n[18]),Dc),n[4]&&n[2]?M?M.p(n,F):(M=Lc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),D&&D.p&&(!b||F[0]&262144)&&wt(D,O,n,n[18],b?kt(O,n[18],F,null):St(n[18]),null),P&&P.p&&(!b||F[0]&262144)&&wt(P,L,n,n[18],b?kt(L,n[18],F,h$):St(n[18]),Ec),(!b||F[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",m),(!b||F[0]&262)&&Q(l,"popup",n[2]),(!b||F[0]&4)&&Q(e,"padded",n[2]),(!b||F[0]&1)&&Q(e,"active",n[0])},i(N){b||(N&&Qe(()=>{b&&(i||(i=je(t,ta,{duration:ys,opacity:0},!0)),i.run(1))}),A(T,N),A(D,N),A(P,N),Qe(()=>{b&&(h&&h.end(1),_=rg(l,fi,n[2]?{duration:ys,y:-10}:{duration:ys,x:50}),_.start())}),b=!0)},o(N){N&&(i||(i=je(t,ta,{duration:ys,opacity:0},!1)),i.run(0)),I(T,N),I(D,N),I(P,N),_&&_.invalidate(),h=$a(l,fi,n[2]?{duration:ys,y:10}:{duration:ys,x:50}),b=!1},d(N){N&&k(e),N&&i&&i.end(),C&&C.d(),T&&T.d(N),M&&M.d(),D&&D.d(N),n[21](null),P&&P.d(N),N&&h&&h.end(),y=!1,Ee(S)}}}function Ic(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=K(e,"click",et(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Lc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=K(e,"click",et(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function g$(n){let e,t,i,s,l=n[0]&&Ac(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[K(window,"resize",n[10]),K(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Ac(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){I(l),t=!1},d(o){o&&k(e),l&&l.d(),n[23](null),i=!1,Ee(s)}}}let Zi,Or=[];function b1(){return Zi=Zi||document.querySelector(".overlays"),Zi||(Zi=document.createElement("div"),Zi.classList.add("overlays"),document.body.appendChild(Zi)),Zi}let ys=150;function Pc(){return 1e3+b1().querySelectorAll(".overlay-panel-container.active").length}function b$(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const m=$t(),_="op_"+B.randomString(10);let h,b,y,S,C="",$=o;function T(){typeof c=="function"&&c()===!1||t(0,o=!0)}function M(){typeof d=="function"&&d()===!1||t(0,o=!1)}function O(){return o}async function D(Z){t(17,$=Z),Z?(y=document.activeElement,m("show"),h==null||h.focus()):(clearTimeout(S),m("hide"),y==null||y.focus()),await fn(),L()}function L(){h&&(o?t(6,h.style.zIndex=Pc(),h):t(6,h.style="",h))}function P(){B.pushUnique(Or,_),document.body.classList.add("overlay-active")}function N(){B.removeByValue(Or,_),Or.length||document.body.classList.remove("overlay-active")}function F(Z){o&&f&&Z.code=="Escape"&&!B.isInput(Z.target)&&h&&h.style.zIndex==Pc()&&(Z.preventDefault(),M())}function R(Z){o&&q(b)}function q(Z,le){le&&t(8,C=""),Z&&(S||(S=setTimeout(()=>{if(clearTimeout(S),S=null,!Z)return;if(Z.scrollHeight-Z.offsetHeight>0)t(8,C="scrollable");else{t(8,C="");return}Z.scrollTop==0?t(8,C+=" scroll-top-reached"):Z.scrollTop+Z.offsetHeight==Z.scrollHeight&&t(8,C+=" scroll-bottom-reached")},100)))}Gt(()=>(b1().appendChild(h),()=>{var Z;clearTimeout(S),N(),(Z=h==null?void 0:h.classList)==null||Z.add("hidden"),setTimeout(()=>{h==null||h.remove()},0)}));const H=()=>a?M():!0;function W(Z){ee[Z?"unshift":"push"](()=>{b=Z,t(7,b)})}const X=Z=>q(Z.target);function J(Z){ee[Z?"unshift":"push"](()=>{h=Z,t(6,h)})}return n.$$set=Z=>{"class"in Z&&t(1,l=Z.class),"active"in Z&&t(0,o=Z.active),"popup"in Z&&t(2,r=Z.popup),"overlayClose"in Z&&t(3,a=Z.overlayClose),"btnClose"in Z&&t(4,u=Z.btnClose),"escClose"in Z&&t(12,f=Z.escClose),"beforeOpen"in Z&&t(13,c=Z.beforeOpen),"beforeHide"in Z&&t(14,d=Z.beforeHide),"$$scope"in Z&&t(18,s=Z.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&$!=o&&D(o),n.$$.dirty[0]&128&&q(b,!0),n.$$.dirty[0]&64&&h&&L(),n.$$.dirty[0]&1&&(o?P():N())},[o,l,r,a,u,M,h,b,C,F,R,q,f,c,d,T,O,$,s,i,H,W,X,J]}class ln extends ge{constructor(e){super(),_e(this,e,b$,g$,me,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function v$(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function y$(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=U(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){w(l,e,o),g(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&se(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&k(e)}}}function k$(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function w$(n){let e,t,i;return t=new g1({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","block")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function S$(n){var Ie;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,m,_,h=n[2].status+"",b,y,S,C,$,T,M=((Ie=n[2].method)==null?void 0:Ie.toUpperCase())+"",O,D,L,P,N,F,R=n[2].auth+"",q,H,W,X,J,Z,le=n[2].url+"",ne,ie,be,Se,Ve,Be,ke,Te,Ze,ht,Ge,Ye=n[2].remoteIp+"",we,fe,ze,Dt,Le,$e,nt=n[2].userIp+"",At,jt,Ut,Ln,ei,Sn,_t=n[2].userAgent+"",Pn,ds,ti,Ti,ps,pi,ve,De,Fe,Xe,Ot,$n,Nn,Bi,nn,cn;function Rl(Pe,Oe){return Pe[2].referer?y$:v$}let Y=Rl(n),G=Y(n);const te=[w$,k$],oe=[];function Ce(Pe,Oe){return Oe&4&&(ve=null),ve==null&&(ve=!B.isEmpty(Pe[2].meta)),ve?0:1}return De=Ce(n,-1),Fe=oe[De]=te[De](n),nn=new wi({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=E(),o=v("td"),a=U(r),u=E(),f=v("tr"),c=v("td"),c.textContent="Status",d=E(),m=v("td"),_=v("span"),b=U(h),y=E(),S=v("tr"),C=v("td"),C.textContent="Method",$=E(),T=v("td"),O=U(M),D=E(),L=v("tr"),P=v("td"),P.textContent="Auth",N=E(),F=v("td"),q=U(R),H=E(),W=v("tr"),X=v("td"),X.textContent="URL",J=E(),Z=v("td"),ne=U(le),ie=E(),be=v("tr"),Se=v("td"),Se.textContent="Referer",Ve=E(),Be=v("td"),G.c(),ke=E(),Te=v("tr"),Ze=v("td"),Ze.textContent="Remote IP",ht=E(),Ge=v("td"),we=U(Ye),fe=E(),ze=v("tr"),Dt=v("td"),Dt.textContent="User IP",Le=E(),$e=v("td"),At=U(nt),jt=E(),Ut=v("tr"),Ln=v("td"),Ln.textContent="UserAgent",ei=E(),Sn=v("td"),Pn=U(_t),ds=E(),ti=v("tr"),Ti=v("td"),Ti.textContent="Meta",ps=E(),pi=v("td"),Fe.c(),Xe=E(),Ot=v("tr"),$n=v("td"),$n.textContent="Created",Nn=E(),Bi=v("td"),z(nn.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(_,"class","label"),Q(_,"label-danger",n[2].status>=400),p(C,"class","min-width txt-hint txt-bold"),p(P,"class","min-width txt-hint txt-bold"),p(X,"class","min-width txt-hint txt-bold"),p(Se,"class","min-width txt-hint txt-bold"),p(Ze,"class","min-width txt-hint txt-bold"),p(Dt,"class","min-width txt-hint txt-bold"),p(Ln,"class","min-width txt-hint txt-bold"),p(Ti,"class","min-width txt-hint txt-bold"),p($n,"class","min-width txt-hint txt-bold"),p(e,"class","table-border")},m(Pe,Oe){w(Pe,e,Oe),g(e,t),g(t,i),g(i,s),g(i,l),g(i,o),g(o,a),g(t,u),g(t,f),g(f,c),g(f,d),g(f,m),g(m,_),g(_,b),g(t,y),g(t,S),g(S,C),g(S,$),g(S,T),g(T,O),g(t,D),g(t,L),g(L,P),g(L,N),g(L,F),g(F,q),g(t,H),g(t,W),g(W,X),g(W,J),g(W,Z),g(Z,ne),g(t,ie),g(t,be),g(be,Se),g(be,Ve),g(be,Be),G.m(Be,null),g(t,ke),g(t,Te),g(Te,Ze),g(Te,ht),g(Te,Ge),g(Ge,we),g(t,fe),g(t,ze),g(ze,Dt),g(ze,Le),g(ze,$e),g($e,At),g(t,jt),g(t,Ut),g(Ut,Ln),g(Ut,ei),g(Ut,Sn),g(Sn,Pn),g(t,ds),g(t,ti),g(ti,Ti),g(ti,ps),g(ti,pi),oe[De].m(pi,null),g(t,Xe),g(t,Ot),g(Ot,$n),g(Ot,Nn),g(Ot,Bi),j(nn,Bi,null),cn=!0},p(Pe,Oe){var We;(!cn||Oe&4)&&r!==(r=Pe[2].id+"")&&se(a,r),(!cn||Oe&4)&&h!==(h=Pe[2].status+"")&&se(b,h),(!cn||Oe&4)&&Q(_,"label-danger",Pe[2].status>=400),(!cn||Oe&4)&&M!==(M=((We=Pe[2].method)==null?void 0:We.toUpperCase())+"")&&se(O,M),(!cn||Oe&4)&&R!==(R=Pe[2].auth+"")&&se(q,R),(!cn||Oe&4)&&le!==(le=Pe[2].url+"")&&se(ne,le),Y===(Y=Rl(Pe))&&G?G.p(Pe,Oe):(G.d(1),G=Y(Pe),G&&(G.c(),G.m(Be,null))),(!cn||Oe&4)&&Ye!==(Ye=Pe[2].remoteIp+"")&&se(we,Ye),(!cn||Oe&4)&&nt!==(nt=Pe[2].userIp+"")&&se(At,nt),(!cn||Oe&4)&&_t!==(_t=Pe[2].userAgent+"")&&se(Pn,_t);let Ke=De;De=Ce(Pe,Oe),De===Ke?oe[De].p(Pe,Oe):(ae(),I(oe[Ke],1,1,()=>{oe[Ke]=null}),ue(),Fe=oe[De],Fe?Fe.p(Pe,Oe):(Fe=oe[De]=te[De](Pe),Fe.c()),A(Fe,1),Fe.m(pi,null));const Re={};Oe&4&&(Re.date=Pe[2].created),nn.$set(Re)},i(Pe){cn||(A(Fe),A(nn.$$.fragment,Pe),cn=!0)},o(Pe){I(Fe),I(nn.$$.fragment,Pe),cn=!1},d(Pe){Pe&&k(e),G.d(),oe[De].d(),V(nn)}}}function $$(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function C$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[4]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function T$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[C$],header:[$$],default:[S$]},$$scope:{ctx:n}};return e=new ln({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[5](null),V(e,s)}}}function M$(n,e,t){let i,s=new Yr;function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){ee[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){Ne.call(this,n,c)}function f(c){Ne.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class O$ extends ge{constructor(e){super(),_e(this,e,M$,T$,me,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function E$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){w(u,e,f),e.checked=n[1],w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Nc(n){let e,t;return e=new u$({props:{filter:n[4],presets:n[5]}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Fc(n){let e,t;return e=new Ok({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function D$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S=n[3],C,$=n[3],T,M;r=new Zo({}),r.$on("refresh",n[9]),d=new pe({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[E$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),_=new Jo({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),_.$on("submit",n[11]);let O=Nc(n),D=Fc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=U(n[6]),o=E(),z(r.$$.fragment),a=E(),u=v("div"),f=E(),c=v("div"),z(d.$$.fragment),m=E(),z(_.$$.fragment),h=E(),b=v("div"),y=E(),O.c(),C=E(),D.c(),T=ye(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(b,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(L,P){w(L,e,P),g(e,t),g(t,i),g(i,s),g(s,l),g(t,o),j(r,t,null),g(t,a),g(t,u),g(t,f),g(t,c),j(d,c,null),g(e,m),j(_,e,null),g(e,h),g(e,b),g(e,y),O.m(e,null),w(L,C,P),D.m(L,P),w(L,T,P),M=!0},p(L,P){(!M||P&64)&&se(l,L[6]);const N={};P&49154&&(N.$$scope={dirty:P,ctx:L}),d.$set(N);const F={};P&1&&(F.value=L[0]),_.$set(F),P&8&&me(S,S=L[3])?(ae(),I(O,1,1,x),ue(),O=Nc(L),O.c(),A(O,1),O.m(e,null)):O.p(L,P),P&8&&me($,$=L[3])?(ae(),I(D,1,1,x),ue(),D=Fc(L),D.c(),A(D,1),D.m(T.parentNode,T)):D.p(L,P)},i(L){M||(A(r.$$.fragment,L),A(d.$$.fragment,L),A(_.$$.fragment,L),A(O),A(D),M=!0)},o(L){I(r.$$.fragment,L),I(d.$$.fragment,L),I(_.$$.fragment,L),I(O),I(D),M=!1},d(L){L&&k(e),V(r),V(d),V(_),O.d(L),L&&k(C),L&&k(T),D.d(L)}}}function A$(n){let e,t,i,s;e=new wn({props:{$$slots:{default:[D$]},$$scope:{ctx:n}}});let l={};return i=new O$({props:l}),n[13](i),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(o,r){j(e,o,r),w(o,t,r),j(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){I(e.$$.fragment,o),I(i.$$.fragment,o),s=!1},d(o){V(e,o),o&&k(t),n[13](null),V(i,o)}}}const Rc="includeAdminLogs";function I$(n,e,t){var y;let i,s,l;Je(n,Tt,S=>t(6,l=S));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];sn(Tt,l="Request logs",l);let r,a="",u=((y=window.localStorage)==null?void 0:y.getItem(Rc))<<0,f=1;function c(){t(3,f++,f)}const d=()=>c();function m(){u=this.checked,t(1,u)}const _=S=>t(0,a=S.detail),h=S=>r==null?void 0:r.show(S==null?void 0:S.detail);function b(S){ee[S?"unshift":"push"](()=>{r=S,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Rc,u<<0),n.$$.dirty&1&&t(4,s=B.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,c,d,m,_,h,b]}class L$ extends ge{constructor(e){super(),_e(this,e,I$,A$,me,{})}}const au=In({});function pn(n,e,t){au.set({text:n,yesCallback:e,noCallback:t})}function v1(){au.set({})}function qc(n){let e,t,i;const s=n[17].default,l=yt(s,n,n[16],null);return{c(){e=v("div"),l&&l.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(o,r){w(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&wt(l,s,o,o[16],i?kt(s,o[16],r,null):St(o[16]),null),(!i||r&2)&&p(e,"class",o[1]),(!i||r&3)&&Q(e,"active",o[0])},i(o){i||(A(l,o),o&&Qe(()=>{i&&(t||(t=je(e,fi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){I(l,o),o&&(t||(t=je(e,fi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function P$(n){let e,t,i,s,l=n[0]&&qc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[K(window,"mousedown",n[5]),K(window,"click",n[6]),K(window,"keydown",n[4]),K(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=qc(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){I(l),t=!1},d(o){o&&k(e),l&&l.d(),n[19](null),i=!1,Ee(s)}}}function N$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,c,d,m,_,h=!1;const b=$t();function y(){t(0,o=!1),h=!1,clearTimeout(_)}function S(){t(0,o=!0),clearTimeout(_),_=setTimeout(()=>{a&&(d!=null&&d.scrollIntoViewIfNeeded?d==null||d.scrollIntoViewIfNeeded():d!=null&&d.scrollIntoView&&(d==null||d.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function C(){o?y():S()}function $(H){return!c||H.classList.contains(u)||(m==null?void 0:m.contains(H))&&!c.contains(H)||c.contains(H)&&H.closest&&H.closest("."+u)}function T(H){(!o||$(H.target))&&(H.preventDefault(),H.stopPropagation(),C())}function M(H){(H.code==="Enter"||H.code==="Space")&&(!o||$(H.target))&&(H.preventDefault(),H.stopPropagation(),C())}function O(H){o&&r&&H.code==="Escape"&&(H.preventDefault(),y())}function D(H){o&&!(c!=null&&c.contains(H.target))?h=!0:h&&(h=!1)}function L(H){var W;o&&h&&!(c!=null&&c.contains(H.target))&&!(m!=null&&m.contains(H.target))&&!((W=H.target)!=null&&W.closest(".flatpickr-calendar"))&&y()}function P(H){D(H),L(H)}function N(H){F(),c==null||c.addEventListener("click",T),t(15,m=H||(c==null?void 0:c.parentNode)),m==null||m.addEventListener("click",T),m==null||m.addEventListener("keydown",M)}function F(){clearTimeout(_),c==null||c.removeEventListener("click",T),m==null||m.removeEventListener("click",T),m==null||m.removeEventListener("keydown",M)}Gt(()=>(N(),()=>F()));function R(H){ee[H?"unshift":"push"](()=>{d=H,t(3,d)})}function q(H){ee[H?"unshift":"push"](()=>{c=H,t(2,c)})}return n.$$set=H=>{"trigger"in H&&t(8,l=H.trigger),"active"in H&&t(0,o=H.active),"escClose"in H&&t(9,r=H.escClose),"autoScroll"in H&&t(10,a=H.autoScroll),"closableClass"in H&&t(11,u=H.closableClass),"class"in H&&t(1,f=H.class),"$$scope"in H&&t(16,s=H.$$scope)},n.$$.update=()=>{var H,W;n.$$.dirty&260&&c&&N(l),n.$$.dirty&32769&&(o?((H=m==null?void 0:m.classList)==null||H.add("active"),b("show")):((W=m==null?void 0:m.classList)==null||W.remove("active"),b("hide")))},[o,f,c,d,O,D,L,P,l,r,a,u,y,S,C,m,s,i,R,q]}class Kn extends ge{constructor(e){super(),_e(this,e,N$,P$,me,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function jc(n,e,t){const i=n.slice();return i[27]=e[t],i}function F$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("input"),s=E(),l=v("label"),o=U("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[30]),e.checked=i=n[3].unique,p(l,"for",r=n[30])},m(f,c){w(f,e,c),w(f,s,c),w(f,l,c),g(l,o),a||(u=K(e,"change",n[19]),a=!0)},p(f,c){c[0]&1073741824&&t!==(t=f[30])&&p(e,"id",t),c[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),c[0]&1073741824&&r!==(r=f[30])&&p(l,"for",r)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function R$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Ft(o,r(n)),ee.push(()=>de(e,"value",l))),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&j(e,a,u),w(a,i,u),s=!0},p(a,u){var c;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(c=a[0])==null?void 0:c.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],he(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){ae();const d=e;I(d.$$.fragment,1,0,()=>{V(d,1)}),ue()}o?(e=Ft(o,r(a)),ee.push(()=>de(e,"value",l)),z(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&V(e,a)}}}function q$(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function j$(n){let e,t,i,s;const l=[q$,R$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function Vc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new pe({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[j$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Vc(n);return{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),r&&r.c(),l=ye()},m(a,u){j(e,a,u),w(a,t,u),j(i,a,u),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};u[0]&64&&(c.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(c.$$scope={dirty:u,ctx:a}),i.$set(c),a[10].length>0?r?r.p(a,u):(r=Vc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),o=!1},d(a){V(e,a),a&&k(t),V(i,a),a&&k(s),r&&r.d(a),a&&k(l)}}}function z$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=v("h4"),i=U(t),s=U(" index")},m(l,o){w(l,e,o),g(e,i),g(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&se(i,t)},d(l){l&&k(e)}}}function Hc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){w(s,e,l),t||(i=[Me(He.call(null,e,{text:"Delete",position:"top"})),K(e,"click",n[16])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ee(i)}}}function H$(n){let e,t,i,s,l,o,r=n[5]!=""&&Hc(n);return{c(){r&&r.c(),e=E(),t=v("button"),t.innerHTML='Cancel',i=E(),s=v("button"),s.innerHTML='Set index',p(t,"type","button"),p(t,"class","btn btn-transparent"),p(s,"type","button"),p(s,"class","btn"),Q(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),l||(o=[K(t,"click",n[17]),K(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Hc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&Q(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&k(e),a&&k(t),a&&k(i),a&&k(s),l=!1,Ee(o)}}}function B$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[H$],header:[z$],default:[V$]},$$scope:{ctx:n}};for(let l=0;lJ.name==H);X?B.removeByValue(W.columns,X):B.pushUnique(W.columns,{name:H}),t(2,d=B.buildIndex(W))}Gt(async()=>{t(8,h=!0);try{t(7,_=(await at(()=>import("./CodeEditor-bc0a826d.js"),["./CodeEditor-bc0a826d.js","./index-fd4289fb.js"],import.meta.url)).default)}catch(H){console.warn(H)}t(8,h=!1)});const M=()=>C(),O=()=>y(),D=()=>$(),L=H=>{t(3,s.unique=H.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,d=B.buildIndex(s))};function P(H){d=H,t(2,d)}const N=H=>T(H);function F(H){ee[H?"unshift":"push"](()=>{f=H,t(4,f)})}function R(H){Ne.call(this,n,H)}function q(H){Ne.call(this,n,H)}return n.$$set=H=>{e=qe(qe({},e),Zt(H)),t(14,r=xe(e,o)),"collection"in H&&t(0,u=H.collection)},n.$$.update=()=>{var H,W,X;n.$$.dirty[0]&1&&t(10,i=(((W=(H=u==null?void 0:u.schema)==null?void 0:H.filter(J=>!J.toDelete))==null?void 0:W.map(J=>J.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=B.parseIndex(d)),n.$$.dirty[0]&8&&t(9,l=((X=s.columns)==null?void 0:X.map(J=>J.name))||[])},[u,y,d,s,f,c,m,_,h,l,i,C,$,T,r,b,M,O,D,L,P,N,F,R,q]}class W$ extends ge{constructor(e){super(),_e(this,e,U$,B$,me,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Bc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=B.parseIndex(i[10]);return i[11]=s,i}function Uc(n){let e;return{c(){e=v("strong"),e.textContent="Unique:"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Wc(n){var d;let e,t,i,s=((d=n[11].columns)==null?void 0:d.map(Yc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Uc();function c(){return n[4](n[10],n[13])}return{c(){var m,_;e=v("button"),f&&f.c(),t=E(),i=v("span"),l=U(s),p(i,"class","txt"),p(e,"type","button"),p(e,"class",o="label link-primary "+((_=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&_.message?"label-danger":"")+" svelte-167lbwu")},m(m,_){var h,b;w(m,e,_),f&&f.m(e,null),g(e,t),g(e,i),g(i,l),a||(u=[Me(r=He.call(null,e,((b=(h=n[2].indexes)==null?void 0:h[n[13]])==null?void 0:b.message)||"")),K(e,"click",c)],a=!0)},p(m,_){var h,b,y,S,C;n=m,n[11].unique?f||(f=Uc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&1&&s!==(s=((h=n[11].columns)==null?void 0:h.map(Yc).join(", "))+"")&&se(l,s),_&4&&o!==(o="label link-primary "+((y=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&y.message?"label-danger":"")+" svelte-167lbwu")&&p(e,"class",o),r&&qt(r.update)&&_&4&&r.update.call(null,((C=(S=n[2].indexes)==null?void 0:S[n[13]])==null?void 0:C.message)||"")},d(m){m&&k(e),f&&f.d(),a=!1,Ee(u)}}}function Y$(n){var $,T,M;let e,t,i=(((T=($=n[0])==null?void 0:$.indexes)==null?void 0:T.length)||0)+"",s,l,o,r,a,u,f,c,d,m,_,h,b=((M=n[0])==null?void 0:M.indexes)||[],y=[];for(let O=0;Ode(c,"collection",S)),c.$on("remove",n[8]),c.$on("submit",n[9]),{c(){e=v("div"),t=U("Unique constraints and indexes ("),s=U(i),l=U(")"),o=E(),r=v("div");for(let O=0;O+ - New index`,f=E(),z(c.$$.fragment),p(e,"class","section-title"),p(u,"type","button"),p(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),p(r,"class","indexes-list svelte-167lbwu")},m(O,D){w(O,e,D),g(e,t),g(e,s),g(e,l),w(O,o,D),w(O,r,D);for(let L=0;Ld=!1)),c.$set(L)},i(O){m||(A(c.$$.fragment,O),m=!0)},o(O){I(c.$$.fragment,O),m=!1},d(O){O&&k(e),O&&k(o),O&&k(r),mt(y,O),O&&k(f),n[6](null),V(c,O),_=!1,h()}}}const Yc=n=>n.name;function K$(n,e,t){let i;Je(n,Si,m=>t(2,i=m));let{collection:s}=e,l;function o(m,_){for(let h=0;hl==null?void 0:l.show(m,_),a=()=>l==null?void 0:l.show();function u(m){ee[m?"unshift":"push"](()=>{l=m,t(1,l)})}function f(m){s=m,t(0,s)}const c=m=>{for(let _=0;_{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},[s,l,i,o,r,a,u,f,c,d]}class J$ extends ge{constructor(e){super(),_e(this,e,K$,Y$,me,{collection:0})}}function Kc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Jc(n){let e,t,i,s,l=n[6].label+"",o,r,a,u;function f(){return n[4](n[6])}function c(...d){return n[5](n[6],...d)}return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),o=U(l),r=E(),p(t,"class","icon "+n[6].icon+" svelte-1gz9b6p"),p(s,"class","txt"),p(e,"tabindex","0"),p(e,"class","dropdown-item closable svelte-1gz9b6p")},m(d,m){w(d,e,m),g(e,t),g(e,i),g(e,s),g(s,o),g(e,r),a||(u=[K(e,"click",An(f)),K(e,"keydown",An(c))],a=!0)},p(d,m){n=d},d(d){d&&k(e),a=!1,Ee(u)}}}function Z$(n){let e,t=n[2],i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class Q$ extends ge{constructor(e){super(),_e(this,e,X$,G$,me,{class:0})}}const x$=n=>({interactive:n&64,hasErrors:n&32}),Zc=n=>({interactive:n[6],hasErrors:n[5]}),eC=n=>({interactive:n&64,hasErrors:n&32}),Gc=n=>({interactive:n[6],hasErrors:n[5]}),tC=n=>({interactive:n&64,hasErrors:n&32}),Xc=n=>({interactive:n[6],hasErrors:n[5]}),nC=n=>({interactive:n&64,hasErrors:n&32}),Qc=n=>({interactive:n[6],hasErrors:n[5]});function xc(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","drag-handle-wrapper"),p(e,"draggable",!0),p(e,"aria-label","Sort")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ed(n){let e,t,i,s;return{c(){e=v("span"),p(e,"class","marker marker-required")},m(l,o){w(l,e,o),i||(s=Me(t=He.call(null,e,n[4])),i=!0)},p(l,o){t&&qt(t.update)&&o&16&&t.update.call(null,l[4])},d(l){l&&k(e),i=!1,s()}}}function iC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_=n[0].required&&ed(n);return{c(){e=v("div"),_&&_.c(),t=E(),i=v("div"),s=v("i"),o=E(),r=v("input"),p(e,"class","markers"),p(s,"class",l=B.getFieldTypeIcon(n[0].type)),p(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),Q(i,"txt-disabled",!n[6]),p(r,"type","text"),r.required=!0,r.disabled=a=!n[6],r.readOnly=u=n[0].id&&n[0].system,p(r,"spellcheck","false"),r.autofocus=f=!n[0].id,p(r,"placeholder","Field name"),r.value=c=n[0].name},m(h,b){w(h,e,b),_&&_.m(e,null),w(h,t,b),w(h,i,b),g(i,s),w(h,o,b),w(h,r,b),n[14](r),n[0].id||r.focus(),d||(m=K(r,"input",n[15]),d=!0)},p(h,b){h[0].required?_?_.p(h,b):(_=ed(h),_.c(),_.m(e,null)):_&&(_.d(1),_=null),b&1&&l!==(l=B.getFieldTypeIcon(h[0].type))&&p(s,"class",l),b&64&&Q(i,"txt-disabled",!h[6]),b&64&&a!==(a=!h[6])&&(r.disabled=a),b&1&&u!==(u=h[0].id&&h[0].system)&&(r.readOnly=u),b&1&&f!==(f=!h[0].id)&&(r.autofocus=f),b&1&&c!==(c=h[0].name)&&r.value!==c&&(r.value=c)},d(h){h&&k(e),_&&_.d(),h&&k(t),h&&k(i),h&&k(o),h&&k(r),n[14](null),d=!1,m()}}}function sC(n){let e;return{c(){e=v("span"),p(e,"class","separator")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function lC(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-settings-3-line"),p(e,"type","button"),p(e,"aria-label","Toggle field options"),p(e,"class",i="btn btn-sm btn-circle options-trigger "+(n[3]?"btn-secondary":"btn-transparent")),Q(e,"btn-hint",!n[3]&&!n[5]),Q(e,"btn-danger",n[5])},m(o,r){w(o,e,r),g(e,t),s||(l=K(e,"click",n[11]),s=!0)},p(o,r){r&8&&i!==(i="btn btn-sm btn-circle options-trigger "+(o[3]?"btn-secondary":"btn-transparent"))&&p(e,"class",i),r&40&&Q(e,"btn-hint",!o[3]&&!o[5]),r&40&&Q(e,"btn-danger",o[5])},d(o){o&&k(e),s=!1,l()}}}function oC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),p(e,"aria-label","Restore")},m(s,l){w(s,e,l),t||(i=[Me(He.call(null,e,"Restore")),K(e,"click",n[9])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ee(i)}}}function td(n){let e,t,i,s,l,o,r,a,u,f,c;const d=n[13].options,m=yt(d,n,n[17],Xc),_=n[13].beforeNonempty,h=yt(_,n,n[17],Gc);r=new pe({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[rC,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}});const b=n[13].afterNonempty,y=yt(b,n,n[17],Zc);let S=!n[0].toDelete&&nd(n);return{c(){e=v("div"),t=v("div"),i=v("div"),m&&m.c(),s=E(),h&&h.c(),l=E(),o=v("div"),z(r.$$.fragment),a=E(),y&&y.c(),u=E(),S&&S.c(),p(i,"class","col-sm-12 hidden-empty"),p(o,"class","col-sm-4"),p(t,"class","grid grid-sm"),p(e,"class","schema-field-options")},m(C,$){w(C,e,$),g(e,t),g(t,i),m&&m.m(i,null),g(t,s),h&&h.m(t,null),g(t,l),g(t,o),j(r,o,null),g(t,a),y&&y.m(t,null),g(t,u),S&&S.m(t,null),c=!0},p(C,$){m&&m.p&&(!c||$&131168)&&wt(m,d,C,C[17],c?kt(d,C[17],$,tC):St(C[17]),Xc),h&&h.p&&(!c||$&131168)&&wt(h,_,C,C[17],c?kt(_,C[17],$,eC):St(C[17]),Gc);const T={};$&8519697&&(T.$$scope={dirty:$,ctx:C}),r.$set(T),y&&y.p&&(!c||$&131168)&&wt(y,b,C,C[17],c?kt(b,C[17],$,x$):St(C[17]),Zc),C[0].toDelete?S&&(ae(),I(S,1,1,()=>{S=null}),ue()):S?(S.p(C,$),$&1&&A(S,1)):(S=nd(C),S.c(),A(S,1),S.m(t,null))},i(C){c||(A(m,C),A(h,C),A(r.$$.fragment,C),A(y,C),A(S),C&&Qe(()=>{c&&(f||(f=je(e,ot,{duration:150},!0)),f.run(1))}),c=!0)},o(C){I(m,C),I(h,C),I(r.$$.fragment,C),I(y,C),I(S),C&&(f||(f=je(e,ot,{duration:150},!1)),f.run(0)),c=!1},d(C){C&&k(e),m&&m.d(C),h&&h.d(C),V(r),y&&y.d(C),S&&S.d(),C&&f&&f.end()}}}function rC(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),o=U(n[4]),r=E(),a=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[23]),p(l,"class","txt"),p(a,"class","ri-information-line link-hint"),p(s,"for",f=n[23])},m(m,_){w(m,e,_),e.checked=n[0].required,w(m,i,_),w(m,s,_),g(s,l),g(l,o),g(s,r),g(s,a),c||(d=[K(e,"change",n[16]),Me(u=He.call(null,a,{text:`Requires the field value NOT to be ${B.zeroDefaultStr(n[0])}.`,position:"right"}))],c=!0)},p(m,_){_&8388608&&t!==(t=m[23])&&p(e,"id",t),_&1&&(e.checked=m[0].required),_&16&&se(o,m[4]),u&&qt(u.update)&&_&1&&u.update.call(null,{text:`Requires the field value NOT to be ${B.zeroDefaultStr(m[0])}.`,position:"right"}),_&8388608&&f!==(f=m[23])&&p(s,"for",f)},d(m){m&&k(e),m&&k(i),m&&k(s),c=!1,Ee(d)}}}function nd(n){let e,t,i,s,l,o,r,a,u;return a=new Kn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[aC]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=E(),s=v("div"),l=v("button"),o=v("i"),r=E(),z(a.$$.fragment),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 m-l-auto txt-right")},m(f,c){w(f,e,c),g(e,t),g(e,i),g(e,s),g(s,l),g(l,o),g(l,r),j(a,l,null),u=!0},p(f,c){const d={};c&131072&&(d.$$scope={dirty:c,ctx:f}),a.$set(d)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){I(a.$$.fragment,f),u=!1},d(f){f&&k(e),V(a)}}}function aC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function uC(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&xc();s=new pe({props:{class:"form-field required m-0 "+(n[6]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[iC]},$$scope:{ctx:n}}});const c=n[13].default,d=yt(c,n,n[17],Qc),m=d||sC();function _(S,C){if(S[0].toDelete)return oC;if(S[6])return lC}let h=_(n),b=h&&h(n),y=n[6]&&n[3]&&td(n);return{c(){e=v("div"),t=v("div"),f&&f.c(),i=E(),z(s.$$.fragment),l=E(),m&&m.c(),o=E(),b&&b.c(),r=E(),y&&y.c(),p(t,"class","schema-field-header"),p(e,"class","schema-field"),Q(e,"required",n[0].required),Q(e,"expanded",n[6]&&n[3]),Q(e,"deleted",n[0].toDelete)},m(S,C){w(S,e,C),g(e,t),f&&f.m(t,null),g(t,i),j(s,t,null),g(t,l),m&&m.m(t,null),g(t,o),b&&b.m(t,null),g(e,r),y&&y.m(e,null),u=!0},p(S,[C]){S[6]?f||(f=xc(),f.c(),f.m(t,i)):f&&(f.d(1),f=null);const $={};C&64&&($.class="form-field required m-0 "+(S[6]?"":"disabled")),C&2&&($.name="schema."+S[1]+".name"),C&131157&&($.$$scope={dirty:C,ctx:S}),s.$set($),d&&d.p&&(!u||C&131168)&&wt(d,c,S,S[17],u?kt(c,S[17],C,nC):St(S[17]),Qc),h===(h=_(S))&&b?b.p(S,C):(b&&b.d(1),b=h&&h(S),b&&(b.c(),b.m(t,null))),S[6]&&S[3]?y?(y.p(S,C),C&72&&A(y,1)):(y=td(S),y.c(),A(y,1),y.m(e,null)):y&&(ae(),I(y,1,1,()=>{y=null}),ue()),(!u||C&1)&&Q(e,"required",S[0].required),(!u||C&72)&&Q(e,"expanded",S[6]&&S[3]),(!u||C&1)&&Q(e,"deleted",S[0].toDelete)},i(S){u||(A(s.$$.fragment,S),A(m,S),A(y),S&&Qe(()=>{u&&(a||(a=je(e,ot,{duration:150},!0)),a.run(1))}),u=!0)},o(S){I(s.$$.fragment,S),I(m,S),I(y),S&&(a||(a=je(e,ot,{duration:150},!1)),a.run(0)),u=!1},d(S){S&&k(e),f&&f.d(),V(s),m&&m.d(S),b&&b.d(),y&&y.d(),S&&a&&a.end()}}}let Er=[];function fC(n,e,t){let i,s,l,o;Je(n,Si,P=>t(12,o=P));let{$$slots:r={},$$scope:a}=e;const u="f_"+B.randomString(8),f=$t(),c={bool:"Nonfalsey",number:"Nonzero"};let{key:d=""}=e,{field:m=new kn}=e,_,h=!1;function b(){m.id?t(0,m.toDelete=!0,m):f("remove")}function y(){t(0,m.toDelete=!1,m),en({})}function S(P){return B.slugify(P)}function C(){t(3,h=!0),M()}function $(){t(3,h=!1)}function T(){h?$():C()}function M(){for(let P of Er)P.id!=u&&P.collapse()}Gt(()=>(Er.push({id:u,collapse:$}),m.onMountSelect&&(t(0,m.onMountSelect=!1,m),_==null||_.select()),()=>{B.removeByKey(Er,"id",u)}));function O(P){ee[P?"unshift":"push"](()=>{_=P,t(2,_)})}const D=P=>{const N=m.name;t(0,m.name=S(P.target.value),m),P.target.value=m.name,f("rename",{oldName:N,newName:m.name})};function L(){m.required=this.checked,t(0,m)}return n.$$set=P=>{"key"in P&&t(1,d=P.key),"field"in P&&t(0,m=P.field),"$$scope"in P&&t(17,a=P.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&m.toDelete&&m.originalName&&m.name!==m.originalName&&t(0,m.name=m.originalName,m),n.$$.dirty&1&&!m.originalName&&m.name&&t(0,m.originalName=m.name,m),n.$$.dirty&1&&typeof m.toDelete>"u"&&t(0,m.toDelete=!1,m),n.$$.dirty&1&&m.required&&t(0,m.nullable=!1,m),n.$$.dirty&1&&t(6,i=!m.toDelete&&!(m.id&&m.system)),n.$$.dirty&4098&&t(5,s=!B.isEmpty(B.getNestedVal(o,`schema.${d}`))),n.$$.dirty&1&&t(4,l=c[m==null?void 0:m.type]||"Nonempty")},[m,d,_,h,l,s,i,f,b,y,S,T,o,r,O,D,L,a]}class di extends ge{constructor(e){super(),_e(this,e,fC,uC,me,{key:1,field:0})}}function cC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min length"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min","0")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.min),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.min&&re(l,u[0].options.min)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function dC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Max length"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min",r=n[0].options.min||0)},m(f,c){w(f,e,c),g(e,t),w(f,s,c),w(f,l,c),re(l,n[0].options.max),a||(u=K(l,"input",n[4]),a=!0)},p(f,c){c&512&&i!==(i=f[9])&&p(e,"for",i),c&512&&o!==(o=f[9])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min||0)&&p(l,"min",r),c&1&&dt(l.value)!==f[0].options.max&&re(l,f[0].options.max)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function pC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Regex pattern"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","text"),p(l,"id",o=n[9]),p(l,"placeholder","Valid Go regular expression, eg. ^\\w+$")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.pattern),r||(a=K(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0].options.pattern&&re(l,u[0].options.pattern)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function mC(n){let e,t,i,s,l,o,r,a,u,f;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[cC,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[dC,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[pC,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),p(t,"class","col-sm-3"),p(l,"class","col-sm-3"),p(a,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(c,d){w(c,e,d),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),g(e,r),g(e,a),j(u,a,null),f=!0},p(c,d){const m={};d&2&&(m.name="schema."+c[1]+".options.min"),d&1537&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const _={};d&2&&(_.name="schema."+c[1]+".options.max"),d&1537&&(_.$$scope={dirty:d,ctx:c}),o.$set(_);const h={};d&2&&(h.name="schema."+c[1]+".options.pattern"),d&1537&&(h.$$scope={dirty:d,ctx:c}),u.$set(h)},i(c){f||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){I(i.$$.fragment,c),I(o.$$.fragment,c),I(u.$$.fragment,c),f=!1},d(c){c&&k(e),V(i),V(o),V(u)}}}function hC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[mC]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&1027&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function _C(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=dt(this.value),t(0,l)}function a(){l.options.max=dt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(m){l=m,t(0,l)}function c(m){Ne.call(this,n,m)}function d(m){Ne.call(this,n,m)}return n.$$set=m=>{e=qe(qe({},e),Zt(m)),t(2,s=xe(e,i)),"field"in m&&t(0,l=m.field),"key"in m&&t(1,o=m.key)},[l,o,s,r,a,u,f,c,d]}class gC extends ge{constructor(e){super(),_e(this,e,_C,hC,me,{field:0,key:1})}}function bC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min"),s=E(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","number"),p(l,"id",o=n[8])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.min),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.min&&re(l,u[0].options.min)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function vC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Max"),s=E(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","number"),p(l,"id",o=n[8]),p(l,"min",r=n[0].options.min)},m(f,c){w(f,e,c),g(e,t),w(f,s,c),w(f,l,c),re(l,n[0].options.max),a||(u=K(l,"input",n[4]),a=!0)},p(f,c){c&256&&i!==(i=f[8])&&p(e,"for",i),c&256&&o!==(o=f[8])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min)&&p(l,"min",r),c&1&&dt(l.value)!==f[0].options.max&&re(l,f[0].options.max)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function yC(n){let e,t,i,s,l,o,r;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[bC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[vC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&769&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&769&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&k(e),V(i),V(o)}}}function kC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[yC]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&515&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function wC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=dt(this.value),t(0,l)}function a(){l.options.max=dt(this.value),t(0,l)}function u(d){l=d,t(0,l)}function f(d){Ne.call(this,n,d)}function c(d){Ne.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(2,s=xe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,s,r,a,u,f,c]}class SC extends ge{constructor(e){super(),_e(this,e,wC,kC,me,{field:0,key:1})}}function $C(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function CC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Ne.call(this,n,f)}function u(f){Ne.call(this,n,f)}return n.$$set=f=>{e=qe(qe({},e),Zt(f)),t(2,s=xe(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class TC extends ge{constructor(e){super(),_e(this,e,CC,$C,me,{field:0,key:1})}}function MC(n){let e,t,i,s,l=[{type:t=n[5].type||"text"},{value:n[4]},{disabled:n[3]},{readOnly:n[2]},n[5]],o={};for(let r=0;r{t(0,o=B.splitNonEmpty(c.target.value,r))};return n.$$set=c=>{e=qe(qe({},e),Zt(c)),t(5,l=xe(e,s)),"value"in c&&t(0,o=c.value),"separator"in c&&t(1,r=c.separator),"readonly"in c&&t(2,a=c.readonly),"disabled"in c&&t(3,u=c.disabled)},n.$$.update=()=>{n.$$.dirty&1&&t(4,i=(o||[]).join(", "))},[o,r,a,u,i,l,f]}class Vs extends ge{constructor(e){super(),_e(this,e,OC,MC,me,{value:0,separator:1,readonly:2,disabled:3})}}function EC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function _(b){n[3](b)}let h={id:n[8],disabled:!B.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(h.value=n[0].options.exceptDomains),r=new Vs({props:h}),ee.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]),p(f,"class","help-block")},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),j(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Me(He.call(null,s,{text:`List of domains that are NOT allowed. - This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&256&&l!==(l=b[8]))&&p(e,"for",l);const S={};y&256&&(S.id=b[8]),y&1&&(S.disabled=!B.isEmpty(b[0].options.onlyDomains)),!a&&y&1&&(a=!0,S.value=b[0].options.exceptDomains,he(()=>a=!1)),r.$set(S)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),V(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function DC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function _(b){n[4](b)}let h={id:n[8]+".options.onlyDomains",disabled:!B.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(h.value=n[0].options.onlyDomains),r=new Vs({props:h}),ee.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]+".options.onlyDomains"),p(f,"class","help-block")},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),j(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Me(He.call(null,s,{text:`List of domains that are ONLY allowed. - This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&256&&l!==(l=b[8]+".options.onlyDomains"))&&p(e,"for",l);const S={};y&256&&(S.id=b[8]+".options.onlyDomains"),y&1&&(S.disabled=!B.isEmpty(b[0].options.exceptDomains)),!a&&y&1&&(a=!0,S.value=b[0].options.onlyDomains,he(()=>a=!1)),r.$set(S)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),V(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function AC(n){let e,t,i,s,l,o,r;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[EC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[DC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&769&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&769&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&k(e),V(i),V(o)}}}function IC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[AC]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&515&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function LC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(d){n.$$.not_equal(l.options.exceptDomains,d)&&(l.options.exceptDomains=d,t(0,l))}function a(d){n.$$.not_equal(l.options.onlyDomains,d)&&(l.options.onlyDomains=d,t(0,l))}function u(d){l=d,t(0,l)}function f(d){Ne.call(this,n,d)}function c(d){Ne.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(2,s=xe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,s,r,a,u,f,c]}class y1 extends ge{constructor(e){super(),_e(this,e,LC,IC,me,{field:0,key:1})}}function PC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function NC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Ne.call(this,n,f)}function u(f){Ne.call(this,n,f)}return n.$$set=f=>{e=qe(qe({},e),Zt(f)),t(2,s=xe(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class FC extends ge{constructor(e){super(),_e(this,e,NC,PC,me,{field:0,key:1})}}function RC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function qC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Ne.call(this,n,f)}function u(f){Ne.call(this,n,f)}return n.$$set=f=>{e=qe(qe({},e),Zt(f)),t(2,s=xe(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class jC extends ge{constructor(e){super(),_e(this,e,qC,RC,me,{field:0,key:1})}}var Dr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ts={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},yl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},_n=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},jn=function(n){return n===!0?1:0};function id(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Ar=function(n){return n instanceof Array?n:[n]};function dn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ft(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function so(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function k1(n,e){if(e(n))return n;if(n.parentNode)return k1(n.parentNode,e)}function lo(n,e){var t=ft("div","numInputWrapper"),i=ft("input","numInput "+n),s=ft("span","arrowUp"),l=ft("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function Tn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Ir=function(){},Fo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},VC={D:Ir,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*jn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Ir,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Ir,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},xi={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},cl={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[cl.w(n,e,t)]},F:function(n,e,t){return Fo(cl.n(n,e,t)-1,!1,e)},G:function(n,e,t){return _n(cl.h(n,e,t))},H:function(n){return _n(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[jn(n.getHours()>11)]},M:function(n,e){return Fo(n.getMonth(),!0,e)},S:function(n){return _n(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return _n(n.getFullYear(),4)},d:function(n){return _n(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return _n(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return _n(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},w1=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?yl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,m){return cl[c]&&m[d-1]!=="\\"?cl[c](r,f,t):c!=="\\"?c:""}).join("")}},ba=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?yl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||Ts).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var _=void 0,h=[],b=0,y=0,S="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),te=Pr(t.config);G.setHours(te.hours,te.minutes,te.seconds,G.getMilliseconds()),t.selectedDates=[G],t.latestSelectedDateObj=G}Y!==void 0&&Y.type!=="blur"&&Rl(Y);var oe=t._input.value;c(),nn(),t._input.value!==oe&&t._debouncedChange()}function u(Y,G){return Y%12+12*jn(G===t.l10n.amPM[1])}function f(Y){switch(Y%24){case 0:case 12:return 12;default:return Y%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var Y=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,G=(parseInt(t.minuteElement.value,10)||0)%60,te=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(Y=u(Y,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&Mn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Ce=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&Mn(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Ie=Lr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Pe=Lr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Oe=Lr(Y,G,te);if(Oe>Pe&&Oe=12)]),t.secondElement!==void 0&&(t.secondElement.value=_n(te)))}function _(Y){var G=Tn(Y),te=parseInt(G.value)+(Y.delta||0);(te/1e3>1||Y.key==="Enter"&&!/[^\d]/.test(te.toString()))&&ke(te)}function h(Y,G,te,oe){if(G instanceof Array)return G.forEach(function(Ce){return h(Y,Ce,te,oe)});if(Y instanceof Array)return Y.forEach(function(Ce){return h(Ce,G,te,oe)});Y.addEventListener(G,te,oe),t._handlers.push({remove:function(){return Y.removeEventListener(G,te,oe)}})}function b(){Fe("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(te){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+te+"]"),function(oe){return h(oe,"click",t[te])})}),t.isMobile){ve();return}var Y=id(we,50);if(t._debouncedChange=id(b,UC),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&h(t.daysContainer,"mouseover",function(te){t.config.mode==="range"&&Ye(Tn(te))}),h(t._input,"keydown",Ge),t.calendarContainer!==void 0&&h(t.calendarContainer,"keydown",Ge),!t.config.inline&&!t.config.static&&h(window,"resize",Y),window.ontouchstart!==void 0?h(window.document,"touchstart",Be):h(window.document,"mousedown",Be),h(window.document,"focus",Be,{capture:!0}),t.config.clickOpens===!0&&(h(t._input,"focus",t.open),h(t._input,"click",t.open)),t.daysContainer!==void 0&&(h(t.monthNav,"click",cn),h(t.monthNav,["keyup","increment"],_),h(t.daysContainer,"click",ei)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var G=function(te){return Tn(te).select()};h(t.timeContainer,["increment"],a),h(t.timeContainer,"blur",a,{capture:!0}),h(t.timeContainer,"click",C),h([t.hourElement,t.minuteElement],["focus","click"],G),t.secondElement!==void 0&&h(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&h(t.amPM,"click",function(te){a(te)})}t.config.allowInput&&h(t._input,"blur",ht)}function S(Y,G){var te=Y!==void 0?t.parseDate(Y):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(Y);var Ce=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Ce&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Ie=ft("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Ie,t.element),Ie.appendChild(t.element),t.altInput&&Ie.appendChild(t.altInput),Ie.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(Y,G,te,oe){var Ce=Te(G,!0),Ie=ft("span",Y,G.getDate().toString());return Ie.dateObj=G,Ie.$i=oe,Ie.setAttribute("aria-label",t.formatDate(G,t.config.ariaDateFormat)),Y.indexOf("hidden")===-1&&Mn(G,t.now)===0&&(t.todayDateElem=Ie,Ie.classList.add("today"),Ie.setAttribute("aria-current","date")),Ce?(Ie.tabIndex=-1,Ot(G)&&(Ie.classList.add("selected"),t.selectedDateElem=Ie,t.config.mode==="range"&&(dn(Ie,"startRange",t.selectedDates[0]&&Mn(G,t.selectedDates[0],!0)===0),dn(Ie,"endRange",t.selectedDates[1]&&Mn(G,t.selectedDates[1],!0)===0),Y==="nextMonthDay"&&Ie.classList.add("inRange")))):Ie.classList.add("flatpickr-disabled"),t.config.mode==="range"&&$n(G)&&!Ot(G)&&Ie.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&Y!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(G)+""),Fe("onDayCreate",Ie),Ie}function O(Y){Y.focus(),t.config.mode==="range"&&Ye(Y)}function D(Y){for(var G=Y>0?0:t.config.showMonths-1,te=Y>0?t.config.showMonths:-1,oe=G;oe!=te;oe+=Y)for(var Ce=t.daysContainer.children[oe],Ie=Y>0?0:Ce.children.length-1,Pe=Y>0?Ce.children.length:-1,Oe=Ie;Oe!=Pe;Oe+=Y){var Ke=Ce.children[Oe];if(Ke.className.indexOf("hidden")===-1&&Te(Ke.dateObj))return Ke}}function L(Y,G){for(var te=Y.className.indexOf("Month")===-1?Y.dateObj.getMonth():t.currentMonth,oe=G>0?t.config.showMonths:-1,Ce=G>0?1:-1,Ie=te-t.currentMonth;Ie!=oe;Ie+=Ce)for(var Pe=t.daysContainer.children[Ie],Oe=te-t.currentMonth===Ie?Y.$i+G:G<0?Pe.children.length-1:0,Ke=Pe.children.length,Re=Oe;Re>=0&&Re0?Ke:-1);Re+=Ce){var We=Pe.children[Re];if(We.className.indexOf("hidden")===-1&&Te(We.dateObj)&&Math.abs(Y.$i-Re)>=Math.abs(G))return O(We)}t.changeMonth(Ce),P(D(Ce),0)}function P(Y,G){var te=l(),oe=Ze(te||document.body),Ce=Y!==void 0?Y:oe?te:t.selectedDateElem!==void 0&&Ze(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ze(t.todayDateElem)?t.todayDateElem:D(G>0?1:-1);Ce===void 0?t._input.focus():oe?L(Ce,G):O(Ce)}function N(Y,G){for(var te=(new Date(Y,G,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((G-1+12)%12,Y),Ce=t.utils.getDaysInMonth(G,Y),Ie=window.document.createDocumentFragment(),Pe=t.config.showMonths>1,Oe=Pe?"prevMonthDay hidden":"prevMonthDay",Ke=Pe?"nextMonthDay hidden":"nextMonthDay",Re=oe+1-te,We=0;Re<=oe;Re++,We++)Ie.appendChild(M("flatpickr-day "+Oe,new Date(Y,G-1,Re),Re,We));for(Re=1;Re<=Ce;Re++,We++)Ie.appendChild(M("flatpickr-day",new Date(Y,G,Re),Re,We));for(var vt=Ce+1;vt<=42-te&&(t.config.showMonths===1||We%7!==0);vt++,We++)Ie.appendChild(M("flatpickr-day "+Ke,new Date(Y,G+1,vt%Ce),vt,We));var ni=ft("div","dayContainer");return ni.appendChild(Ie),ni}function F(){if(t.daysContainer!==void 0){so(t.daysContainer),t.weekNumbers&&so(t.weekNumbers);for(var Y=document.createDocumentFragment(),G=0;G1||t.config.monthSelectorType!=="dropdown")){var Y=function(oe){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&oet.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var G=0;G<12;G++)if(Y(G)){var te=ft("option","flatpickr-monthDropdown-month");te.value=new Date(t.currentYear,G).getMonth().toString(),te.textContent=Fo(G,t.config.shorthandCurrentMonth,t.l10n),te.tabIndex=-1,t.currentMonth===G&&(te.selected=!0),t.monthsDropdownContainer.appendChild(te)}}}function q(){var Y=ft("div","flatpickr-month"),G=window.document.createDocumentFragment(),te;t.config.showMonths>1||t.config.monthSelectorType==="static"?te=ft("span","cur-month"):(t.monthsDropdownContainer=ft("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),h(t.monthsDropdownContainer,"change",function(Pe){var Oe=Tn(Pe),Ke=parseInt(Oe.value,10);t.changeMonth(Ke-t.currentMonth),Fe("onMonthChange")}),R(),te=t.monthsDropdownContainer);var oe=lo("cur-year",{tabindex:"-1"}),Ce=oe.getElementsByTagName("input")[0];Ce.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Ce.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Ce.setAttribute("max",t.config.maxDate.getFullYear().toString()),Ce.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Ie=ft("div","flatpickr-current-month");return Ie.appendChild(te),Ie.appendChild(oe),G.appendChild(Ie),Y.appendChild(G),{container:Y,yearElement:Ce,monthElement:te}}function H(){so(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var Y=t.config.showMonths;Y--;){var G=q();t.yearElements.push(G.yearElement),t.monthElements.push(G.monthElement),t.monthNav.appendChild(G.container)}t.monthNav.appendChild(t.nextMonthNav)}function W(){return t.monthNav=ft("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ft("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ft("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,H(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(Y){t.__hidePrevMonthArrow!==Y&&(dn(t.prevMonthNav,"flatpickr-disabled",Y),t.__hidePrevMonthArrow=Y)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(Y){t.__hideNextMonthArrow!==Y&&(dn(t.nextMonthNav,"flatpickr-disabled",Y),t.__hideNextMonthArrow=Y)}}),t.currentYearElement=t.yearElements[0],Nn(),t.monthNav}function X(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var Y=Pr(t.config);t.timeContainer=ft("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var G=ft("span","flatpickr-time-separator",":"),te=lo("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=te.getElementsByTagName("input")[0];var oe=lo("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?Y.hours:f(Y.hours)),t.minuteElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():Y.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(te),t.timeContainer.appendChild(G),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Ce=lo("flatpickr-second");t.secondElement=Ce.getElementsByTagName("input")[0],t.secondElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():Y.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ft("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Ce)}return t.config.time_24hr||(t.amPM=ft("span","flatpickr-am-pm",t.l10n.amPM[jn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function J(){t.weekdayContainer?so(t.weekdayContainer):t.weekdayContainer=ft("div","flatpickr-weekdays");for(var Y=t.config.showMonths;Y--;){var G=ft("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(G)}return Z(),t.weekdayContainer}function Z(){if(t.weekdayContainer){var Y=t.l10n.firstDayOfWeek,G=sd(t.l10n.weekdays.shorthand);Y>0&&Y>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function h$(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){w(s,e,l),g(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:x,o:x,d(s){s&&k(e)}}}function _$(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=xs.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),xs.highlight(a,xs.languages[l]||xs.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof xs<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class v1 extends ge{constructor(e){super(),_e(this,e,_$,h$,me,{class:0,content:2,language:3})}}const g$=n=>({}),Ec=n=>({}),b$=n=>({}),Dc=n=>({});function Ac(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C=n[4]&&!n[2]&&Ic(n);const $=n[19].header,T=yt($,n,n[18],Dc);let M=n[4]&&n[2]&&Lc(n);const O=n[19].default,D=yt(O,n,n[18],null),L=n[19].footer,P=yt(L,n,n[18],Ec);return{c(){e=v("div"),t=v("div"),s=E(),l=v("div"),o=v("div"),C&&C.c(),r=E(),T&&T.c(),a=E(),M&&M.c(),u=E(),f=v("div"),D&&D.c(),c=E(),d=v("div"),P&&P.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",m="overlay-panel "+n[1]+" "+n[8]),Q(l,"popup",n[2]),p(e,"class","overlay-panel-container"),Q(e,"padded",n[2]),Q(e,"active",n[0])},m(N,F){w(N,e,F),g(e,t),g(e,s),g(e,l),g(l,o),C&&C.m(o,null),g(o,r),T&&T.m(o,null),g(o,a),M&&M.m(o,null),g(l,u),g(l,f),D&&D.m(f,null),n[21](f),g(l,c),g(l,d),P&&P.m(d,null),b=!0,y||(S=[J(t,"click",et(n[20])),J(f,"scroll",n[22])],y=!0)},p(N,F){n=N,n[4]&&!n[2]?C?C.p(n,F):(C=Ic(n),C.c(),C.m(o,r)):C&&(C.d(1),C=null),T&&T.p&&(!b||F[0]&262144)&&wt(T,$,n,n[18],b?kt($,n[18],F,b$):St(n[18]),Dc),n[4]&&n[2]?M?M.p(n,F):(M=Lc(n),M.c(),M.m(o,null)):M&&(M.d(1),M=null),D&&D.p&&(!b||F[0]&262144)&&wt(D,O,n,n[18],b?kt(O,n[18],F,null):St(n[18]),null),P&&P.p&&(!b||F[0]&262144)&&wt(P,L,n,n[18],b?kt(L,n[18],F,g$):St(n[18]),Ec),(!b||F[0]&258&&m!==(m="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",m),(!b||F[0]&262)&&Q(l,"popup",n[2]),(!b||F[0]&4)&&Q(e,"padded",n[2]),(!b||F[0]&1)&&Q(e,"active",n[0])},i(N){b||(N&&Qe(()=>{b&&(i||(i=je(t,ta,{duration:ys,opacity:0},!0)),i.run(1))}),A(T,N),A(D,N),A(P,N),Qe(()=>{b&&(h&&h.end(1),_=ug(l,fi,n[2]?{duration:ys,y:-10}:{duration:ys,x:50}),_.start())}),b=!0)},o(N){N&&(i||(i=je(t,ta,{duration:ys,opacity:0},!1)),i.run(0)),I(T,N),I(D,N),I(P,N),_&&_.invalidate(),h=$a(l,fi,n[2]?{duration:ys,y:10}:{duration:ys,x:50}),b=!1},d(N){N&&k(e),N&&i&&i.end(),C&&C.d(),T&&T.d(N),M&&M.d(),D&&D.d(N),n[21](null),P&&P.d(N),N&&h&&h.end(),y=!1,Ee(S)}}}function Ic(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=J(e,"click",et(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Lc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-transparent btn-close m-l-auto")},m(s,l){w(s,e,l),t||(i=J(e,"click",et(n[5])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function v$(n){let e,t,i,s,l=n[0]&&Ac(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[23](e),t=!0,i||(s=[J(window,"resize",n[10]),J(window,"keydown",n[9])],i=!0)},p(o,r){o[0]?l?(l.p(o,r),r[0]&1&&A(l,1)):(l=Ac(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){I(l),t=!1},d(o){o&&k(e),l&&l.d(),n[23](null),i=!1,Ee(s)}}}let Zi,Er=[];function y1(){return Zi=Zi||document.querySelector(".overlays"),Zi||(Zi=document.createElement("div"),Zi.classList.add("overlays"),document.body.appendChild(Zi)),Zi}let ys=150;function Pc(){return 1e3+y1().querySelectorAll(".overlay-panel-container.active").length}function y$(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const m=$t(),_="op_"+B.randomString(10);let h,b,y,S,C="",$=o;function T(){typeof c=="function"&&c()===!1||t(0,o=!0)}function M(){typeof d=="function"&&d()===!1||t(0,o=!1)}function O(){return o}async function D(Z){t(17,$=Z),Z?(y=document.activeElement,m("show"),h==null||h.focus()):(clearTimeout(S),m("hide"),y==null||y.focus()),await fn(),L()}function L(){h&&(o?t(6,h.style.zIndex=Pc(),h):t(6,h.style="",h))}function P(){B.pushUnique(Er,_),document.body.classList.add("overlay-active")}function N(){B.removeByValue(Er,_),Er.length||document.body.classList.remove("overlay-active")}function F(Z){o&&f&&Z.code=="Escape"&&!B.isInput(Z.target)&&h&&h.style.zIndex==Pc()&&(Z.preventDefault(),M())}function R(Z){o&&q(b)}function q(Z,le){le&&t(8,C=""),Z&&(S||(S=setTimeout(()=>{if(clearTimeout(S),S=null,!Z)return;if(Z.scrollHeight-Z.offsetHeight>0)t(8,C="scrollable");else{t(8,C="");return}Z.scrollTop==0?t(8,C+=" scroll-top-reached"):Z.scrollTop+Z.offsetHeight==Z.scrollHeight&&t(8,C+=" scroll-bottom-reached")},100)))}Gt(()=>(y1().appendChild(h),()=>{var Z;clearTimeout(S),N(),(Z=h==null?void 0:h.classList)==null||Z.add("hidden"),setTimeout(()=>{h==null||h.remove()},0)}));const j=()=>a?M():!0;function W(Z){ee[Z?"unshift":"push"](()=>{b=Z,t(7,b)})}const X=Z=>q(Z.target);function K(Z){ee[Z?"unshift":"push"](()=>{h=Z,t(6,h)})}return n.$$set=Z=>{"class"in Z&&t(1,l=Z.class),"active"in Z&&t(0,o=Z.active),"popup"in Z&&t(2,r=Z.popup),"overlayClose"in Z&&t(3,a=Z.overlayClose),"btnClose"in Z&&t(4,u=Z.btnClose),"escClose"in Z&&t(12,f=Z.escClose),"beforeOpen"in Z&&t(13,c=Z.beforeOpen),"beforeHide"in Z&&t(14,d=Z.beforeHide),"$$scope"in Z&&t(18,s=Z.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&131073&&$!=o&&D(o),n.$$.dirty[0]&128&&q(b,!0),n.$$.dirty[0]&64&&h&&L(),n.$$.dirty[0]&1&&(o?P():N())},[o,l,r,a,u,M,h,b,C,F,R,q,f,c,d,T,O,$,s,i,j,W,X,K]}class ln extends ge{constructor(e){super(),_e(this,e,y$,v$,me,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function k$(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function w$(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=U(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){w(l,e,o),g(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&se(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&k(e)}}}function S$(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function $$(n){let e,t,i;return t=new v1({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","block")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l&4&&(o.content=JSON.stringify(s[2].meta,null,2)),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),z(t)}}}function C$(n){var Ie;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,m,_,h=n[2].status+"",b,y,S,C,$,T,M=((Ie=n[2].method)==null?void 0:Ie.toUpperCase())+"",O,D,L,P,N,F,R=n[2].auth+"",q,j,W,X,K,Z,le=n[2].url+"",ne,ie,be,Se,Ve,Be,ke,Te,Ze,ht,Ge,Ye=n[2].remoteIp+"",we,fe,ze,Dt,Le,$e,nt=n[2].userIp+"",At,It,Ut,Ln,ei,Sn,_t=n[2].userAgent+"",Pn,ds,ti,Ti,ps,pi,ve,De,Fe,Xe,Ot,$n,Nn,Bi,nn,cn;function Rl(Pe,Oe){return Pe[2].referer?w$:k$}let Y=Rl(n),G=Y(n);const te=[$$,S$],oe=[];function Ce(Pe,Oe){return Oe&4&&(ve=null),ve==null&&(ve=!B.isEmpty(Pe[2].meta)),ve?0:1}return De=Ce(n,-1),Fe=oe[De]=te[De](n),nn=new wi({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=E(),o=v("td"),a=U(r),u=E(),f=v("tr"),c=v("td"),c.textContent="Status",d=E(),m=v("td"),_=v("span"),b=U(h),y=E(),S=v("tr"),C=v("td"),C.textContent="Method",$=E(),T=v("td"),O=U(M),D=E(),L=v("tr"),P=v("td"),P.textContent="Auth",N=E(),F=v("td"),q=U(R),j=E(),W=v("tr"),X=v("td"),X.textContent="URL",K=E(),Z=v("td"),ne=U(le),ie=E(),be=v("tr"),Se=v("td"),Se.textContent="Referer",Ve=E(),Be=v("td"),G.c(),ke=E(),Te=v("tr"),Ze=v("td"),Ze.textContent="Remote IP",ht=E(),Ge=v("td"),we=U(Ye),fe=E(),ze=v("tr"),Dt=v("td"),Dt.textContent="User IP",Le=E(),$e=v("td"),At=U(nt),It=E(),Ut=v("tr"),Ln=v("td"),Ln.textContent="UserAgent",ei=E(),Sn=v("td"),Pn=U(_t),ds=E(),ti=v("tr"),Ti=v("td"),Ti.textContent="Meta",ps=E(),pi=v("td"),Fe.c(),Xe=E(),Ot=v("tr"),$n=v("td"),$n.textContent="Created",Nn=E(),Bi=v("td"),H(nn.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(_,"class","label"),Q(_,"label-danger",n[2].status>=400),p(C,"class","min-width txt-hint txt-bold"),p(P,"class","min-width txt-hint txt-bold"),p(X,"class","min-width txt-hint txt-bold"),p(Se,"class","min-width txt-hint txt-bold"),p(Ze,"class","min-width txt-hint txt-bold"),p(Dt,"class","min-width txt-hint txt-bold"),p(Ln,"class","min-width txt-hint txt-bold"),p(Ti,"class","min-width txt-hint txt-bold"),p($n,"class","min-width txt-hint txt-bold"),p(e,"class","table-border")},m(Pe,Oe){w(Pe,e,Oe),g(e,t),g(t,i),g(i,s),g(i,l),g(i,o),g(o,a),g(t,u),g(t,f),g(f,c),g(f,d),g(f,m),g(m,_),g(_,b),g(t,y),g(t,S),g(S,C),g(S,$),g(S,T),g(T,O),g(t,D),g(t,L),g(L,P),g(L,N),g(L,F),g(F,q),g(t,j),g(t,W),g(W,X),g(W,K),g(W,Z),g(Z,ne),g(t,ie),g(t,be),g(be,Se),g(be,Ve),g(be,Be),G.m(Be,null),g(t,ke),g(t,Te),g(Te,Ze),g(Te,ht),g(Te,Ge),g(Ge,we),g(t,fe),g(t,ze),g(ze,Dt),g(ze,Le),g(ze,$e),g($e,At),g(t,It),g(t,Ut),g(Ut,Ln),g(Ut,ei),g(Ut,Sn),g(Sn,Pn),g(t,ds),g(t,ti),g(ti,Ti),g(ti,ps),g(ti,pi),oe[De].m(pi,null),g(t,Xe),g(t,Ot),g(Ot,$n),g(Ot,Nn),g(Ot,Bi),V(nn,Bi,null),cn=!0},p(Pe,Oe){var We;(!cn||Oe&4)&&r!==(r=Pe[2].id+"")&&se(a,r),(!cn||Oe&4)&&h!==(h=Pe[2].status+"")&&se(b,h),(!cn||Oe&4)&&Q(_,"label-danger",Pe[2].status>=400),(!cn||Oe&4)&&M!==(M=((We=Pe[2].method)==null?void 0:We.toUpperCase())+"")&&se(O,M),(!cn||Oe&4)&&R!==(R=Pe[2].auth+"")&&se(q,R),(!cn||Oe&4)&&le!==(le=Pe[2].url+"")&&se(ne,le),Y===(Y=Rl(Pe))&&G?G.p(Pe,Oe):(G.d(1),G=Y(Pe),G&&(G.c(),G.m(Be,null))),(!cn||Oe&4)&&Ye!==(Ye=Pe[2].remoteIp+"")&&se(we,Ye),(!cn||Oe&4)&&nt!==(nt=Pe[2].userIp+"")&&se(At,nt),(!cn||Oe&4)&&_t!==(_t=Pe[2].userAgent+"")&&se(Pn,_t);let Ke=De;De=Ce(Pe,Oe),De===Ke?oe[De].p(Pe,Oe):(ae(),I(oe[Ke],1,1,()=>{oe[Ke]=null}),ue(),Fe=oe[De],Fe?Fe.p(Pe,Oe):(Fe=oe[De]=te[De](Pe),Fe.c()),A(Fe,1),Fe.m(pi,null));const Re={};Oe&4&&(Re.date=Pe[2].created),nn.$set(Re)},i(Pe){cn||(A(Fe),A(nn.$$.fragment,Pe),cn=!0)},o(Pe){I(Fe),I(nn.$$.fragment,Pe),cn=!1},d(Pe){Pe&&k(e),G.d(),oe[De].d(),z(nn)}}}function T$(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function M$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[4]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function O$(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[M$],header:[T$],default:[C$]},$$scope:{ctx:n}};return e=new ln({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[5](null),z(e,s)}}}function E$(n,e,t){let i,s=new Yr;function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){ee[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){Ne.call(this,n,c)}function f(c){Ne.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class D$ extends ge{constructor(e){super(),_e(this,e,E$,O$,me,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function A$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){w(u,e,f),e.checked=n[1],w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"change",n[10]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&2&&(e.checked=u[1]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Nc(n){let e,t;return e=new c$({props:{filter:n[4],presets:n[5]}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function Fc(n){let e,t;return e=new Dk({props:{filter:n[4],presets:n[5]}}),e.$on("select",n[12]),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&16&&(l.filter=i[4]),s&32&&(l.presets=i[5]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function I$(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S=n[3],C,$=n[3],T,M;r=new Go({}),r.$on("refresh",n[9]),d=new pe({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[A$,({uniqueId:L})=>({14:L}),({uniqueId:L})=>L?16384:0]},$$scope:{ctx:n}}}),_=new Zo({props:{value:n[0],placeholder:"Search term or filter like status >= 400",extraAutocompleteKeys:n[7]}}),_.$on("submit",n[11]);let O=Nc(n),D=Fc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=U(n[6]),o=E(),H(r.$$.fragment),a=E(),u=v("div"),f=E(),c=v("div"),H(d.$$.fragment),m=E(),H(_.$$.fragment),h=E(),b=v("div"),y=E(),O.c(),C=E(),D.c(),T=ye(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(b,"class","clearfix m-b-base"),p(e,"class","page-header-wrapper m-b-0")},m(L,P){w(L,e,P),g(e,t),g(t,i),g(i,s),g(s,l),g(t,o),V(r,t,null),g(t,a),g(t,u),g(t,f),g(t,c),V(d,c,null),g(e,m),V(_,e,null),g(e,h),g(e,b),g(e,y),O.m(e,null),w(L,C,P),D.m(L,P),w(L,T,P),M=!0},p(L,P){(!M||P&64)&&se(l,L[6]);const N={};P&49154&&(N.$$scope={dirty:P,ctx:L}),d.$set(N);const F={};P&1&&(F.value=L[0]),_.$set(F),P&8&&me(S,S=L[3])?(ae(),I(O,1,1,x),ue(),O=Nc(L),O.c(),A(O,1),O.m(e,null)):O.p(L,P),P&8&&me($,$=L[3])?(ae(),I(D,1,1,x),ue(),D=Fc(L),D.c(),A(D,1),D.m(T.parentNode,T)):D.p(L,P)},i(L){M||(A(r.$$.fragment,L),A(d.$$.fragment,L),A(_.$$.fragment,L),A(O),A(D),M=!0)},o(L){I(r.$$.fragment,L),I(d.$$.fragment,L),I(_.$$.fragment,L),I(O),I(D),M=!1},d(L){L&&k(e),z(r),z(d),z(_),O.d(L),L&&k(C),L&&k(T),D.d(L)}}}function L$(n){let e,t,i,s;e=new wn({props:{$$slots:{default:[I$]},$$scope:{ctx:n}}});let l={};return i=new D$({props:l}),n[13](i),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(o,r){V(e,o,r),w(o,t,r),V(i,o,r),s=!0},p(o,[r]){const a={};r&32895&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(A(e.$$.fragment,o),A(i.$$.fragment,o),s=!0)},o(o){I(e.$$.fragment,o),I(i.$$.fragment,o),s=!1},d(o){z(e,o),o&&k(t),n[13](null),z(i,o)}}}const Rc="includeAdminLogs";function P$(n,e,t){var y;let i,s,l;Je(n,Tt,S=>t(6,l=S));const o=["method","url","remoteIp","userIp","referer","status","auth","userAgent","created"];sn(Tt,l="Request logs",l);let r,a="",u=((y=window.localStorage)==null?void 0:y.getItem(Rc))<<0,f=1;function c(){t(3,f++,f)}const d=()=>c();function m(){u=this.checked,t(1,u)}const _=S=>t(0,a=S.detail),h=S=>r==null?void 0:r.show(S==null?void 0:S.detail);function b(S){ee[S?"unshift":"push"](()=>{r=S,t(2,r)})}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=u?"":'auth!="admin"'),n.$$.dirty&2&&typeof u<"u"&&window.localStorage&&window.localStorage.setItem(Rc,u<<0),n.$$.dirty&1&&t(4,s=B.normalizeSearchFilter(a,o))},[a,u,r,f,s,i,l,o,c,d,m,_,h,b]}class N$ extends ge{constructor(e){super(),_e(this,e,P$,L$,me,{})}}const au=In({});function pn(n,e,t){au.set({text:n,yesCallback:e,noCallback:t})}function k1(){au.set({})}function qc(n){let e,t,i;const s=n[17].default,l=yt(s,n,n[16],null);return{c(){e=v("div"),l&&l.c(),p(e,"class",n[1]),Q(e,"active",n[0])},m(o,r){w(o,e,r),l&&l.m(e,null),n[18](e),i=!0},p(o,r){l&&l.p&&(!i||r&65536)&&wt(l,s,o,o[16],i?kt(s,o[16],r,null):St(o[16]),null),(!i||r&2)&&p(e,"class",o[1]),(!i||r&3)&&Q(e,"active",o[0])},i(o){i||(A(l,o),o&&Qe(()=>{i&&(t||(t=je(e,fi,{duration:150,y:3},!0)),t.run(1))}),i=!0)},o(o){I(l,o),o&&(t||(t=je(e,fi,{duration:150,y:3},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),n[18](null),o&&t&&t.end()}}}function F$(n){let e,t,i,s,l=n[0]&&qc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container"),p(e,"tabindex","-1")},m(o,r){w(o,e,r),l&&l.m(e,null),n[19](e),t=!0,i||(s=[J(window,"mousedown",n[5]),J(window,"click",n[6]),J(window,"keydown",n[4]),J(window,"focusin",n[7])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&A(l,1)):(l=qc(o),l.c(),A(l,1),l.m(e,null)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){t||(A(l),t=!0)},o(o){I(l),t=!1},d(o){o&&k(e),l&&l.d(),n[19](null),i=!1,Ee(s)}}}function R$(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{autoScroll:a=!0}=e,{closableClass:u="closable"}=e,{class:f=""}=e,c,d,m,_,h=!1;const b=$t();function y(){t(0,o=!1),h=!1,clearTimeout(_)}function S(){t(0,o=!0),clearTimeout(_),_=setTimeout(()=>{a&&(d!=null&&d.scrollIntoViewIfNeeded?d==null||d.scrollIntoViewIfNeeded():d!=null&&d.scrollIntoView&&(d==null||d.scrollIntoView({behavior:"smooth",block:"nearest"})))},180)}function C(){o?y():S()}function $(j){return!c||j.classList.contains(u)||(m==null?void 0:m.contains(j))&&!c.contains(j)||c.contains(j)&&j.closest&&j.closest("."+u)}function T(j){(!o||$(j.target))&&(j.preventDefault(),j.stopPropagation(),C())}function M(j){(j.code==="Enter"||j.code==="Space")&&(!o||$(j.target))&&(j.preventDefault(),j.stopPropagation(),C())}function O(j){o&&r&&j.code==="Escape"&&(j.preventDefault(),y())}function D(j){o&&!(c!=null&&c.contains(j.target))?h=!0:h&&(h=!1)}function L(j){var W;o&&h&&!(c!=null&&c.contains(j.target))&&!(m!=null&&m.contains(j.target))&&!((W=j.target)!=null&&W.closest(".flatpickr-calendar"))&&y()}function P(j){D(j),L(j)}function N(j){F(),c==null||c.addEventListener("click",T),t(15,m=j||(c==null?void 0:c.parentNode)),m==null||m.addEventListener("click",T),m==null||m.addEventListener("keydown",M)}function F(){clearTimeout(_),c==null||c.removeEventListener("click",T),m==null||m.removeEventListener("click",T),m==null||m.removeEventListener("keydown",M)}Gt(()=>(N(),()=>F()));function R(j){ee[j?"unshift":"push"](()=>{d=j,t(3,d)})}function q(j){ee[j?"unshift":"push"](()=>{c=j,t(2,c)})}return n.$$set=j=>{"trigger"in j&&t(8,l=j.trigger),"active"in j&&t(0,o=j.active),"escClose"in j&&t(9,r=j.escClose),"autoScroll"in j&&t(10,a=j.autoScroll),"closableClass"in j&&t(11,u=j.closableClass),"class"in j&&t(1,f=j.class),"$$scope"in j&&t(16,s=j.$$scope)},n.$$.update=()=>{var j,W;n.$$.dirty&260&&c&&N(l),n.$$.dirty&32769&&(o?((j=m==null?void 0:m.classList)==null||j.add("active"),b("show")):((W=m==null?void 0:m.classList)==null||W.remove("active"),b("hide")))},[o,f,c,d,O,D,L,P,l,r,a,u,y,S,C,m,s,i,R,q]}class Kn extends ge{constructor(e){super(),_e(this,e,R$,F$,me,{trigger:8,active:0,escClose:9,autoScroll:10,closableClass:11,class:1,hide:12,show:13,toggle:14})}get hide(){return this.$$.ctx[12]}get show(){return this.$$.ctx[13]}get toggle(){return this.$$.ctx[14]}}function jc(n,e,t){const i=n.slice();return i[27]=e[t],i}function q$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("input"),s=E(),l=v("label"),o=U("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[30]),e.checked=i=n[3].unique,p(l,"for",r=n[30])},m(f,c){w(f,e,c),w(f,s,c),w(f,l,c),g(l,o),a||(u=J(e,"change",n[19]),a=!0)},p(f,c){c[0]&1073741824&&t!==(t=f[30])&&p(e,"id",t),c[0]&8&&i!==(i=f[3].unique)&&(e.checked=i),c[0]&1073741824&&r!==(r=f[30])&&p(l,"for",r)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function j$(n){let e,t,i,s;function l(a){n[20](a)}var o=n[7];function r(a){var f;let u={id:a[30],placeholder:`eg. CREATE INDEX idx_test on ${(f=a[0])==null?void 0:f.name} (created)`,language:"sql-create-index",minHeight:"85"};return a[2]!==void 0&&(u.value=a[2]),{props:u}}return o&&(e=Rt(o,r(n)),ee.push(()=>de(e,"value",l))),{c(){e&&H(e.$$.fragment),i=ye()},m(a,u){e&&V(e,a,u),w(a,i,u),s=!0},p(a,u){var c;const f={};if(u[0]&1073741824&&(f.id=a[30]),u[0]&1&&(f.placeholder=`eg. CREATE INDEX idx_test on ${(c=a[0])==null?void 0:c.name} (created)`),!t&&u[0]&4&&(t=!0,f.value=a[2],he(()=>t=!1)),u[0]&128&&o!==(o=a[7])){if(e){ae();const d=e;I(d.$$.fragment,1,0,()=>{z(d,1)}),ue()}o?(e=Rt(o,r(a)),ee.push(()=>de(e,"value",l)),H(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function V$(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function z$(n){let e,t,i,s;const l=[V$,j$],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function Vc(n){let e,t,i,s=n[10],l=[];for(let o=0;o({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}}),i=new pe({props:{class:"form-field required m-b-sm",name:`indexes.${n[6]||""}`,$$slots:{default:[z$,({uniqueId:a})=>({30:a}),({uniqueId:a})=>[a?1073741824:0]]},$$scope:{ctx:n}}});let r=n[10].length>0&&Vc(n);return{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),r&&r.c(),l=ye()},m(a,u){V(e,a,u),w(a,t,u),V(i,a,u),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){const f={};u[0]&1073741837|u[1]&1&&(f.$$scope={dirty:u,ctx:a}),e.$set(f);const c={};u[0]&64&&(c.name=`indexes.${a[6]||""}`),u[0]&1073742213|u[1]&1&&(c.$$scope={dirty:u,ctx:a}),i.$set(c),a[10].length>0?r?r.p(a,u):(r=Vc(a),r.c(),r.m(l.parentNode,l)):r&&(r.d(1),r=null)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),o=!1},d(a){z(e,a),a&&k(t),z(i,a),a&&k(s),r&&r.d(a),a&&k(l)}}}function B$(n){let e,t=n[5]?"Update":"Create",i,s;return{c(){e=v("h4"),i=U(t),s=U(" index")},m(l,o){w(l,e,o),g(e,i),g(e,s)},p(l,o){o[0]&32&&t!==(t=l[5]?"Update":"Create")&&se(i,t)},d(l){l&&k(e)}}}function Hc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-hint btn-transparent m-r-auto")},m(s,l){w(s,e,l),t||(i=[Me(He.call(null,e,{text:"Delete",position:"top"})),J(e,"click",n[16])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ee(i)}}}function U$(n){let e,t,i,s,l,o,r=n[5]!=""&&Hc(n);return{c(){r&&r.c(),e=E(),t=v("button"),t.innerHTML='Cancel',i=E(),s=v("button"),s.innerHTML='Set index',p(t,"type","button"),p(t,"class","btn btn-transparent"),p(s,"type","button"),p(s,"class","btn"),Q(s,"btn-disabled",n[9].length<=0)},m(a,u){r&&r.m(a,u),w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),l||(o=[J(t,"click",n[17]),J(s,"click",n[18])],l=!0)},p(a,u){a[5]!=""?r?r.p(a,u):(r=Hc(a),r.c(),r.m(e.parentNode,e)):r&&(r.d(1),r=null),u[0]&512&&Q(s,"btn-disabled",a[9].length<=0)},d(a){r&&r.d(a),a&&k(e),a&&k(t),a&&k(i),a&&k(s),l=!1,Ee(o)}}}function W$(n){let e,t;const i=[{popup:!0},n[14]];let s={$$slots:{footer:[U$],header:[B$],default:[H$]},$$scope:{ctx:n}};for(let l=0;lK.name==j);X?B.removeByValue(W.columns,X):B.pushUnique(W.columns,{name:j}),t(2,d=B.buildIndex(W))}Gt(async()=>{t(8,h=!0);try{t(7,_=(await at(()=>import("./CodeEditor-14802b79.js"),["./CodeEditor-14802b79.js","./index-fd4289fb.js"],import.meta.url)).default)}catch(j){console.warn(j)}t(8,h=!1)});const M=()=>C(),O=()=>y(),D=()=>$(),L=j=>{t(3,s.unique=j.target.checked,s),t(3,s.tableName=s.tableName||(u==null?void 0:u.name),s),t(2,d=B.buildIndex(s))};function P(j){d=j,t(2,d)}const N=j=>T(j);function F(j){ee[j?"unshift":"push"](()=>{f=j,t(4,f)})}function R(j){Ne.call(this,n,j)}function q(j){Ne.call(this,n,j)}return n.$$set=j=>{e=qe(qe({},e),Zt(j)),t(14,r=xe(e,o)),"collection"in j&&t(0,u=j.collection)},n.$$.update=()=>{var j,W,X;n.$$.dirty[0]&1&&t(10,i=(((W=(j=u==null?void 0:u.schema)==null?void 0:j.filter(K=>!K.toDelete))==null?void 0:W.map(K=>K.name))||[]).concat(["created","updated"])),n.$$.dirty[0]&4&&t(3,s=B.parseIndex(d)),n.$$.dirty[0]&8&&t(9,l=((X=s.columns)==null?void 0:X.map(K=>K.name))||[])},[u,y,d,s,f,c,m,_,h,l,i,C,$,T,r,b,M,O,D,L,P,N,F,R,q]}class K$ extends ge{constructor(e){super(),_e(this,e,Y$,W$,me,{collection:0,show:15,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[1]}}function Bc(n,e,t){const i=n.slice();i[10]=e[t],i[13]=t;const s=B.parseIndex(i[10]);return i[11]=s,i}function Uc(n){let e;return{c(){e=v("strong"),e.textContent="Unique:"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Wc(n){var d;let e,t,i,s=((d=n[11].columns)==null?void 0:d.map(Yc).join(", "))+"",l,o,r,a,u,f=n[11].unique&&Uc();function c(){return n[4](n[10],n[13])}return{c(){var m,_;e=v("button"),f&&f.c(),t=E(),i=v("span"),l=U(s),p(i,"class","txt"),p(e,"type","button"),p(e,"class",o="label link-primary "+((_=(m=n[2].indexes)==null?void 0:m[n[13]])!=null&&_.message?"label-danger":"")+" svelte-167lbwu")},m(m,_){var h,b;w(m,e,_),f&&f.m(e,null),g(e,t),g(e,i),g(i,l),a||(u=[Me(r=He.call(null,e,((b=(h=n[2].indexes)==null?void 0:h[n[13]])==null?void 0:b.message)||"")),J(e,"click",c)],a=!0)},p(m,_){var h,b,y,S,C;n=m,n[11].unique?f||(f=Uc(),f.c(),f.m(e,t)):f&&(f.d(1),f=null),_&1&&s!==(s=((h=n[11].columns)==null?void 0:h.map(Yc).join(", "))+"")&&se(l,s),_&4&&o!==(o="label link-primary "+((y=(b=n[2].indexes)==null?void 0:b[n[13]])!=null&&y.message?"label-danger":"")+" svelte-167lbwu")&&p(e,"class",o),r&&jt(r.update)&&_&4&&r.update.call(null,((C=(S=n[2].indexes)==null?void 0:S[n[13]])==null?void 0:C.message)||"")},d(m){m&&k(e),f&&f.d(),a=!1,Ee(u)}}}function J$(n){var $,T,M;let e,t,i=(((T=($=n[0])==null?void 0:$.indexes)==null?void 0:T.length)||0)+"",s,l,o,r,a,u,f,c,d,m,_,h,b=((M=n[0])==null?void 0:M.indexes)||[],y=[];for(let O=0;Ode(c,"collection",S)),c.$on("remove",n[8]),c.$on("submit",n[9]),{c(){e=v("div"),t=U("Unique constraints and indexes ("),s=U(i),l=U(")"),o=E(),r=v("div");for(let O=0;O+ + New index`,f=E(),H(c.$$.fragment),p(e,"class","section-title"),p(u,"type","button"),p(u,"class","btn btn-xs btn-transparent btn-pill btn-outline"),p(r,"class","indexes-list svelte-167lbwu")},m(O,D){w(O,e,D),g(e,t),g(e,s),g(e,l),w(O,o,D),w(O,r,D);for(let L=0;Ld=!1)),c.$set(L)},i(O){m||(A(c.$$.fragment,O),m=!0)},o(O){I(c.$$.fragment,O),m=!1},d(O){O&&k(e),O&&k(o),O&&k(r),mt(y,O),O&&k(f),n[6](null),z(c,O),_=!1,h()}}}const Yc=n=>n.name;function Z$(n,e,t){let i;Je(n,Si,m=>t(2,i=m));let{collection:s}=e,l;function o(m,_){for(let h=0;hl==null?void 0:l.show(m,_),a=()=>l==null?void 0:l.show();function u(m){ee[m?"unshift":"push"](()=>{l=m,t(1,l)})}function f(m){s=m,t(0,s)}const c=m=>{for(let _=0;_{o(m.detail.old,m.detail.new)};return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},[s,l,i,o,r,a,u,f,c,d]}class G$ extends ge{constructor(e){super(),_e(this,e,Z$,J$,me,{collection:0})}}function Kc(n,e,t){const i=n.slice();return i[6]=e[t],i}function Jc(n){let e,t,i,s,l=n[6].label+"",o,r,a,u;function f(){return n[4](n[6])}function c(...d){return n[5](n[6],...d)}return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),o=U(l),r=E(),p(t,"class","icon "+n[6].icon+" svelte-1gz9b6p"),p(s,"class","txt"),p(e,"tabindex","0"),p(e,"class","dropdown-item closable svelte-1gz9b6p")},m(d,m){w(d,e,m),g(e,t),g(e,i),g(e,s),g(s,o),g(e,r),a||(u=[J(e,"click",An(f)),J(e,"keydown",An(c))],a=!0)},p(d,m){n=d},d(d){d&&k(e),a=!1,Ee(u)}}}function X$(n){let e,t=n[2],i=[];for(let s=0;s{o(u.value)},a=(u,f)=>{(f.code==="Enter"||f.code==="Space")&&o(u.value)};return n.$$set=u=>{"class"in u&&t(0,i=u.class)},[i,s,l,o,r,a]}class eC extends ge{constructor(e){super(),_e(this,e,x$,Q$,me,{class:0})}}const tC=n=>({interactive:n&64,hasErrors:n&32}),Zc=n=>({interactive:n[6],hasErrors:n[5]}),nC=n=>({interactive:n&64,hasErrors:n&32}),Gc=n=>({interactive:n[6],hasErrors:n[5]}),iC=n=>({interactive:n&64,hasErrors:n&32}),Xc=n=>({interactive:n[6],hasErrors:n[5]}),sC=n=>({interactive:n&64,hasErrors:n&32}),Qc=n=>({interactive:n[6],hasErrors:n[5]});function xc(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","drag-handle-wrapper"),p(e,"draggable",!0),p(e,"aria-label","Sort")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ed(n){let e,t,i,s;return{c(){e=v("span"),p(e,"class","marker marker-required")},m(l,o){w(l,e,o),i||(s=Me(t=He.call(null,e,n[4])),i=!0)},p(l,o){t&&jt(t.update)&&o&16&&t.update.call(null,l[4])},d(l){l&&k(e),i=!1,s()}}}function lC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_=n[0].required&&ed(n);return{c(){e=v("div"),_&&_.c(),t=E(),i=v("div"),s=v("i"),o=E(),r=v("input"),p(e,"class","markers"),p(s,"class",l=B.getFieldTypeIcon(n[0].type)),p(i,"class","form-field-addon prefix no-pointer-events field-type-icon"),Q(i,"txt-disabled",!n[6]),p(r,"type","text"),r.required=!0,r.disabled=a=!n[6],r.readOnly=u=n[0].id&&n[0].system,p(r,"spellcheck","false"),r.autofocus=f=!n[0].id,p(r,"placeholder","Field name"),r.value=c=n[0].name},m(h,b){w(h,e,b),_&&_.m(e,null),w(h,t,b),w(h,i,b),g(i,s),w(h,o,b),w(h,r,b),n[14](r),n[0].id||r.focus(),d||(m=J(r,"input",n[15]),d=!0)},p(h,b){h[0].required?_?_.p(h,b):(_=ed(h),_.c(),_.m(e,null)):_&&(_.d(1),_=null),b&1&&l!==(l=B.getFieldTypeIcon(h[0].type))&&p(s,"class",l),b&64&&Q(i,"txt-disabled",!h[6]),b&64&&a!==(a=!h[6])&&(r.disabled=a),b&1&&u!==(u=h[0].id&&h[0].system)&&(r.readOnly=u),b&1&&f!==(f=!h[0].id)&&(r.autofocus=f),b&1&&c!==(c=h[0].name)&&r.value!==c&&(r.value=c)},d(h){h&&k(e),_&&_.d(),h&&k(t),h&&k(i),h&&k(o),h&&k(r),n[14](null),d=!1,m()}}}function oC(n){let e;return{c(){e=v("span"),p(e,"class","separator")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function rC(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("i"),p(t,"class","ri-settings-3-line"),p(e,"type","button"),p(e,"aria-label","Toggle field options"),p(e,"class",i="btn btn-sm btn-circle options-trigger "+(n[3]?"btn-secondary":"btn-transparent")),Q(e,"btn-hint",!n[3]&&!n[5]),Q(e,"btn-danger",n[5])},m(o,r){w(o,e,r),g(e,t),s||(l=J(e,"click",n[11]),s=!0)},p(o,r){r&8&&i!==(i="btn btn-sm btn-circle options-trigger "+(o[3]?"btn-secondary":"btn-transparent"))&&p(e,"class",i),r&40&&Q(e,"btn-hint",!o[3]&&!o[5]),r&40&&Q(e,"btn-danger",o[5])},d(o){o&&k(e),s=!1,l()}}}function aC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-warning btn-transparent options-trigger"),p(e,"aria-label","Restore")},m(s,l){w(s,e,l),t||(i=[Me(He.call(null,e,"Restore")),J(e,"click",n[9])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ee(i)}}}function td(n){let e,t,i,s,l,o,r,a,u,f,c;const d=n[13].options,m=yt(d,n,n[17],Xc),_=n[13].beforeNonempty,h=yt(_,n,n[17],Gc);r=new pe({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[uC,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}});const b=n[13].afterNonempty,y=yt(b,n,n[17],Zc);let S=!n[0].toDelete&&nd(n);return{c(){e=v("div"),t=v("div"),i=v("div"),m&&m.c(),s=E(),h&&h.c(),l=E(),o=v("div"),H(r.$$.fragment),a=E(),y&&y.c(),u=E(),S&&S.c(),p(i,"class","col-sm-12 hidden-empty"),p(o,"class","col-sm-4"),p(t,"class","grid grid-sm"),p(e,"class","schema-field-options")},m(C,$){w(C,e,$),g(e,t),g(t,i),m&&m.m(i,null),g(t,s),h&&h.m(t,null),g(t,l),g(t,o),V(r,o,null),g(t,a),y&&y.m(t,null),g(t,u),S&&S.m(t,null),c=!0},p(C,$){m&&m.p&&(!c||$&131168)&&wt(m,d,C,C[17],c?kt(d,C[17],$,iC):St(C[17]),Xc),h&&h.p&&(!c||$&131168)&&wt(h,_,C,C[17],c?kt(_,C[17],$,nC):St(C[17]),Gc);const T={};$&8519697&&(T.$$scope={dirty:$,ctx:C}),r.$set(T),y&&y.p&&(!c||$&131168)&&wt(y,b,C,C[17],c?kt(b,C[17],$,tC):St(C[17]),Zc),C[0].toDelete?S&&(ae(),I(S,1,1,()=>{S=null}),ue()):S?(S.p(C,$),$&1&&A(S,1)):(S=nd(C),S.c(),A(S,1),S.m(t,null))},i(C){c||(A(m,C),A(h,C),A(r.$$.fragment,C),A(y,C),A(S),C&&Qe(()=>{c&&(f||(f=je(e,ot,{duration:150},!0)),f.run(1))}),c=!0)},o(C){I(m,C),I(h,C),I(r.$$.fragment,C),I(y,C),I(S),C&&(f||(f=je(e,ot,{duration:150},!1)),f.run(0)),c=!1},d(C){C&&k(e),m&&m.d(C),h&&h.d(C),z(r),y&&y.d(C),S&&S.d(),C&&f&&f.end()}}}function uC(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),o=U(n[4]),r=E(),a=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[23]),p(l,"class","txt"),p(a,"class","ri-information-line link-hint"),p(s,"for",f=n[23])},m(m,_){w(m,e,_),e.checked=n[0].required,w(m,i,_),w(m,s,_),g(s,l),g(l,o),g(s,r),g(s,a),c||(d=[J(e,"change",n[16]),Me(u=He.call(null,a,{text:`Requires the field value NOT to be ${B.zeroDefaultStr(n[0])}.`,position:"right"}))],c=!0)},p(m,_){_&8388608&&t!==(t=m[23])&&p(e,"id",t),_&1&&(e.checked=m[0].required),_&16&&se(o,m[4]),u&&jt(u.update)&&_&1&&u.update.call(null,{text:`Requires the field value NOT to be ${B.zeroDefaultStr(m[0])}.`,position:"right"}),_&8388608&&f!==(f=m[23])&&p(s,"for",f)},d(m){m&&k(e),m&&k(i),m&&k(s),c=!1,Ee(d)}}}function nd(n){let e,t,i,s,l,o,r,a,u;return a=new Kn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[fC]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=E(),s=v("div"),l=v("button"),o=v("i"),r=E(),H(a.$$.fragment),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"aria-label","More"),p(l,"class","btn btn-circle btn-sm btn-transparent"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 m-l-auto txt-right")},m(f,c){w(f,e,c),g(e,t),g(e,i),g(e,s),g(s,l),g(l,o),g(l,r),V(a,l,null),u=!0},p(f,c){const d={};c&131072&&(d.$$scope={dirty:c,ctx:f}),a.$set(d)},i(f){u||(A(a.$$.fragment,f),u=!0)},o(f){I(a.$$.fragment,f),u=!1},d(f){f&&k(e),z(a)}}}function fC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function cC(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&xc();s=new pe({props:{class:"form-field required m-0 "+(n[6]?"":"disabled"),name:"schema."+n[1]+".name",inlineError:!0,$$slots:{default:[lC]},$$scope:{ctx:n}}});const c=n[13].default,d=yt(c,n,n[17],Qc),m=d||oC();function _(S,C){if(S[0].toDelete)return aC;if(S[6])return rC}let h=_(n),b=h&&h(n),y=n[6]&&n[3]&&td(n);return{c(){e=v("div"),t=v("div"),f&&f.c(),i=E(),H(s.$$.fragment),l=E(),m&&m.c(),o=E(),b&&b.c(),r=E(),y&&y.c(),p(t,"class","schema-field-header"),p(e,"class","schema-field"),Q(e,"required",n[0].required),Q(e,"expanded",n[6]&&n[3]),Q(e,"deleted",n[0].toDelete)},m(S,C){w(S,e,C),g(e,t),f&&f.m(t,null),g(t,i),V(s,t,null),g(t,l),m&&m.m(t,null),g(t,o),b&&b.m(t,null),g(e,r),y&&y.m(e,null),u=!0},p(S,[C]){S[6]?f||(f=xc(),f.c(),f.m(t,i)):f&&(f.d(1),f=null);const $={};C&64&&($.class="form-field required m-0 "+(S[6]?"":"disabled")),C&2&&($.name="schema."+S[1]+".name"),C&131157&&($.$$scope={dirty:C,ctx:S}),s.$set($),d&&d.p&&(!u||C&131168)&&wt(d,c,S,S[17],u?kt(c,S[17],C,sC):St(S[17]),Qc),h===(h=_(S))&&b?b.p(S,C):(b&&b.d(1),b=h&&h(S),b&&(b.c(),b.m(t,null))),S[6]&&S[3]?y?(y.p(S,C),C&72&&A(y,1)):(y=td(S),y.c(),A(y,1),y.m(e,null)):y&&(ae(),I(y,1,1,()=>{y=null}),ue()),(!u||C&1)&&Q(e,"required",S[0].required),(!u||C&72)&&Q(e,"expanded",S[6]&&S[3]),(!u||C&1)&&Q(e,"deleted",S[0].toDelete)},i(S){u||(A(s.$$.fragment,S),A(m,S),A(y),S&&Qe(()=>{u&&(a||(a=je(e,ot,{duration:150},!0)),a.run(1))}),u=!0)},o(S){I(s.$$.fragment,S),I(m,S),I(y),S&&(a||(a=je(e,ot,{duration:150},!1)),a.run(0)),u=!1},d(S){S&&k(e),f&&f.d(),z(s),m&&m.d(S),b&&b.d(),y&&y.d(),S&&a&&a.end()}}}let Dr=[];function dC(n,e,t){let i,s,l,o;Je(n,Si,P=>t(12,o=P));let{$$slots:r={},$$scope:a}=e;const u="f_"+B.randomString(8),f=$t(),c={bool:"Nonfalsey",number:"Nonzero"};let{key:d=""}=e,{field:m=new kn}=e,_,h=!1;function b(){m.id?t(0,m.toDelete=!0,m):f("remove")}function y(){t(0,m.toDelete=!1,m),en({})}function S(P){return B.slugify(P)}function C(){t(3,h=!0),M()}function $(){t(3,h=!1)}function T(){h?$():C()}function M(){for(let P of Dr)P.id!=u&&P.collapse()}Gt(()=>(Dr.push({id:u,collapse:$}),m.onMountSelect&&(t(0,m.onMountSelect=!1,m),_==null||_.select()),()=>{B.removeByKey(Dr,"id",u)}));function O(P){ee[P?"unshift":"push"](()=>{_=P,t(2,_)})}const D=P=>{const N=m.name;t(0,m.name=S(P.target.value),m),P.target.value=m.name,f("rename",{oldName:N,newName:m.name})};function L(){m.required=this.checked,t(0,m)}return n.$$set=P=>{"key"in P&&t(1,d=P.key),"field"in P&&t(0,m=P.field),"$$scope"in P&&t(17,a=P.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&m.toDelete&&m.originalName&&m.name!==m.originalName&&t(0,m.name=m.originalName,m),n.$$.dirty&1&&!m.originalName&&m.name&&t(0,m.originalName=m.name,m),n.$$.dirty&1&&typeof m.toDelete>"u"&&t(0,m.toDelete=!1,m),n.$$.dirty&1&&m.required&&t(0,m.nullable=!1,m),n.$$.dirty&1&&t(6,i=!m.toDelete&&!(m.id&&m.system)),n.$$.dirty&4098&&t(5,s=!B.isEmpty(B.getNestedVal(o,`schema.${d}`))),n.$$.dirty&1&&t(4,l=c[m==null?void 0:m.type]||"Nonempty")},[m,d,_,h,l,s,i,f,b,y,S,T,o,r,O,D,L,a]}class di extends ge{constructor(e){super(),_e(this,e,dC,cC,me,{key:1,field:0})}}function pC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min length"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min","0")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.min&&re(l,u[0].options.min)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function mC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Max length"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","number"),p(l,"id",o=n[9]),p(l,"step","1"),p(l,"min",r=n[0].options.min||0)},m(f,c){w(f,e,c),g(e,t),w(f,s,c),w(f,l,c),re(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,c){c&512&&i!==(i=f[9])&&p(e,"for",i),c&512&&o!==(o=f[9])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min||0)&&p(l,"min",r),c&1&&dt(l.value)!==f[0].options.max&&re(l,f[0].options.max)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function hC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Regex pattern"),s=E(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","text"),p(l,"id",o=n[9]),p(l,"placeholder","Valid Go regular expression, eg. ^\\w+$")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.pattern),r||(a=J(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0].options.pattern&&re(l,u[0].options.pattern)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function _C(n){let e,t,i,s,l,o,r,a,u,f;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[pC,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[mC,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[hC,({uniqueId:c})=>({9:c}),({uniqueId:c})=>c?512:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),r=E(),a=v("div"),H(u.$$.fragment),p(t,"class","col-sm-3"),p(l,"class","col-sm-3"),p(a,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(c,d){w(c,e,d),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),g(e,r),g(e,a),V(u,a,null),f=!0},p(c,d){const m={};d&2&&(m.name="schema."+c[1]+".options.min"),d&1537&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const _={};d&2&&(_.name="schema."+c[1]+".options.max"),d&1537&&(_.$$scope={dirty:d,ctx:c}),o.$set(_);const h={};d&2&&(h.name="schema."+c[1]+".options.pattern"),d&1537&&(h.$$scope={dirty:d,ctx:c}),u.$set(h)},i(c){f||(A(i.$$.fragment,c),A(o.$$.fragment,c),A(u.$$.fragment,c),f=!0)},o(c){I(i.$$.fragment,c),I(o.$$.fragment,c),I(u.$$.fragment,c),f=!1},d(c){c&&k(e),z(i),z(o),z(u)}}}function gC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[6](r)}let o={$$slots:{options:[_C]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[7]),e.$on("remove",n[8]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&1027&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function bC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=dt(this.value),t(0,l)}function a(){l.options.max=dt(this.value),t(0,l)}function u(){l.options.pattern=this.value,t(0,l)}function f(m){l=m,t(0,l)}function c(m){Ne.call(this,n,m)}function d(m){Ne.call(this,n,m)}return n.$$set=m=>{e=qe(qe({},e),Zt(m)),t(2,s=xe(e,i)),"field"in m&&t(0,l=m.field),"key"in m&&t(1,o=m.key)},[l,o,s,r,a,u,f,c,d]}class vC extends ge{constructor(e){super(),_e(this,e,bC,gC,me,{field:0,key:1})}}function yC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min"),s=E(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","number"),p(l,"id",o=n[8])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.min),r||(a=J(l,"input",n[3]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.min&&re(l,u[0].options.min)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function kC(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Max"),s=E(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","number"),p(l,"id",o=n[8]),p(l,"min",r=n[0].options.min)},m(f,c){w(f,e,c),g(e,t),w(f,s,c),w(f,l,c),re(l,n[0].options.max),a||(u=J(l,"input",n[4]),a=!0)},p(f,c){c&256&&i!==(i=f[8])&&p(e,"for",i),c&256&&o!==(o=f[8])&&p(l,"id",o),c&1&&r!==(r=f[0].options.min)&&p(l,"min",r),c&1&&dt(l.value)!==f[0].options.max&&re(l,f[0].options.max)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function wC(n){let e,t,i,s,l,o,r;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[yC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[kC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&769&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&769&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&k(e),z(i),z(o)}}}function SC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[wC]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&515&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function $C(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(){l.options.min=dt(this.value),t(0,l)}function a(){l.options.max=dt(this.value),t(0,l)}function u(d){l=d,t(0,l)}function f(d){Ne.call(this,n,d)}function c(d){Ne.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(2,s=xe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,s,r,a,u,f,c]}class CC extends ge{constructor(e){super(),_e(this,e,$C,SC,me,{field:0,key:1})}}function TC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function MC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Ne.call(this,n,f)}function u(f){Ne.call(this,n,f)}return n.$$set=f=>{e=qe(qe({},e),Zt(f)),t(2,s=xe(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class OC extends ge{constructor(e){super(),_e(this,e,MC,TC,me,{field:0,key:1})}}function EC(n){let e,t,i,s,l=[{type:t=n[5].type||"text"},{value:n[4]},{disabled:n[3]},{readOnly:n[2]},n[5]],o={};for(let r=0;r{t(0,o=B.splitNonEmpty(c.target.value,r))};return n.$$set=c=>{e=qe(qe({},e),Zt(c)),t(5,l=xe(e,s)),"value"in c&&t(0,o=c.value),"separator"in c&&t(1,r=c.separator),"readonly"in c&&t(2,a=c.readonly),"disabled"in c&&t(3,u=c.disabled)},n.$$.update=()=>{n.$$.dirty&1&&t(4,i=(o||[]).join(", "))},[o,r,a,u,i,l,f]}class Vs extends ge{constructor(e){super(),_e(this,e,DC,EC,me,{value:0,separator:1,readonly:2,disabled:3})}}function AC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function _(b){n[3](b)}let h={id:n[8],disabled:!B.isEmpty(n[0].options.onlyDomains)};return n[0].options.exceptDomains!==void 0&&(h.value=n[0].options.exceptDomains),r=new Vs({props:h}),ee.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),H(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]),p(f,"class","help-block")},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Me(He.call(null,s,{text:`List of domains that are NOT allowed. + This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&256&&l!==(l=b[8]))&&p(e,"for",l);const S={};y&256&&(S.id=b[8]),y&1&&(S.disabled=!B.isEmpty(b[0].options.onlyDomains)),!a&&y&1&&(a=!0,S.value=b[0].options.exceptDomains,he(()=>a=!1)),r.$set(S)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function IC(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function _(b){n[4](b)}let h={id:n[8]+".options.onlyDomains",disabled:!B.isEmpty(n[0].options.exceptDomains)};return n[0].options.onlyDomains!==void 0&&(h.value=n[0].options.onlyDomains),r=new Vs({props:h}),ee.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),H(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[8]+".options.onlyDomains"),p(f,"class","help-block")},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Me(He.call(null,s,{text:`List of domains that are ONLY allowed. + This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&256&&l!==(l=b[8]+".options.onlyDomains"))&&p(e,"for",l);const S={};y&256&&(S.id=b[8]+".options.onlyDomains"),y&1&&(S.disabled=!B.isEmpty(b[0].options.exceptDomains)),!a&&y&1&&(a=!0,S.value=b[0].options.onlyDomains,he(()=>a=!1)),r.$set(S)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function LC(n){let e,t,i,s,l,o,r;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[AC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[IC,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&769&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&769&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&k(e),z(i),z(o)}}}function PC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[5](r)}let o={$$slots:{options:[LC]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};a&515&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function NC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(d){n.$$.not_equal(l.options.exceptDomains,d)&&(l.options.exceptDomains=d,t(0,l))}function a(d){n.$$.not_equal(l.options.onlyDomains,d)&&(l.options.onlyDomains=d,t(0,l))}function u(d){l=d,t(0,l)}function f(d){Ne.call(this,n,d)}function c(d){Ne.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(2,s=xe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,s,r,a,u,f,c]}class w1 extends ge{constructor(e){super(),_e(this,e,NC,PC,me,{field:0,key:1})}}function FC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function RC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Ne.call(this,n,f)}function u(f){Ne.call(this,n,f)}return n.$$set=f=>{e=qe(qe({},e),Zt(f)),t(2,s=xe(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class qC extends ge{constructor(e){super(),_e(this,e,RC,FC,me,{field:0,key:1})}}function jC(n){let e,t,i;const s=[{key:n[1]},n[2]];function l(r){n[3](r)}let o={};for(let r=0;rde(e,"field",l)),e.$on("rename",n[4]),e.$on("remove",n[5]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&6?Mt(s,[a&2&&{key:r[1]},a&4&&Xt(r[2])]):{};!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function VC(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;function r(f){l=f,t(0,l)}function a(f){Ne.call(this,n,f)}function u(f){Ne.call(this,n,f)}return n.$$set=f=>{e=qe(qe({},e),Zt(f)),t(2,s=xe(e,i)),"field"in f&&t(0,l=f.field),"key"in f&&t(1,o=f.key)},[l,o,s,r,a,u]}class zC extends ge{constructor(e){super(),_e(this,e,VC,jC,me,{field:0,key:1})}}var Ar=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ts={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},yl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},_n=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},jn=function(n){return n===!0?1:0};function id(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var Ir=function(n){return n instanceof Array?n:[n]};function dn(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function ft(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function so(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function S1(n,e){if(e(n))return n;if(n.parentNode)return S1(n.parentNode,e)}function lo(n,e){var t=ft("div","numInputWrapper"),i=ft("input","numInput "+n),s=ft("span","arrowUp"),l=ft("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function Tn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var Lr=function(){},Ro=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},HC={D:Lr,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*jn(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:Lr,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:Lr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},xi={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},cl={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[cl.w(n,e,t)]},F:function(n,e,t){return Ro(cl.n(n,e,t)-1,!1,e)},G:function(n,e,t){return _n(cl.h(n,e,t))},H:function(n){return _n(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[jn(n.getHours()>11)]},M:function(n,e){return Ro(n.getMonth(),!0,e)},S:function(n){return _n(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return _n(n.getFullYear(),4)},d:function(n){return _n(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return _n(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return _n(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},$1=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?yl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,m){return cl[c]&&m[d-1]!=="\\"?cl[c](r,f,t):c!=="\\"?c:""}).join("")}},ba=function(n){var e=n.config,t=e===void 0?Ts:e,i=n.l10n,s=i===void 0?yl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||Ts).dateFormat,m=String(l).trim();if(m==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(m)||/GMT$/.test(m))f=new Date(l);else{for(var _=void 0,h=[],b=0,y=0,S="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),te=Nr(t.config);G.setHours(te.hours,te.minutes,te.seconds,G.getMilliseconds()),t.selectedDates=[G],t.latestSelectedDateObj=G}Y!==void 0&&Y.type!=="blur"&&Rl(Y);var oe=t._input.value;c(),nn(),t._input.value!==oe&&t._debouncedChange()}function u(Y,G){return Y%12+12*jn(G===t.l10n.amPM[1])}function f(Y){switch(Y%24){case 0:case 12:return 12;default:return Y%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var Y=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,G=(parseInt(t.minuteElement.value,10)||0)%60,te=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(Y=u(Y,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&Mn(t.latestSelectedDateObj,t.config.minDate,!0)===0,Ce=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&Mn(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Ie=Pr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Pe=Pr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Oe=Pr(Y,G,te);if(Oe>Pe&&Oe=12)]),t.secondElement!==void 0&&(t.secondElement.value=_n(te)))}function _(Y){var G=Tn(Y),te=parseInt(G.value)+(Y.delta||0);(te/1e3>1||Y.key==="Enter"&&!/[^\d]/.test(te.toString()))&&ke(te)}function h(Y,G,te,oe){if(G instanceof Array)return G.forEach(function(Ce){return h(Y,Ce,te,oe)});if(Y instanceof Array)return Y.forEach(function(Ce){return h(Ce,G,te,oe)});Y.addEventListener(G,te,oe),t._handlers.push({remove:function(){return Y.removeEventListener(G,te,oe)}})}function b(){Fe("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(te){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+te+"]"),function(oe){return h(oe,"click",t[te])})}),t.isMobile){ve();return}var Y=id(we,50);if(t._debouncedChange=id(b,YC),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&h(t.daysContainer,"mouseover",function(te){t.config.mode==="range"&&Ye(Tn(te))}),h(t._input,"keydown",Ge),t.calendarContainer!==void 0&&h(t.calendarContainer,"keydown",Ge),!t.config.inline&&!t.config.static&&h(window,"resize",Y),window.ontouchstart!==void 0?h(window.document,"touchstart",Be):h(window.document,"mousedown",Be),h(window.document,"focus",Be,{capture:!0}),t.config.clickOpens===!0&&(h(t._input,"focus",t.open),h(t._input,"click",t.open)),t.daysContainer!==void 0&&(h(t.monthNav,"click",cn),h(t.monthNav,["keyup","increment"],_),h(t.daysContainer,"click",ei)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var G=function(te){return Tn(te).select()};h(t.timeContainer,["increment"],a),h(t.timeContainer,"blur",a,{capture:!0}),h(t.timeContainer,"click",C),h([t.hourElement,t.minuteElement],["focus","click"],G),t.secondElement!==void 0&&h(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&h(t.amPM,"click",function(te){a(te)})}t.config.allowInput&&h(t._input,"blur",ht)}function S(Y,G){var te=Y!==void 0?t.parseDate(Y):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(Y);var Ce=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Ce&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Ie=ft("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Ie,t.element),Ie.appendChild(t.element),t.altInput&&Ie.appendChild(t.altInput),Ie.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function M(Y,G,te,oe){var Ce=Te(G,!0),Ie=ft("span",Y,G.getDate().toString());return Ie.dateObj=G,Ie.$i=oe,Ie.setAttribute("aria-label",t.formatDate(G,t.config.ariaDateFormat)),Y.indexOf("hidden")===-1&&Mn(G,t.now)===0&&(t.todayDateElem=Ie,Ie.classList.add("today"),Ie.setAttribute("aria-current","date")),Ce?(Ie.tabIndex=-1,Ot(G)&&(Ie.classList.add("selected"),t.selectedDateElem=Ie,t.config.mode==="range"&&(dn(Ie,"startRange",t.selectedDates[0]&&Mn(G,t.selectedDates[0],!0)===0),dn(Ie,"endRange",t.selectedDates[1]&&Mn(G,t.selectedDates[1],!0)===0),Y==="nextMonthDay"&&Ie.classList.add("inRange")))):Ie.classList.add("flatpickr-disabled"),t.config.mode==="range"&&$n(G)&&!Ot(G)&&Ie.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&Y!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(G)+""),Fe("onDayCreate",Ie),Ie}function O(Y){Y.focus(),t.config.mode==="range"&&Ye(Y)}function D(Y){for(var G=Y>0?0:t.config.showMonths-1,te=Y>0?t.config.showMonths:-1,oe=G;oe!=te;oe+=Y)for(var Ce=t.daysContainer.children[oe],Ie=Y>0?0:Ce.children.length-1,Pe=Y>0?Ce.children.length:-1,Oe=Ie;Oe!=Pe;Oe+=Y){var Ke=Ce.children[Oe];if(Ke.className.indexOf("hidden")===-1&&Te(Ke.dateObj))return Ke}}function L(Y,G){for(var te=Y.className.indexOf("Month")===-1?Y.dateObj.getMonth():t.currentMonth,oe=G>0?t.config.showMonths:-1,Ce=G>0?1:-1,Ie=te-t.currentMonth;Ie!=oe;Ie+=Ce)for(var Pe=t.daysContainer.children[Ie],Oe=te-t.currentMonth===Ie?Y.$i+G:G<0?Pe.children.length-1:0,Ke=Pe.children.length,Re=Oe;Re>=0&&Re0?Ke:-1);Re+=Ce){var We=Pe.children[Re];if(We.className.indexOf("hidden")===-1&&Te(We.dateObj)&&Math.abs(Y.$i-Re)>=Math.abs(G))return O(We)}t.changeMonth(Ce),P(D(Ce),0)}function P(Y,G){var te=l(),oe=Ze(te||document.body),Ce=Y!==void 0?Y:oe?te:t.selectedDateElem!==void 0&&Ze(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&Ze(t.todayDateElem)?t.todayDateElem:D(G>0?1:-1);Ce===void 0?t._input.focus():oe?L(Ce,G):O(Ce)}function N(Y,G){for(var te=(new Date(Y,G,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((G-1+12)%12,Y),Ce=t.utils.getDaysInMonth(G,Y),Ie=window.document.createDocumentFragment(),Pe=t.config.showMonths>1,Oe=Pe?"prevMonthDay hidden":"prevMonthDay",Ke=Pe?"nextMonthDay hidden":"nextMonthDay",Re=oe+1-te,We=0;Re<=oe;Re++,We++)Ie.appendChild(M("flatpickr-day "+Oe,new Date(Y,G-1,Re),Re,We));for(Re=1;Re<=Ce;Re++,We++)Ie.appendChild(M("flatpickr-day",new Date(Y,G,Re),Re,We));for(var vt=Ce+1;vt<=42-te&&(t.config.showMonths===1||We%7!==0);vt++,We++)Ie.appendChild(M("flatpickr-day "+Ke,new Date(Y,G+1,vt%Ce),vt,We));var ni=ft("div","dayContainer");return ni.appendChild(Ie),ni}function F(){if(t.daysContainer!==void 0){so(t.daysContainer),t.weekNumbers&&so(t.weekNumbers);for(var Y=document.createDocumentFragment(),G=0;G1||t.config.monthSelectorType!=="dropdown")){var Y=function(oe){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&oet.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var G=0;G<12;G++)if(Y(G)){var te=ft("option","flatpickr-monthDropdown-month");te.value=new Date(t.currentYear,G).getMonth().toString(),te.textContent=Ro(G,t.config.shorthandCurrentMonth,t.l10n),te.tabIndex=-1,t.currentMonth===G&&(te.selected=!0),t.monthsDropdownContainer.appendChild(te)}}}function q(){var Y=ft("div","flatpickr-month"),G=window.document.createDocumentFragment(),te;t.config.showMonths>1||t.config.monthSelectorType==="static"?te=ft("span","cur-month"):(t.monthsDropdownContainer=ft("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),h(t.monthsDropdownContainer,"change",function(Pe){var Oe=Tn(Pe),Ke=parseInt(Oe.value,10);t.changeMonth(Ke-t.currentMonth),Fe("onMonthChange")}),R(),te=t.monthsDropdownContainer);var oe=lo("cur-year",{tabindex:"-1"}),Ce=oe.getElementsByTagName("input")[0];Ce.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Ce.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Ce.setAttribute("max",t.config.maxDate.getFullYear().toString()),Ce.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Ie=ft("div","flatpickr-current-month");return Ie.appendChild(te),Ie.appendChild(oe),G.appendChild(Ie),Y.appendChild(G),{container:Y,yearElement:Ce,monthElement:te}}function j(){so(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var Y=t.config.showMonths;Y--;){var G=q();t.yearElements.push(G.yearElement),t.monthElements.push(G.monthElement),t.monthNav.appendChild(G.container)}t.monthNav.appendChild(t.nextMonthNav)}function W(){return t.monthNav=ft("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=ft("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=ft("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,j(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(Y){t.__hidePrevMonthArrow!==Y&&(dn(t.prevMonthNav,"flatpickr-disabled",Y),t.__hidePrevMonthArrow=Y)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(Y){t.__hideNextMonthArrow!==Y&&(dn(t.nextMonthNav,"flatpickr-disabled",Y),t.__hideNextMonthArrow=Y)}}),t.currentYearElement=t.yearElements[0],Nn(),t.monthNav}function X(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var Y=Nr(t.config);t.timeContainer=ft("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var G=ft("span","flatpickr-time-separator",":"),te=lo("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=te.getElementsByTagName("input")[0];var oe=lo("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?Y.hours:f(Y.hours)),t.minuteElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():Y.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(te),t.timeContainer.appendChild(G),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Ce=lo("flatpickr-second");t.secondElement=Ce.getElementsByTagName("input")[0],t.secondElement.value=_n(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():Y.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ft("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Ce)}return t.config.time_24hr||(t.amPM=ft("span","flatpickr-am-pm",t.l10n.amPM[jn((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function K(){t.weekdayContainer?so(t.weekdayContainer):t.weekdayContainer=ft("div","flatpickr-weekdays");for(var Y=t.config.showMonths;Y--;){var G=ft("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(G)}return Z(),t.weekdayContainer}function Z(){if(t.weekdayContainer){var Y=t.l10n.firstDayOfWeek,G=sd(t.l10n.weekdays.shorthand);Y>0&&Y `+G.join("")+` - `}}function le(){t.calendarContainer.classList.add("hasWeeks");var Y=ft("div","flatpickr-weekwrapper");Y.appendChild(ft("span","flatpickr-weekday",t.l10n.weekAbbreviation));var G=ft("div","flatpickr-weeks");return Y.appendChild(G),{weekWrapper:Y,weekNumbers:G}}function ne(Y,G){G===void 0&&(G=!0);var te=G?Y:Y-t.currentMonth;te<0&&t._hidePrevMonthArrow===!0||te>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=te,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Fe("onYearChange"),R()),F(),Fe("onMonthChange"),Nn())}function ie(Y,G){if(Y===void 0&&(Y=!0),G===void 0&&(G=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,G===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var te=Pr(t.config),oe=te.hours,Ce=te.minutes,Ie=te.seconds;m(oe,Ce,Ie)}t.redraw(),Y&&Fe("onChange")}function be(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Fe("onClose")}function Se(){t.config!==void 0&&Fe("onDestroy");for(var Y=t._handlers.length;Y--;)t._handlers[Y].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var G=t.calendarContainer.parentNode;if(G.lastChild&&G.removeChild(G.lastChild),G.parentNode){for(;G.firstChild;)G.parentNode.insertBefore(G.firstChild,G);G.parentNode.removeChild(G)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(te){try{delete t[te]}catch{}})}function Ve(Y){return t.calendarContainer.contains(Y)}function Be(Y){if(t.isOpen&&!t.config.inline){var G=Tn(Y),te=Ve(G),oe=G===t.input||G===t.altInput||t.element.contains(G)||Y.path&&Y.path.indexOf&&(~Y.path.indexOf(t.input)||~Y.path.indexOf(t.altInput)),Ce=!oe&&!te&&!Ve(Y.relatedTarget),Ie=!t.config.ignoredFocusElements.some(function(Pe){return Pe.contains(G)});Ce&&Ie&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ke(Y){if(!(!Y||t.config.minDate&&Yt.config.maxDate.getFullYear())){var G=Y,te=t.currentYear!==G;t.currentYear=G||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),te&&(t.redraw(),Fe("onYearChange"),R())}}function Te(Y,G){var te;G===void 0&&(G=!0);var oe=t.parseDate(Y,void 0,G);if(t.config.minDate&&oe&&Mn(oe,t.config.minDate,G!==void 0?G:!t.minDateHasTime)<0||t.config.maxDate&&oe&&Mn(oe,t.config.maxDate,G!==void 0?G:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var Ce=!!t.config.enable,Ie=(te=t.config.enable)!==null&&te!==void 0?te:t.config.disable,Pe=0,Oe=void 0;Pe=Oe.from.getTime()&&oe.getTime()<=Oe.to.getTime())return Ce}return!Ce}function Ze(Y){return t.daysContainer!==void 0?Y.className.indexOf("hidden")===-1&&Y.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(Y):!1}function ht(Y){var G=Y.target===t._input,te=t._input.value.trimEnd()!==Bi();G&&te&&!(Y.relatedTarget&&Ve(Y.relatedTarget))&&t.setDate(t._input.value,!0,Y.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ge(Y){var G=Tn(Y),te=t.config.wrap?n.contains(G):G===t._input,oe=t.config.allowInput,Ce=t.isOpen&&(!oe||!te),Ie=t.config.inline&&te&&!oe;if(Y.keyCode===13&&te){if(oe)return t.setDate(t._input.value,!0,G===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),G.blur();t.open()}else if(Ve(G)||Ce||Ie){var Pe=!!t.timeContainer&&t.timeContainer.contains(G);switch(Y.keyCode){case 13:Pe?(Y.preventDefault(),a(),Ln()):ei(Y);break;case 27:Y.preventDefault(),Ln();break;case 8:case 46:te&&!t.config.allowInput&&(Y.preventDefault(),t.clear());break;case 37:case 39:if(!Pe&&!te){Y.preventDefault();var Oe=l();if(t.daysContainer!==void 0&&(oe===!1||Oe&&Ze(Oe))){var Ke=Y.keyCode===39?1:-1;Y.ctrlKey?(Y.stopPropagation(),ne(Ke),P(D(1),0)):P(void 0,Ke)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:Y.preventDefault();var Re=Y.keyCode===40?1:-1;t.daysContainer&&G.$i!==void 0||G===t.input||G===t.altInput?Y.ctrlKey?(Y.stopPropagation(),ke(t.currentYear-Re),P(D(1),0)):Pe||P(void 0,Re*7):G===t.currentYearElement?ke(t.currentYear-Re):t.config.enableTime&&(!Pe&&t.hourElement&&t.hourElement.focus(),a(Y),t._debouncedChange());break;case 9:if(Pe){var We=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Cn){return Cn}),vt=We.indexOf(G);if(vt!==-1){var ni=We[vt+(Y.shiftKey?-1:1)];Y.preventDefault(),(ni||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(G)&&Y.shiftKey&&(Y.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&G===t.amPM)switch(Y.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),nn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),nn();break}(te||Ve(G))&&Fe("onKeyDown",Y)}function Ye(Y,G){if(G===void 0&&(G="flatpickr-day"),!(t.selectedDates.length!==1||Y&&(!Y.classList.contains(G)||Y.classList.contains("flatpickr-disabled")))){for(var te=Y?Y.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),oe=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Ce=Math.min(te,t.selectedDates[0].getTime()),Ie=Math.max(te,t.selectedDates[0].getTime()),Pe=!1,Oe=0,Ke=0,Re=Ce;ReCe&&ReOe)?Oe=Re:Re>oe&&(!Ke||Re ."+G));We.forEach(function(vt){var ni=vt.dateObj,Cn=ni.getTime(),zs=Oe>0&&Cn0&&Cn>Ke;if(zs){vt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(ms){vt.classList.remove(ms)});return}else if(Pe&&!zs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(ms){vt.classList.remove(ms)}),Y!==void 0&&(Y.classList.add(te<=t.selectedDates[0].getTime()?"startRange":"endRange"),oete&&Cn===oe&&vt.classList.add("endRange"),Cn>=Oe&&(Ke===0||Cn<=Ke)&&zC(Cn,oe,te)&&vt.classList.add("inRange"))})}}function we(){t.isOpen&&!t.config.static&&!t.config.inline&&nt()}function fe(Y,G){if(G===void 0&&(G=t._positionElement),t.isMobile===!0){if(Y){Y.preventDefault();var te=Tn(Y);te&&te.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Fe("onOpen");return}else if(t._input.disabled||t.config.inline)return;var oe=t.isOpen;t.isOpen=!0,oe||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Fe("onOpen"),nt(G)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(Y===void 0||!t.timeContainer.contains(Y.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function ze(Y){return function(G){var te=t.config["_"+Y+"Date"]=t.parseDate(G,t.config.dateFormat),oe=t.config["_"+(Y==="min"?"max":"min")+"Date"];te!==void 0&&(t[Y==="min"?"minDateHasTime":"maxDateHasTime"]=te.getHours()>0||te.getMinutes()>0||te.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Ce){return Te(Ce)}),!t.selectedDates.length&&Y==="min"&&d(te),nn()),t.daysContainer&&(Ut(),te!==void 0?t.currentYearElement[Y]=te.getFullYear().toString():t.currentYearElement.removeAttribute(Y),t.currentYearElement.disabled=!!oe&&te!==void 0&&oe.getFullYear()===te.getFullYear())}}function Dt(){var Y=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],G=rn(rn({},JSON.parse(JSON.stringify(n.dataset||{}))),e),te={};t.config.parseDate=G.parseDate,t.config.formatDate=G.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(We){t.config._enable=ti(We)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(We){t.config._disable=ti(We)}});var oe=G.mode==="time";if(!G.dateFormat&&(G.enableTime||oe)){var Ce=Yt.defaultConfig.dateFormat||Ts.dateFormat;te.dateFormat=G.noCalendar||oe?"H:i"+(G.enableSeconds?":S":""):Ce+" H:i"+(G.enableSeconds?":S":"")}if(G.altInput&&(G.enableTime||oe)&&!G.altFormat){var Ie=Yt.defaultConfig.altFormat||Ts.altFormat;te.altFormat=G.noCalendar||oe?"h:i"+(G.enableSeconds?":S K":" K"):Ie+(" h:i"+(G.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:ze("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:ze("max")});var Pe=function(We){return function(vt){t.config[We==="min"?"_minTime":"_maxTime"]=t.parseDate(vt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Pe("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Pe("max")}),G.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,te,G);for(var Oe=0;Oe-1?t.config[Re]=Ar(Ke[Re]).map(o).concat(t.config[Re]):typeof G[Re]>"u"&&(t.config[Re]=Ke[Re])}G.altInputClass||(t.config.altInputClass=Le().className+" "+t.config.altInputClass),Fe("onParseConfig")}function Le(){return t.config.wrap?n.querySelector("[data-input]"):n}function $e(){typeof t.config.locale!="object"&&typeof Yt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=rn(rn({},Yt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Yt.l10ns[t.config.locale]:void 0),xi.D="("+t.l10n.weekdays.shorthand.join("|")+")",xi.l="("+t.l10n.weekdays.longhand.join("|")+")",xi.M="("+t.l10n.months.shorthand.join("|")+")",xi.F="("+t.l10n.months.longhand.join("|")+")",xi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var Y=rn(rn({},e),JSON.parse(JSON.stringify(n.dataset||{})));Y.time_24hr===void 0&&Yt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=w1(t),t.parseDate=ba({config:t.config,l10n:t.l10n})}function nt(Y){if(typeof t.config.position=="function")return void t.config.position(t,Y);if(t.calendarContainer!==void 0){Fe("onPreCalendarPosition");var G=Y||t._positionElement,te=Array.prototype.reduce.call(t.calendarContainer.children,function(F1,R1){return F1+R1.offsetHeight},0),oe=t.calendarContainer.offsetWidth,Ce=t.config.position.split(" "),Ie=Ce[0],Pe=Ce.length>1?Ce[1]:null,Oe=G.getBoundingClientRect(),Ke=window.innerHeight-Oe.bottom,Re=Ie==="above"||Ie!=="below"&&Kete,We=window.pageYOffset+Oe.top+(Re?-te-2:G.offsetHeight+2);if(dn(t.calendarContainer,"arrowTop",!Re),dn(t.calendarContainer,"arrowBottom",Re),!t.config.inline){var vt=window.pageXOffset+Oe.left,ni=!1,Cn=!1;Pe==="center"?(vt-=(oe-Oe.width)/2,ni=!0):Pe==="right"&&(vt-=oe-Oe.width,Cn=!0),dn(t.calendarContainer,"arrowLeft",!ni&&!Cn),dn(t.calendarContainer,"arrowCenter",ni),dn(t.calendarContainer,"arrowRight",Cn);var zs=window.document.body.offsetWidth-(window.pageXOffset+Oe.right),ms=vt+oe>window.document.body.offsetWidth,E1=zs+oe>window.document.body.offsetWidth;if(dn(t.calendarContainer,"rightMost",ms),!t.config.static)if(t.calendarContainer.style.top=We+"px",!ms)t.calendarContainer.style.left=vt+"px",t.calendarContainer.style.right="auto";else if(!E1)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=zs+"px";else{var ir=At();if(ir===void 0)return;var D1=window.document.body.offsetWidth,A1=Math.max(0,D1/2-oe/2),I1=".flatpickr-calendar.centerMost:before",L1=".flatpickr-calendar.centerMost:after",P1=ir.cssRules.length,N1="{left:"+Oe.left+"px;right:auto;}";dn(t.calendarContainer,"rightMost",!1),dn(t.calendarContainer,"centerMost",!0),ir.insertRule(I1+","+L1+N1,P1),t.calendarContainer.style.left=A1+"px",t.calendarContainer.style.right="auto"}}}}function At(){for(var Y=null,G=0;Gt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=oe,t.config.mode==="single")t.selectedDates=[Ce];else if(t.config.mode==="multiple"){var Pe=Ot(Ce);Pe?t.selectedDates.splice(parseInt(Pe),1):t.selectedDates.push(Ce)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Ce,t.selectedDates.push(Ce),Mn(Ce,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(We,vt){return We.getTime()-vt.getTime()}));if(c(),Ie){var Oe=t.currentYear!==Ce.getFullYear();t.currentYear=Ce.getFullYear(),t.currentMonth=Ce.getMonth(),Oe&&(Fe("onYearChange"),R()),Fe("onMonthChange")}if(Nn(),F(),nn(),!Ie&&t.config.mode!=="range"&&t.config.showMonths===1?O(oe):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ke=t.config.mode==="single"&&!t.config.enableTime,Re=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ke||Re)&&Ln()}b()}}var Sn={locale:[$e,Z],showMonths:[H,r,J],minDate:[S],maxDate:[S],positionElement:[pi],clickOpens:[function(){t.config.clickOpens===!0?(h(t._input,"focus",t.open),h(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function _t(Y,G){if(Y!==null&&typeof Y=="object"){Object.assign(t.config,Y);for(var te in Y)Sn[te]!==void 0&&Sn[te].forEach(function(oe){return oe()})}else t.config[Y]=G,Sn[Y]!==void 0?Sn[Y].forEach(function(oe){return oe()}):Dr.indexOf(Y)>-1&&(t.config[Y]=Ar(G));t.redraw(),nn(!0)}function Pn(Y,G){var te=[];if(Y instanceof Array)te=Y.map(function(oe){return t.parseDate(oe,G)});else if(Y instanceof Date||typeof Y=="number")te=[t.parseDate(Y,G)];else if(typeof Y=="string")switch(t.config.mode){case"single":case"time":te=[t.parseDate(Y,G)];break;case"multiple":te=Y.split(t.config.conjunction).map(function(oe){return t.parseDate(oe,G)});break;case"range":te=Y.split(t.l10n.rangeSeparator).map(function(oe){return t.parseDate(oe,G)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(Y)));t.selectedDates=t.config.allowInvalidPreload?te:te.filter(function(oe){return oe instanceof Date&&Te(oe,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(oe,Ce){return oe.getTime()-Ce.getTime()})}function ds(Y,G,te){if(G===void 0&&(G=!1),te===void 0&&(te=t.config.dateFormat),Y!==0&&!Y||Y instanceof Array&&Y.length===0)return t.clear(G);Pn(Y,te),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),S(void 0,G),d(),t.selectedDates.length===0&&t.clear(!1),nn(G),G&&Fe("onChange")}function ti(Y){return Y.slice().map(function(G){return typeof G=="string"||typeof G=="number"||G instanceof Date?t.parseDate(G,void 0,!0):G&&typeof G=="object"&&G.from&&G.to?{from:t.parseDate(G.from,void 0),to:t.parseDate(G.to,void 0)}:G}).filter(function(G){return G})}function Ti(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var Y=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);Y&&Pn(Y,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ps(){if(t.input=Le(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=ft(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),pi()}function pi(){t._positionElement=t.config.positionElement||t._input}function ve(){var Y=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=ft("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=Y,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=Y==="datetime-local"?"Y-m-d\\TH:i:S":Y==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}h(t.mobileInput,"change",function(G){t.setDate(Tn(G).value,!1,t.mobileFormatStr),Fe("onChange"),Fe("onClose")})}function De(Y){if(t.isOpen===!0)return t.close();t.open(Y)}function Fe(Y,G){if(t.config!==void 0){var te=t.config[Y];if(te!==void 0&&te.length>0)for(var oe=0;te[oe]&&oe=0&&Mn(Y,t.selectedDates[1])<=0}function Nn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(Y,G){var te=new Date(t.currentYear,t.currentMonth,1);te.setMonth(t.currentMonth+G),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[G].textContent=Fo(te.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=te.getMonth().toString(),Y.value=te.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Bi(Y){var G=Y||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(te){return t.formatDate(te,G)}).filter(function(te,oe,Ce){return t.config.mode!=="range"||t.config.enableTime||Ce.indexOf(te)===oe}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function nn(Y){Y===void 0&&(Y=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Bi(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Bi(t.config.altFormat)),Y!==!1&&Fe("onValueUpdate")}function cn(Y){var G=Tn(Y),te=t.prevMonthNav.contains(G),oe=t.nextMonthNav.contains(G);te||oe?ne(te?-1:1):t.yearElements.indexOf(G)>=0?G.select():G.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):G.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Rl(Y){Y.preventDefault();var G=Y.type==="keydown",te=Tn(Y),oe=te;t.amPM!==void 0&&te===t.amPM&&(t.amPM.textContent=t.l10n.amPM[jn(t.amPM.textContent===t.l10n.amPM[0])]);var Ce=parseFloat(oe.getAttribute("min")),Ie=parseFloat(oe.getAttribute("max")),Pe=parseFloat(oe.getAttribute("step")),Oe=parseInt(oe.value,10),Ke=Y.delta||(G?Y.which===38?1:-1:0),Re=Oe+Pe*Ke;if(typeof oe.value<"u"&&oe.value.length===2){var We=oe===t.hourElement,vt=oe===t.minuteElement;ReIe&&(Re=oe===t.hourElement?Re-Ie-jn(!t.amPM):Ce,vt&&$(void 0,1,t.hourElement)),t.amPM&&We&&(Pe===1?Re+Oe===23:Math.abs(Re-Oe)>Pe)&&(t.amPM.textContent=t.l10n.amPM[jn(t.amPM.textContent===t.l10n.amPM[0])]),oe.value=_n(Re)}}return s(),t}function Ms(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function ZC(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=xe(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:u="",element:f=void 0,dateFormat:c=void 0}=e,{options:d={}}=e,m=!1,{input:_=void 0,flatpickr:h=void 0}=e;Gt(()=>{const $=f??_,T=y(d);return T.onReady.push((M,O,D)=>{a===void 0&&S(M,O,D),fn().then(()=>{t(8,m=!0)})}),t(3,h=Yt($,Object.assign(T,f?{wrap:!0}:{}))),()=>{h.destroy()}});const b=$t();function y($={}){$=Object.assign({},$);for(const T of r){const M=(O,D,L)=>{b(JC(T),[O,D,L])};T in $?(Array.isArray($[T])||($[T]=[$[T]]),$[T].push(M)):$[T]=[M]}return $.onChange&&!$.onChange.includes(S)&&$.onChange.push(S),$}function S($,T,M){const O=ld(M,$);!od(a,O)&&(a||O)&&t(2,a=O),t(4,u=T)}function C($){ee[$?"unshift":"push"](()=>{_=$,t(0,_)})}return n.$$set=$=>{e=qe(qe({},e),Zt($)),t(1,s=xe(e,i)),"value"in $&&t(2,a=$.value),"formattedValue"in $&&t(4,u=$.formattedValue),"element"in $&&t(5,f=$.element),"dateFormat"in $&&t(6,c=$.dateFormat),"options"in $&&t(7,d=$.options),"input"in $&&t(0,_=$.input),"flatpickr"in $&&t(3,h=$.flatpickr),"$$scope"in $&&t(9,o=$.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&h&&m&&(od(a,ld(h,h.selectedDates))||h.setDate(a,!0,c)),n.$$.dirty&392&&h&&m)for(const[$,T]of Object.entries(y(d)))h.set($,T)},[_,s,a,h,u,f,c,d,m,o,l,C]}class uu extends ge{constructor(e){super(),_e(this,e,ZC,KC,me,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function GC(n){let e,t,i,s,l,o,r,a;function u(d){n[6](d)}function f(d){n[7](d)}let c={id:n[15],options:B.defaultFlatpickrOptions()};return n[2]!==void 0&&(c.value=n[2]),n[0].options.min!==void 0&&(c.formattedValue=n[0].options.min),l=new uu({props:c}),ee.push(()=>de(l,"value",u)),ee.push(()=>de(l,"formattedValue",f)),l.$on("close",n[8]),{c(){e=v("label"),t=U("Min date (UTC)"),s=E(),z(l.$$.fragment),p(e,"for",i=n[15])},m(d,m){w(d,e,m),g(e,t),w(d,s,m),j(l,d,m),a=!0},p(d,m){(!a||m&32768&&i!==(i=d[15]))&&p(e,"for",i);const _={};m&32768&&(_.id=d[15]),!o&&m&4&&(o=!0,_.value=d[2],he(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=d[0].options.min,he(()=>r=!1)),l.$set(_)},i(d){a||(A(l.$$.fragment,d),a=!0)},o(d){I(l.$$.fragment,d),a=!1},d(d){d&&k(e),d&&k(s),V(l,d)}}}function XC(n){let e,t,i,s,l,o,r,a;function u(d){n[9](d)}function f(d){n[10](d)}let c={id:n[15],options:B.defaultFlatpickrOptions()};return n[3]!==void 0&&(c.value=n[3]),n[0].options.max!==void 0&&(c.formattedValue=n[0].options.max),l=new uu({props:c}),ee.push(()=>de(l,"value",u)),ee.push(()=>de(l,"formattedValue",f)),l.$on("close",n[11]),{c(){e=v("label"),t=U("Max date (UTC)"),s=E(),z(l.$$.fragment),p(e,"for",i=n[15])},m(d,m){w(d,e,m),g(e,t),w(d,s,m),j(l,d,m),a=!0},p(d,m){(!a||m&32768&&i!==(i=d[15]))&&p(e,"for",i);const _={};m&32768&&(_.id=d[15]),!o&&m&8&&(o=!0,_.value=d[3],he(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=d[0].options.max,he(()=>r=!1)),l.$set(_)},i(d){a||(A(l.$$.fragment,d),a=!0)},o(d){I(l.$$.fragment,d),a=!1},d(d){d&&k(e),d&&k(s),V(l,d)}}}function QC(n){let e,t,i,s,l,o,r;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[GC,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[XC,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&98309&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&98313&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&k(e),V(i),V(o)}}}function xC(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[12](r)}let o={$$slots:{options:[QC]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[13]),e.$on("remove",n[14]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Xt(r[5])]):{};a&65551&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function eT(n,e,t){var C,$;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e,r=(C=l==null?void 0:l.options)==null?void 0:C.min,a=($=l==null?void 0:l.options)==null?void 0:$.max;function u(T,M){T.detail&&T.detail.length==3&&t(0,l.options[M]=T.detail[1],l)}function f(T){r=T,t(2,r),t(0,l)}function c(T){n.$$.not_equal(l.options.min,T)&&(l.options.min=T,t(0,l))}const d=T=>u(T,"min");function m(T){a=T,t(3,a),t(0,l)}function _(T){n.$$.not_equal(l.options.max,T)&&(l.options.max=T,t(0,l))}const h=T=>u(T,"max");function b(T){l=T,t(0,l)}function y(T){Ne.call(this,n,T)}function S(T){Ne.call(this,n,T)}return n.$$set=T=>{e=qe(qe({},e),Zt(T)),t(5,s=xe(e,i)),"field"in T&&t(0,l=T.field),"key"in T&&t(1,o=T.key)},n.$$.update=()=>{var T,M,O,D;n.$$.dirty&5&&r!=((T=l==null?void 0:l.options)==null?void 0:T.min)&&t(2,r=(M=l==null?void 0:l.options)==null?void 0:M.min),n.$$.dirty&9&&a!=((O=l==null?void 0:l.options)==null?void 0:O.max)&&t(3,a=(D=l==null?void 0:l.options)==null?void 0:D.max)},[l,o,r,a,u,s,f,c,d,m,_,h,b,y,S]}class tT extends ge{constructor(e){super(),_e(this,e,eT,xC,me,{field:0,key:1})}}const nT=n=>({}),rd=n=>({});function ad(n,e,t){const i=n.slice();return i[47]=e[t],i}const iT=n=>({}),ud=n=>({});function fd(n,e,t){const i=n.slice();return i[47]=e[t],i[51]=t,i}function cd(n){let e,t,i;return{c(){e=v("div"),t=U(n[2]),i=E(),p(e,"class","block txt-placeholder"),Q(e,"link-hint",!n[5]&&!n[6])},m(s,l){w(s,e,l),g(e,t),g(e,i)},p(s,l){l[0]&4&&se(t,s[2]),l[0]&96&&Q(e,"link-hint",!s[5]&&!s[6])},d(s){s&&k(e)}}}function sT(n){let e,t=n[47]+"",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt")},m(s,l){w(s,e,l),g(e,i)},p(s,l){l[0]&1&&t!==(t=s[47]+"")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function lT(n){let e,t,i;const s=[{item:n[47]},n[10]];var l=n[9];function o(r){let a={};for(let u=0;u{V(f,1)}),ue()}l?(e=Ft(l,o()),z(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function dd(n){let e,t,i;function s(){return n[35](n[47])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){w(l,e,o),t||(i=[Me(He.call(null,e,"Clear")),K(e,"click",An(et(s)))],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Ee(i)}}}function pd(n){let e,t,i,s,l,o;const r=[lT,sT],a=[];function u(c,d){return c[9]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[7])&&dd(n);return{c(){e=v("div"),i.c(),s=E(),f&&f.c(),l=E(),p(e,"class","option")},m(c,d){w(c,e,d),a[t].m(e,null),g(e,s),f&&f.m(e,null),g(e,l),o=!0},p(c,d){let m=t;t=u(c),t===m?a[t].p(c,d):(ae(),I(a[m],1,1,()=>{a[m]=null}),ue(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[7]?f?f.p(c,d):(f=dd(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(A(i),o=!0)},o(c){I(i),o=!1},d(c){c&&k(e),a[t].d(),f&&f.d()}}}function md(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[19],$$slots:{default:[aT]},$$scope:{ctx:n}};return e=new Kn({props:i}),n[40](e),e.$on("show",n[25]),e.$on("hide",n[41]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&524288&&(o.trigger=s[19]),l[0]&3225866|l[1]&4096&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[40](null),V(e,s)}}}function hd(n){let e,t,i,s,l,o,r,a,u=n[16].length&&_d(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=E(),l=v("input"),o=E(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){w(f,e,c),g(e,t),g(t,i),g(t,s),g(t,l),re(l,n[16]),g(t,o),u&&u.m(t,null),l.focus(),r||(a=K(l,"input",n[37]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&65536&&l.value!==f[16]&&re(l,f[16]),f[16].length?u?u.p(f,c):(u=_d(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&k(e),u&&u.d(),r=!1,a()}}}function _d(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent clear"),p(e,"class","addon suffix p-r-5")},m(l,o){w(l,e,o),g(e,t),i||(s=K(t,"click",An(et(n[22]))),i=!0)},p:x,d(l){l&&k(e),i=!1,s()}}}function gd(n){let e,t=n[1]&&bd(n);return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=bd(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function bd(n){let e,t;return{c(){e=v("div"),t=U(n[1]),p(e,"class","txt-missing")},m(i,s){w(i,e,s),g(e,t)},p(i,s){s[0]&2&&se(t,i[1])},d(i){i&&k(e)}}}function oT(n){let e=n[47]+"",t;return{c(){t=U(e)},m(i,s){w(i,t,s)},p(i,s){s[0]&2097152&&e!==(e=i[47]+"")&&se(t,e)},i:x,o:x,d(i){i&&k(t)}}}function rT(n){let e,t,i;const s=[{item:n[47]},n[12]];var l=n[11];function o(r){let a={};for(let u=0;u{V(f,1)}),ue()}l?(e=Ft(l,o()),z(e.$$.fragment),A(e.$$.fragment,1),j(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&V(e,r)}}}function vd(n){let e,t,i,s,l,o,r;const a=[rT,oT],u=[];function f(m,_){return m[11]?0:1}t=f(n),i=u[t]=a[t](n);function c(...m){return n[38](n[47],...m)}function d(...m){return n[39](n[47],...m)}return{c(){e=v("div"),i.c(),s=E(),p(e,"tabindex","0"),p(e,"class","dropdown-item option"),Q(e,"closable",n[8]),Q(e,"selected",n[20](n[47]))},m(m,_){w(m,e,_),u[t].m(e,null),g(e,s),l=!0,o||(r=[K(e,"click",c),K(e,"keydown",d)],o=!0)},p(m,_){n=m;let h=t;t=f(n),t===h?u[t].p(n,_):(ae(),I(u[h],1,1,()=>{u[h]=null}),ue(),i=u[t],i?i.p(n,_):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||_[0]&256)&&Q(e,"closable",n[8]),(!l||_[0]&3145728)&&Q(e,"selected",n[20](n[47]))},i(m){l||(A(i),l=!0)},o(m){I(i),l=!1},d(m){m&&k(e),u[t].d(),o=!1,Ee(r)}}}function aT(n){let e,t,i,s,l,o=n[13]&&hd(n);const r=n[34].beforeOptions,a=yt(r,n,n[43],ud);let u=n[21],f=[];for(let h=0;hI(f[h],1,1,()=>{f[h]=null});let d=null;u.length||(d=gd(n));const m=n[34].afterOptions,_=yt(m,n,n[43],rd);return{c(){o&&o.c(),e=E(),a&&a.c(),t=E(),i=v("div");for(let h=0;hI(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=cd(n));let c=!n[5]&&!n[6]&&md(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),ue()),(!o||m[0]&16384&&l!==(l="select "+d[14]))&&p(e,"class",l),(!o||m[0]&16400)&&Q(e,"multiple",d[4]),(!o||m[0]&16416)&&Q(e,"disabled",d[5]),(!o||m[0]&16448)&&Q(e,"readonly",d[6])},i(d){if(!o){for(let m=0;mDt(Le,ze))||[]}function ie(fe,ze){fe.preventDefault(),b&&d?H(ze):q(ze)}function be(fe,ze){(fe.code==="Enter"||fe.code==="Space")&&(ie(fe,ze),y&&J())}function Se(){le(),setTimeout(()=>{const fe=N==null?void 0:N.querySelector(".dropdown-item.option.selected");fe&&(fe.focus(),fe.scrollIntoView({block:"nearest"}))},0)}function Ve(fe){fe.stopPropagation(),!_&&!m&&(L==null||L.toggle())}Gt(()=>{const fe=document.querySelectorAll(`label[for="${r}"]`);for(const ze of fe)ze.addEventListener("click",Ve);return()=>{for(const ze of fe)ze.removeEventListener("click",Ve)}});const Be=fe=>R(fe);function ke(fe){ee[fe?"unshift":"push"](()=>{F=fe,t(19,F)})}function Te(){P=this.value,t(16,P)}const Ze=(fe,ze)=>ie(ze,fe),ht=(fe,ze)=>be(ze,fe);function Ge(fe){ee[fe?"unshift":"push"](()=>{L=fe,t(17,L)})}function Ye(fe){Ne.call(this,n,fe)}function we(fe){ee[fe?"unshift":"push"](()=>{N=fe,t(18,N)})}return n.$$set=fe=>{"id"in fe&&t(26,r=fe.id),"noOptionsText"in fe&&t(1,a=fe.noOptionsText),"selectPlaceholder"in fe&&t(2,u=fe.selectPlaceholder),"searchPlaceholder"in fe&&t(3,f=fe.searchPlaceholder),"items"in fe&&t(27,c=fe.items),"multiple"in fe&&t(4,d=fe.multiple),"disabled"in fe&&t(5,m=fe.disabled),"readonly"in fe&&t(6,_=fe.readonly),"selected"in fe&&t(0,h=fe.selected),"toggle"in fe&&t(7,b=fe.toggle),"closable"in fe&&t(8,y=fe.closable),"labelComponent"in fe&&t(9,S=fe.labelComponent),"labelComponentProps"in fe&&t(10,C=fe.labelComponentProps),"optionComponent"in fe&&t(11,$=fe.optionComponent),"optionComponentProps"in fe&&t(12,T=fe.optionComponentProps),"searchable"in fe&&t(13,M=fe.searchable),"searchFunc"in fe&&t(28,O=fe.searchFunc),"class"in fe&&t(14,D=fe.class),"$$scope"in fe&&t(43,o=fe.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&134217728&&c&&(Z(),le()),n.$$.dirty[0]&134283264&&t(21,i=ne(c,P)),n.$$.dirty[0]&1&&t(20,s=function(fe){const ze=B.toArray(h);return B.inArray(ze,fe)})},[h,a,u,f,d,m,_,b,y,S,C,$,T,M,D,R,P,L,N,F,s,i,le,ie,be,Se,r,c,O,q,H,W,X,J,l,Be,ke,Te,Ze,ht,Ge,Ye,we,o]}class fu extends ge{constructor(e){super(),_e(this,e,cT,uT,me,{id:26,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:27,multiple:4,disabled:5,readonly:6,selected:0,toggle:7,closable:8,labelComponent:9,labelComponentProps:10,optionComponent:11,optionComponentProps:12,searchable:13,searchFunc:28,class:14,deselectItem:15,selectItem:29,toggleItem:30,reset:31,showDropdown:32,hideDropdown:33},null,[-1,-1])}get deselectItem(){return this.$$.ctx[15]}get selectItem(){return this.$$.ctx[29]}get toggleItem(){return this.$$.ctx[30]}get reset(){return this.$$.ctx[31]}get showDropdown(){return this.$$.ctx[32]}get hideDropdown(){return this.$$.ctx[33]}}function yd(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&k(e)}}}function dT(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&yd(n);return{c(){l&&l.c(),e=E(),t=v("span"),s=U(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),w(o,e,r),w(o,t,r),g(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=yd(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&se(s,i)},i:x,o:x,d(o){l&&l.d(o),o&&k(e),o&&k(t)}}}function pT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class kd extends ge{constructor(e){super(),_e(this,e,pT,dT,me,{item:0})}}const mT=n=>({}),wd=n=>({});function hT(n){let e;const t=n[8].afterOptions,i=yt(t,n,n[12],wd);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&wt(i,t,s,s[12],e?kt(t,s[12],l,mT):St(s[12]),wd)},i(s){e||(A(i,s),e=!0)},o(s){I(i,s),e=!1},d(s){i&&i.d(s)}}}function _T(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[hT]},$$scope:{ctx:n}};for(let r=0;rde(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&62?Mt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Xt(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function gT(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=xe(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=kd}=e,{optionComponent:c=kd}=e,{selectionKey:d="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function _(C){C=B.toArray(C,!0);let $=[];for(let T of C){const M=B.findByKey(r,d,T);M&&$.push(M)}C.length&&!$.length||t(0,u=a?$:$[0])}async function h(C){let $=B.toArray(C,!0).map(T=>T[d]);r.length&&t(6,m=a?$:$[0])}function b(C){u=C,t(0,u)}function y(C){Ne.call(this,n,C)}function S(C){Ne.call(this,n,C)}return n.$$set=C=>{e=qe(qe({},e),Zt(C)),t(5,s=xe(e,i)),"items"in C&&t(1,r=C.items),"multiple"in C&&t(2,a=C.multiple),"selected"in C&&t(0,u=C.selected),"labelComponent"in C&&t(3,f=C.labelComponent),"optionComponent"in C&&t(4,c=C.optionComponent),"selectionKey"in C&&t(7,d=C.selectionKey),"keyOfSelected"in C&&t(6,m=C.keyOfSelected),"$$scope"in C&&t(12,o=C.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&_(m),n.$$.dirty&1&&h(u)},[u,r,a,f,c,s,m,d,l,b,y,S,o]}class Hi extends ge{constructor(e){super(),_e(this,e,gT,_T,me,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function bT(n){let e,t,i,s,l,o;function r(u){n[7](u)}let a={id:n[13],placeholder:"Choices: eg. optionA, optionB",required:!0,readonly:!n[14]};return n[0].options.values!==void 0&&(a.value=n[0].options.values),t=new Vs({props:a}),ee.push(()=>de(t,"value",r)),{c(){e=v("div"),z(t.$$.fragment)},m(u,f){w(u,e,f),j(t,e,null),s=!0,l||(o=Me(He.call(null,e,{text:"Choices (comma separated)",position:"top-left",delay:700})),l=!0)},p(u,f){const c={};f&8192&&(c.id=u[13]),f&16384&&(c.readonly=!u[14]),!i&&f&1&&(i=!0,c.value=u[0].options.values,he(()=>i=!1)),t.$set(c)},i(u){s||(A(t.$$.fragment,u),s=!0)},o(u){I(t.$$.fragment,u),s=!1},d(u){u&&k(e),V(t),l=!1,o()}}}function vT(n){let e,t,i;function s(o){n[8](o)}let l={id:n[13],items:n[3],readonly:!n[14]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Hi({props:l}),ee.push(()=>de(e,"keyOfSelected",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&8192&&(a.id=o[13]),r&16384&&(a.readonly=!o[14]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function yT(n){let e,t,i,s,l,o,r,a,u,f;return i=new pe({props:{class:"form-field required "+(n[14]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.values",$$slots:{default:[bT,({uniqueId:c})=>({13:c}),({uniqueId:c})=>c?8192:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field form-field-single-multiple-select "+(n[14]?"":"readonly"),inlineError:!0,$$slots:{default:[vT,({uniqueId:c})=>({13:c}),({uniqueId:c})=>c?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),z(i.$$.fragment),s=E(),l=v("div"),o=E(),z(r.$$.fragment),a=E(),u=v("div"),p(e,"class","separator"),p(l,"class","separator"),p(u,"class","separator")},m(c,d){w(c,e,d),w(c,t,d),j(i,c,d),w(c,s,d),w(c,l,d),w(c,o,d),j(r,c,d),w(c,a,d),w(c,u,d),f=!0},p(c,d){const m={};d&16384&&(m.class="form-field required "+(c[14]?"":"readonly")),d&2&&(m.name="schema."+c[1]+".options.values"),d&57345&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const _={};d&16384&&(_.class="form-field form-field-single-multiple-select "+(c[14]?"":"readonly")),d&57348&&(_.$$scope={dirty:d,ctx:c}),r.$set(_)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),f=!0)},o(c){I(i.$$.fragment,c),I(r.$$.fragment,c),f=!1},d(c){c&&k(e),c&&k(t),V(i,c),c&&k(s),c&&k(l),c&&k(o),V(r,c),c&&k(a),c&&k(u)}}}function Sd(n){let e,t;return e=new pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[kT,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.maxSelect"),s&40961&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function kT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=E(),l=v("input"),p(e,"for",i=n[13]),p(l,"id",o=n[13]),p(l,"type","number"),p(l,"step","1"),p(l,"min","2"),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.maxSelect),r||(a=K(l,"input",n[6]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&p(e,"for",i),f&8192&&o!==(o=u[13])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.maxSelect&&re(l,u[0].options.maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function wT(n){let e,t,i=!n[2]&&Sd(n);return{c(){i&&i.c(),e=ye()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,l){s[2]?i&&(ae(),I(i,1,1,()=>{i=null}),ue()):i?(i.p(s,l),l&4&&A(i,1)):(i=Sd(s),i.c(),A(i,1),i.m(e.parentNode,e))},i(s){t||(A(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function ST(n){let e,t,i;const s=[{key:n[1]},n[4]];function l(r){n[9](r)}let o={$$slots:{options:[wT],default:[yT,({interactive:r})=>({14:r}),({interactive:r})=>r?16384:0]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[10]),e.$on("remove",n[11]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&18?Mt(s,[a&2&&{key:r[1]},a&16&&Xt(r[4])]):{};a&49159&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function $T(n,e,t){var y;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=((y=l.options)==null?void 0:y.maxSelect)<=1,u=a;function f(){t(0,l.options={maxSelect:1,values:[]},l),t(2,a=!0),t(5,u=a)}function c(){l.options.maxSelect=dt(this.value),t(0,l),t(5,u),t(2,a)}function d(S){n.$$.not_equal(l.options.values,S)&&(l.options.values=S,t(0,l),t(5,u),t(2,a))}function m(S){a=S,t(2,a)}function _(S){l=S,t(0,l),t(5,u),t(2,a)}function h(S){Ne.call(this,n,S)}function b(S){Ne.call(this,n,S)}return n.$$set=S=>{e=qe(qe({},e),Zt(S)),t(4,s=xe(e,i)),"field"in S&&t(0,l=S.field),"key"in S&&t(1,o=S.key)},n.$$.update=()=>{var S,C;n.$$.dirty&37&&u!=a&&(t(5,u=a),a?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((C=(S=l.options)==null?void 0:S.values)==null?void 0:C.length)||2,l)),n.$$.dirty&1&&B.isEmpty(l.options)&&f()},[l,o,a,r,s,u,c,d,m,_,h,b]}class CT extends ge{constructor(e){super(),_e(this,e,$T,ST,me,{field:0,key:1})}}function TT(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function MT(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $d(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O='"{"a":1,"b":2}"',D,L,P,N,F,R,q,H,W,X,J,Z,le;return{c(){e=v("div"),t=v("div"),i=v("div"),s=U("In order to support seamlessly both "),l=v("code"),l.textContent="application/json",o=U(` and + `}}function le(){t.calendarContainer.classList.add("hasWeeks");var Y=ft("div","flatpickr-weekwrapper");Y.appendChild(ft("span","flatpickr-weekday",t.l10n.weekAbbreviation));var G=ft("div","flatpickr-weeks");return Y.appendChild(G),{weekWrapper:Y,weekNumbers:G}}function ne(Y,G){G===void 0&&(G=!0);var te=G?Y:Y-t.currentMonth;te<0&&t._hidePrevMonthArrow===!0||te>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=te,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Fe("onYearChange"),R()),F(),Fe("onMonthChange"),Nn())}function ie(Y,G){if(Y===void 0&&(Y=!0),G===void 0&&(G=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,G===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var te=Nr(t.config),oe=te.hours,Ce=te.minutes,Ie=te.seconds;m(oe,Ce,Ie)}t.redraw(),Y&&Fe("onChange")}function be(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Fe("onClose")}function Se(){t.config!==void 0&&Fe("onDestroy");for(var Y=t._handlers.length;Y--;)t._handlers[Y].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var G=t.calendarContainer.parentNode;if(G.lastChild&&G.removeChild(G.lastChild),G.parentNode){for(;G.firstChild;)G.parentNode.insertBefore(G.firstChild,G);G.parentNode.removeChild(G)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(te){try{delete t[te]}catch{}})}function Ve(Y){return t.calendarContainer.contains(Y)}function Be(Y){if(t.isOpen&&!t.config.inline){var G=Tn(Y),te=Ve(G),oe=G===t.input||G===t.altInput||t.element.contains(G)||Y.path&&Y.path.indexOf&&(~Y.path.indexOf(t.input)||~Y.path.indexOf(t.altInput)),Ce=!oe&&!te&&!Ve(Y.relatedTarget),Ie=!t.config.ignoredFocusElements.some(function(Pe){return Pe.contains(G)});Ce&&Ie&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ke(Y){if(!(!Y||t.config.minDate&&Yt.config.maxDate.getFullYear())){var G=Y,te=t.currentYear!==G;t.currentYear=G||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),te&&(t.redraw(),Fe("onYearChange"),R())}}function Te(Y,G){var te;G===void 0&&(G=!0);var oe=t.parseDate(Y,void 0,G);if(t.config.minDate&&oe&&Mn(oe,t.config.minDate,G!==void 0?G:!t.minDateHasTime)<0||t.config.maxDate&&oe&&Mn(oe,t.config.maxDate,G!==void 0?G:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var Ce=!!t.config.enable,Ie=(te=t.config.enable)!==null&&te!==void 0?te:t.config.disable,Pe=0,Oe=void 0;Pe=Oe.from.getTime()&&oe.getTime()<=Oe.to.getTime())return Ce}return!Ce}function Ze(Y){return t.daysContainer!==void 0?Y.className.indexOf("hidden")===-1&&Y.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(Y):!1}function ht(Y){var G=Y.target===t._input,te=t._input.value.trimEnd()!==Bi();G&&te&&!(Y.relatedTarget&&Ve(Y.relatedTarget))&&t.setDate(t._input.value,!0,Y.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Ge(Y){var G=Tn(Y),te=t.config.wrap?n.contains(G):G===t._input,oe=t.config.allowInput,Ce=t.isOpen&&(!oe||!te),Ie=t.config.inline&&te&&!oe;if(Y.keyCode===13&&te){if(oe)return t.setDate(t._input.value,!0,G===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),G.blur();t.open()}else if(Ve(G)||Ce||Ie){var Pe=!!t.timeContainer&&t.timeContainer.contains(G);switch(Y.keyCode){case 13:Pe?(Y.preventDefault(),a(),Ln()):ei(Y);break;case 27:Y.preventDefault(),Ln();break;case 8:case 46:te&&!t.config.allowInput&&(Y.preventDefault(),t.clear());break;case 37:case 39:if(!Pe&&!te){Y.preventDefault();var Oe=l();if(t.daysContainer!==void 0&&(oe===!1||Oe&&Ze(Oe))){var Ke=Y.keyCode===39?1:-1;Y.ctrlKey?(Y.stopPropagation(),ne(Ke),P(D(1),0)):P(void 0,Ke)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:Y.preventDefault();var Re=Y.keyCode===40?1:-1;t.daysContainer&&G.$i!==void 0||G===t.input||G===t.altInput?Y.ctrlKey?(Y.stopPropagation(),ke(t.currentYear-Re),P(D(1),0)):Pe||P(void 0,Re*7):G===t.currentYearElement?ke(t.currentYear-Re):t.config.enableTime&&(!Pe&&t.hourElement&&t.hourElement.focus(),a(Y),t._debouncedChange());break;case 9:if(Pe){var We=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Cn){return Cn}),vt=We.indexOf(G);if(vt!==-1){var ni=We[vt+(Y.shiftKey?-1:1)];Y.preventDefault(),(ni||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(G)&&Y.shiftKey&&(Y.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&G===t.amPM)switch(Y.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),nn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),nn();break}(te||Ve(G))&&Fe("onKeyDown",Y)}function Ye(Y,G){if(G===void 0&&(G="flatpickr-day"),!(t.selectedDates.length!==1||Y&&(!Y.classList.contains(G)||Y.classList.contains("flatpickr-disabled")))){for(var te=Y?Y.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),oe=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Ce=Math.min(te,t.selectedDates[0].getTime()),Ie=Math.max(te,t.selectedDates[0].getTime()),Pe=!1,Oe=0,Ke=0,Re=Ce;ReCe&&ReOe)?Oe=Re:Re>oe&&(!Ke||Re ."+G));We.forEach(function(vt){var ni=vt.dateObj,Cn=ni.getTime(),zs=Oe>0&&Cn0&&Cn>Ke;if(zs){vt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(ms){vt.classList.remove(ms)});return}else if(Pe&&!zs)return;["startRange","inRange","endRange","notAllowed"].forEach(function(ms){vt.classList.remove(ms)}),Y!==void 0&&(Y.classList.add(te<=t.selectedDates[0].getTime()?"startRange":"endRange"),oete&&Cn===oe&&vt.classList.add("endRange"),Cn>=Oe&&(Ke===0||Cn<=Ke)&&BC(Cn,oe,te)&&vt.classList.add("inRange"))})}}function we(){t.isOpen&&!t.config.static&&!t.config.inline&&nt()}function fe(Y,G){if(G===void 0&&(G=t._positionElement),t.isMobile===!0){if(Y){Y.preventDefault();var te=Tn(Y);te&&te.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Fe("onOpen");return}else if(t._input.disabled||t.config.inline)return;var oe=t.isOpen;t.isOpen=!0,oe||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Fe("onOpen"),nt(G)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(Y===void 0||!t.timeContainer.contains(Y.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function ze(Y){return function(G){var te=t.config["_"+Y+"Date"]=t.parseDate(G,t.config.dateFormat),oe=t.config["_"+(Y==="min"?"max":"min")+"Date"];te!==void 0&&(t[Y==="min"?"minDateHasTime":"maxDateHasTime"]=te.getHours()>0||te.getMinutes()>0||te.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Ce){return Te(Ce)}),!t.selectedDates.length&&Y==="min"&&d(te),nn()),t.daysContainer&&(Ut(),te!==void 0?t.currentYearElement[Y]=te.getFullYear().toString():t.currentYearElement.removeAttribute(Y),t.currentYearElement.disabled=!!oe&&te!==void 0&&oe.getFullYear()===te.getFullYear())}}function Dt(){var Y=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],G=rn(rn({},JSON.parse(JSON.stringify(n.dataset||{}))),e),te={};t.config.parseDate=G.parseDate,t.config.formatDate=G.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(We){t.config._enable=ti(We)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(We){t.config._disable=ti(We)}});var oe=G.mode==="time";if(!G.dateFormat&&(G.enableTime||oe)){var Ce=Yt.defaultConfig.dateFormat||Ts.dateFormat;te.dateFormat=G.noCalendar||oe?"H:i"+(G.enableSeconds?":S":""):Ce+" H:i"+(G.enableSeconds?":S":"")}if(G.altInput&&(G.enableTime||oe)&&!G.altFormat){var Ie=Yt.defaultConfig.altFormat||Ts.altFormat;te.altFormat=G.noCalendar||oe?"h:i"+(G.enableSeconds?":S K":" K"):Ie+(" h:i"+(G.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:ze("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:ze("max")});var Pe=function(We){return function(vt){t.config[We==="min"?"_minTime":"_maxTime"]=t.parseDate(vt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Pe("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Pe("max")}),G.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,te,G);for(var Oe=0;Oe-1?t.config[Re]=Ir(Ke[Re]).map(o).concat(t.config[Re]):typeof G[Re]>"u"&&(t.config[Re]=Ke[Re])}G.altInputClass||(t.config.altInputClass=Le().className+" "+t.config.altInputClass),Fe("onParseConfig")}function Le(){return t.config.wrap?n.querySelector("[data-input]"):n}function $e(){typeof t.config.locale!="object"&&typeof Yt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=rn(rn({},Yt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Yt.l10ns[t.config.locale]:void 0),xi.D="("+t.l10n.weekdays.shorthand.join("|")+")",xi.l="("+t.l10n.weekdays.longhand.join("|")+")",xi.M="("+t.l10n.months.shorthand.join("|")+")",xi.F="("+t.l10n.months.longhand.join("|")+")",xi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var Y=rn(rn({},e),JSON.parse(JSON.stringify(n.dataset||{})));Y.time_24hr===void 0&&Yt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=$1(t),t.parseDate=ba({config:t.config,l10n:t.l10n})}function nt(Y){if(typeof t.config.position=="function")return void t.config.position(t,Y);if(t.calendarContainer!==void 0){Fe("onPreCalendarPosition");var G=Y||t._positionElement,te=Array.prototype.reduce.call(t.calendarContainer.children,function(q1,j1){return q1+j1.offsetHeight},0),oe=t.calendarContainer.offsetWidth,Ce=t.config.position.split(" "),Ie=Ce[0],Pe=Ce.length>1?Ce[1]:null,Oe=G.getBoundingClientRect(),Ke=window.innerHeight-Oe.bottom,Re=Ie==="above"||Ie!=="below"&&Kete,We=window.pageYOffset+Oe.top+(Re?-te-2:G.offsetHeight+2);if(dn(t.calendarContainer,"arrowTop",!Re),dn(t.calendarContainer,"arrowBottom",Re),!t.config.inline){var vt=window.pageXOffset+Oe.left,ni=!1,Cn=!1;Pe==="center"?(vt-=(oe-Oe.width)/2,ni=!0):Pe==="right"&&(vt-=oe-Oe.width,Cn=!0),dn(t.calendarContainer,"arrowLeft",!ni&&!Cn),dn(t.calendarContainer,"arrowCenter",ni),dn(t.calendarContainer,"arrowRight",Cn);var zs=window.document.body.offsetWidth-(window.pageXOffset+Oe.right),ms=vt+oe>window.document.body.offsetWidth,A1=zs+oe>window.document.body.offsetWidth;if(dn(t.calendarContainer,"rightMost",ms),!t.config.static)if(t.calendarContainer.style.top=We+"px",!ms)t.calendarContainer.style.left=vt+"px",t.calendarContainer.style.right="auto";else if(!A1)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=zs+"px";else{var sr=At();if(sr===void 0)return;var I1=window.document.body.offsetWidth,L1=Math.max(0,I1/2-oe/2),P1=".flatpickr-calendar.centerMost:before",N1=".flatpickr-calendar.centerMost:after",F1=sr.cssRules.length,R1="{left:"+Oe.left+"px;right:auto;}";dn(t.calendarContainer,"rightMost",!1),dn(t.calendarContainer,"centerMost",!0),sr.insertRule(P1+","+N1+R1,F1),t.calendarContainer.style.left=L1+"px",t.calendarContainer.style.right="auto"}}}}function At(){for(var Y=null,G=0;Gt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=oe,t.config.mode==="single")t.selectedDates=[Ce];else if(t.config.mode==="multiple"){var Pe=Ot(Ce);Pe?t.selectedDates.splice(parseInt(Pe),1):t.selectedDates.push(Ce)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Ce,t.selectedDates.push(Ce),Mn(Ce,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(We,vt){return We.getTime()-vt.getTime()}));if(c(),Ie){var Oe=t.currentYear!==Ce.getFullYear();t.currentYear=Ce.getFullYear(),t.currentMonth=Ce.getMonth(),Oe&&(Fe("onYearChange"),R()),Fe("onMonthChange")}if(Nn(),F(),nn(),!Ie&&t.config.mode!=="range"&&t.config.showMonths===1?O(oe):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ke=t.config.mode==="single"&&!t.config.enableTime,Re=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ke||Re)&&Ln()}b()}}var Sn={locale:[$e,Z],showMonths:[j,r,K],minDate:[S],maxDate:[S],positionElement:[pi],clickOpens:[function(){t.config.clickOpens===!0?(h(t._input,"focus",t.open),h(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function _t(Y,G){if(Y!==null&&typeof Y=="object"){Object.assign(t.config,Y);for(var te in Y)Sn[te]!==void 0&&Sn[te].forEach(function(oe){return oe()})}else t.config[Y]=G,Sn[Y]!==void 0?Sn[Y].forEach(function(oe){return oe()}):Ar.indexOf(Y)>-1&&(t.config[Y]=Ir(G));t.redraw(),nn(!0)}function Pn(Y,G){var te=[];if(Y instanceof Array)te=Y.map(function(oe){return t.parseDate(oe,G)});else if(Y instanceof Date||typeof Y=="number")te=[t.parseDate(Y,G)];else if(typeof Y=="string")switch(t.config.mode){case"single":case"time":te=[t.parseDate(Y,G)];break;case"multiple":te=Y.split(t.config.conjunction).map(function(oe){return t.parseDate(oe,G)});break;case"range":te=Y.split(t.l10n.rangeSeparator).map(function(oe){return t.parseDate(oe,G)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(Y)));t.selectedDates=t.config.allowInvalidPreload?te:te.filter(function(oe){return oe instanceof Date&&Te(oe,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(oe,Ce){return oe.getTime()-Ce.getTime()})}function ds(Y,G,te){if(G===void 0&&(G=!1),te===void 0&&(te=t.config.dateFormat),Y!==0&&!Y||Y instanceof Array&&Y.length===0)return t.clear(G);Pn(Y,te),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),S(void 0,G),d(),t.selectedDates.length===0&&t.clear(!1),nn(G),G&&Fe("onChange")}function ti(Y){return Y.slice().map(function(G){return typeof G=="string"||typeof G=="number"||G instanceof Date?t.parseDate(G,void 0,!0):G&&typeof G=="object"&&G.from&&G.to?{from:t.parseDate(G.from,void 0),to:t.parseDate(G.to,void 0)}:G}).filter(function(G){return G})}function Ti(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var Y=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);Y&&Pn(Y,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ps(){if(t.input=Le(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=ft(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),pi()}function pi(){t._positionElement=t.config.positionElement||t._input}function ve(){var Y=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=ft("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=Y,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=Y==="datetime-local"?"Y-m-d\\TH:i:S":Y==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}h(t.mobileInput,"change",function(G){t.setDate(Tn(G).value,!1,t.mobileFormatStr),Fe("onChange"),Fe("onClose")})}function De(Y){if(t.isOpen===!0)return t.close();t.open(Y)}function Fe(Y,G){if(t.config!==void 0){var te=t.config[Y];if(te!==void 0&&te.length>0)for(var oe=0;te[oe]&&oe=0&&Mn(Y,t.selectedDates[1])<=0}function Nn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(Y,G){var te=new Date(t.currentYear,t.currentMonth,1);te.setMonth(t.currentMonth+G),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[G].textContent=Ro(te.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=te.getMonth().toString(),Y.value=te.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Bi(Y){var G=Y||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(te){return t.formatDate(te,G)}).filter(function(te,oe,Ce){return t.config.mode!=="range"||t.config.enableTime||Ce.indexOf(te)===oe}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function nn(Y){Y===void 0&&(Y=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Bi(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Bi(t.config.altFormat)),Y!==!1&&Fe("onValueUpdate")}function cn(Y){var G=Tn(Y),te=t.prevMonthNav.contains(G),oe=t.nextMonthNav.contains(G);te||oe?ne(te?-1:1):t.yearElements.indexOf(G)>=0?G.select():G.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):G.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Rl(Y){Y.preventDefault();var G=Y.type==="keydown",te=Tn(Y),oe=te;t.amPM!==void 0&&te===t.amPM&&(t.amPM.textContent=t.l10n.amPM[jn(t.amPM.textContent===t.l10n.amPM[0])]);var Ce=parseFloat(oe.getAttribute("min")),Ie=parseFloat(oe.getAttribute("max")),Pe=parseFloat(oe.getAttribute("step")),Oe=parseInt(oe.value,10),Ke=Y.delta||(G?Y.which===38?1:-1:0),Re=Oe+Pe*Ke;if(typeof oe.value<"u"&&oe.value.length===2){var We=oe===t.hourElement,vt=oe===t.minuteElement;ReIe&&(Re=oe===t.hourElement?Re-Ie-jn(!t.amPM):Ce,vt&&$(void 0,1,t.hourElement)),t.amPM&&We&&(Pe===1?Re+Oe===23:Math.abs(Re-Oe)>Pe)&&(t.amPM.textContent=t.l10n.amPM[jn(t.amPM.textContent===t.l10n.amPM[0])]),oe.value=_n(Re)}}return s(),t}function Ms(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;st===e[i]))}function XC(n,e,t){const i=["value","formattedValue","element","dateFormat","options","input","flatpickr"];let s=xe(e,i),{$$slots:l={},$$scope:o}=e;const r=new Set(["onChange","onOpen","onClose","onMonthChange","onYearChange","onReady","onValueUpdate","onDayCreate"]);let{value:a=void 0,formattedValue:u="",element:f=void 0,dateFormat:c=void 0}=e,{options:d={}}=e,m=!1,{input:_=void 0,flatpickr:h=void 0}=e;Gt(()=>{const $=f??_,T=y(d);return T.onReady.push((M,O,D)=>{a===void 0&&S(M,O,D),fn().then(()=>{t(8,m=!0)})}),t(3,h=Yt($,Object.assign(T,f?{wrap:!0}:{}))),()=>{h.destroy()}});const b=$t();function y($={}){$=Object.assign({},$);for(const T of r){const M=(O,D,L)=>{b(GC(T),[O,D,L])};T in $?(Array.isArray($[T])||($[T]=[$[T]]),$[T].push(M)):$[T]=[M]}return $.onChange&&!$.onChange.includes(S)&&$.onChange.push(S),$}function S($,T,M){const O=ld(M,$);!od(a,O)&&(a||O)&&t(2,a=O),t(4,u=T)}function C($){ee[$?"unshift":"push"](()=>{_=$,t(0,_)})}return n.$$set=$=>{e=qe(qe({},e),Zt($)),t(1,s=xe(e,i)),"value"in $&&t(2,a=$.value),"formattedValue"in $&&t(4,u=$.formattedValue),"element"in $&&t(5,f=$.element),"dateFormat"in $&&t(6,c=$.dateFormat),"options"in $&&t(7,d=$.options),"input"in $&&t(0,_=$.input),"flatpickr"in $&&t(3,h=$.flatpickr),"$$scope"in $&&t(9,o=$.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&h&&m&&(od(a,ld(h,h.selectedDates))||h.setDate(a,!0,c)),n.$$.dirty&392&&h&&m)for(const[$,T]of Object.entries(y(d)))h.set($,T)},[_,s,a,h,u,f,c,d,m,o,l,C]}class uu extends ge{constructor(e){super(),_e(this,e,XC,ZC,me,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function QC(n){let e,t,i,s,l,o,r,a;function u(d){n[6](d)}function f(d){n[7](d)}let c={id:n[15],options:B.defaultFlatpickrOptions()};return n[2]!==void 0&&(c.value=n[2]),n[0].options.min!==void 0&&(c.formattedValue=n[0].options.min),l=new uu({props:c}),ee.push(()=>de(l,"value",u)),ee.push(()=>de(l,"formattedValue",f)),l.$on("close",n[8]),{c(){e=v("label"),t=U("Min date (UTC)"),s=E(),H(l.$$.fragment),p(e,"for",i=n[15])},m(d,m){w(d,e,m),g(e,t),w(d,s,m),V(l,d,m),a=!0},p(d,m){(!a||m&32768&&i!==(i=d[15]))&&p(e,"for",i);const _={};m&32768&&(_.id=d[15]),!o&&m&4&&(o=!0,_.value=d[2],he(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=d[0].options.min,he(()=>r=!1)),l.$set(_)},i(d){a||(A(l.$$.fragment,d),a=!0)},o(d){I(l.$$.fragment,d),a=!1},d(d){d&&k(e),d&&k(s),z(l,d)}}}function xC(n){let e,t,i,s,l,o,r,a;function u(d){n[9](d)}function f(d){n[10](d)}let c={id:n[15],options:B.defaultFlatpickrOptions()};return n[3]!==void 0&&(c.value=n[3]),n[0].options.max!==void 0&&(c.formattedValue=n[0].options.max),l=new uu({props:c}),ee.push(()=>de(l,"value",u)),ee.push(()=>de(l,"formattedValue",f)),l.$on("close",n[11]),{c(){e=v("label"),t=U("Max date (UTC)"),s=E(),H(l.$$.fragment),p(e,"for",i=n[15])},m(d,m){w(d,e,m),g(e,t),w(d,s,m),V(l,d,m),a=!0},p(d,m){(!a||m&32768&&i!==(i=d[15]))&&p(e,"for",i);const _={};m&32768&&(_.id=d[15]),!o&&m&8&&(o=!0,_.value=d[3],he(()=>o=!1)),!r&&m&1&&(r=!0,_.formattedValue=d[0].options.max,he(()=>r=!1)),l.$set(_)},i(d){a||(A(l.$$.fragment,d),a=!0)},o(d){I(l.$$.fragment,d),a=!1},d(d){d&&k(e),d&&k(s),z(l,d)}}}function eT(n){let e,t,i,s,l,o,r;return i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[QC,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[xC,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(a,u){w(a,e,u),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),r=!0},p(a,u){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&98309&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&98313&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(A(i.$$.fragment,a),A(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&k(e),z(i),z(o)}}}function tT(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[12](r)}let o={$$slots:{options:[eT]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[13]),e.$on("remove",n[14]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Xt(r[5])]):{};a&65551&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function nT(n,e,t){var C,$;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e,r=(C=l==null?void 0:l.options)==null?void 0:C.min,a=($=l==null?void 0:l.options)==null?void 0:$.max;function u(T,M){T.detail&&T.detail.length==3&&t(0,l.options[M]=T.detail[1],l)}function f(T){r=T,t(2,r),t(0,l)}function c(T){n.$$.not_equal(l.options.min,T)&&(l.options.min=T,t(0,l))}const d=T=>u(T,"min");function m(T){a=T,t(3,a),t(0,l)}function _(T){n.$$.not_equal(l.options.max,T)&&(l.options.max=T,t(0,l))}const h=T=>u(T,"max");function b(T){l=T,t(0,l)}function y(T){Ne.call(this,n,T)}function S(T){Ne.call(this,n,T)}return n.$$set=T=>{e=qe(qe({},e),Zt(T)),t(5,s=xe(e,i)),"field"in T&&t(0,l=T.field),"key"in T&&t(1,o=T.key)},n.$$.update=()=>{var T,M,O,D;n.$$.dirty&5&&r!=((T=l==null?void 0:l.options)==null?void 0:T.min)&&t(2,r=(M=l==null?void 0:l.options)==null?void 0:M.min),n.$$.dirty&9&&a!=((O=l==null?void 0:l.options)==null?void 0:O.max)&&t(3,a=(D=l==null?void 0:l.options)==null?void 0:D.max)},[l,o,r,a,u,s,f,c,d,m,_,h,b,y,S]}class iT extends ge{constructor(e){super(),_e(this,e,nT,tT,me,{field:0,key:1})}}const sT=n=>({}),rd=n=>({});function ad(n,e,t){const i=n.slice();return i[47]=e[t],i}const lT=n=>({}),ud=n=>({});function fd(n,e,t){const i=n.slice();return i[47]=e[t],i[51]=t,i}function cd(n){let e,t,i;return{c(){e=v("div"),t=U(n[2]),i=E(),p(e,"class","block txt-placeholder"),Q(e,"link-hint",!n[5]&&!n[6])},m(s,l){w(s,e,l),g(e,t),g(e,i)},p(s,l){l[0]&4&&se(t,s[2]),l[0]&96&&Q(e,"link-hint",!s[5]&&!s[6])},d(s){s&&k(e)}}}function oT(n){let e,t=n[47]+"",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt")},m(s,l){w(s,e,l),g(e,i)},p(s,l){l[0]&1&&t!==(t=s[47]+"")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function rT(n){let e,t,i;const s=[{item:n[47]},n[10]];var l=n[9];function o(r){let a={};for(let u=0;u{z(f,1)}),ue()}l?(e=Rt(l,o()),H(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&z(e,r)}}}function dd(n){let e,t,i;function s(){return n[35](n[47])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){w(l,e,o),t||(i=[Me(He.call(null,e,"Clear")),J(e,"click",An(et(s)))],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Ee(i)}}}function pd(n){let e,t,i,s,l,o;const r=[rT,oT],a=[];function u(c,d){return c[9]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[7])&&dd(n);return{c(){e=v("div"),i.c(),s=E(),f&&f.c(),l=E(),p(e,"class","option")},m(c,d){w(c,e,d),a[t].m(e,null),g(e,s),f&&f.m(e,null),g(e,l),o=!0},p(c,d){let m=t;t=u(c),t===m?a[t].p(c,d):(ae(),I(a[m],1,1,()=>{a[m]=null}),ue(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),A(i,1),i.m(e,s)),c[4]||c[7]?f?f.p(c,d):(f=dd(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(A(i),o=!0)},o(c){I(i),o=!1},d(c){c&&k(e),a[t].d(),f&&f.d()}}}function md(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[19],$$slots:{default:[fT]},$$scope:{ctx:n}};return e=new Kn({props:i}),n[40](e),e.$on("show",n[25]),e.$on("hide",n[41]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&524288&&(o.trigger=s[19]),l[0]&3225866|l[1]&4096&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[40](null),z(e,s)}}}function hd(n){let e,t,i,s,l,o,r,a,u=n[16].length&&_d(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=E(),l=v("input"),o=E(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){w(f,e,c),g(e,t),g(t,i),g(t,s),g(t,l),re(l,n[16]),g(t,o),u&&u.m(t,null),l.focus(),r||(a=J(l,"input",n[37]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&65536&&l.value!==f[16]&&re(l,f[16]),f[16].length?u?u.p(f,c):(u=_d(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&k(e),u&&u.d(),r=!1,a()}}}function _d(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent clear"),p(e,"class","addon suffix p-r-5")},m(l,o){w(l,e,o),g(e,t),i||(s=J(t,"click",An(et(n[22]))),i=!0)},p:x,d(l){l&&k(e),i=!1,s()}}}function gd(n){let e,t=n[1]&&bd(n);return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=bd(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function bd(n){let e,t;return{c(){e=v("div"),t=U(n[1]),p(e,"class","txt-missing")},m(i,s){w(i,e,s),g(e,t)},p(i,s){s[0]&2&&se(t,i[1])},d(i){i&&k(e)}}}function aT(n){let e=n[47]+"",t;return{c(){t=U(e)},m(i,s){w(i,t,s)},p(i,s){s[0]&2097152&&e!==(e=i[47]+"")&&se(t,e)},i:x,o:x,d(i){i&&k(t)}}}function uT(n){let e,t,i;const s=[{item:n[47]},n[12]];var l=n[11];function o(r){let a={};for(let u=0;u{z(f,1)}),ue()}l?(e=Rt(l,o()),H(e.$$.fragment),A(e.$$.fragment,1),V(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&A(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&k(t),e&&z(e,r)}}}function vd(n){let e,t,i,s,l,o,r;const a=[uT,aT],u=[];function f(m,_){return m[11]?0:1}t=f(n),i=u[t]=a[t](n);function c(...m){return n[38](n[47],...m)}function d(...m){return n[39](n[47],...m)}return{c(){e=v("div"),i.c(),s=E(),p(e,"tabindex","0"),p(e,"class","dropdown-item option"),Q(e,"closable",n[8]),Q(e,"selected",n[20](n[47]))},m(m,_){w(m,e,_),u[t].m(e,null),g(e,s),l=!0,o||(r=[J(e,"click",c),J(e,"keydown",d)],o=!0)},p(m,_){n=m;let h=t;t=f(n),t===h?u[t].p(n,_):(ae(),I(u[h],1,1,()=>{u[h]=null}),ue(),i=u[t],i?i.p(n,_):(i=u[t]=a[t](n),i.c()),A(i,1),i.m(e,s)),(!l||_[0]&256)&&Q(e,"closable",n[8]),(!l||_[0]&3145728)&&Q(e,"selected",n[20](n[47]))},i(m){l||(A(i),l=!0)},o(m){I(i),l=!1},d(m){m&&k(e),u[t].d(),o=!1,Ee(r)}}}function fT(n){let e,t,i,s,l,o=n[13]&&hd(n);const r=n[34].beforeOptions,a=yt(r,n,n[43],ud);let u=n[21],f=[];for(let h=0;hI(f[h],1,1,()=>{f[h]=null});let d=null;u.length||(d=gd(n));const m=n[34].afterOptions,_=yt(m,n,n[43],rd);return{c(){o&&o.c(),e=E(),a&&a.c(),t=E(),i=v("div");for(let h=0;hI(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=cd(n));let c=!n[5]&&!n[6]&&md(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),ue()),(!o||m[0]&16384&&l!==(l="select "+d[14]))&&p(e,"class",l),(!o||m[0]&16400)&&Q(e,"multiple",d[4]),(!o||m[0]&16416)&&Q(e,"disabled",d[5]),(!o||m[0]&16448)&&Q(e,"readonly",d[6])},i(d){if(!o){for(let m=0;mDt(Le,ze))||[]}function ie(fe,ze){fe.preventDefault(),b&&d?j(ze):q(ze)}function be(fe,ze){(fe.code==="Enter"||fe.code==="Space")&&(ie(fe,ze),y&&K())}function Se(){le(),setTimeout(()=>{const fe=N==null?void 0:N.querySelector(".dropdown-item.option.selected");fe&&(fe.focus(),fe.scrollIntoView({block:"nearest"}))},0)}function Ve(fe){fe.stopPropagation(),!_&&!m&&(L==null||L.toggle())}Gt(()=>{const fe=document.querySelectorAll(`label[for="${r}"]`);for(const ze of fe)ze.addEventListener("click",Ve);return()=>{for(const ze of fe)ze.removeEventListener("click",Ve)}});const Be=fe=>R(fe);function ke(fe){ee[fe?"unshift":"push"](()=>{F=fe,t(19,F)})}function Te(){P=this.value,t(16,P)}const Ze=(fe,ze)=>ie(ze,fe),ht=(fe,ze)=>be(ze,fe);function Ge(fe){ee[fe?"unshift":"push"](()=>{L=fe,t(17,L)})}function Ye(fe){Ne.call(this,n,fe)}function we(fe){ee[fe?"unshift":"push"](()=>{N=fe,t(18,N)})}return n.$$set=fe=>{"id"in fe&&t(26,r=fe.id),"noOptionsText"in fe&&t(1,a=fe.noOptionsText),"selectPlaceholder"in fe&&t(2,u=fe.selectPlaceholder),"searchPlaceholder"in fe&&t(3,f=fe.searchPlaceholder),"items"in fe&&t(27,c=fe.items),"multiple"in fe&&t(4,d=fe.multiple),"disabled"in fe&&t(5,m=fe.disabled),"readonly"in fe&&t(6,_=fe.readonly),"selected"in fe&&t(0,h=fe.selected),"toggle"in fe&&t(7,b=fe.toggle),"closable"in fe&&t(8,y=fe.closable),"labelComponent"in fe&&t(9,S=fe.labelComponent),"labelComponentProps"in fe&&t(10,C=fe.labelComponentProps),"optionComponent"in fe&&t(11,$=fe.optionComponent),"optionComponentProps"in fe&&t(12,T=fe.optionComponentProps),"searchable"in fe&&t(13,M=fe.searchable),"searchFunc"in fe&&t(28,O=fe.searchFunc),"class"in fe&&t(14,D=fe.class),"$$scope"in fe&&t(43,o=fe.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&134217728&&c&&(Z(),le()),n.$$.dirty[0]&134283264&&t(21,i=ne(c,P)),n.$$.dirty[0]&1&&t(20,s=function(fe){const ze=B.toArray(h);return B.inArray(ze,fe)})},[h,a,u,f,d,m,_,b,y,S,C,$,T,M,D,R,P,L,N,F,s,i,le,ie,be,Se,r,c,O,q,j,W,X,K,l,Be,ke,Te,Ze,ht,Ge,Ye,we,o]}class fu extends ge{constructor(e){super(),_e(this,e,pT,cT,me,{id:26,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:27,multiple:4,disabled:5,readonly:6,selected:0,toggle:7,closable:8,labelComponent:9,labelComponentProps:10,optionComponent:11,optionComponentProps:12,searchable:13,searchFunc:28,class:14,deselectItem:15,selectItem:29,toggleItem:30,reset:31,showDropdown:32,hideDropdown:33},null,[-1,-1])}get deselectItem(){return this.$$.ctx[15]}get selectItem(){return this.$$.ctx[29]}get toggleItem(){return this.$$.ctx[30]}get reset(){return this.$$.ctx[31]}get showDropdown(){return this.$$.ctx[32]}get hideDropdown(){return this.$$.ctx[33]}}function yd(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&k(e)}}}function mT(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&yd(n);return{c(){l&&l.c(),e=E(),t=v("span"),s=U(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),w(o,e,r),w(o,t,r),g(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=yd(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&se(s,i)},i:x,o:x,d(o){l&&l.d(o),o&&k(e),o&&k(t)}}}function hT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class kd extends ge{constructor(e){super(),_e(this,e,hT,mT,me,{item:0})}}const _T=n=>({}),wd=n=>({});function gT(n){let e;const t=n[8].afterOptions,i=yt(t,n,n[12],wd);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&wt(i,t,s,s[12],e?kt(t,s[12],l,_T):St(s[12]),wd)},i(s){e||(A(i,s),e=!0)},o(s){I(i,s),e=!1},d(s){i&&i.d(s)}}}function bT(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[gT]},$$scope:{ctx:n}};for(let r=0;rde(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&62?Mt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Xt(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function vT(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=xe(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=kd}=e,{optionComponent:c=kd}=e,{selectionKey:d="value"}=e,{keyOfSelected:m=a?[]:void 0}=e;function _(C){C=B.toArray(C,!0);let $=[];for(let T of C){const M=B.findByKey(r,d,T);M&&$.push(M)}C.length&&!$.length||t(0,u=a?$:$[0])}async function h(C){let $=B.toArray(C,!0).map(T=>T[d]);r.length&&t(6,m=a?$:$[0])}function b(C){u=C,t(0,u)}function y(C){Ne.call(this,n,C)}function S(C){Ne.call(this,n,C)}return n.$$set=C=>{e=qe(qe({},e),Zt(C)),t(5,s=xe(e,i)),"items"in C&&t(1,r=C.items),"multiple"in C&&t(2,a=C.multiple),"selected"in C&&t(0,u=C.selected),"labelComponent"in C&&t(3,f=C.labelComponent),"optionComponent"in C&&t(4,c=C.optionComponent),"selectionKey"in C&&t(7,d=C.selectionKey),"keyOfSelected"in C&&t(6,m=C.keyOfSelected),"$$scope"in C&&t(12,o=C.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&_(m),n.$$.dirty&1&&h(u)},[u,r,a,f,c,s,m,d,l,b,y,S,o]}class Hi extends ge{constructor(e){super(),_e(this,e,vT,bT,me,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function yT(n){let e,t,i,s,l,o;function r(u){n[7](u)}let a={id:n[13],placeholder:"Choices: eg. optionA, optionB",required:!0,readonly:!n[14]};return n[0].options.values!==void 0&&(a.value=n[0].options.values),t=new Vs({props:a}),ee.push(()=>de(t,"value",r)),{c(){e=v("div"),H(t.$$.fragment)},m(u,f){w(u,e,f),V(t,e,null),s=!0,l||(o=Me(He.call(null,e,{text:"Choices (comma separated)",position:"top-left",delay:700})),l=!0)},p(u,f){const c={};f&8192&&(c.id=u[13]),f&16384&&(c.readonly=!u[14]),!i&&f&1&&(i=!0,c.value=u[0].options.values,he(()=>i=!1)),t.$set(c)},i(u){s||(A(t.$$.fragment,u),s=!0)},o(u){I(t.$$.fragment,u),s=!1},d(u){u&&k(e),z(t),l=!1,o()}}}function kT(n){let e,t,i;function s(o){n[8](o)}let l={id:n[13],items:n[3],readonly:!n[14]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Hi({props:l}),ee.push(()=>de(e,"keyOfSelected",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r&8192&&(a.id=o[13]),r&16384&&(a.readonly=!o[14]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function wT(n){let e,t,i,s,l,o,r,a,u,f;return i=new pe({props:{class:"form-field required "+(n[14]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.values",$$slots:{default:[yT,({uniqueId:c})=>({13:c}),({uniqueId:c})=>c?8192:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field form-field-single-multiple-select "+(n[14]?"":"readonly"),inlineError:!0,$$slots:{default:[kT,({uniqueId:c})=>({13:c}),({uniqueId:c})=>c?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),H(i.$$.fragment),s=E(),l=v("div"),o=E(),H(r.$$.fragment),a=E(),u=v("div"),p(e,"class","separator"),p(l,"class","separator"),p(u,"class","separator")},m(c,d){w(c,e,d),w(c,t,d),V(i,c,d),w(c,s,d),w(c,l,d),w(c,o,d),V(r,c,d),w(c,a,d),w(c,u,d),f=!0},p(c,d){const m={};d&16384&&(m.class="form-field required "+(c[14]?"":"readonly")),d&2&&(m.name="schema."+c[1]+".options.values"),d&57345&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const _={};d&16384&&(_.class="form-field form-field-single-multiple-select "+(c[14]?"":"readonly")),d&57348&&(_.$$scope={dirty:d,ctx:c}),r.$set(_)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),f=!0)},o(c){I(i.$$.fragment,c),I(r.$$.fragment,c),f=!1},d(c){c&&k(e),c&&k(t),z(i,c),c&&k(s),c&&k(l),c&&k(o),z(r,c),c&&k(a),c&&k(u)}}}function Sd(n){let e,t;return e=new pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[ST,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&2&&(l.name="schema."+i[1]+".options.maxSelect"),s&40961&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function ST(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=E(),l=v("input"),p(e,"for",i=n[13]),p(l,"id",o=n[13]),p(l,"type","number"),p(l,"step","1"),p(l,"min","2"),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.maxSelect),r||(a=J(l,"input",n[6]),r=!0)},p(u,f){f&8192&&i!==(i=u[13])&&p(e,"for",i),f&8192&&o!==(o=u[13])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.maxSelect&&re(l,u[0].options.maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function $T(n){let e,t,i=!n[2]&&Sd(n);return{c(){i&&i.c(),e=ye()},m(s,l){i&&i.m(s,l),w(s,e,l),t=!0},p(s,l){s[2]?i&&(ae(),I(i,1,1,()=>{i=null}),ue()):i?(i.p(s,l),l&4&&A(i,1)):(i=Sd(s),i.c(),A(i,1),i.m(e.parentNode,e))},i(s){t||(A(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function CT(n){let e,t,i;const s=[{key:n[1]},n[4]];function l(r){n[9](r)}let o={$$slots:{options:[$T],default:[wT,({interactive:r})=>({14:r}),({interactive:r})=>r?16384:0]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[10]),e.$on("remove",n[11]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&18?Mt(s,[a&2&&{key:r[1]},a&16&&Xt(r[4])]):{};a&49159&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function TT(n,e,t){var y;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=((y=l.options)==null?void 0:y.maxSelect)<=1,u=a;function f(){t(0,l.options={maxSelect:1,values:[]},l),t(2,a=!0),t(5,u=a)}function c(){l.options.maxSelect=dt(this.value),t(0,l),t(5,u),t(2,a)}function d(S){n.$$.not_equal(l.options.values,S)&&(l.options.values=S,t(0,l),t(5,u),t(2,a))}function m(S){a=S,t(2,a)}function _(S){l=S,t(0,l),t(5,u),t(2,a)}function h(S){Ne.call(this,n,S)}function b(S){Ne.call(this,n,S)}return n.$$set=S=>{e=qe(qe({},e),Zt(S)),t(4,s=xe(e,i)),"field"in S&&t(0,l=S.field),"key"in S&&t(1,o=S.key)},n.$$.update=()=>{var S,C;n.$$.dirty&37&&u!=a&&(t(5,u=a),a?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((C=(S=l.options)==null?void 0:S.values)==null?void 0:C.length)||2,l)),n.$$.dirty&1&&B.isEmpty(l.options)&&f()},[l,o,a,r,s,u,c,d,m,_,h,b]}class MT extends ge{constructor(e){super(),_e(this,e,TT,CT,me,{field:0,key:1})}}function OT(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line txt-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function ET(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line txt-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function $d(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O='"{"a":1,"b":2}"',D,L,P,N,F,R,q,j,W,X,K,Z,le;return{c(){e=v("div"),t=v("div"),i=v("div"),s=U("In order to support seamlessly both "),l=v("code"),l.textContent="application/json",o=U(` and `),r=v("code"),r.textContent="multipart/form-data",a=U(` requests, the following normalization rules are applied if the `),u=v("code"),u.textContent="json",f=U(` field is a `),c=v("strong"),c.textContent="plain string",d=U(`: - `),m=v("ul"),_=v("li"),_.innerHTML=""true" is converted to the json true",h=E(),b=v("li"),b.innerHTML=""false" is converted to the json false",y=E(),S=v("li"),S.innerHTML=""null" is converted to the json null",C=E(),$=v("li"),$.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",T=E(),M=v("li"),D=U(O),L=U(" is converted to the json "),P=v("code"),P.textContent='{"a":1,"b":2}',N=E(),F=v("li"),F.textContent="numeric strings are converted to json number",R=E(),q=v("li"),q.textContent="double quoted strings are left as they are (aka. without normalizations)",H=E(),W=v("li"),W.textContent="any other string (empty string too) is double quoted",X=U(` + `),m=v("ul"),_=v("li"),_.innerHTML=""true" is converted to the json true",h=E(),b=v("li"),b.innerHTML=""false" is converted to the json false",y=E(),S=v("li"),S.innerHTML=""null" is converted to the json null",C=E(),$=v("li"),$.innerHTML=""[1,2,3]" is converted to the json [1,2,3]",T=E(),M=v("li"),D=U(O),L=U(" is converted to the json "),P=v("code"),P.textContent='{"a":1,"b":2}',N=E(),F=v("li"),F.textContent="numeric strings are converted to json number",R=E(),q=v("li"),q.textContent="double quoted strings are left as they are (aka. without normalizations)",j=E(),W=v("li"),W.textContent="any other string (empty string too) is double quoted",X=U(` Alternatively, if you want to avoid the string value normalizations, you can wrap your - data inside an object, eg.`),J=v("code"),J.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(ne,ie){w(ne,e,ie),g(e,t),g(t,i),g(i,s),g(i,l),g(i,o),g(i,r),g(i,a),g(i,u),g(i,f),g(i,c),g(i,d),g(i,m),g(m,_),g(m,h),g(m,b),g(m,y),g(m,S),g(m,C),g(m,$),g(m,T),g(m,M),g(M,D),g(M,L),g(M,P),g(m,N),g(m,F),g(m,R),g(m,q),g(m,H),g(m,W),g(i,X),g(i,J),le=!0},i(ne){le||(ne&&Qe(()=>{le&&(Z||(Z=je(e,ot,{duration:150},!0)),Z.run(1))}),le=!0)},o(ne){ne&&(Z||(Z=je(e,ot,{duration:150},!1)),Z.run(0)),le=!1},d(ne){ne&&k(e),ne&&Z&&Z.end()}}}function OT(n){let e,t,i,s,l,o,r;function a(d,m){return d[2]?MT:TT}let u=a(n),f=u(n),c=n[2]&&$d();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=E(),f.c(),s=E(),c&&c.c(),l=ye(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,m){w(d,e,m),g(e,t),g(e,i),f.m(e,null),w(d,s,m),c&&c.m(d,m),w(d,l,m),o||(r=K(e,"click",n[4]),o=!0)},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(e,null))),d[2]?c?m&4&&A(c,1):(c=$d(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},d(d){d&&k(e),f.d(),d&&k(s),c&&c.d(d),d&&k(l),o=!1,r()}}}function ET(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[OT]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&10?Mt(s,[a&2&&{key:r[1]},a&8&&Xt(r[3])]):{};a&260&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function DT(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function u(d){l=d,t(0,l)}function f(d){Ne.call(this,n,d)}function c(d){Ne.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(3,s=xe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,r,s,a,u,f,c]}class AT extends ge{constructor(e){super(),_e(this,e,DT,ET,me,{field:0,key:1})}}function IT(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=U(t),s=E(),l=v("small"),r=U(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){w(a,e,u),g(e,i),w(a,s,u),w(a,l,u),g(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&se(i,t),u&1&&o!==(o=a[0].mimeType+"")&&se(r,o)},i:x,o:x,d(a){a&&k(e),a&&k(s),a&&k(l)}}}function LT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Cd extends ge{constructor(e){super(),_e(this,e,LT,IT,me,{item:0})}}const PT=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function NT(n){let e,t,i;function s(o){n[16](o)}let l={id:n[22],items:n[4],readonly:!n[23]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Hi({props:l}),ee.push(()=>de(e,"keyOfSelected",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&4194304&&(a.id=o[22]),r&8388608&&(a.readonly=!o[23]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function FT(n){let e,t,i,s,l,o;return i=new pe({props:{class:"form-field form-field-single-multiple-select "+(n[23]?"":"readonly"),inlineError:!0,$$slots:{default:[NT,({uniqueId:r})=>({22:r}),({uniqueId:r})=>r?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),z(i.$$.fragment),s=E(),l=v("div"),p(e,"class","separator"),p(l,"class","separator")},m(r,a){w(r,e,a),w(r,t,a),j(i,r,a),w(r,s,a),w(r,l,a),o=!0},p(r,a){const u={};a&8388608&&(u.class="form-field form-field-single-multiple-select "+(r[23]?"":"readonly")),a&29360132&&(u.$$scope={dirty:a,ctx:r}),i.$set(u)},i(r){o||(A(i.$$.fragment,r),o=!0)},o(r){I(i.$$.fragment,r),o=!1},d(r){r&&k(e),r&&k(t),V(i,r),r&&k(s),r&&k(l)}}}function RT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=E(),i=v("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=E(),l=v("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=E(),r=v("button"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){w(f,e,c),w(f,t,c),w(f,i,c),w(f,s,c),w(f,l,c),w(f,o,c),w(f,r,c),a||(u=[K(e,"click",n[9]),K(i,"click",n[10]),K(l,"click",n[11]),K(r,"click",n[12])],a=!0)},p:x,d(f){f&&k(e),f&&k(t),f&&k(i),f&&k(s),f&&k(l),f&&k(o),f&&k(r),a=!1,Ee(u)}}}function qT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C;function $(M){n[8](M)}let T={id:n[22],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[3],labelComponent:Cd,optionComponent:Cd};return n[0].options.mimeTypes!==void 0&&(T.keyOfSelected=n[0].options.mimeTypes),r=new Hi({props:T}),ee.push(()=>de(r,"keyOfSelected",$)),b=new Kn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[RT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Allowed mime types",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),c=v("button"),d=v("span"),d.textContent="Choose presets",m=E(),_=v("i"),h=E(),z(b.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[22]),p(d,"class","txt link-primary"),p(_,"class","ri-arrow-drop-down-fill"),p(c,"type","button"),p(c,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(M,O){w(M,e,O),g(e,t),g(e,i),g(e,s),w(M,o,O),j(r,M,O),w(M,u,O),w(M,f,O),g(f,c),g(c,d),g(c,m),g(c,_),g(c,h),j(b,c,null),y=!0,S||(C=Me(He.call(null,s,{text:`Allow files ONLY with the listed mime types. - Leave empty for no restriction.`,position:"top"})),S=!0)},p(M,O){(!y||O&4194304&&l!==(l=M[22]))&&p(e,"for",l);const D={};O&4194304&&(D.id=M[22]),O&8&&(D.items=M[3]),!a&&O&1&&(a=!0,D.keyOfSelected=M[0].options.mimeTypes,he(()=>a=!1)),r.$set(D);const L={};O&16777217&&(L.$$scope={dirty:O,ctx:M}),b.$set(L)},i(M){y||(A(r.$$.fragment,M),A(b.$$.fragment,M),y=!0)},o(M){I(r.$$.fragment,M),I(b.$$.fragment,M),y=!1},d(M){M&&k(e),M&&k(o),V(r,M),M&&k(u),M&&k(f),V(b),S=!1,C()}}}function jT(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH + data inside an object, eg.`),K=v("code"),K.textContent='{"data": anything}',p(i,"class","content"),p(t,"class","alert alert-warning m-b-0 m-t-10"),p(e,"class","block")},m(ne,ie){w(ne,e,ie),g(e,t),g(t,i),g(i,s),g(i,l),g(i,o),g(i,r),g(i,a),g(i,u),g(i,f),g(i,c),g(i,d),g(i,m),g(m,_),g(m,h),g(m,b),g(m,y),g(m,S),g(m,C),g(m,$),g(m,T),g(m,M),g(M,D),g(M,L),g(M,P),g(m,N),g(m,F),g(m,R),g(m,q),g(m,j),g(m,W),g(i,X),g(i,K),le=!0},i(ne){le||(ne&&Qe(()=>{le&&(Z||(Z=je(e,ot,{duration:150},!0)),Z.run(1))}),le=!0)},o(ne){ne&&(Z||(Z=je(e,ot,{duration:150},!1)),Z.run(0)),le=!1},d(ne){ne&&k(e),ne&&Z&&Z.end()}}}function DT(n){let e,t,i,s,l,o,r;function a(d,m){return d[2]?ET:OT}let u=a(n),f=u(n),c=n[2]&&$d();return{c(){e=v("button"),t=v("strong"),t.textContent="String value normalizations",i=E(),f.c(),s=E(),c&&c.c(),l=ye(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","inline-flex txt-sm flex-gap-5 link-hint")},m(d,m){w(d,e,m),g(e,t),g(e,i),f.m(e,null),w(d,s,m),c&&c.m(d,m),w(d,l,m),o||(r=J(e,"click",n[4]),o=!0)},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(e,null))),d[2]?c?m&4&&A(c,1):(c=$d(),c.c(),A(c,1),c.m(l.parentNode,l)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},d(d){d&&k(e),f.d(),d&&k(s),c&&c.d(d),d&&k(l),o=!1,r()}}}function AT(n){let e,t,i;const s=[{key:n[1]},n[3]];function l(r){n[5](r)}let o={$$slots:{options:[DT]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[6]),e.$on("remove",n[7]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&10?Mt(s,[a&2&&{key:r[1]},a&8&&Xt(r[3])]):{};a&260&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function IT(n,e,t){const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e,r=!1;const a=()=>{t(2,r=!r)};function u(d){l=d,t(0,l)}function f(d){Ne.call(this,n,d)}function c(d){Ne.call(this,n,d)}return n.$$set=d=>{e=qe(qe({},e),Zt(d)),t(3,s=xe(e,i)),"field"in d&&t(0,l=d.field),"key"in d&&t(1,o=d.key)},[l,o,r,s,a,u,f,c]}class LT extends ge{constructor(e){super(),_e(this,e,IT,AT,me,{field:0,key:1})}}function PT(n){let e,t=(n[0].ext||"N/A")+"",i,s,l,o=n[0].mimeType+"",r;return{c(){e=v("span"),i=U(t),s=E(),l=v("small"),r=U(o),p(e,"class","txt"),p(l,"class","txt-hint")},m(a,u){w(a,e,u),g(e,i),w(a,s,u),w(a,l,u),g(l,r)},p(a,[u]){u&1&&t!==(t=(a[0].ext||"N/A")+"")&&se(i,t),u&1&&o!==(o=a[0].mimeType+"")&&se(r,o)},i:x,o:x,d(a){a&&k(e),a&&k(s),a&&k(l)}}}function NT(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Cd extends ge{constructor(e){super(),_e(this,e,NT,PT,me,{item:0})}}const FT=[{ext:".xpm",mimeType:"image/x-xpixmap"},{ext:".7z",mimeType:"application/x-7z-compressed"},{ext:".zip",mimeType:"application/zip"},{ext:".xlsx",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},{ext:".docx",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"},{ext:".pptx",mimeType:"application/vnd.openxmlformats-officedocument.presentationml.presentation"},{ext:".epub",mimeType:"application/epub+zip"},{ext:".jar",mimeType:"application/jar"},{ext:".odt",mimeType:"application/vnd.oasis.opendocument.text"},{ext:".ott",mimeType:"application/vnd.oasis.opendocument.text-template"},{ext:".ods",mimeType:"application/vnd.oasis.opendocument.spreadsheet"},{ext:".ots",mimeType:"application/vnd.oasis.opendocument.spreadsheet-template"},{ext:".odp",mimeType:"application/vnd.oasis.opendocument.presentation"},{ext:".otp",mimeType:"application/vnd.oasis.opendocument.presentation-template"},{ext:".odg",mimeType:"application/vnd.oasis.opendocument.graphics"},{ext:".otg",mimeType:"application/vnd.oasis.opendocument.graphics-template"},{ext:".odf",mimeType:"application/vnd.oasis.opendocument.formula"},{ext:".odc",mimeType:"application/vnd.oasis.opendocument.chart"},{ext:".sxc",mimeType:"application/vnd.sun.xml.calc"},{ext:".pdf",mimeType:"application/pdf"},{ext:".fdf",mimeType:"application/vnd.fdf"},{ext:"",mimeType:"application/x-ole-storage"},{ext:".msi",mimeType:"application/x-ms-installer"},{ext:".aaf",mimeType:"application/octet-stream"},{ext:".msg",mimeType:"application/vnd.ms-outlook"},{ext:".xls",mimeType:"application/vnd.ms-excel"},{ext:".pub",mimeType:"application/vnd.ms-publisher"},{ext:".ppt",mimeType:"application/vnd.ms-powerpoint"},{ext:".doc",mimeType:"application/msword"},{ext:".ps",mimeType:"application/postscript"},{ext:".psd",mimeType:"image/vnd.adobe.photoshop"},{ext:".p7s",mimeType:"application/pkcs7-signature"},{ext:".ogg",mimeType:"application/ogg"},{ext:".oga",mimeType:"audio/ogg"},{ext:".ogv",mimeType:"video/ogg"},{ext:".png",mimeType:"image/png"},{ext:".png",mimeType:"image/vnd.mozilla.apng"},{ext:".jpg",mimeType:"image/jpeg"},{ext:".jxl",mimeType:"image/jxl"},{ext:".jp2",mimeType:"image/jp2"},{ext:".jpf",mimeType:"image/jpx"},{ext:".jpm",mimeType:"image/jpm"},{ext:".jxs",mimeType:"image/jxs"},{ext:".gif",mimeType:"image/gif"},{ext:".webp",mimeType:"image/webp"},{ext:".exe",mimeType:"application/vnd.microsoft.portable-executable"},{ext:"",mimeType:"application/x-elf"},{ext:"",mimeType:"application/x-object"},{ext:"",mimeType:"application/x-executable"},{ext:".so",mimeType:"application/x-sharedlib"},{ext:"",mimeType:"application/x-coredump"},{ext:".a",mimeType:"application/x-archive"},{ext:".deb",mimeType:"application/vnd.debian.binary-package"},{ext:".tar",mimeType:"application/x-tar"},{ext:".xar",mimeType:"application/x-xar"},{ext:".bz2",mimeType:"application/x-bzip2"},{ext:".fits",mimeType:"application/fits"},{ext:".tiff",mimeType:"image/tiff"},{ext:".bmp",mimeType:"image/bmp"},{ext:".ico",mimeType:"image/x-icon"},{ext:".mp3",mimeType:"audio/mpeg"},{ext:".flac",mimeType:"audio/flac"},{ext:".midi",mimeType:"audio/midi"},{ext:".ape",mimeType:"audio/ape"},{ext:".mpc",mimeType:"audio/musepack"},{ext:".amr",mimeType:"audio/amr"},{ext:".wav",mimeType:"audio/wav"},{ext:".aiff",mimeType:"audio/aiff"},{ext:".au",mimeType:"audio/basic"},{ext:".mpeg",mimeType:"video/mpeg"},{ext:".mov",mimeType:"video/quicktime"},{ext:".mqv",mimeType:"video/quicktime"},{ext:".mp4",mimeType:"video/mp4"},{ext:".webm",mimeType:"video/webm"},{ext:".3gp",mimeType:"video/3gpp"},{ext:".3g2",mimeType:"video/3gpp2"},{ext:".avi",mimeType:"video/x-msvideo"},{ext:".flv",mimeType:"video/x-flv"},{ext:".mkv",mimeType:"video/x-matroska"},{ext:".asf",mimeType:"video/x-ms-asf"},{ext:".aac",mimeType:"audio/aac"},{ext:".voc",mimeType:"audio/x-unknown"},{ext:".mp4",mimeType:"audio/mp4"},{ext:".m4a",mimeType:"audio/x-m4a"},{ext:".m3u",mimeType:"application/vnd.apple.mpegurl"},{ext:".m4v",mimeType:"video/x-m4v"},{ext:".rmvb",mimeType:"application/vnd.rn-realmedia-vbr"},{ext:".gz",mimeType:"application/gzip"},{ext:".class",mimeType:"application/x-java-applet"},{ext:".swf",mimeType:"application/x-shockwave-flash"},{ext:".crx",mimeType:"application/x-chrome-extension"},{ext:".ttf",mimeType:"font/ttf"},{ext:".woff",mimeType:"font/woff"},{ext:".woff2",mimeType:"font/woff2"},{ext:".otf",mimeType:"font/otf"},{ext:".ttc",mimeType:"font/collection"},{ext:".eot",mimeType:"application/vnd.ms-fontobject"},{ext:".wasm",mimeType:"application/wasm"},{ext:".shx",mimeType:"application/vnd.shx"},{ext:".shp",mimeType:"application/vnd.shp"},{ext:".dbf",mimeType:"application/x-dbf"},{ext:".dcm",mimeType:"application/dicom"},{ext:".rar",mimeType:"application/x-rar-compressed"},{ext:".djvu",mimeType:"image/vnd.djvu"},{ext:".mobi",mimeType:"application/x-mobipocket-ebook"},{ext:".lit",mimeType:"application/x-ms-reader"},{ext:".bpg",mimeType:"image/bpg"},{ext:".sqlite",mimeType:"application/vnd.sqlite3"},{ext:".dwg",mimeType:"image/vnd.dwg"},{ext:".nes",mimeType:"application/vnd.nintendo.snes.rom"},{ext:".lnk",mimeType:"application/x-ms-shortcut"},{ext:".macho",mimeType:"application/x-mach-binary"},{ext:".qcp",mimeType:"audio/qcelp"},{ext:".icns",mimeType:"image/x-icns"},{ext:".heic",mimeType:"image/heic"},{ext:".heic",mimeType:"image/heic-sequence"},{ext:".heif",mimeType:"image/heif"},{ext:".heif",mimeType:"image/heif-sequence"},{ext:".hdr",mimeType:"image/vnd.radiance"},{ext:".mrc",mimeType:"application/marc"},{ext:".mdb",mimeType:"application/x-msaccess"},{ext:".accdb",mimeType:"application/x-msaccess"},{ext:".zst",mimeType:"application/zstd"},{ext:".cab",mimeType:"application/vnd.ms-cab-compressed"},{ext:".rpm",mimeType:"application/x-rpm"},{ext:".xz",mimeType:"application/x-xz"},{ext:".lz",mimeType:"application/lzip"},{ext:".torrent",mimeType:"application/x-bittorrent"},{ext:".cpio",mimeType:"application/x-cpio"},{ext:"",mimeType:"application/tzif"},{ext:".xcf",mimeType:"image/x-xcf"},{ext:".pat",mimeType:"image/x-gimp-pat"},{ext:".gbr",mimeType:"image/x-gimp-gbr"},{ext:".glb",mimeType:"model/gltf-binary"},{ext:".avif",mimeType:"image/avif"},{ext:".cab",mimeType:"application/x-installshield"},{ext:".jxr",mimeType:"image/jxr"},{ext:".txt",mimeType:"text/plain"},{ext:".html",mimeType:"text/html"},{ext:".svg",mimeType:"image/svg+xml"},{ext:".xml",mimeType:"text/xml"},{ext:".rss",mimeType:"application/rss+xml"},{ext:".atom",mimeType:"applicatiotom+xml"},{ext:".x3d",mimeType:"model/x3d+xml"},{ext:".kml",mimeType:"application/vnd.google-earth.kml+xml"},{ext:".xlf",mimeType:"application/x-xliff+xml"},{ext:".dae",mimeType:"model/vnd.collada+xml"},{ext:".gml",mimeType:"application/gml+xml"},{ext:".gpx",mimeType:"application/gpx+xml"},{ext:".tcx",mimeType:"application/vnd.garmin.tcx+xml"},{ext:".amf",mimeType:"application/x-amf"},{ext:".3mf",mimeType:"application/vnd.ms-package.3dmanufacturing-3dmodel+xml"},{ext:".xfdf",mimeType:"application/vnd.adobe.xfdf"},{ext:".owl",mimeType:"application/owl+xml"},{ext:".php",mimeType:"text/x-php"},{ext:".js",mimeType:"application/javascript"},{ext:".lua",mimeType:"text/x-lua"},{ext:".pl",mimeType:"text/x-perl"},{ext:".py",mimeType:"text/x-python"},{ext:".json",mimeType:"application/json"},{ext:".geojson",mimeType:"application/geo+json"},{ext:".har",mimeType:"application/json"},{ext:".ndjson",mimeType:"application/x-ndjson"},{ext:".rtf",mimeType:"text/rtf"},{ext:".srt",mimeType:"application/x-subrip"},{ext:".tcl",mimeType:"text/x-tcl"},{ext:".csv",mimeType:"text/csv"},{ext:".tsv",mimeType:"text/tab-separated-values"},{ext:".vcf",mimeType:"text/vcard"},{ext:".ics",mimeType:"text/calendar"},{ext:".warc",mimeType:"application/warc"},{ext:".vtt",mimeType:"text/vtt"},{ext:"",mimeType:"application/octet-stream"}];function RT(n){let e,t,i;function s(o){n[16](o)}let l={id:n[22],items:n[4],readonly:!n[23]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Hi({props:l}),ee.push(()=>de(e,"keyOfSelected",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r&4194304&&(a.id=o[22]),r&8388608&&(a.readonly=!o[23]),!t&&r&4&&(t=!0,a.keyOfSelected=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function qT(n){let e,t,i,s,l,o;return i=new pe({props:{class:"form-field form-field-single-multiple-select "+(n[23]?"":"readonly"),inlineError:!0,$$slots:{default:[RT,({uniqueId:r})=>({22:r}),({uniqueId:r})=>r?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),H(i.$$.fragment),s=E(),l=v("div"),p(e,"class","separator"),p(l,"class","separator")},m(r,a){w(r,e,a),w(r,t,a),V(i,r,a),w(r,s,a),w(r,l,a),o=!0},p(r,a){const u={};a&8388608&&(u.class="form-field form-field-single-multiple-select "+(r[23]?"":"readonly")),a&29360132&&(u.$$scope={dirty:a,ctx:r}),i.$set(u)},i(r){o||(A(i.$$.fragment,r),o=!0)},o(r){I(i.$$.fragment,r),o=!1},d(r){r&&k(e),r&&k(t),z(i,r),r&&k(s),r&&k(l)}}}function jT(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Images (jpg, png, svg, gif, webp)',t=E(),i=v("button"),i.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',s=E(),l=v("button"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=E(),r=v("button"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){w(f,e,c),w(f,t,c),w(f,i,c),w(f,s,c),w(f,l,c),w(f,o,c),w(f,r,c),a||(u=[J(e,"click",n[9]),J(i,"click",n[10]),J(l,"click",n[11]),J(r,"click",n[12])],a=!0)},p:x,d(f){f&&k(e),f&&k(t),f&&k(i),f&&k(s),f&&k(l),f&&k(o),f&&k(r),a=!1,Ee(u)}}}function VT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C;function $(M){n[8](M)}let T={id:n[22],multiple:!0,searchable:!0,closable:!1,selectionKey:"mimeType",selectPlaceholder:"No restriction",items:n[3],labelComponent:Cd,optionComponent:Cd};return n[0].options.mimeTypes!==void 0&&(T.keyOfSelected=n[0].options.mimeTypes),r=new Hi({props:T}),ee.push(()=>de(r,"keyOfSelected",$)),b=new Kn({props:{class:"dropdown dropdown-sm dropdown-nowrap dropdown-left",$$slots:{default:[jT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Allowed mime types",i=E(),s=v("i"),o=E(),H(r.$$.fragment),u=E(),f=v("div"),c=v("button"),d=v("span"),d.textContent="Choose presets",m=E(),_=v("i"),h=E(),H(b.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[22]),p(d,"class","txt link-primary"),p(_,"class","ri-arrow-drop-down-fill"),p(c,"type","button"),p(c,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(M,O){w(M,e,O),g(e,t),g(e,i),g(e,s),w(M,o,O),V(r,M,O),w(M,u,O),w(M,f,O),g(f,c),g(c,d),g(c,m),g(c,_),g(c,h),V(b,c,null),y=!0,S||(C=Me(He.call(null,s,{text:`Allow files ONLY with the listed mime types. + Leave empty for no restriction.`,position:"top"})),S=!0)},p(M,O){(!y||O&4194304&&l!==(l=M[22]))&&p(e,"for",l);const D={};O&4194304&&(D.id=M[22]),O&8&&(D.items=M[3]),!a&&O&1&&(a=!0,D.keyOfSelected=M[0].options.mimeTypes,he(()=>a=!1)),r.$set(D);const L={};O&16777217&&(L.$$scope={dirty:O,ctx:M}),b.$set(L)},i(M){y||(A(r.$$.fragment,M),A(b.$$.fragment,M),y=!0)},o(M){I(r.$$.fragment,M),I(b.$$.fragment,M),y=!1},d(M){M&&k(e),M&&k(o),z(r,M),M&&k(u),M&&k(f),z(b),S=!1,C()}}}function zT(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH (eg. 100x50) - crop to WxH viewbox (from center)
  • WxHt (eg. 100x50t) - crop to WxH viewbox (from top)
  • @@ -75,81 +75,81 @@
  • 0xH (eg. 0x50) - resize to H height preserving the aspect ratio
  • Wx0 - (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,p(e,"class","m-0")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function VT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T;function M(D){n[13](D)}let O={id:n[22],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(O.value=n[0].options.thumbs),r=new Vs({props:O}),ee.push(()=>de(r,"value",M)),S=new Kn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[jT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=E(),m=v("button"),_=v("span"),_.textContent="Supported formats",h=E(),b=v("i"),y=E(),z(S.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[22]),p(c,"class","txt"),p(_,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(m,"type","button"),p(m,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(D,L){w(D,e,L),g(e,t),g(e,i),g(e,s),w(D,o,L),j(r,D,L),w(D,u,L),w(D,f,L),g(f,c),g(f,d),g(f,m),g(m,_),g(m,h),g(m,b),g(m,y),j(S,m,null),C=!0,$||(T=Me(He.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),$=!0)},p(D,L){(!C||L&4194304&&l!==(l=D[22]))&&p(e,"for",l);const P={};L&4194304&&(P.id=D[22]),!a&&L&1&&(a=!0,P.value=D[0].options.thumbs,he(()=>a=!1)),r.$set(P);const N={};L&16777216&&(N.$$scope={dirty:L,ctx:D}),S.$set(N)},i(D){C||(A(r.$$.fragment,D),A(S.$$.fragment,D),C=!0)},o(D){I(r.$$.fragment,D),I(S.$$.fragment,D),C=!1},d(D){D&&k(e),D&&k(o),V(r,D),D&&k(u),D&&k(f),V(S),$=!1,T()}}}function zT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Max file size"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Must be in bytes.",p(e,"for",i=n[22]),p(l,"type","number"),p(l,"id",o=n[22]),p(l,"step","1"),p(l,"min","0"),p(a,"class","help-block")},m(c,d){w(c,e,d),g(e,t),w(c,s,d),w(c,l,d),re(l,n[0].options.maxSize),w(c,r,d),w(c,a,d),u||(f=K(l,"input",n[14]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&o!==(o=c[22])&&p(l,"id",o),d&1&&dt(l.value)!==c[0].options.maxSize&&re(l,c[0].options.maxSize)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function Td(n){let e,t,i;return t=new pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[HT,({uniqueId:s})=>({22:s}),({uniqueId:s})=>s?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","col-sm-3")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.maxSelect"),l&20971521&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function HT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=E(),l=v("input"),p(e,"for",i=n[22]),p(l,"id",o=n[22]),p(l,"type","number"),p(l,"step","1"),p(l,"min","2"),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.maxSelect),r||(a=K(l,"input",n[15]),r=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&o!==(o=u[22])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.maxSelect&&re(l,u[0].options.maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function BT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[qT,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[VT,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}}),f=new pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[zT,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}});let _=!n[2]&&Td(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),a=E(),u=v("div"),z(f.$$.fragment),d=E(),_&&_.c(),p(t,"class","col-sm-12"),p(l,"class",r=n[2]?"col-sm-8":"col-sm-6"),p(u,"class",c=n[2]?"col-sm-4":"col-sm-3"),p(e,"class","grid grid-sm")},m(h,b){w(h,e,b),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),g(e,a),g(e,u),j(f,u,null),g(e,d),_&&_.m(e,null),m=!0},p(h,b){const y={};b&2&&(y.name="schema."+h[1]+".options.mimeTypes"),b&20971529&&(y.$$scope={dirty:b,ctx:h}),i.$set(y);const S={};b&2&&(S.name="schema."+h[1]+".options.thumbs"),b&20971521&&(S.$$scope={dirty:b,ctx:h}),o.$set(S),(!m||b&4&&r!==(r=h[2]?"col-sm-8":"col-sm-6"))&&p(l,"class",r);const C={};b&2&&(C.name="schema."+h[1]+".options.maxSize"),b&20971521&&(C.$$scope={dirty:b,ctx:h}),f.$set(C),(!m||b&4&&c!==(c=h[2]?"col-sm-4":"col-sm-3"))&&p(u,"class",c),h[2]?_&&(ae(),I(_,1,1,()=>{_=null}),ue()):_?(_.p(h,b),b&4&&A(_,1)):(_=Td(h),_.c(),A(_,1),_.m(e,null))},i(h){m||(A(i.$$.fragment,h),A(o.$$.fragment,h),A(f.$$.fragment,h),A(_),m=!0)},o(h){I(i.$$.fragment,h),I(o.$$.fragment,h),I(f.$$.fragment,h),I(_),m=!1},d(h){h&&k(e),V(i),V(o),V(f),_&&_.d()}}}function UT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Protected",r=E(),a=v("a"),a.textContent="(Learn more)",p(e,"type","checkbox"),p(e,"id",t=n[22]),p(l,"class","txt"),p(s,"for",o=n[22]),p(a,"href","https://pocketbase.io/docs/files-handling/#protected-files"),p(a,"class","toggle-info txt-sm txt-hint m-l-5"),p(a,"target","_blank"),p(a,"rel","noopener")},m(c,d){w(c,e,d),e.checked=n[0].options.protected,w(c,i,d),w(c,s,d),g(s,l),w(c,r,d),w(c,a,d),u||(f=K(e,"change",n[7]),u=!0)},p(c,d){d&4194304&&t!==(t=c[22])&&p(e,"id",t),d&1&&(e.checked=c[0].options.protected),d&4194304&&o!==(o=c[22])&&p(s,"for",o)},d(c){c&&k(e),c&&k(i),c&&k(s),c&&k(r),c&&k(a),u=!1,f()}}}function WT(n){let e,t,i;return t=new pe({props:{class:"form-field form-field-toggle m-0",name:"schema."+n[1]+".options.protected",$$slots:{default:[UT,({uniqueId:s})=>({22:s}),({uniqueId:s})=>s?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","col-sm-4")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.protected"),l&20971521&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function YT(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[17](r)}let o={$$slots:{afterNonempty:[WT],options:[BT],default:[FT,({interactive:r})=>({23:r}),({interactive:r})=>r?8388608:0]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[18]),e.$on("remove",n[19]),{c(){z(e.$$.fragment)},m(r,a){j(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Xt(r[5])]):{};a&25165839&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){V(e,r)}}}function KT(n,e,t){var P;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=PT.slice(),u=((P=l.options)==null?void 0:P.maxSelect)<=1,f=u;function c(){t(0,l.options={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]},l),t(2,u=!0),t(6,f=u)}function d(){if(B.isEmpty(l.options.mimeTypes))return;const N=[];for(const F of l.options.mimeTypes)a.find(R=>R.mimeType===F)||N.push({mimeType:F});N.length&&t(3,a=a.concat(N))}function m(){l.options.protected=this.checked,t(0,l),t(6,f),t(2,u)}function _(N){n.$$.not_equal(l.options.mimeTypes,N)&&(l.options.mimeTypes=N,t(0,l),t(6,f),t(2,u))}const h=()=>{t(0,l.options.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],l)},b=()=>{t(0,l.options.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],l)},y=()=>{t(0,l.options.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],l)},S=()=>{t(0,l.options.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],l)};function C(N){n.$$.not_equal(l.options.thumbs,N)&&(l.options.thumbs=N,t(0,l),t(6,f),t(2,u))}function $(){l.options.maxSize=dt(this.value),t(0,l),t(6,f),t(2,u)}function T(){l.options.maxSelect=dt(this.value),t(0,l),t(6,f),t(2,u)}function M(N){u=N,t(2,u)}function O(N){l=N,t(0,l),t(6,f),t(2,u)}function D(N){Ne.call(this,n,N)}function L(N){Ne.call(this,n,N)}return n.$$set=N=>{e=qe(qe({},e),Zt(N)),t(5,s=xe(e,i)),"field"in N&&t(0,l=N.field),"key"in N&&t(1,o=N.key)},n.$$.update=()=>{var N,F;n.$$.dirty&69&&f!=u&&(t(6,f=u),u?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((F=(N=l.options)==null?void 0:N.values)==null?void 0:F.length)||99,l)),n.$$.dirty&1&&(B.isEmpty(l.options)?c():d())},[l,o,u,a,r,s,f,m,_,h,b,y,S,C,$,T,M,O,D,L]}class JT extends ge{constructor(e){super(),_e(this,e,KT,YT,me,{field:0,key:1})}}function ZT(n){let e,t,i,s,l;return{c(){e=v("hr"),t=E(),i=v("button"),i.innerHTML=` - New collection`,p(i,"type","button"),p(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=K(i,"click",n[17]),s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,l()}}}function GT(n){let e,t,i;function s(o){n[18](o)}let l={id:n[29],searchable:n[3].length>5,selectPlaceholder:"Select collection *",noOptionsText:"No collections found",selectionKey:"id",items:n[3],readonly:!n[30]||n[0].id,$$slots:{afterOptions:[ZT]},$$scope:{ctx:n}};return n[0].options.collectionId!==void 0&&(l.keyOfSelected=n[0].options.collectionId),e=new Hi({props:l}),ee.push(()=>de(e,"keyOfSelected",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&536870912&&(a.id=o[29]),r[0]&8&&(a.searchable=o[3].length>5),r[0]&8&&(a.items=o[3]),r[0]&1073741825&&(a.readonly=!o[30]||o[0].id),r[0]&16|r[1]&1&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.keyOfSelected=o[0].options.collectionId,he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function XT(n){let e,t,i;function s(o){n[19](o)}let l={id:n[29],items:n[8],readonly:!n[30]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Hi({props:l}),ee.push(()=>de(e,"keyOfSelected",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&536870912&&(a.id=o[29]),r[0]&1073741824&&(a.readonly=!o[30]),!t&&r[0]&4&&(t=!0,a.keyOfSelected=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function QT(n){let e,t,i,s,l,o,r,a,u,f;return i=new pe({props:{class:"form-field required "+(n[30]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.collectionId",$$slots:{default:[GT,({uniqueId:c})=>({29:c}),({uniqueId:c})=>[c?536870912:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field form-field-single-multiple-select "+(n[30]?"":"readonly"),inlineError:!0,$$slots:{default:[XT,({uniqueId:c})=>({29:c}),({uniqueId:c})=>[c?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),z(i.$$.fragment),s=E(),l=v("div"),o=E(),z(r.$$.fragment),a=E(),u=v("div"),p(e,"class","separator"),p(l,"class","separator"),p(u,"class","separator")},m(c,d){w(c,e,d),w(c,t,d),j(i,c,d),w(c,s,d),w(c,l,d),w(c,o,d),j(r,c,d),w(c,a,d),w(c,u,d),f=!0},p(c,d){const m={};d[0]&1073741824&&(m.class="form-field required "+(c[30]?"":"readonly")),d[0]&2&&(m.name="schema."+c[1]+".options.collectionId"),d[0]&1610612761|d[1]&1&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const _={};d[0]&1073741824&&(_.class="form-field form-field-single-multiple-select "+(c[30]?"":"readonly")),d[0]&1610612740|d[1]&1&&(_.$$scope={dirty:d,ctx:c}),r.$set(_)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),f=!0)},o(c){I(i.$$.fragment,c),I(r.$$.fragment,c),f=!1},d(c){c&&k(e),c&&k(t),V(i,c),c&&k(s),c&&k(l),c&&k(o),V(r,c),c&&k(a),c&&k(u)}}}function Md(n){let e,t,i,s,l,o;return t=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.minSelect",$$slots:{default:[xT,({uniqueId:r})=>({29:r}),({uniqueId:r})=>[r?536870912:0]]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[e4,({uniqueId:r})=>({29:r}),({uniqueId:r})=>[r?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),z(t.$$.fragment),i=E(),s=v("div"),z(l.$$.fragment),p(e,"class","col-sm-6"),p(s,"class","col-sm-6")},m(r,a){w(r,e,a),j(t,e,null),w(r,i,a),w(r,s,a),j(l,s,null),o=!0},p(r,a){const u={};a[0]&2&&(u.name="schema."+r[1]+".options.minSelect"),a[0]&536870913|a[1]&1&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a[0]&2&&(f.name="schema."+r[1]+".options.maxSelect"),a[0]&536870913|a[1]&1&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(t.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){I(t.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){r&&k(e),V(t),r&&k(i),r&&k(s),V(l)}}}function xT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min select"),s=E(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","number"),p(l,"id",o=n[29]),p(l,"step","1"),p(l,"min","1"),p(l,"placeholder","No min limit")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.minSelect),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f[0]&536870912&&i!==(i=u[29])&&p(e,"for",i),f[0]&536870912&&o!==(o=u[29])&&p(l,"id",o),f[0]&1&&dt(l.value)!==u[0].options.minSelect&&re(l,u[0].options.minSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function e4(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Max select"),s=E(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","number"),p(l,"id",o=n[29]),p(l,"step","1"),p(l,"placeholder","No max limit"),p(l,"min",r=n[0].options.minSelect||2)},m(f,c){w(f,e,c),g(e,t),w(f,s,c),w(f,l,c),re(l,n[0].options.maxSelect),a||(u=K(l,"input",n[14]),a=!0)},p(f,c){c[0]&536870912&&i!==(i=f[29])&&p(e,"for",i),c[0]&536870912&&o!==(o=f[29])&&p(l,"id",o),c[0]&1&&r!==(r=f[0].options.minSelect||2)&&p(l,"min",r),c[0]&1&&dt(l.value)!==f[0].options.maxSelect&&re(l,f[0].options.maxSelect)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function t4(n){let e,t,i,s,l,o,r,a,u,f,c;function d(_){n[15](_)}let m={multiple:!0,searchable:!0,id:n[29],selectPlaceholder:"Auto",items:n[5]};return n[0].options.displayFields!==void 0&&(m.selected=n[0].options.displayFields),r=new fu({props:m}),ee.push(()=>de(r,"selected",d)),{c(){e=v("label"),t=v("span"),t.textContent="Display fields",i=E(),s=v("i"),o=E(),z(r.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[29])},m(_,h){w(_,e,h),g(e,t),g(e,i),g(e,s),w(_,o,h),j(r,_,h),u=!0,f||(c=Me(He.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(_,h){(!u||h[0]&536870912&&l!==(l=_[29]))&&p(e,"for",l);const b={};h[0]&536870912&&(b.id=_[29]),h[0]&32&&(b.items=_[5]),!a&&h[0]&1&&(a=!0,b.selected=_[0].options.displayFields,he(()=>a=!1)),r.$set(b)},i(_){u||(A(r.$$.fragment,_),u=!0)},o(_){I(r.$$.fragment,_),u=!1},d(_){_&&k(e),_&&k(o),V(r,_),f=!1,c()}}}function n4(n){let e,t,i,s,l,o,r,a,u,f,c,d;function m(h){n[16](h)}let _={id:n[29],items:n[9]};return n[0].options.cascadeDelete!==void 0&&(_.keyOfSelected=n[0].options.cascadeDelete),a=new Hi({props:_}),ee.push(()=>de(a,"keyOfSelected",m)),{c(){e=v("label"),t=v("span"),t.textContent="Cascade delete",i=E(),s=v("i"),r=E(),z(a.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",o=n[29])},m(h,b){var y,S;w(h,e,b),g(e,t),g(e,i),g(e,s),w(h,r,b),j(a,h,b),f=!0,c||(d=Me(l=He.call(null,s,{text:`Whether on ${((y=n[6])==null?void 0:y.name)||"relation"} record deletion to delete also the ${((S=n[7])==null?void 0:S.name)||"field"} associated records.`,position:"top"})),c=!0)},p(h,b){var S,C;l&&qt(l.update)&&b[0]&192&&l.update.call(null,{text:`Whether on ${((S=h[6])==null?void 0:S.name)||"relation"} record deletion to delete also the ${((C=h[7])==null?void 0:C.name)||"field"} associated records.`,position:"top"}),(!f||b[0]&536870912&&o!==(o=h[29]))&&p(e,"for",o);const y={};b[0]&536870912&&(y.id=h[29]),!u&&b[0]&1&&(u=!0,y.keyOfSelected=h[0].options.cascadeDelete,he(()=>u=!1)),a.$set(y)},i(h){f||(A(a.$$.fragment,h),f=!0)},o(h){I(a.$$.fragment,h),f=!1},d(h){h&&k(e),h&&k(r),V(a,h),c=!1,d()}}}function i4(n){let e,t,i,s,l,o,r,a,u=!n[2]&&Md(n);return s=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[t4,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[n4,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),u&&u.c(),t=E(),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(f,c){w(f,e,c),u&&u.m(e,null),g(e,t),g(e,i),j(s,i,null),g(e,l),g(e,o),j(r,o,null),a=!0},p(f,c){f[2]?u&&(ae(),I(u,1,1,()=>{u=null}),ue()):u?(u.p(f,c),c[0]&4&&A(u,1)):(u=Md(f),u.c(),A(u,1),u.m(e,t));const d={};c[0]&2&&(d.name="schema."+f[1]+".options.displayFields"),c[0]&536870945|c[1]&1&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&2&&(m.name="schema."+f[1]+".options.cascadeDelete"),c[0]&536871105|c[1]&1&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){a||(A(u),A(s.$$.fragment,f),A(r.$$.fragment,f),a=!0)},o(f){I(u),I(s.$$.fragment,f),I(r.$$.fragment,f),a=!1},d(f){f&&k(e),u&&u.d(),V(s),V(r)}}}function s4(n){let e,t,i,s,l;const o=[{key:n[1]},n[10]];function r(f){n[20](f)}let a={$$slots:{options:[i4],default:[QT,({interactive:f})=>({30:f}),({interactive:f})=>[f?1073741824:0]]},$$scope:{ctx:n}};for(let f=0;fde(e,"field",r)),e.$on("rename",n[21]),e.$on("remove",n[22]);let u={};return s=new cu({props:u}),n[23](s),s.$on("save",n[24]),{c(){z(e.$$.fragment),i=E(),z(s.$$.fragment)},m(f,c){j(e,f,c),w(f,i,c),j(s,f,c),l=!0},p(f,c){const d=c[0]&1026?Mt(o,[c[0]&2&&{key:f[1]},c[0]&1024&&Xt(f[10])]):{};c[0]&1073742079|c[1]&1&&(d.$$scope={dirty:c,ctx:f}),!t&&c[0]&1&&(t=!0,d.field=f[0],he(()=>t=!1)),e.$set(d);const m={};s.$set(m)},i(f){l||(A(e.$$.fragment,f),A(s.$$.fragment,f),l=!0)},o(f){I(e.$$.fragment,f),I(s.$$.fragment,f),l=!1},d(f){V(e,f),f&&k(i),n[23](null),V(s,f)}}}function l4(n,e,t){var X;let i;const s=["field","key"];let l=xe(e,s),o,r;Je(n,ci,J=>t(3,o=J)),Je(n,ui,J=>t(7,r=J));let{field:a}=e,{key:u=""}=e;const f=[{label:"Single",value:!0},{label:"Multiple",value:!1}],c=[{label:"False",value:!1},{label:"True",value:!0}],d=["id","created","updated"],m=["username","email","emailVisibility","verified"];let _=null,h=[],b=null,y=((X=a.options)==null?void 0:X.maxSelect)==1,S=y;function C(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]},a),t(2,y=!0),t(12,S=y)}function $(){var J,Z;if(t(5,h=d.slice(0)),!!i){i.isAuth&&t(5,h=h.concat(m));for(const le of i.schema)h.push(le.name);if(((Z=(J=a.options)==null?void 0:J.displayFields)==null?void 0:Z.length)>0)for(let le=a.options.displayFields.length-1;le>=0;le--)h.includes(a.options.displayFields[le])||a.options.displayFields.splice(le,1)}}function T(){a.options.minSelect=dt(this.value),t(0,a),t(12,S),t(2,y)}function M(){a.options.maxSelect=dt(this.value),t(0,a),t(12,S),t(2,y)}function O(J){n.$$.not_equal(a.options.displayFields,J)&&(a.options.displayFields=J,t(0,a),t(12,S),t(2,y))}function D(J){n.$$.not_equal(a.options.cascadeDelete,J)&&(a.options.cascadeDelete=J,t(0,a),t(12,S),t(2,y))}const L=()=>_==null?void 0:_.show();function P(J){n.$$.not_equal(a.options.collectionId,J)&&(a.options.collectionId=J,t(0,a),t(12,S),t(2,y))}function N(J){y=J,t(2,y)}function F(J){a=J,t(0,a),t(12,S),t(2,y)}function R(J){Ne.call(this,n,J)}function q(J){Ne.call(this,n,J)}function H(J){ee[J?"unshift":"push"](()=>{_=J,t(4,_)})}const W=J=>{var Z,le;(le=(Z=J==null?void 0:J.detail)==null?void 0:Z.collection)!=null&&le.id&&t(0,a.options.collectionId=J.detail.collection.id,a)};return n.$$set=J=>{e=qe(qe({},e),Zt(J)),t(10,l=xe(e,s)),"field"in J&&t(0,a=J.field),"key"in J&&t(1,u=J.key)},n.$$.update=()=>{n.$$.dirty[0]&4100&&S!=y&&(t(12,S=y),y?(t(0,a.options.minSelect=null,a),t(0,a.options.maxSelect=1,a)):t(0,a.options.maxSelect=null,a)),n.$$.dirty[0]&1&&B.isEmpty(a.options)&&C(),n.$$.dirty[0]&9&&t(6,i=o.find(J=>J.id==a.options.collectionId)||null),n.$$.dirty[0]&2049&&b!=a.options.collectionId&&(t(11,b=a.options.collectionId),$())},[a,u,y,o,_,h,i,r,f,c,l,b,S,T,M,O,D,L,P,N,F,R,q,H,W]}class o4 extends ge{constructor(e){super(),_e(this,e,l4,s4,me,{field:0,key:1},null,[-1,-1])}}const r4=n=>({dragging:n&4,dragover:n&8}),Od=n=>({dragging:n[2],dragover:n[3]});function a4(n){let e,t,i,s,l;const o=n[10].default,r=yt(o,n,n[9],Od);return{c(){e=v("div"),r&&r.c(),p(e,"draggable",t=!n[1]),p(e,"class","draggable svelte-28orm4"),Q(e,"dragging",n[2]),Q(e,"dragover",n[3])},m(a,u){w(a,e,u),r&&r.m(e,null),i=!0,s||(l=[K(e,"dragover",et(n[11])),K(e,"dragleave",et(n[12])),K(e,"dragend",n[13]),K(e,"dragstart",n[14]),K(e,"drop",n[15])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&524)&&wt(r,o,a,a[9],i?kt(o,a[9],u,r4):St(a[9]),Od),(!i||u&2&&t!==(t=!a[1]))&&p(e,"draggable",t),(!i||u&4)&&Q(e,"dragging",a[2]),(!i||u&8)&&Q(e,"dragover",a[3])},i(a){i||(A(r,a),i=!0)},o(a){I(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),s=!1,Ee(l)}}}function u4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=$t();let{index:o}=e,{list:r=[]}=e,{group:a="default"}=e,{disabled:u=!1}=e,{dragHandleClass:f=""}=e,c=!1,d=!1;function m($,T){if(!(!$||u)){if(f&&!$.target.classList.contains(f)){t(3,d=!1),t(2,c=!1),$.preventDefault();return}t(2,c=!0),$.dataTransfer.effectAllowed="move",$.dataTransfer.dropEffect="move",$.dataTransfer.setData("text/plain",JSON.stringify({index:T,group:a})),l("drag",$)}}function _($,T){if(t(3,d=!1),t(2,c=!1),!$||u)return;$.dataTransfer.dropEffect="move";let M={};try{M=JSON.parse($.dataTransfer.getData("text/plain"))}catch{}if(M.group!=a)return;const O=M.index<<0;O{t(3,d=!0)},b=()=>{t(3,d=!1)},y=()=>{t(3,d=!1),t(2,c=!1)},S=$=>m($,o),C=$=>_($,o);return n.$$set=$=>{"index"in $&&t(0,o=$.index),"list"in $&&t(6,r=$.list),"group"in $&&t(7,a=$.group),"disabled"in $&&t(1,u=$.disabled),"dragHandleClass"in $&&t(8,f=$.dragHandleClass),"$$scope"in $&&t(9,s=$.$$scope)},[o,u,c,d,m,_,r,a,f,s,i,h,b,y,S,C]}class Nl extends ge{constructor(e){super(),_e(this,e,u4,a4,me,{index:0,list:6,group:7,disabled:1,dragHandleClass:8})}}function Ed(n,e,t){const i=n.slice();return i[17]=e[t],i[18]=e,i[19]=t,i}function Dd(n){let e,t,i,s,l,o,r,a;return{c(){e=U(`, + (eg. 100x0) - resize to W width preserving the aspect ratio`,p(e,"class","m-0")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function HT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T;function M(D){n[13](D)}let O={id:n[22],placeholder:"eg. 50x50, 480x720"};return n[0].options.thumbs!==void 0&&(O.value=n[0].options.thumbs),r=new Vs({props:O}),ee.push(()=>de(r,"value",M)),S=new Kn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[zT]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=E(),s=v("i"),o=E(),H(r.$$.fragment),u=E(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=E(),m=v("button"),_=v("span"),_.textContent="Supported formats",h=E(),b=v("i"),y=E(),H(S.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[22]),p(c,"class","txt"),p(_,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(m,"type","button"),p(m,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(D,L){w(D,e,L),g(e,t),g(e,i),g(e,s),w(D,o,L),V(r,D,L),w(D,u,L),w(D,f,L),g(f,c),g(f,d),g(f,m),g(m,_),g(m,h),g(m,b),g(m,y),V(S,m,null),C=!0,$||(T=Me(He.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),$=!0)},p(D,L){(!C||L&4194304&&l!==(l=D[22]))&&p(e,"for",l);const P={};L&4194304&&(P.id=D[22]),!a&&L&1&&(a=!0,P.value=D[0].options.thumbs,he(()=>a=!1)),r.$set(P);const N={};L&16777216&&(N.$$scope={dirty:L,ctx:D}),S.$set(N)},i(D){C||(A(r.$$.fragment,D),A(S.$$.fragment,D),C=!0)},o(D){I(r.$$.fragment,D),I(S.$$.fragment,D),C=!1},d(D){D&&k(e),D&&k(o),z(r,D),D&&k(u),D&&k(f),z(S),$=!1,T()}}}function BT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Max file size"),s=E(),l=v("input"),r=E(),a=v("div"),a.textContent="Must be in bytes.",p(e,"for",i=n[22]),p(l,"type","number"),p(l,"id",o=n[22]),p(l,"step","1"),p(l,"min","0"),p(a,"class","help-block")},m(c,d){w(c,e,d),g(e,t),w(c,s,d),w(c,l,d),re(l,n[0].options.maxSize),w(c,r,d),w(c,a,d),u||(f=J(l,"input",n[14]),u=!0)},p(c,d){d&4194304&&i!==(i=c[22])&&p(e,"for",i),d&4194304&&o!==(o=c[22])&&p(l,"id",o),d&1&&dt(l.value)!==c[0].options.maxSize&&re(l,c[0].options.maxSize)},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function Td(n){let e,t,i;return t=new pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[UT,({uniqueId:s})=>({22:s}),({uniqueId:s})=>s?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","col-sm-3")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.maxSelect"),l&20971521&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),z(t)}}}function UT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max select"),s=E(),l=v("input"),p(e,"for",i=n[22]),p(l,"id",o=n[22]),p(l,"type","number"),p(l,"step","1"),p(l,"min","2"),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.maxSelect),r||(a=J(l,"input",n[15]),r=!0)},p(u,f){f&4194304&&i!==(i=u[22])&&p(e,"for",i),f&4194304&&o!==(o=u[22])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.maxSelect&&re(l,u[0].options.maxSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function WT(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[VT,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[HT,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}}),f=new pe({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[BT,({uniqueId:h})=>({22:h}),({uniqueId:h})=>h?4194304:0]},$$scope:{ctx:n}}});let _=!n[2]&&Td(n);return{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),a=E(),u=v("div"),H(f.$$.fragment),d=E(),_&&_.c(),p(t,"class","col-sm-12"),p(l,"class",r=n[2]?"col-sm-8":"col-sm-6"),p(u,"class",c=n[2]?"col-sm-4":"col-sm-3"),p(e,"class","grid grid-sm")},m(h,b){w(h,e,b),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),g(e,a),g(e,u),V(f,u,null),g(e,d),_&&_.m(e,null),m=!0},p(h,b){const y={};b&2&&(y.name="schema."+h[1]+".options.mimeTypes"),b&20971529&&(y.$$scope={dirty:b,ctx:h}),i.$set(y);const S={};b&2&&(S.name="schema."+h[1]+".options.thumbs"),b&20971521&&(S.$$scope={dirty:b,ctx:h}),o.$set(S),(!m||b&4&&r!==(r=h[2]?"col-sm-8":"col-sm-6"))&&p(l,"class",r);const C={};b&2&&(C.name="schema."+h[1]+".options.maxSize"),b&20971521&&(C.$$scope={dirty:b,ctx:h}),f.$set(C),(!m||b&4&&c!==(c=h[2]?"col-sm-4":"col-sm-3"))&&p(u,"class",c),h[2]?_&&(ae(),I(_,1,1,()=>{_=null}),ue()):_?(_.p(h,b),b&4&&A(_,1)):(_=Td(h),_.c(),A(_,1),_.m(e,null))},i(h){m||(A(i.$$.fragment,h),A(o.$$.fragment,h),A(f.$$.fragment,h),A(_),m=!0)},o(h){I(i.$$.fragment,h),I(o.$$.fragment,h),I(f.$$.fragment,h),I(_),m=!1},d(h){h&&k(e),z(i),z(o),z(f),_&&_.d()}}}function YT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Protected",r=E(),a=v("a"),a.textContent="(Learn more)",p(e,"type","checkbox"),p(e,"id",t=n[22]),p(l,"class","txt"),p(s,"for",o=n[22]),p(a,"href","https://pocketbase.io/docs/files-handling/#protected-files"),p(a,"class","toggle-info txt-sm txt-hint m-l-5"),p(a,"target","_blank"),p(a,"rel","noopener")},m(c,d){w(c,e,d),e.checked=n[0].options.protected,w(c,i,d),w(c,s,d),g(s,l),w(c,r,d),w(c,a,d),u||(f=J(e,"change",n[7]),u=!0)},p(c,d){d&4194304&&t!==(t=c[22])&&p(e,"id",t),d&1&&(e.checked=c[0].options.protected),d&4194304&&o!==(o=c[22])&&p(s,"for",o)},d(c){c&&k(e),c&&k(i),c&&k(s),c&&k(r),c&&k(a),u=!1,f()}}}function KT(n){let e,t,i;return t=new pe({props:{class:"form-field form-field-toggle m-0",name:"schema."+n[1]+".options.protected",$$slots:{default:[YT,({uniqueId:s})=>({22:s}),({uniqueId:s})=>s?4194304:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","col-sm-4")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l&2&&(o.name="schema."+s[1]+".options.protected"),l&20971521&&(o.$$scope={dirty:l,ctx:s}),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),z(t)}}}function JT(n){let e,t,i;const s=[{key:n[1]},n[5]];function l(r){n[17](r)}let o={$$slots:{afterNonempty:[KT],options:[WT],default:[qT,({interactive:r})=>({23:r}),({interactive:r})=>r?8388608:0]},$$scope:{ctx:n}};for(let r=0;rde(e,"field",l)),e.$on("rename",n[18]),e.$on("remove",n[19]),{c(){H(e.$$.fragment)},m(r,a){V(e,r,a),i=!0},p(r,[a]){const u=a&34?Mt(s,[a&2&&{key:r[1]},a&32&&Xt(r[5])]):{};a&25165839&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.field=r[0],he(()=>t=!1)),e.$set(u)},i(r){i||(A(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){z(e,r)}}}function ZT(n,e,t){var P;const i=["field","key"];let s=xe(e,i),{field:l}=e,{key:o=""}=e;const r=[{label:"Single",value:!0},{label:"Multiple",value:!1}];let a=FT.slice(),u=((P=l.options)==null?void 0:P.maxSelect)<=1,f=u;function c(){t(0,l.options={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]},l),t(2,u=!0),t(6,f=u)}function d(){if(B.isEmpty(l.options.mimeTypes))return;const N=[];for(const F of l.options.mimeTypes)a.find(R=>R.mimeType===F)||N.push({mimeType:F});N.length&&t(3,a=a.concat(N))}function m(){l.options.protected=this.checked,t(0,l),t(6,f),t(2,u)}function _(N){n.$$.not_equal(l.options.mimeTypes,N)&&(l.options.mimeTypes=N,t(0,l),t(6,f),t(2,u))}const h=()=>{t(0,l.options.mimeTypes=["image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],l)},b=()=>{t(0,l.options.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],l)},y=()=>{t(0,l.options.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],l)},S=()=>{t(0,l.options.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],l)};function C(N){n.$$.not_equal(l.options.thumbs,N)&&(l.options.thumbs=N,t(0,l),t(6,f),t(2,u))}function $(){l.options.maxSize=dt(this.value),t(0,l),t(6,f),t(2,u)}function T(){l.options.maxSelect=dt(this.value),t(0,l),t(6,f),t(2,u)}function M(N){u=N,t(2,u)}function O(N){l=N,t(0,l),t(6,f),t(2,u)}function D(N){Ne.call(this,n,N)}function L(N){Ne.call(this,n,N)}return n.$$set=N=>{e=qe(qe({},e),Zt(N)),t(5,s=xe(e,i)),"field"in N&&t(0,l=N.field),"key"in N&&t(1,o=N.key)},n.$$.update=()=>{var N,F;n.$$.dirty&69&&f!=u&&(t(6,f=u),u?t(0,l.options.maxSelect=1,l):t(0,l.options.maxSelect=((F=(N=l.options)==null?void 0:N.values)==null?void 0:F.length)||99,l)),n.$$.dirty&1&&(B.isEmpty(l.options)?c():d())},[l,o,u,a,r,s,f,m,_,h,b,y,S,C,$,T,M,O,D,L]}class GT extends ge{constructor(e){super(),_e(this,e,ZT,JT,me,{field:0,key:1})}}function XT(n){let e,t,i,s,l;return{c(){e=v("hr"),t=E(),i=v("button"),i.innerHTML=` + New collection`,p(i,"type","button"),p(i,"class","btn btn-transparent btn-block btn-sm")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=J(i,"click",n[17]),s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,l()}}}function QT(n){let e,t,i;function s(o){n[18](o)}let l={id:n[29],searchable:n[3].length>5,selectPlaceholder:"Select collection *",noOptionsText:"No collections found",selectionKey:"id",items:n[3],readonly:!n[30]||n[0].id,$$slots:{afterOptions:[XT]},$$scope:{ctx:n}};return n[0].options.collectionId!==void 0&&(l.keyOfSelected=n[0].options.collectionId),e=new Hi({props:l}),ee.push(()=>de(e,"keyOfSelected",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r[0]&536870912&&(a.id=o[29]),r[0]&8&&(a.searchable=o[3].length>5),r[0]&8&&(a.items=o[3]),r[0]&1073741825&&(a.readonly=!o[30]||o[0].id),r[0]&16|r[1]&1&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.keyOfSelected=o[0].options.collectionId,he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function xT(n){let e,t,i;function s(o){n[19](o)}let l={id:n[29],items:n[8],readonly:!n[30]};return n[2]!==void 0&&(l.keyOfSelected=n[2]),e=new Hi({props:l}),ee.push(()=>de(e,"keyOfSelected",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r[0]&536870912&&(a.id=o[29]),r[0]&1073741824&&(a.readonly=!o[30]),!t&&r[0]&4&&(t=!0,a.keyOfSelected=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function e4(n){let e,t,i,s,l,o,r,a,u,f;return i=new pe({props:{class:"form-field required "+(n[30]?"":"readonly"),inlineError:!0,name:"schema."+n[1]+".options.collectionId",$$slots:{default:[QT,({uniqueId:c})=>({29:c}),({uniqueId:c})=>[c?536870912:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field form-field-single-multiple-select "+(n[30]?"":"readonly"),inlineError:!0,$$slots:{default:[xT,({uniqueId:c})=>({29:c}),({uniqueId:c})=>[c?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),H(i.$$.fragment),s=E(),l=v("div"),o=E(),H(r.$$.fragment),a=E(),u=v("div"),p(e,"class","separator"),p(l,"class","separator"),p(u,"class","separator")},m(c,d){w(c,e,d),w(c,t,d),V(i,c,d),w(c,s,d),w(c,l,d),w(c,o,d),V(r,c,d),w(c,a,d),w(c,u,d),f=!0},p(c,d){const m={};d[0]&1073741824&&(m.class="form-field required "+(c[30]?"":"readonly")),d[0]&2&&(m.name="schema."+c[1]+".options.collectionId"),d[0]&1610612761|d[1]&1&&(m.$$scope={dirty:d,ctx:c}),i.$set(m);const _={};d[0]&1073741824&&(_.class="form-field form-field-single-multiple-select "+(c[30]?"":"readonly")),d[0]&1610612740|d[1]&1&&(_.$$scope={dirty:d,ctx:c}),r.$set(_)},i(c){f||(A(i.$$.fragment,c),A(r.$$.fragment,c),f=!0)},o(c){I(i.$$.fragment,c),I(r.$$.fragment,c),f=!1},d(c){c&&k(e),c&&k(t),z(i,c),c&&k(s),c&&k(l),c&&k(o),z(r,c),c&&k(a),c&&k(u)}}}function Md(n){let e,t,i,s,l,o;return t=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.minSelect",$$slots:{default:[t4,({uniqueId:r})=>({29:r}),({uniqueId:r})=>[r?536870912:0]]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[n4,({uniqueId:r})=>({29:r}),({uniqueId:r})=>[r?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),H(t.$$.fragment),i=E(),s=v("div"),H(l.$$.fragment),p(e,"class","col-sm-6"),p(s,"class","col-sm-6")},m(r,a){w(r,e,a),V(t,e,null),w(r,i,a),w(r,s,a),V(l,s,null),o=!0},p(r,a){const u={};a[0]&2&&(u.name="schema."+r[1]+".options.minSelect"),a[0]&536870913|a[1]&1&&(u.$$scope={dirty:a,ctx:r}),t.$set(u);const f={};a[0]&2&&(f.name="schema."+r[1]+".options.maxSelect"),a[0]&536870913|a[1]&1&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(t.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){I(t.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){r&&k(e),z(t),r&&k(i),r&&k(s),z(l)}}}function t4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Min select"),s=E(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","number"),p(l,"id",o=n[29]),p(l,"step","1"),p(l,"min","1"),p(l,"placeholder","No min limit")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.minSelect),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[0]&536870912&&i!==(i=u[29])&&p(e,"for",i),f[0]&536870912&&o!==(o=u[29])&&p(l,"id",o),f[0]&1&&dt(l.value)!==u[0].options.minSelect&&re(l,u[0].options.minSelect)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function n4(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Max select"),s=E(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","number"),p(l,"id",o=n[29]),p(l,"step","1"),p(l,"placeholder","No max limit"),p(l,"min",r=n[0].options.minSelect||2)},m(f,c){w(f,e,c),g(e,t),w(f,s,c),w(f,l,c),re(l,n[0].options.maxSelect),a||(u=J(l,"input",n[14]),a=!0)},p(f,c){c[0]&536870912&&i!==(i=f[29])&&p(e,"for",i),c[0]&536870912&&o!==(o=f[29])&&p(l,"id",o),c[0]&1&&r!==(r=f[0].options.minSelect||2)&&p(l,"min",r),c[0]&1&&dt(l.value)!==f[0].options.maxSelect&&re(l,f[0].options.maxSelect)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function i4(n){let e,t,i,s,l,o,r,a,u,f,c;function d(_){n[15](_)}let m={multiple:!0,searchable:!0,id:n[29],selectPlaceholder:"Auto",items:n[5]};return n[0].options.displayFields!==void 0&&(m.selected=n[0].options.displayFields),r=new fu({props:m}),ee.push(()=>de(r,"selected",d)),{c(){e=v("label"),t=v("span"),t.textContent="Display fields",i=E(),s=v("i"),o=E(),H(r.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[29])},m(_,h){w(_,e,h),g(e,t),g(e,i),g(e,s),w(_,o,h),V(r,_,h),u=!0,f||(c=Me(He.call(null,s,{text:"Optionally select the field(s) that will be used in the listings UI. Leave empty for auto.",position:"top"})),f=!0)},p(_,h){(!u||h[0]&536870912&&l!==(l=_[29]))&&p(e,"for",l);const b={};h[0]&536870912&&(b.id=_[29]),h[0]&32&&(b.items=_[5]),!a&&h[0]&1&&(a=!0,b.selected=_[0].options.displayFields,he(()=>a=!1)),r.$set(b)},i(_){u||(A(r.$$.fragment,_),u=!0)},o(_){I(r.$$.fragment,_),u=!1},d(_){_&&k(e),_&&k(o),z(r,_),f=!1,c()}}}function s4(n){let e,t,i,s,l,o,r,a,u,f,c,d;function m(h){n[16](h)}let _={id:n[29],items:n[9]};return n[0].options.cascadeDelete!==void 0&&(_.keyOfSelected=n[0].options.cascadeDelete),a=new Hi({props:_}),ee.push(()=>de(a,"keyOfSelected",m)),{c(){e=v("label"),t=v("span"),t.textContent="Cascade delete",i=E(),s=v("i"),r=E(),H(a.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",o=n[29])},m(h,b){var y,S;w(h,e,b),g(e,t),g(e,i),g(e,s),w(h,r,b),V(a,h,b),f=!0,c||(d=Me(l=He.call(null,s,{text:`Whether on ${((y=n[6])==null?void 0:y.name)||"relation"} record deletion to delete also the ${((S=n[7])==null?void 0:S.name)||"field"} associated records.`,position:"top"})),c=!0)},p(h,b){var S,C;l&&jt(l.update)&&b[0]&192&&l.update.call(null,{text:`Whether on ${((S=h[6])==null?void 0:S.name)||"relation"} record deletion to delete also the ${((C=h[7])==null?void 0:C.name)||"field"} associated records.`,position:"top"}),(!f||b[0]&536870912&&o!==(o=h[29]))&&p(e,"for",o);const y={};b[0]&536870912&&(y.id=h[29]),!u&&b[0]&1&&(u=!0,y.keyOfSelected=h[0].options.cascadeDelete,he(()=>u=!1)),a.$set(y)},i(h){f||(A(a.$$.fragment,h),f=!0)},o(h){I(a.$$.fragment,h),f=!1},d(h){h&&k(e),h&&k(r),z(a,h),c=!1,d()}}}function l4(n){let e,t,i,s,l,o,r,a,u=!n[2]&&Md(n);return s=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.displayFields",$$slots:{default:[i4,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[s4,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),u&&u.c(),t=E(),i=v("div"),H(s.$$.fragment),l=E(),o=v("div"),H(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(e,"class","grid grid-sm")},m(f,c){w(f,e,c),u&&u.m(e,null),g(e,t),g(e,i),V(s,i,null),g(e,l),g(e,o),V(r,o,null),a=!0},p(f,c){f[2]?u&&(ae(),I(u,1,1,()=>{u=null}),ue()):u?(u.p(f,c),c[0]&4&&A(u,1)):(u=Md(f),u.c(),A(u,1),u.m(e,t));const d={};c[0]&2&&(d.name="schema."+f[1]+".options.displayFields"),c[0]&536870945|c[1]&1&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&2&&(m.name="schema."+f[1]+".options.cascadeDelete"),c[0]&536871105|c[1]&1&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){a||(A(u),A(s.$$.fragment,f),A(r.$$.fragment,f),a=!0)},o(f){I(u),I(s.$$.fragment,f),I(r.$$.fragment,f),a=!1},d(f){f&&k(e),u&&u.d(),z(s),z(r)}}}function o4(n){let e,t,i,s,l;const o=[{key:n[1]},n[10]];function r(f){n[20](f)}let a={$$slots:{options:[l4],default:[e4,({interactive:f})=>({30:f}),({interactive:f})=>[f?1073741824:0]]},$$scope:{ctx:n}};for(let f=0;fde(e,"field",r)),e.$on("rename",n[21]),e.$on("remove",n[22]);let u={};return s=new cu({props:u}),n[23](s),s.$on("save",n[24]),{c(){H(e.$$.fragment),i=E(),H(s.$$.fragment)},m(f,c){V(e,f,c),w(f,i,c),V(s,f,c),l=!0},p(f,c){const d=c[0]&1026?Mt(o,[c[0]&2&&{key:f[1]},c[0]&1024&&Xt(f[10])]):{};c[0]&1073742079|c[1]&1&&(d.$$scope={dirty:c,ctx:f}),!t&&c[0]&1&&(t=!0,d.field=f[0],he(()=>t=!1)),e.$set(d);const m={};s.$set(m)},i(f){l||(A(e.$$.fragment,f),A(s.$$.fragment,f),l=!0)},o(f){I(e.$$.fragment,f),I(s.$$.fragment,f),l=!1},d(f){z(e,f),f&&k(i),n[23](null),z(s,f)}}}function r4(n,e,t){var X;let i;const s=["field","key"];let l=xe(e,s),o,r;Je(n,ci,K=>t(3,o=K)),Je(n,ui,K=>t(7,r=K));let{field:a}=e,{key:u=""}=e;const f=[{label:"Single",value:!0},{label:"Multiple",value:!1}],c=[{label:"False",value:!1},{label:"True",value:!0}],d=["id","created","updated"],m=["username","email","emailVisibility","verified"];let _=null,h=[],b=null,y=((X=a.options)==null?void 0:X.maxSelect)==1,S=y;function C(){t(0,a.options={maxSelect:1,collectionId:null,cascadeDelete:!1,displayFields:[]},a),t(2,y=!0),t(12,S=y)}function $(){var K,Z;if(t(5,h=d.slice(0)),!!i){i.isAuth&&t(5,h=h.concat(m));for(const le of i.schema)h.push(le.name);if(((Z=(K=a.options)==null?void 0:K.displayFields)==null?void 0:Z.length)>0)for(let le=a.options.displayFields.length-1;le>=0;le--)h.includes(a.options.displayFields[le])||a.options.displayFields.splice(le,1)}}function T(){a.options.minSelect=dt(this.value),t(0,a),t(12,S),t(2,y)}function M(){a.options.maxSelect=dt(this.value),t(0,a),t(12,S),t(2,y)}function O(K){n.$$.not_equal(a.options.displayFields,K)&&(a.options.displayFields=K,t(0,a),t(12,S),t(2,y))}function D(K){n.$$.not_equal(a.options.cascadeDelete,K)&&(a.options.cascadeDelete=K,t(0,a),t(12,S),t(2,y))}const L=()=>_==null?void 0:_.show();function P(K){n.$$.not_equal(a.options.collectionId,K)&&(a.options.collectionId=K,t(0,a),t(12,S),t(2,y))}function N(K){y=K,t(2,y)}function F(K){a=K,t(0,a),t(12,S),t(2,y)}function R(K){Ne.call(this,n,K)}function q(K){Ne.call(this,n,K)}function j(K){ee[K?"unshift":"push"](()=>{_=K,t(4,_)})}const W=K=>{var Z,le;(le=(Z=K==null?void 0:K.detail)==null?void 0:Z.collection)!=null&&le.id&&t(0,a.options.collectionId=K.detail.collection.id,a)};return n.$$set=K=>{e=qe(qe({},e),Zt(K)),t(10,l=xe(e,s)),"field"in K&&t(0,a=K.field),"key"in K&&t(1,u=K.key)},n.$$.update=()=>{n.$$.dirty[0]&4100&&S!=y&&(t(12,S=y),y?(t(0,a.options.minSelect=null,a),t(0,a.options.maxSelect=1,a)):t(0,a.options.maxSelect=null,a)),n.$$.dirty[0]&1&&B.isEmpty(a.options)&&C(),n.$$.dirty[0]&9&&t(6,i=o.find(K=>K.id==a.options.collectionId)||null),n.$$.dirty[0]&2049&&b!=a.options.collectionId&&(t(11,b=a.options.collectionId),$())},[a,u,y,o,_,h,i,r,f,c,l,b,S,T,M,O,D,L,P,N,F,R,q,j,W]}class a4 extends ge{constructor(e){super(),_e(this,e,r4,o4,me,{field:0,key:1},null,[-1,-1])}}const u4=n=>({dragging:n&4,dragover:n&8}),Od=n=>({dragging:n[2],dragover:n[3]});function f4(n){let e,t,i,s,l;const o=n[10].default,r=yt(o,n,n[9],Od);return{c(){e=v("div"),r&&r.c(),p(e,"draggable",t=!n[1]),p(e,"class","draggable svelte-28orm4"),Q(e,"dragging",n[2]),Q(e,"dragover",n[3])},m(a,u){w(a,e,u),r&&r.m(e,null),i=!0,s||(l=[J(e,"dragover",et(n[11])),J(e,"dragleave",et(n[12])),J(e,"dragend",n[13]),J(e,"dragstart",n[14]),J(e,"drop",n[15])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&524)&&wt(r,o,a,a[9],i?kt(o,a[9],u,u4):St(a[9]),Od),(!i||u&2&&t!==(t=!a[1]))&&p(e,"draggable",t),(!i||u&4)&&Q(e,"dragging",a[2]),(!i||u&8)&&Q(e,"dragover",a[3])},i(a){i||(A(r,a),i=!0)},o(a){I(r,a),i=!1},d(a){a&&k(e),r&&r.d(a),s=!1,Ee(l)}}}function c4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=$t();let{index:o}=e,{list:r=[]}=e,{group:a="default"}=e,{disabled:u=!1}=e,{dragHandleClass:f=""}=e,c=!1,d=!1;function m($,T){if(!(!$||u)){if(f&&!$.target.classList.contains(f)){t(3,d=!1),t(2,c=!1),$.preventDefault();return}t(2,c=!0),$.dataTransfer.effectAllowed="move",$.dataTransfer.dropEffect="move",$.dataTransfer.setData("text/plain",JSON.stringify({index:T,group:a})),l("drag",$)}}function _($,T){if(t(3,d=!1),t(2,c=!1),!$||u)return;$.dataTransfer.dropEffect="move";let M={};try{M=JSON.parse($.dataTransfer.getData("text/plain"))}catch{}if(M.group!=a)return;const O=M.index<<0;O{t(3,d=!0)},b=()=>{t(3,d=!1)},y=()=>{t(3,d=!1),t(2,c=!1)},S=$=>m($,o),C=$=>_($,o);return n.$$set=$=>{"index"in $&&t(0,o=$.index),"list"in $&&t(6,r=$.list),"group"in $&&t(7,a=$.group),"disabled"in $&&t(1,u=$.disabled),"dragHandleClass"in $&&t(8,f=$.dragHandleClass),"$$scope"in $&&t(9,s=$.$$scope)},[o,u,c,d,m,_,r,a,f,s,i,h,b,y,S,C]}class Nl extends ge{constructor(e){super(),_e(this,e,c4,f4,me,{index:0,list:6,group:7,disabled:1,dragHandleClass:8})}}function Ed(n,e,t){const i=n.slice();return i[17]=e[t],i[18]=e,i[19]=t,i}function Dd(n){let e,t,i,s,l,o,r,a;return{c(){e=U(`, `),t=v("code"),t.textContent="username",i=U(` , `),s=v("code"),s.textContent="email",l=U(` , `),o=v("code"),o.textContent="emailVisibility",r=U(` , - `),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),w(u,s,f),w(u,l,f),w(u,o,f),w(u,r,f),w(u,a,f)},d(u){u&&k(e),u&&k(t),u&&k(i),u&&k(s),u&&k(l),u&&k(o),u&&k(r),u&&k(a)}}}function f4(n){let e,t,i,s;function l(u){n[6](u,n[17],n[18],n[19])}function o(){return n[7](n[19])}var r=n[1][n[17].type];function a(u){let f={key:u[4](u[17])};return u[17]!==void 0&&(f.field=u[17]),{props:f}}return r&&(e=Ft(r,a(n)),ee.push(()=>de(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8])),{c(){e&&z(e.$$.fragment),i=E()},m(u,f){e&&j(e,u,f),w(u,i,f),s=!0},p(u,f){n=u;const c={};if(f&1&&(c.key=n[4](n[17])),!t&&f&1&&(t=!0,c.field=n[17],he(()=>t=!1)),f&1&&r!==(r=n[1][n[17].type])){if(e){ae();const d=e;I(d.$$.fragment,1,0,()=>{V(d,1)}),ue()}r?(e=Ft(r,a(n)),ee.push(()=>de(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8]),z(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else r&&e.$set(c)},i(u){s||(e&&A(e.$$.fragment,u),s=!0)},o(u){e&&I(e.$$.fragment,u),s=!1},d(u){e&&V(e,u),u&&k(i)}}}function Ad(n,e){let t,i,s,l;function o(a){e[9](a)}let r={index:e[19],disabled:e[17].toDelete||e[17].id&&e[17].system,dragHandleClass:"drag-handle-wrapper",$$slots:{default:[f4]},$$scope:{ctx:e}};return e[0].schema!==void 0&&(r.list=e[0].schema),i=new Nl({props:r}),ee.push(()=>de(i,"list",o)),i.$on("drag",e[10]),i.$on("sort",e[11]),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u&1&&(f.index=e[19]),u&1&&(f.disabled=e[17].toDelete||e[17].id&&e[17].system),u&1048577&&(f.$$scope={dirty:u,ctx:e}),!s&&u&1&&(s=!0,f.list=e[0].schema,he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function c4(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=[],_=new Map,h,b,y,S,C,$,T,M,O=n[0].$isAuth&&Dd(),D=n[0].schema;const L=F=>F[17];for(let F=0;Fde($,"collection",P)),{c(){e=v("div"),t=v("p"),i=U(`System fields: + `),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),w(u,s,f),w(u,l,f),w(u,o,f),w(u,r,f),w(u,a,f)},d(u){u&&k(e),u&&k(t),u&&k(i),u&&k(s),u&&k(l),u&&k(o),u&&k(r),u&&k(a)}}}function d4(n){let e,t,i,s;function l(u){n[6](u,n[17],n[18],n[19])}function o(){return n[7](n[19])}var r=n[1][n[17].type];function a(u){let f={key:u[4](u[17])};return u[17]!==void 0&&(f.field=u[17]),{props:f}}return r&&(e=Rt(r,a(n)),ee.push(()=>de(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8])),{c(){e&&H(e.$$.fragment),i=E()},m(u,f){e&&V(e,u,f),w(u,i,f),s=!0},p(u,f){n=u;const c={};if(f&1&&(c.key=n[4](n[17])),!t&&f&1&&(t=!0,c.field=n[17],he(()=>t=!1)),f&1&&r!==(r=n[1][n[17].type])){if(e){ae();const d=e;I(d.$$.fragment,1,0,()=>{z(d,1)}),ue()}r?(e=Rt(r,a(n)),ee.push(()=>de(e,"field",l)),e.$on("remove",o),e.$on("rename",n[8]),H(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else r&&e.$set(c)},i(u){s||(e&&A(e.$$.fragment,u),s=!0)},o(u){e&&I(e.$$.fragment,u),s=!1},d(u){e&&z(e,u),u&&k(i)}}}function Ad(n,e){let t,i,s,l;function o(a){e[9](a)}let r={index:e[19],disabled:e[17].toDelete||e[17].id&&e[17].system,dragHandleClass:"drag-handle-wrapper",$$slots:{default:[d4]},$$scope:{ctx:e}};return e[0].schema!==void 0&&(r.list=e[0].schema),i=new Nl({props:r}),ee.push(()=>de(i,"list",o)),i.$on("drag",e[10]),i.$on("sort",e[11]),{key:n,first:null,c(){t=ye(),H(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),V(i,a,u),l=!0},p(a,u){e=a;const f={};u&1&&(f.index=e[19]),u&1&&(f.disabled=e[17].toDelete||e[17].id&&e[17].system),u&1048577&&(f.$$scope={dirty:u,ctx:e}),!s&&u&1&&(s=!0,f.list=e[0].schema,he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),z(i,a)}}}function p4(n){let e,t,i,s,l,o,r,a,u,f,c,d,m=[],_=new Map,h,b,y,S,C,$,T,M,O=n[0].$isAuth&&Dd(),D=n[0].schema;const L=F=>F[17];for(let F=0;Fde($,"collection",P)),{c(){e=v("div"),t=v("p"),i=U(`System fields: `),s=v("code"),s.textContent="id",l=U(` , `),o=v("code"),o.textContent="created",r=U(` , `),a=v("code"),a.textContent="updated",u=E(),O&&O.c(),f=U(` - .`),c=E(),d=v("div");for(let F=0;FT=!1)),$.$set(q)},i(F){if(!M){for(let R=0;RT.name===$)}function f($){return i.findIndex(T=>T===$)}function c($,T){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||$===T||!T||t(0,s.indexes=s.indexes.map(O=>B.replaceIndexColumn(O,$,T)),s)}function d($,T,M,O){M[O]=$,t(0,s)}const m=$=>o($),_=$=>c($.detail.oldName,$.detail.newName);function h($){n.$$.not_equal(s.schema,$)&&(s.schema=$,t(0,s))}const b=$=>{if(!$.detail)return;const T=$.detail.target;T.style.opacity=0,setTimeout(()=>{var M;(M=T==null?void 0:T.style)==null||M.removeProperty("opacity")},0),$.detail.dataTransfer.setDragImage(T,0,0)},y=()=>{en({})},S=$=>r($.detail);function C($){s=$,t(0,s)}return n.$$set=$=>{"collection"in $&&t(0,s=$.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&(t(0,s=s||new yn),t(0,s.schema=[],s)),n.$$.dirty&1&&(i=s.schema.filter($=>!$.toDelete)||[])},[s,l,o,r,f,c,d,m,_,h,b,y,S,C]}class p4 extends ge{constructor(e){super(),_e(this,e,d4,c4,me,{collection:0})}}const m4=n=>({isAdminOnly:n&512}),Id=n=>({isAdminOnly:n[9]}),h4=n=>({isAdminOnly:n&512}),Ld=n=>({isAdminOnly:n[9]}),_4=n=>({isAdminOnly:n&512}),Pd=n=>({isAdminOnly:n[9]});function g4(n){let e,t;return e=new pe({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[v4,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function b4(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Nd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Set Admins only`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[11]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Fd(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=`Unlock and set custom rule -
    `,p(e,"type","button"),p(e,"class","unlock-overlay svelte-1akuazq"),p(e,"aria-label","Unlock and set custom rule")},m(o,r){w(o,e,r),i=!0,s||(l=K(e,"click",n[10]),s=!0)},p:x,i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,Kt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function v4(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,c,d,m,_,h,b,y,S;const C=n[12].beforeLabel,$=yt(C,n,n[15],Pd),T=n[12].afterLabel,M=yt(T,n,n[15],Ld);let O=!n[9]&&Nd(n);function D(q){n[14](q)}var L=n[7];function P(q){let H={id:q[18],baseCollection:q[1],disabled:q[9],placeholder:q[9]?"":q[5]};return q[0]!==void 0&&(H.value=q[0]),{props:H}}L&&(m=Ft(L,P(n)),n[13](m),ee.push(()=>de(m,"value",D)));let N=n[9]&&Fd(n);const F=n[12].default,R=yt(F,n,n[15],Id);return{c(){e=v("div"),t=v("label"),$&&$.c(),i=E(),s=v("span"),l=U(n[2]),o=E(),a=U(r),u=E(),M&&M.c(),f=E(),O&&O.c(),d=E(),m&&z(m.$$.fragment),h=E(),N&&N.c(),b=E(),y=v("div"),R&&R.c(),p(s,"class","txt"),Q(s,"txt-hint",n[9]),p(t,"for",c=n[18]),p(e,"class","input-wrapper svelte-1akuazq"),p(y,"class","help-block")},m(q,H){w(q,e,H),g(e,t),$&&$.m(t,null),g(t,i),g(t,s),g(s,l),g(s,o),g(s,a),g(t,u),M&&M.m(t,null),g(t,f),O&&O.m(t,null),g(e,d),m&&j(m,e,null),g(e,h),N&&N.m(e,null),w(q,b,H),w(q,y,H),R&&R.m(y,null),S=!0},p(q,H){$&&$.p&&(!S||H&33280)&&wt($,C,q,q[15],S?kt(C,q[15],H,_4):St(q[15]),Pd),(!S||H&4)&&se(l,q[2]),(!S||H&512)&&r!==(r=q[9]?"- Admins only":"")&&se(a,r),(!S||H&512)&&Q(s,"txt-hint",q[9]),M&&M.p&&(!S||H&33280)&&wt(M,T,q,q[15],S?kt(T,q[15],H,h4):St(q[15]),Ld),q[9]?O&&(O.d(1),O=null):O?O.p(q,H):(O=Nd(q),O.c(),O.m(t,null)),(!S||H&262144&&c!==(c=q[18]))&&p(t,"for",c);const W={};if(H&262144&&(W.id=q[18]),H&2&&(W.baseCollection=q[1]),H&512&&(W.disabled=q[9]),H&544&&(W.placeholder=q[9]?"":q[5]),!_&&H&1&&(_=!0,W.value=q[0],he(()=>_=!1)),H&128&&L!==(L=q[7])){if(m){ae();const X=m;I(X.$$.fragment,1,0,()=>{V(X,1)}),ue()}L?(m=Ft(L,P(q)),q[13](m),ee.push(()=>de(m,"value",D)),z(m.$$.fragment),A(m.$$.fragment,1),j(m,e,h)):m=null}else L&&m.$set(W);q[9]?N?(N.p(q,H),H&512&&A(N,1)):(N=Fd(q),N.c(),A(N,1),N.m(e,null)):N&&(ae(),I(N,1,1,()=>{N=null}),ue()),R&&R.p&&(!S||H&33280)&&wt(R,F,q,q[15],S?kt(F,q[15],H,m4):St(q[15]),Id)},i(q){S||(A($,q),A(M,q),m&&A(m.$$.fragment,q),A(N),A(R,q),S=!0)},o(q){I($,q),I(M,q),m&&I(m.$$.fragment,q),I(N),I(R,q),S=!1},d(q){q&&k(e),$&&$.d(q),M&&M.d(q),O&&O.d(),n[13](null),m&&V(m),N&&N.d(),q&&k(b),q&&k(y),R&&R.d(q)}}}function y4(n){let e,t,i,s;const l=[b4,g4],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}let Rd;function k4(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,{placeholder:c="Leave empty to grant everyone access..."}=e,d=null,m=null,_=Rd,h=!1;b();async function b(){_||h||(t(8,h=!0),t(7,_=(await at(()=>import("./FilterAutocompleteInput-49490f14.js"),["./FilterAutocompleteInput-49490f14.js","./index-fd4289fb.js"],import.meta.url)).default),Rd=_,t(8,h=!1))}async function y(){t(0,r=m||""),await fn(),d==null||d.focus()}async function S(){m=r,t(0,r=null)}function C(T){ee[T?"unshift":"push"](()=>{d=T,t(6,d)})}function $(T){r=T,t(0,r)}return n.$$set=T=>{"collection"in T&&t(1,o=T.collection),"rule"in T&&t(0,r=T.rule),"label"in T&&t(2,a=T.label),"formKey"in T&&t(3,u=T.formKey),"required"in T&&t(4,f=T.required),"placeholder"in T&&t(5,c=T.placeholder),"$$scope"in T&&t(15,l=T.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,_,h,i,y,S,s,C,$,l]}class Os extends ge{constructor(e){super(),_e(this,e,k4,y4,me,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function qd(n,e,t){const i=n.slice();return i[11]=e[t],i}function jd(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L=n[2],P=[];for(let N=0;N@request filter:",c=E(),d=v("div"),d.innerHTML=`@request.headers.* + .`),c=E(),d=v("div");for(let F=0;FT=!1)),$.$set(q)},i(F){if(!M){for(let R=0;RT.name===$)}function f($){return i.findIndex(T=>T===$)}function c($,T){var M;!((M=s==null?void 0:s.schema)!=null&&M.length)||$===T||!T||t(0,s.indexes=s.indexes.map(O=>B.replaceIndexColumn(O,$,T)),s)}function d($,T,M,O){M[O]=$,t(0,s)}const m=$=>o($),_=$=>c($.detail.oldName,$.detail.newName);function h($){n.$$.not_equal(s.schema,$)&&(s.schema=$,t(0,s))}const b=$=>{if(!$.detail)return;const T=$.detail.target;T.style.opacity=0,setTimeout(()=>{var M;(M=T==null?void 0:T.style)==null||M.removeProperty("opacity")},0),$.detail.dataTransfer.setDragImage(T,0,0)},y=()=>{en({})},S=$=>r($.detail);function C($){s=$,t(0,s)}return n.$$set=$=>{"collection"in $&&t(0,s=$.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof s.schema>"u"&&(t(0,s=s||new yn),t(0,s.schema=[],s)),n.$$.dirty&1&&(i=s.schema.filter($=>!$.toDelete)||[])},[s,l,o,r,f,c,d,m,_,h,b,y,S,C]}class h4 extends ge{constructor(e){super(),_e(this,e,m4,p4,me,{collection:0})}}const _4=n=>({isAdminOnly:n&512}),Id=n=>({isAdminOnly:n[9]}),g4=n=>({isAdminOnly:n&512}),Ld=n=>({isAdminOnly:n[9]}),b4=n=>({isAdminOnly:n&512}),Pd=n=>({isAdminOnly:n[9]});function v4(n){let e,t;return e=new pe({props:{class:"form-field rule-field "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[k4,({uniqueId:i})=>({18:i}),({uniqueId:i})=>i?262144:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&528&&(l.class="form-field rule-field "+(i[4]?"requied":"")+" "+(i[9]?"disabled":"")),s&8&&(l.name=i[3]),s&295655&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function y4(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Nd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Set Admins only`,p(e,"type","button"),p(e,"class","btn btn-sm btn-transparent btn-hint lock-toggle svelte-1akuazq")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[11]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Fd(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=`Unlock and set custom rule +
    `,p(e,"type","button"),p(e,"class","unlock-overlay svelte-1akuazq"),p(e,"aria-label","Unlock and set custom rule")},m(o,r){w(o,e,r),i=!0,s||(l=J(e,"click",n[10]),s=!0)},p:x,i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.98},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,Kt,{duration:150,start:.98},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function k4(n){let e,t,i,s,l,o,r=n[9]?"- Admins only":"",a,u,f,c,d,m,_,h,b,y,S;const C=n[12].beforeLabel,$=yt(C,n,n[15],Pd),T=n[12].afterLabel,M=yt(T,n,n[15],Ld);let O=!n[9]&&Nd(n);function D(q){n[14](q)}var L=n[7];function P(q){let j={id:q[18],baseCollection:q[1],disabled:q[9],placeholder:q[9]?"":q[5]};return q[0]!==void 0&&(j.value=q[0]),{props:j}}L&&(m=Rt(L,P(n)),n[13](m),ee.push(()=>de(m,"value",D)));let N=n[9]&&Fd(n);const F=n[12].default,R=yt(F,n,n[15],Id);return{c(){e=v("div"),t=v("label"),$&&$.c(),i=E(),s=v("span"),l=U(n[2]),o=E(),a=U(r),u=E(),M&&M.c(),f=E(),O&&O.c(),d=E(),m&&H(m.$$.fragment),h=E(),N&&N.c(),b=E(),y=v("div"),R&&R.c(),p(s,"class","txt"),Q(s,"txt-hint",n[9]),p(t,"for",c=n[18]),p(e,"class","input-wrapper svelte-1akuazq"),p(y,"class","help-block")},m(q,j){w(q,e,j),g(e,t),$&&$.m(t,null),g(t,i),g(t,s),g(s,l),g(s,o),g(s,a),g(t,u),M&&M.m(t,null),g(t,f),O&&O.m(t,null),g(e,d),m&&V(m,e,null),g(e,h),N&&N.m(e,null),w(q,b,j),w(q,y,j),R&&R.m(y,null),S=!0},p(q,j){$&&$.p&&(!S||j&33280)&&wt($,C,q,q[15],S?kt(C,q[15],j,b4):St(q[15]),Pd),(!S||j&4)&&se(l,q[2]),(!S||j&512)&&r!==(r=q[9]?"- Admins only":"")&&se(a,r),(!S||j&512)&&Q(s,"txt-hint",q[9]),M&&M.p&&(!S||j&33280)&&wt(M,T,q,q[15],S?kt(T,q[15],j,g4):St(q[15]),Ld),q[9]?O&&(O.d(1),O=null):O?O.p(q,j):(O=Nd(q),O.c(),O.m(t,null)),(!S||j&262144&&c!==(c=q[18]))&&p(t,"for",c);const W={};if(j&262144&&(W.id=q[18]),j&2&&(W.baseCollection=q[1]),j&512&&(W.disabled=q[9]),j&544&&(W.placeholder=q[9]?"":q[5]),!_&&j&1&&(_=!0,W.value=q[0],he(()=>_=!1)),j&128&&L!==(L=q[7])){if(m){ae();const X=m;I(X.$$.fragment,1,0,()=>{z(X,1)}),ue()}L?(m=Rt(L,P(q)),q[13](m),ee.push(()=>de(m,"value",D)),H(m.$$.fragment),A(m.$$.fragment,1),V(m,e,h)):m=null}else L&&m.$set(W);q[9]?N?(N.p(q,j),j&512&&A(N,1)):(N=Fd(q),N.c(),A(N,1),N.m(e,null)):N&&(ae(),I(N,1,1,()=>{N=null}),ue()),R&&R.p&&(!S||j&33280)&&wt(R,F,q,q[15],S?kt(F,q[15],j,_4):St(q[15]),Id)},i(q){S||(A($,q),A(M,q),m&&A(m.$$.fragment,q),A(N),A(R,q),S=!0)},o(q){I($,q),I(M,q),m&&I(m.$$.fragment,q),I(N),I(R,q),S=!1},d(q){q&&k(e),$&&$.d(q),M&&M.d(q),O&&O.d(),n[13](null),m&&z(m),N&&N.d(),q&&k(b),q&&k(y),R&&R.d(q)}}}function w4(n){let e,t,i,s;const l=[y4,v4],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}let Rd;function S4(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,{placeholder:c="Leave empty to grant everyone access..."}=e,d=null,m=null,_=Rd,h=!1;b();async function b(){_||h||(t(8,h=!0),t(7,_=(await at(()=>import("./FilterAutocompleteInput-0a8b8b21.js"),["./FilterAutocompleteInput-0a8b8b21.js","./index-fd4289fb.js"],import.meta.url)).default),Rd=_,t(8,h=!1))}async function y(){t(0,r=m||""),await fn(),d==null||d.focus()}async function S(){m=r,t(0,r=null)}function C(T){ee[T?"unshift":"push"](()=>{d=T,t(6,d)})}function $(T){r=T,t(0,r)}return n.$$set=T=>{"collection"in T&&t(1,o=T.collection),"rule"in T&&t(0,r=T.rule),"label"in T&&t(2,a=T.label),"formKey"in T&&t(3,u=T.formKey),"required"in T&&t(4,f=T.required),"placeholder"in T&&t(5,c=T.placeholder),"$$scope"in T&&t(15,l=T.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,_,h,i,y,S,s,C,$,l]}class Os extends ge{constructor(e){super(),_e(this,e,S4,w4,me,{collection:1,rule:0,label:2,formKey:3,required:4,placeholder:5})}}function qd(n,e,t){const i=n.slice();return i[11]=e[t],i}function jd(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L=n[2],P=[];for(let N=0;N@request filter:",c=E(),d=v("div"),d.innerHTML=`@request.headers.* @request.query.* @request.data.* @request.auth.*`,m=E(),_=v("hr"),h=E(),b=v("p"),b.innerHTML="You could also add constraints and query other collections using the @collection filter:",y=E(),S=v("div"),S.innerHTML="@collection.ANY_COLLECTION_NAME.*",C=E(),$=v("hr"),T=E(),M=v("p"),M.innerHTML=`Example rule:
    - @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(a,"class","m-t-10 m-b-5"),p(f,"class","m-b-0"),p(d,"class","inline-flex flex-gap-5"),p(_,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(S,"class","inline-flex flex-gap-5"),p($,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(N,F){w(N,e,F),g(e,t),g(t,i),g(i,s),g(i,l),g(i,o);for(let R=0;R{D&&(O||(O=je(e,ot,{duration:150},!0)),O.run(1))}),D=!0)},o(N){N&&(O||(O=je(e,ot,{duration:150},!1)),O.run(0)),D=!1},d(N){N&&k(e),mt(P,N),N&&O&&O.end()}}}function Vd(n){let e,t=n[11]+"",i;return{c(){e=v("code"),i=U(t)},m(s,l){w(s,e,l),g(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&se(i,t)},d(s){s&&k(e)}}}function zd(n){let e,t,i,s,l,o,r,a,u;function f(b){n[6](b)}let c={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[w4,({isAdminOnly:b})=>({10:b}),({isAdminOnly:b})=>b?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(c.rule=n[0].createRule),e=new Os({props:c}),ee.push(()=>de(e,"rule",f));function d(b){n[7](b)}let m={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(m.rule=n[0].updateRule),s=new Os({props:m}),ee.push(()=>de(s,"rule",d));function _(b){n[8](b)}let h={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(h.rule=n[0].deleteRule),r=new Os({props:h}),ee.push(()=>de(r,"rule",_)),{c(){z(e.$$.fragment),i=E(),z(s.$$.fragment),o=E(),z(r.$$.fragment)},m(b,y){j(e,b,y),w(b,i,y),j(s,b,y),w(b,o,y),j(r,b,y),u=!0},p(b,y){const S={};y&1&&(S.collection=b[0]),y&17408&&(S.$$scope={dirty:y,ctx:b}),!t&&y&1&&(t=!0,S.rule=b[0].createRule,he(()=>t=!1)),e.$set(S);const C={};y&1&&(C.collection=b[0]),!l&&y&1&&(l=!0,C.rule=b[0].updateRule,he(()=>l=!1)),s.$set(C);const $={};y&1&&($.collection=b[0]),!a&&y&1&&(a=!0,$.rule=b[0].deleteRule,he(()=>a=!1)),r.$set($)},i(b){u||(A(e.$$.fragment,b),A(s.$$.fragment,b),A(r.$$.fragment,b),u=!0)},o(b){I(e.$$.fragment,b),I(s.$$.fragment,b),I(r.$$.fragment,b),u=!1},d(b){V(e,b),b&&k(i),V(s,b),b&&k(o),V(r,b)}}}function Hd(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-information-line link-hint")},m(s,l){w(s,e,l),t||(i=Me(He.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&k(e),t=!1,i()}}}function w4(n){let e,t=!n[10]&&Hd();return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=Hd(),t.c(),t.m(e.parentNode,e))},d(i){t&&t.d(i),i&&k(e)}}}function Bd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[S4]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new Os({props:l}),ee.push(()=>de(e,"rule",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function S4(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. + @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(a,"class","m-t-10 m-b-5"),p(f,"class","m-b-0"),p(d,"class","inline-flex flex-gap-5"),p(_,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(S,"class","inline-flex flex-gap-5"),p($,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(N,F){w(N,e,F),g(e,t),g(t,i),g(i,s),g(i,l),g(i,o);for(let R=0;R{D&&(O||(O=je(e,ot,{duration:150},!0)),O.run(1))}),D=!0)},o(N){N&&(O||(O=je(e,ot,{duration:150},!1)),O.run(0)),D=!1},d(N){N&&k(e),mt(P,N),N&&O&&O.end()}}}function Vd(n){let e,t=n[11]+"",i;return{c(){e=v("code"),i=U(t)},m(s,l){w(s,e,l),g(e,i)},p(s,l){l&4&&t!==(t=s[11]+"")&&se(i,t)},d(s){s&&k(e)}}}function zd(n){let e,t,i,s,l,o,r,a,u;function f(b){n[6](b)}let c={label:"Create rule",formKey:"createRule",collection:n[0],$$slots:{afterLabel:[$4,({isAdminOnly:b})=>({10:b}),({isAdminOnly:b})=>b?1024:0]},$$scope:{ctx:n}};n[0].createRule!==void 0&&(c.rule=n[0].createRule),e=new Os({props:c}),ee.push(()=>de(e,"rule",f));function d(b){n[7](b)}let m={label:"Update rule",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(m.rule=n[0].updateRule),s=new Os({props:m}),ee.push(()=>de(s,"rule",d));function _(b){n[8](b)}let h={label:"Delete rule",formKey:"deleteRule",collection:n[0]};return n[0].deleteRule!==void 0&&(h.rule=n[0].deleteRule),r=new Os({props:h}),ee.push(()=>de(r,"rule",_)),{c(){H(e.$$.fragment),i=E(),H(s.$$.fragment),o=E(),H(r.$$.fragment)},m(b,y){V(e,b,y),w(b,i,y),V(s,b,y),w(b,o,y),V(r,b,y),u=!0},p(b,y){const S={};y&1&&(S.collection=b[0]),y&17408&&(S.$$scope={dirty:y,ctx:b}),!t&&y&1&&(t=!0,S.rule=b[0].createRule,he(()=>t=!1)),e.$set(S);const C={};y&1&&(C.collection=b[0]),!l&&y&1&&(l=!0,C.rule=b[0].updateRule,he(()=>l=!1)),s.$set(C);const $={};y&1&&($.collection=b[0]),!a&&y&1&&(a=!0,$.rule=b[0].deleteRule,he(()=>a=!1)),r.$set($)},i(b){u||(A(e.$$.fragment,b),A(s.$$.fragment,b),A(r.$$.fragment,b),u=!0)},o(b){I(e.$$.fragment,b),I(s.$$.fragment,b),I(r.$$.fragment,b),u=!1},d(b){z(e,b),b&&k(i),z(s,b),b&&k(o),z(r,b)}}}function Hd(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-information-line link-hint")},m(s,l){w(s,e,l),t||(i=Me(He.call(null,e,{text:'The Create rule is executed after a "dry save" of the submitted data, giving you access to the main record fields as in every other rule.',position:"top"})),t=!0)},d(s){s&&k(e),t=!1,i()}}}function $4(n){let e,t=!n[10]&&Hd();return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[10]?t&&(t.d(1),t=null):t||(t=Hd(),t.c(),t.m(e.parentNode,e))},d(i){t&&t.d(i),i&&k(e)}}}function Bd(n){let e,t,i;function s(o){n[9](o)}let l={label:"Manage rule",formKey:"options.manageRule",placeholder:"",required:n[0].options.manageRule!==null,collection:n[0],$$slots:{default:[C4]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(l.rule=n[0].options.manageRule),e=new Os({props:l}),ee.push(()=>de(e,"rule",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r&1&&(a.required=o[0].options.manageRule!==null),r&1&&(a.collection=o[0]),r&16384&&(a.$$scope={dirty:r,ctx:o}),!t&&r&1&&(t=!0,a.rule=o[0].options.manageRule,he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function C4(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. changing the password without requiring to enter the old one, directly updating the verified - state or email, etc.`,t=E(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},p:x,d(s){s&&k(e),s&&k(t),s&&k(i)}}}function $4(n){var F,R;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,m,_,h,b,y,S,C,$,T=n[1]&&jd(n);function M(q){n[4](q)}let O={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(O.rule=n[0].listRule),f=new Os({props:O}),ee.push(()=>de(f,"rule",M));function D(q){n[5](q)}let L={label:"View rule",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(L.rule=n[0].viewRule),m=new Os({props:L}),ee.push(()=>de(m,"rule",D));let P=!((F=n[0])!=null&&F.$isView)&&zd(n),N=((R=n[0])==null?void 0:R.$isAuth)&&Bd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the + state or email, etc.`,t=E(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},p:x,d(s){s&&k(e),s&&k(t),s&&k(i)}}}function T4(n){var F,R;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,m,_,h,b,y,S,C,$,T=n[1]&&jd(n);function M(q){n[4](q)}let O={label:"List/Search rule",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(O.rule=n[0].listRule),f=new Os({props:O}),ee.push(()=>de(f,"rule",M));function D(q){n[5](q)}let L={label:"View rule",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(L.rule=n[0].viewRule),m=new Os({props:L}),ee.push(()=>de(m,"rule",D));let P=!((F=n[0])!=null&&F.$isView)&&zd(n),N=((R=n[0])==null?void 0:R.$isAuth)&&Bd(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the
    PocketBase filter syntax and operators - .`,s=E(),l=v("button"),r=U(o),a=E(),T&&T.c(),u=E(),z(f.$$.fragment),d=E(),z(m.$$.fragment),h=E(),P&&P.c(),b=E(),N&&N.c(),y=ye(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-sm handle")},m(q,H){w(q,e,H),g(e,t),g(t,i),g(t,s),g(t,l),g(l,r),g(e,a),T&&T.m(e,null),w(q,u,H),j(f,q,H),w(q,d,H),j(m,q,H),w(q,h,H),P&&P.m(q,H),w(q,b,H),N&&N.m(q,H),w(q,y,H),S=!0,C||($=K(l,"click",n[3]),C=!0)},p(q,[H]){var J,Z;(!S||H&2)&&o!==(o=q[1]?"Hide available fields":"Show available fields")&&se(r,o),q[1]?T?(T.p(q,H),H&2&&A(T,1)):(T=jd(q),T.c(),A(T,1),T.m(e,null)):T&&(ae(),I(T,1,1,()=>{T=null}),ue());const W={};H&1&&(W.collection=q[0]),!c&&H&1&&(c=!0,W.rule=q[0].listRule,he(()=>c=!1)),f.$set(W);const X={};H&1&&(X.collection=q[0]),!_&&H&1&&(_=!0,X.rule=q[0].viewRule,he(()=>_=!1)),m.$set(X),(J=q[0])!=null&&J.$isView?P&&(ae(),I(P,1,1,()=>{P=null}),ue()):P?(P.p(q,H),H&1&&A(P,1)):(P=zd(q),P.c(),A(P,1),P.m(b.parentNode,b)),(Z=q[0])!=null&&Z.$isAuth?N?(N.p(q,H),H&1&&A(N,1)):(N=Bd(q),N.c(),A(N,1),N.m(y.parentNode,y)):N&&(ae(),I(N,1,1,()=>{N=null}),ue())},i(q){S||(A(T),A(f.$$.fragment,q),A(m.$$.fragment,q),A(P),A(N),S=!0)},o(q){I(T),I(f.$$.fragment,q),I(m.$$.fragment,q),I(P),I(N),S=!1},d(q){q&&k(e),T&&T.d(),q&&k(u),V(f,q),q&&k(d),V(m,q),q&&k(h),P&&P.d(q),q&&k(b),N&&N.d(q),q&&k(y),C=!1,$()}}}function C4(n,e,t){let i,{collection:s=new yn}=e,l=!1;const o=()=>t(1,l=!l);function r(m){n.$$.not_equal(s.listRule,m)&&(s.listRule=m,t(0,s))}function a(m){n.$$.not_equal(s.viewRule,m)&&(s.viewRule=m,t(0,s))}function u(m){n.$$.not_equal(s.createRule,m)&&(s.createRule=m,t(0,s))}function f(m){n.$$.not_equal(s.updateRule,m)&&(s.updateRule=m,t(0,s))}function c(m){n.$$.not_equal(s.deleteRule,m)&&(s.deleteRule=m,t(0,s))}function d(m){n.$$.not_equal(s.options.manageRule,m)&&(s.options.manageRule=m,t(0,s))}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=B.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,u,f,c,d]}class T4 extends ge{constructor(e){super(),_e(this,e,C4,$4,me,{collection:0})}}function Ud(n,e,t){const i=n.slice();return i[9]=e[t],i}function M4(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a){let u={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql-select",minHeight:"150"};return a[0].options.query!==void 0&&(u.value=a[0].options.query),{props:u}}return o&&(e=Ft(o,r(n)),ee.push(()=>de(e,"value",l)),e.$on("change",n[6])),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&j(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u&256&&(f.id=a[8]),!t&&u&1&&(t=!0,f.value=a[0].options.query,he(()=>t=!1)),u&2&&o!==(o=a[1])){if(e){ae();const c=e;I(c.$$.fragment,1,0,()=>{V(c,1)}),ue()}o?(e=Ft(o,r(a)),ee.push(()=>de(e,"value",l)),e.$on("change",a[6]),z(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&V(e,a)}}}function O4(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Wd(n){let e,t,i=n[3],s=[];for(let l=0;l
  • Wildcard columns (*) are not supported.
  • + .`,s=E(),l=v("button"),r=U(o),a=E(),T&&T.c(),u=E(),H(f.$$.fragment),d=E(),H(m.$$.fragment),h=E(),P&&P.c(),b=E(),N&&N.c(),y=ye(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-sm handle")},m(q,j){w(q,e,j),g(e,t),g(t,i),g(t,s),g(t,l),g(l,r),g(e,a),T&&T.m(e,null),w(q,u,j),V(f,q,j),w(q,d,j),V(m,q,j),w(q,h,j),P&&P.m(q,j),w(q,b,j),N&&N.m(q,j),w(q,y,j),S=!0,C||($=J(l,"click",n[3]),C=!0)},p(q,[j]){var K,Z;(!S||j&2)&&o!==(o=q[1]?"Hide available fields":"Show available fields")&&se(r,o),q[1]?T?(T.p(q,j),j&2&&A(T,1)):(T=jd(q),T.c(),A(T,1),T.m(e,null)):T&&(ae(),I(T,1,1,()=>{T=null}),ue());const W={};j&1&&(W.collection=q[0]),!c&&j&1&&(c=!0,W.rule=q[0].listRule,he(()=>c=!1)),f.$set(W);const X={};j&1&&(X.collection=q[0]),!_&&j&1&&(_=!0,X.rule=q[0].viewRule,he(()=>_=!1)),m.$set(X),(K=q[0])!=null&&K.$isView?P&&(ae(),I(P,1,1,()=>{P=null}),ue()):P?(P.p(q,j),j&1&&A(P,1)):(P=zd(q),P.c(),A(P,1),P.m(b.parentNode,b)),(Z=q[0])!=null&&Z.$isAuth?N?(N.p(q,j),j&1&&A(N,1)):(N=Bd(q),N.c(),A(N,1),N.m(y.parentNode,y)):N&&(ae(),I(N,1,1,()=>{N=null}),ue())},i(q){S||(A(T),A(f.$$.fragment,q),A(m.$$.fragment,q),A(P),A(N),S=!0)},o(q){I(T),I(f.$$.fragment,q),I(m.$$.fragment,q),I(P),I(N),S=!1},d(q){q&&k(e),T&&T.d(),q&&k(u),z(f,q),q&&k(d),z(m,q),q&&k(h),P&&P.d(q),q&&k(b),N&&N.d(q),q&&k(y),C=!1,$()}}}function M4(n,e,t){let i,{collection:s=new yn}=e,l=!1;const o=()=>t(1,l=!l);function r(m){n.$$.not_equal(s.listRule,m)&&(s.listRule=m,t(0,s))}function a(m){n.$$.not_equal(s.viewRule,m)&&(s.viewRule=m,t(0,s))}function u(m){n.$$.not_equal(s.createRule,m)&&(s.createRule=m,t(0,s))}function f(m){n.$$.not_equal(s.updateRule,m)&&(s.updateRule=m,t(0,s))}function c(m){n.$$.not_equal(s.deleteRule,m)&&(s.deleteRule=m,t(0,s))}function d(m){n.$$.not_equal(s.options.manageRule,m)&&(s.options.manageRule=m,t(0,s))}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=B.getAllCollectionIdentifiers(s))},[s,l,i,o,r,a,u,f,c,d]}class O4 extends ge{constructor(e){super(),_e(this,e,M4,T4,me,{collection:0})}}function Ud(n,e,t){const i=n.slice();return i[9]=e[t],i}function E4(n){let e,t,i,s;function l(a){n[5](a)}var o=n[1];function r(a){let u={id:a[8],placeholder:"eg. SELECT id, name from posts",language:"sql-select",minHeight:"150"};return a[0].options.query!==void 0&&(u.value=a[0].options.query),{props:u}}return o&&(e=Rt(o,r(n)),ee.push(()=>de(e,"value",l)),e.$on("change",n[6])),{c(){e&&H(e.$$.fragment),i=ye()},m(a,u){e&&V(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u&256&&(f.id=a[8]),!t&&u&1&&(t=!0,f.value=a[0].options.query,he(()=>t=!1)),u&2&&o!==(o=a[1])){if(e){ae();const c=e;I(c.$$.fragment,1,0,()=>{z(c,1)}),ue()}o?(e=Rt(o,r(a)),ee.push(()=>de(e,"value",l)),e.$on("change",a[6]),H(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function D4(n){let e;return{c(){e=v("textarea"),e.disabled=!0,p(e,"rows","7"),p(e,"placeholder","Loading...")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function Wd(n){let e,t,i=n[3],s=[];for(let l=0;l
  • Wildcard columns (*) are not supported.
  • The query must have a unique id column.
    If your query doesn't have a suitable one, you can use the universal (ROW_NUMBER() OVER()) as id.
  • Expressions must be aliased with a valid formatted field name (eg. - MAX(balance) as maxBalance).
  • `,u=E(),h&&h.c(),f=ye(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(b,y){w(b,e,y),g(e,t),w(b,s,y),m[l].m(b,y),w(b,r,y),w(b,a,y),w(b,u,y),h&&h.m(b,y),w(b,f,y),c=!0},p(b,y){(!c||y&256&&i!==(i=b[8]))&&p(e,"for",i);let S=l;l=_(b),l===S?m[l].p(b,y):(ae(),I(m[S],1,1,()=>{m[S]=null}),ue(),o=m[l],o?o.p(b,y):(o=m[l]=d[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?h?h.p(b,y):(h=Wd(b),h.c(),h.m(f.parentNode,f)):h&&(h.d(1),h=null)},i(b){c||(A(o),c=!0)},o(b){I(o),c=!1},d(b){b&&k(e),b&&k(s),m[l].d(b),b&&k(r),b&&k(a),b&&k(u),h&&h.d(b),b&&k(f)}}}function D4(n){let e,t;return e=new pe({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[E4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function A4(n,e,t){let i;Je(n,Si,c=>t(4,i=c));let{collection:s=new yn}=e,l,o=!1,r=[];function a(c){var _;t(3,r=[]);const d=B.getNestedVal(c,"schema",null);if(B.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const m=B.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);B.removeByValue(m,"id"),B.removeByValue(m,"created"),B.removeByValue(m,"updated");for(let h in d)for(let b in d[h]){const y=d[h][b].message,S=m[h]||h;r.push(B.sentenize(S+": "+y))}}Gt(async()=>{t(2,o=!0);try{t(1,l=(await at(()=>import("./CodeEditor-bc0a826d.js"),["./CodeEditor-bc0a826d.js","./index-fd4289fb.js"],import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function u(c){n.$$.not_equal(s.options.query,c)&&(s.options.query=c,t(0,s))}const f=()=>{r.length&&ai("schema")};return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class I4 extends ge{constructor(e){super(),_e(this,e,A4,D4,me,{collection:0})}}const L4=n=>({active:n&1}),Kd=n=>({active:n[0]});function Jd(n){let e,t,i;const s=n[15].default,l=yt(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){w(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&wt(l,s,o,o[14],i?kt(s,o[14],r,null):St(o[14]),null)},i(o){i||(A(l,o),o&&Qe(()=>{i&&(t||(t=je(e,ot,{duration:150},!0)),t.run(1))}),i=!0)},o(o){I(l,o),o&&(t||(t=je(e,ot,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),o&&t&&t.end()}}}function P4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=yt(a,n,n[14],Kd);let f=n[0]&&Jd(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=E(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){w(c,e,d),g(e,t),u&&u.m(t,null),g(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[K(t,"click",et(n[17])),K(t,"drop",et(n[18])),K(t,"dragstart",n[19]),K(t,"dragenter",n[20]),K(t,"dragleave",n[21]),K(t,"dragover",et(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&wt(u,a,c,c[14],l?kt(a,c[14],d,L4):St(c[14]),Kd),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Jd(c),f.c(),A(f,1),f.m(e,null)):f&&(ae(),I(f,1,1,()=>{f=null}),ue()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){I(u,c),I(f),l=!1},d(c){c&&k(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,Ee(r)}}}function N4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=$t();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,m=!1;function _(){return!!f}function h(){S(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),f?b():h()}function S(){if(d&&o.closest(".accordions")){const P=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const N of P)N.click()}}Gt(()=>()=>clearTimeout(r));function C(P){Ne.call(this,n,P)}const $=()=>c&&y(),T=P=>{u&&(t(7,m=!1),S(),l("drop",P))},M=P=>u&&l("dragstart",P),O=P=>{u&&(t(7,m=!0),l("dragenter",P))},D=P=>{u&&(t(7,m=!1),l("dragleave",P))};function L(P){ee[P?"unshift":"push"](()=>{o=P,t(6,o)})}return n.$$set=P=>{"class"in P&&t(1,a=P.class),"draggable"in P&&t(2,u=P.draggable),"active"in P&&t(0,f=P.active),"interactive"in P&&t(3,c=P.interactive),"single"in P&&t(9,d=P.single),"$$scope"in P&&t(14,s=P.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,c,y,S,o,m,l,d,_,h,b,r,s,i,C,$,T,M,O,D,L]}class co extends ge{constructor(e){super(),_e(this,e,N4,P4,me,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function F4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowUsernameAuth,w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function R4(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[F4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function q4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function j4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Zd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function V4(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowUsernameAuth?j4:q4}let u=a(n),f=u(n),c=n[3]&&Zd();return{c(){e=v("div"),e.innerHTML=` - Username/Password`,t=E(),i=v("div"),s=E(),f.c(),l=E(),c&&c.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){w(d,e,m),w(d,t,m),w(d,i,m),w(d,s,m),f.m(d,m),w(d,l,m),c&&c.m(d,m),w(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?m&8&&A(c,1):(c=Zd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){r||(A(c),r=!0)},o(d){I(c),r=!1},d(d){d&&k(e),d&&k(t),d&&k(i),d&&k(s),f.d(d),d&&k(l),c&&c.d(d),d&&k(o)}}}function z4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowEmailAuth,w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Gd(n){let e,t,i,s,l,o,r,a;return i=new pe({props:{class:"form-field "+(B.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[H4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field "+(B.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[B4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){w(u,e,f),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(B.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(B.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&Qe(()=>{a&&(r||(r=je(e,ot,{duration:150},!0)),r.run(1))}),a=!0)},o(u){I(i.$$.fragment,u),I(o.$$.fragment,u),u&&(r||(r=je(e,ot,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&k(e),V(i),V(o),u&&r&&r.end()}}}function H4(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function _(b){n[7](b)}let h={id:n[12],disabled:!B.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(h.value=n[0].options.exceptEmailDomains),r=new Vs({props:h}),ee.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),j(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Me(He.call(null,s,{text:`Email domains that are NOT allowed to sign up. - This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=b[12]),y&1&&(S.disabled=!B.isEmpty(b[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,S.value=b[0].options.exceptEmailDomains,he(()=>a=!1)),r.$set(S)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),V(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function B4(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function _(b){n[8](b)}let h={id:n[12],disabled:!B.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(h.value=n[0].options.onlyEmailDomains),r=new Vs({props:h}),ee.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),z(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),j(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Me(He.call(null,s,{text:`Email domains that are ONLY allowed to sign up. - This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=b[12]),y&1&&(S.disabled=!B.isEmpty(b[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,S.value=b[0].options.onlyEmailDomains,he(()=>a=!1)),r.$set(S)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),V(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function U4(n){let e,t,i,s;e=new pe({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[z4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Gd(n);return{c(){z(e.$$.fragment),t=E(),l&&l.c(),i=ye()},m(o,r){j(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=Gd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){V(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function W4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Y4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Xd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function K4(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowEmailAuth?Y4:W4}let u=a(n),f=u(n),c=n[2]&&Xd();return{c(){e=v("div"),e.innerHTML=` - Email/Password`,t=E(),i=v("div"),s=E(),f.c(),l=E(),c&&c.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){w(d,e,m),w(d,t,m),w(d,i,m),w(d,s,m),f.m(d,m),w(d,l,m),c&&c.m(d,m),w(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?m&4&&A(c,1):(c=Xd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){r||(A(c),r=!0)},o(d){I(c),r=!1},d(d){d&&k(e),d&&k(t),d&&k(i),d&&k(s),f.d(d),d&&k(l),c&&c.d(d),d&&k(o)}}}function J4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowOAuth2Auth,w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Qd(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{i&&(t||(t=je(e,ot,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=je(e,ot,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function Z4(n){let e,t,i,s;e=new pe({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[J4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Qd();return{c(){z(e.$$.fragment),t=E(),l&&l.c(),i=ye()},m(o,r){j(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=Qd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){V(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function G4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function X4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Q4(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowOAuth2Auth?X4:G4}let u=a(n),f=u(n),c=n[1]&&xd();return{c(){e=v("div"),e.innerHTML=` - OAuth2`,t=E(),i=v("div"),s=E(),f.c(),l=E(),c&&c.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){w(d,e,m),w(d,t,m),w(d,i,m),w(d,s,m),f.m(d,m),w(d,l,m),c&&c.m(d,m),w(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?m&2&&A(c,1):(c=xd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){r||(A(c),r=!0)},o(d){I(c),r=!1},d(d){d&&k(e),d&&k(t),d&&k(i),d&&k(s),f.d(d),d&&k(l),c&&c.d(d),d&&k(o)}}}function x4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Minimum password length"),s=E(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.minPasswordLength),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.minPasswordLength&&re(l,u[0].options.minPasswordLength)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function eM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Always require email",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){w(c,e,d),e.checked=n[0].options.requireEmail,w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=[K(e,"change",n[11]),Me(He.call(null,r,{text:`The constraint is applied only for new records. -Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function tM(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y;return s=new co({props:{single:!0,$$slots:{header:[V4],default:[R4]},$$scope:{ctx:n}}}),o=new co({props:{single:!0,$$slots:{header:[K4],default:[U4]},$$scope:{ctx:n}}}),a=new co({props:{single:!0,$$slots:{header:[Q4],default:[Z4]},$$scope:{ctx:n}}}),_=new pe({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[x4,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),b=new pe({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[eM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=E(),i=v("div"),z(s.$$.fragment),l=E(),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),f=v("hr"),c=E(),d=v("h4"),d.textContent="General",m=E(),z(_.$$.fragment),h=E(),z(b.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(S,C){w(S,e,C),w(S,t,C),w(S,i,C),j(s,i,null),g(i,l),j(o,i,null),g(i,r),j(a,i,null),w(S,u,C),w(S,f,C),w(S,c,C),w(S,d,C),w(S,m,C),j(_,S,C),w(S,h,C),j(b,S,C),y=!0},p(S,[C]){const $={};C&8201&&($.$$scope={dirty:C,ctx:S}),s.$set($);const T={};C&8197&&(T.$$scope={dirty:C,ctx:S}),o.$set(T);const M={};C&8195&&(M.$$scope={dirty:C,ctx:S}),a.$set(M);const O={};C&12289&&(O.$$scope={dirty:C,ctx:S}),_.$set(O);const D={};C&12289&&(D.$$scope={dirty:C,ctx:S}),b.$set(D)},i(S){y||(A(s.$$.fragment,S),A(o.$$.fragment,S),A(a.$$.fragment,S),A(_.$$.fragment,S),A(b.$$.fragment,S),y=!0)},o(S){I(s.$$.fragment,S),I(o.$$.fragment,S),I(a.$$.fragment,S),I(_.$$.fragment,S),I(b.$$.fragment,S),y=!1},d(S){S&&k(e),S&&k(t),S&&k(i),V(s),V(o),V(a),S&&k(u),S&&k(f),S&&k(c),S&&k(d),S&&k(m),V(_,S),S&&k(h),V(b,S)}}}function nM(n,e,t){let i,s,l,o;Je(n,Si,h=>t(4,o=h));let{collection:r=new yn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(h){n.$$.not_equal(r.options.exceptEmailDomains,h)&&(r.options.exceptEmailDomains=h,t(0,r))}function c(h){n.$$.not_equal(r.options.onlyEmailDomains,h)&&(r.options.onlyEmailDomains=h,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=dt(this.value),t(0,r)}function _(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=h=>{"collection"in h&&t(0,r=h.collection)},n.$$.update=()=>{var h,b,y,S;n.$$.dirty&1&&r.$isAuth&&B.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!B.isEmpty((h=o==null?void 0:o.options)==null?void 0:h.allowEmailAuth)||!B.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!B.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!B.isEmpty((S=o==null?void 0:o.options)==null?void 0:S.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,m,_]}class iM extends ge{constructor(e){super(),_e(this,e,nM,tM,me,{collection:0})}}function ep(n,e,t){const i=n.slice();return i[17]=e[t],i}function tp(n,e,t){const i=n.slice();return i[17]=e[t],i}function np(n,e,t){const i=n.slice();return i[17]=e[t],i}function ip(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function sp(n){var r;let e,t,i,s,l=n[3]&&lp(n),o=!((r=n[2])!=null&&r.$isView)&&op(n);return{c(){e=v("h6"),e.textContent="Changes:",t=E(),i=v("ul"),l&&l.c(),s=E(),o&&o.c(),p(i,"class","changes-list svelte-xqpcsf")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),l&&l.m(i,null),g(i,s),o&&o.m(i,null)},p(a,u){var f;a[3]?l?l.p(a,u):(l=lp(a),l.c(),l.m(i,s)):l&&(l.d(1),l=null),(f=a[2])!=null&&f.$isView?o&&(o.d(1),o=null):o?o.p(a,u):(o=op(a),o.c(),o.m(i,null))},d(a){a&&k(e),a&&k(t),a&&k(i),l&&l.d(),o&&o.d()}}}function lp(n){var m,_;let e,t,i,s,l=((m=n[1])==null?void 0:m.name)+"",o,r,a,u,f,c=((_=n[2])==null?void 0:_.name)+"",d;return{c(){e=v("li"),t=v("div"),i=U(`Renamed collection + MAX(balance) as maxBalance).`,u=E(),h&&h.c(),f=ye(),p(t,"class","txt"),p(e,"for",i=n[8]),p(a,"class","help-block")},m(b,y){w(b,e,y),g(e,t),w(b,s,y),m[l].m(b,y),w(b,r,y),w(b,a,y),w(b,u,y),h&&h.m(b,y),w(b,f,y),c=!0},p(b,y){(!c||y&256&&i!==(i=b[8]))&&p(e,"for",i);let S=l;l=_(b),l===S?m[l].p(b,y):(ae(),I(m[S],1,1,()=>{m[S]=null}),ue(),o=m[l],o?o.p(b,y):(o=m[l]=d[l](b),o.c()),A(o,1),o.m(r.parentNode,r)),b[3].length?h?h.p(b,y):(h=Wd(b),h.c(),h.m(f.parentNode,f)):h&&(h.d(1),h=null)},i(b){c||(A(o),c=!0)},o(b){I(o),c=!1},d(b){b&&k(e),b&&k(s),m[l].d(b),b&&k(r),b&&k(a),b&&k(u),h&&h.d(b),b&&k(f)}}}function I4(n){let e,t;return e=new pe({props:{class:"form-field required "+(n[3].length?"error":""),name:"options.query",$$slots:{default:[A4,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field required "+(i[3].length?"error":"")),s&4367&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function L4(n,e,t){let i;Je(n,Si,c=>t(4,i=c));let{collection:s=new yn}=e,l,o=!1,r=[];function a(c){var _;t(3,r=[]);const d=B.getNestedVal(c,"schema",null);if(B.isEmpty(d))return;if(d!=null&&d.message){r.push(d==null?void 0:d.message);return}const m=B.extractColumnsFromQuery((_=s==null?void 0:s.options)==null?void 0:_.query);B.removeByValue(m,"id"),B.removeByValue(m,"created"),B.removeByValue(m,"updated");for(let h in d)for(let b in d[h]){const y=d[h][b].message,S=m[h]||h;r.push(B.sentenize(S+": "+y))}}Gt(async()=>{t(2,o=!0);try{t(1,l=(await at(()=>import("./CodeEditor-14802b79.js"),["./CodeEditor-14802b79.js","./index-fd4289fb.js"],import.meta.url)).default)}catch(c){console.warn(c)}t(2,o=!1)});function u(c){n.$$.not_equal(s.options.query,c)&&(s.options.query=c,t(0,s))}const f=()=>{r.length&&ai("schema")};return n.$$set=c=>{"collection"in c&&t(0,s=c.collection)},n.$$.update=()=>{n.$$.dirty&16&&a(i)},[s,l,o,r,i,u,f]}class P4 extends ge{constructor(e){super(),_e(this,e,L4,I4,me,{collection:0})}}const N4=n=>({active:n&1}),Kd=n=>({active:n[0]});function Jd(n){let e,t,i;const s=n[15].default,l=yt(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){w(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&wt(l,s,o,o[14],i?kt(s,o[14],r,null):St(o[14]),null)},i(o){i||(A(l,o),o&&Qe(()=>{i&&(t||(t=je(e,ot,{duration:150},!0)),t.run(1))}),i=!0)},o(o){I(l,o),o&&(t||(t=je(e,ot,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&k(e),l&&l.d(o),o&&t&&t.end()}}}function F4(n){let e,t,i,s,l,o,r;const a=n[15].header,u=yt(a,n,n[14],Kd);let f=n[0]&&Jd(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=E(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),Q(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),Q(e,"active",n[0])},m(c,d){w(c,e,d),g(e,t),u&&u.m(t,null),g(e,i),f&&f.m(e,null),n[22](e),l=!0,o||(r=[J(t,"click",et(n[17])),J(t,"drop",et(n[18])),J(t,"dragstart",n[19]),J(t,"dragenter",n[20]),J(t,"dragleave",n[21]),J(t,"dragover",et(n[16]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&16385)&&wt(u,a,c,c[14],l?kt(a,c[14],d,N4):St(c[14]),Kd),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&Q(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&A(f,1)):(f=Jd(c),f.c(),A(f,1),f.m(e,null)):f&&(ae(),I(f,1,1,()=>{f=null}),ue()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&Q(e,"active",c[0])},i(c){l||(A(u,c),A(f),l=!0)},o(c){I(u,c),I(f),l=!1},d(c){c&&k(e),u&&u.d(c),f&&f.d(),n[22](null),o=!1,Ee(r)}}}function R4(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=$t();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,m=!1;function _(){return!!f}function h(){S(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function y(){l("toggle"),f?b():h()}function S(){if(d&&o.closest(".accordions")){const P=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const N of P)N.click()}}Gt(()=>()=>clearTimeout(r));function C(P){Ne.call(this,n,P)}const $=()=>c&&y(),T=P=>{u&&(t(7,m=!1),S(),l("drop",P))},M=P=>u&&l("dragstart",P),O=P=>{u&&(t(7,m=!0),l("dragenter",P))},D=P=>{u&&(t(7,m=!1),l("dragleave",P))};function L(P){ee[P?"unshift":"push"](()=>{o=P,t(6,o)})}return n.$$set=P=>{"class"in P&&t(1,a=P.class),"draggable"in P&&t(2,u=P.draggable),"active"in P&&t(0,f=P.active),"interactive"in P&&t(3,c=P.interactive),"single"in P&&t(9,d=P.single),"$$scope"in P&&t(14,s=P.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},200)))},[f,a,u,c,y,S,o,m,l,d,_,h,b,r,s,i,C,$,T,M,O,D,L]}class po extends ge{constructor(e){super(),_e(this,e,R4,F4,me,{class:1,draggable:2,active:0,interactive:3,single:9,isExpanded:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get isExpanded(){return this.$$.ctx[10]}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}function q4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowUsernameAuth,w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function j4(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[q4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function V4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function z4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Zd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function H4(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowUsernameAuth?z4:V4}let u=a(n),f=u(n),c=n[3]&&Zd();return{c(){e=v("div"),e.innerHTML=` + Username/Password`,t=E(),i=v("div"),s=E(),f.c(),l=E(),c&&c.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){w(d,e,m),w(d,t,m),w(d,i,m),w(d,s,m),f.m(d,m),w(d,l,m),c&&c.m(d,m),w(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?m&8&&A(c,1):(c=Zd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){r||(A(c),r=!0)},o(d){I(c),r=!1},d(d){d&&k(e),d&&k(t),d&&k(i),d&&k(s),f.d(d),d&&k(l),c&&c.d(d),d&&k(o)}}}function B4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowEmailAuth,w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Gd(n){let e,t,i,s,l,o,r,a;return i=new pe({props:{class:"form-field "+(B.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[U4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field "+(B.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[W4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){w(u,e,f),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(B.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(B.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(A(i.$$.fragment,u),A(o.$$.fragment,u),u&&Qe(()=>{a&&(r||(r=je(e,ot,{duration:150},!0)),r.run(1))}),a=!0)},o(u){I(i.$$.fragment,u),I(o.$$.fragment,u),u&&(r||(r=je(e,ot,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&k(e),z(i),z(o),u&&r&&r.end()}}}function U4(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function _(b){n[7](b)}let h={id:n[12],disabled:!B.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(h.value=n[0].options.exceptEmailDomains),r=new Vs({props:h}),ee.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=E(),s=v("i"),o=E(),H(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Me(He.call(null,s,{text:`Email domains that are NOT allowed to sign up. + This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=b[12]),y&1&&(S.disabled=!B.isEmpty(b[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,S.value=b[0].options.exceptEmailDomains,he(()=>a=!1)),r.$set(S)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function W4(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;function _(b){n[8](b)}let h={id:n[12],disabled:!B.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(h.value=n[0].options.onlyEmailDomains),r=new Vs({props:h}),ee.push(()=>de(r,"value",_)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=E(),s=v("i"),o=E(),H(r.$$.fragment),u=E(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),V(r,b,y),w(b,u,y),w(b,f,y),c=!0,d||(m=Me(He.call(null,s,{text:`Email domains that are ONLY allowed to sign up. + This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const S={};y&4096&&(S.id=b[12]),y&1&&(S.disabled=!B.isEmpty(b[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,S.value=b[0].options.onlyEmailDomains,he(()=>a=!1)),r.$set(S)},i(b){c||(A(r.$$.fragment,b),c=!0)},o(b){I(r.$$.fragment,b),c=!1},d(b){b&&k(e),b&&k(o),z(r,b),b&&k(u),b&&k(f),d=!1,m()}}}function Y4(n){let e,t,i,s;e=new pe({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[B4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&Gd(n);return{c(){H(e.$$.fragment),t=E(),l&&l.c(),i=ye()},m(o,r){V(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&A(l,1)):(l=Gd(o),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){z(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function K4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function J4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Xd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function Z4(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowEmailAuth?J4:K4}let u=a(n),f=u(n),c=n[2]&&Xd();return{c(){e=v("div"),e.innerHTML=` + Email/Password`,t=E(),i=v("div"),s=E(),f.c(),l=E(),c&&c.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){w(d,e,m),w(d,t,m),w(d,i,m),w(d,s,m),f.m(d,m),w(d,l,m),c&&c.m(d,m),w(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?m&4&&A(c,1):(c=Xd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){r||(A(c),r=!0)},o(d){I(c),r=!1},d(d){d&&k(e),d&&k(t),d&&k(i),d&&k(s),f.d(d),d&&k(l),c&&c.d(d),d&&k(o)}}}function G4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){w(u,e,f),e.checked=n[0].options.allowOAuth2Auth,w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Qd(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){w(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{i&&(t||(t=je(e,ot,{duration:150},!0)),t.run(1))}),i=!0)},o(s){s&&(t||(t=je(e,ot,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&k(e),s&&t&&t.end()}}}function X4(n){let e,t,i,s;e=new pe({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[G4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&Qd();return{c(){H(e.$$.fragment),t=E(),l&&l.c(),i=ye()},m(o,r){V(e,o,r),w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&A(l,1):(l=Qd(),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){s||(A(e.$$.fragment,o),A(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){z(e,o),o&&k(t),l&&l.d(o),o&&k(i)}}}function Q4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function x4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function eM(n){let e,t,i,s,l,o,r;function a(d,m){return d[0].options.allowOAuth2Auth?x4:Q4}let u=a(n),f=u(n),c=n[1]&&xd();return{c(){e=v("div"),e.innerHTML=` + OAuth2`,t=E(),i=v("div"),s=E(),f.c(),l=E(),c&&c.c(),o=ye(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,m){w(d,e,m),w(d,t,m),w(d,i,m),w(d,s,m),f.m(d,m),w(d,l,m),c&&c.m(d,m),w(d,o,m),r=!0},p(d,m){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?m&2&&A(c,1):(c=xd(),c.c(),A(c,1),c.m(o.parentNode,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue())},i(d){r||(A(c),r=!0)},o(d){I(c),r=!1},d(d){d&&k(e),d&&k(t),d&&k(i),d&&k(s),f.d(d),d&&k(l),c&&c.d(d),d&&k(o)}}}function tM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Minimum password length"),s=E(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].options.minPasswordLength),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].options.minPasswordLength&&re(l,u[0].options.minPasswordLength)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function nM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Always require email",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){w(c,e,d),e.checked=n[0].options.requireEmail,w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=[J(e,"change",n[11]),Me(He.call(null,r,{text:`The constraint is applied only for new records. +Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function iM(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y;return s=new po({props:{single:!0,$$slots:{header:[H4],default:[j4]},$$scope:{ctx:n}}}),o=new po({props:{single:!0,$$slots:{header:[Z4],default:[Y4]},$$scope:{ctx:n}}}),a=new po({props:{single:!0,$$slots:{header:[eM],default:[X4]},$$scope:{ctx:n}}}),_=new pe({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[tM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),b=new pe({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[nM,({uniqueId:S})=>({12:S}),({uniqueId:S})=>S?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=E(),i=v("div"),H(s.$$.fragment),l=E(),H(o.$$.fragment),r=E(),H(a.$$.fragment),u=E(),f=v("hr"),c=E(),d=v("h4"),d.textContent="General",m=E(),H(_.$$.fragment),h=E(),H(b.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(S,C){w(S,e,C),w(S,t,C),w(S,i,C),V(s,i,null),g(i,l),V(o,i,null),g(i,r),V(a,i,null),w(S,u,C),w(S,f,C),w(S,c,C),w(S,d,C),w(S,m,C),V(_,S,C),w(S,h,C),V(b,S,C),y=!0},p(S,[C]){const $={};C&8201&&($.$$scope={dirty:C,ctx:S}),s.$set($);const T={};C&8197&&(T.$$scope={dirty:C,ctx:S}),o.$set(T);const M={};C&8195&&(M.$$scope={dirty:C,ctx:S}),a.$set(M);const O={};C&12289&&(O.$$scope={dirty:C,ctx:S}),_.$set(O);const D={};C&12289&&(D.$$scope={dirty:C,ctx:S}),b.$set(D)},i(S){y||(A(s.$$.fragment,S),A(o.$$.fragment,S),A(a.$$.fragment,S),A(_.$$.fragment,S),A(b.$$.fragment,S),y=!0)},o(S){I(s.$$.fragment,S),I(o.$$.fragment,S),I(a.$$.fragment,S),I(_.$$.fragment,S),I(b.$$.fragment,S),y=!1},d(S){S&&k(e),S&&k(t),S&&k(i),z(s),z(o),z(a),S&&k(u),S&&k(f),S&&k(c),S&&k(d),S&&k(m),z(_,S),S&&k(h),z(b,S)}}}function sM(n,e,t){let i,s,l,o;Je(n,Si,h=>t(4,o=h));let{collection:r=new yn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(h){n.$$.not_equal(r.options.exceptEmailDomains,h)&&(r.options.exceptEmailDomains=h,t(0,r))}function c(h){n.$$.not_equal(r.options.onlyEmailDomains,h)&&(r.options.onlyEmailDomains=h,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function m(){r.options.minPasswordLength=dt(this.value),t(0,r)}function _(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=h=>{"collection"in h&&t(0,r=h.collection)},n.$$.update=()=>{var h,b,y,S;n.$$.dirty&1&&r.$isAuth&&B.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!B.isEmpty((h=o==null?void 0:o.options)==null?void 0:h.allowEmailAuth)||!B.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!B.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!B.isEmpty((S=o==null?void 0:o.options)==null?void 0:S.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,m,_]}class lM extends ge{constructor(e){super(),_e(this,e,sM,iM,me,{collection:0})}}function ep(n,e,t){const i=n.slice();return i[17]=e[t],i}function tp(n,e,t){const i=n.slice();return i[17]=e[t],i}function np(n,e,t){const i=n.slice();return i[17]=e[t],i}function ip(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function sp(n){var r;let e,t,i,s,l=n[3]&&lp(n),o=!((r=n[2])!=null&&r.$isView)&&op(n);return{c(){e=v("h6"),e.textContent="Changes:",t=E(),i=v("ul"),l&&l.c(),s=E(),o&&o.c(),p(i,"class","changes-list svelte-xqpcsf")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),l&&l.m(i,null),g(i,s),o&&o.m(i,null)},p(a,u){var f;a[3]?l?l.p(a,u):(l=lp(a),l.c(),l.m(i,s)):l&&(l.d(1),l=null),(f=a[2])!=null&&f.$isView?o&&(o.d(1),o=null):o?o.p(a,u):(o=op(a),o.c(),o.m(i,null))},d(a){a&&k(e),a&&k(t),a&&k(i),l&&l.d(),o&&o.d()}}}function lp(n){var m,_;let e,t,i,s,l=((m=n[1])==null?void 0:m.name)+"",o,r,a,u,f,c=((_=n[2])==null?void 0:_.name)+"",d;return{c(){e=v("li"),t=v("div"),i=U(`Renamed collection `),s=v("strong"),o=U(l),r=E(),a=v("i"),u=E(),f=v("strong"),d=U(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex"),p(e,"class","svelte-xqpcsf")},m(h,b){w(h,e,b),g(e,t),g(t,i),g(t,s),g(s,o),g(t,r),g(t,a),g(t,u),g(t,f),g(f,d)},p(h,b){var y,S;b&2&&l!==(l=((y=h[1])==null?void 0:y.name)+"")&&se(o,l),b&4&&c!==(c=((S=h[2])==null?void 0:S.name)+"")&&se(d,c)},d(h){h&&k(e)}}}function op(n){let e,t,i,s=n[5],l=[];for(let f=0;f
    ',i=E(),s=v("div"),l=v("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query, - you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=ye(),p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning")},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),g(s,l),g(s,o),u&&u.m(s,null),w(c,r,d),f&&f.m(c,d),w(c,a,d)},p(c,d){c[6].length?u||(u=ip(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),c[8]?f?f.p(c,d):(f=sp(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&k(e),u&&u.d(),c&&k(r),f&&f.d(c),c&&k(a)}}}function lM(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function oM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Cancel',t=E(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[K(e,"click",n[11]),K(i,"click",n[12])],s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Ee(l)}}}function rM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[oM],header:[lM],default:[sM]},$$scope:{ctx:n}};return e=new ln({props:i}),n[13](e),e.$on("hide",n[14]),e.$on("show",n[15]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16777710&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[13](null),V(e,s)}}}function aM(n,e,t){let i,s,l,o,r;const a=$t();let u,f,c;async function d($,T){t(1,f=$),t(2,c=T),await fn(),i||s.length||l.length||o.length?u==null||u.show():_()}function m(){u==null||u.hide()}function _(){m(),a("confirm")}const h=()=>m(),b=()=>_();function y($){ee[$?"unshift":"push"](()=>{u=$,t(4,u)})}function S($){Ne.call(this,n,$)}function C($){Ne.call(this,n,$)}return n.$$.update=()=>{var $,T,M;n.$$.dirty&6&&t(3,i=(f==null?void 0:f.name)!=(c==null?void 0:c.name)),n.$$.dirty&4&&t(7,s=(($=c==null?void 0:c.schema)==null?void 0:$.filter(O=>O.id&&!O.toDelete&&O.originalName!=O.name))||[]),n.$$.dirty&4&&t(6,l=((T=c==null?void 0:c.schema)==null?void 0:T.filter(O=>O.id&&O.toDelete))||[]),n.$$.dirty&6&&t(5,o=((M=c==null?void 0:c.schema)==null?void 0:M.filter(O=>{var L,P,N;const D=(L=f==null?void 0:f.schema)==null?void 0:L.find(F=>F.id==O.id);return D?((P=D.options)==null?void 0:P.maxSelect)!=1&&((N=O.options)==null?void 0:N.maxSelect)==1:!1}))||[]),n.$$.dirty&12&&t(8,r=!(c!=null&&c.$isView)||i)},[m,f,c,i,u,o,l,s,r,_,d,h,b,y,S,C]}class uM extends ge{constructor(e){super(),_e(this,e,aM,rM,me,{show:10,hide:0})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[0]}}function fp(n,e,t){const i=n.slice();return i[47]=e[t][0],i[48]=e[t][1],i}function fM(n){let e,t,i;function s(o){n[33](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new p4({props:l}),ee.push(()=>de(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function cM(n){let e,t,i;function s(o){n[32](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new I4({props:l}),ee.push(()=>de(e,"collection",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function cp(n){let e,t,i,s;function l(r){n[34](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new T4({props:o}),ee.push(()=>de(t,"collection",l)),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){w(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],he(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&k(e),V(t)}}}function dp(n){let e,t,i,s;function l(r){n[35](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new iM({props:o}),ee.push(()=>de(t,"collection",l)),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===Ns)},m(r,a){w(r,e,a),j(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],he(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&Q(e,"active",r[3]===Ns)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&k(e),V(t)}}}function dM(n){let e,t,i,s,l,o,r;const a=[cM,fM],u=[];function f(m,_){return m[2].$isView?0:1}i=f(n),s=u[i]=a[i](n);let c=n[3]===kl&&cp(n),d=n[2].$isAuth&&dp(n);return{c(){e=v("div"),t=v("div"),s.c(),l=E(),c&&c.c(),o=E(),d&&d.c(),p(t,"class","tab-item"),Q(t,"active",n[3]===Pi),p(e,"class","tabs-content svelte-12y0yzb")},m(m,_){w(m,e,_),g(e,t),u[i].m(t,null),g(e,l),c&&c.m(e,null),g(e,o),d&&d.m(e,null),r=!0},p(m,_){let h=i;i=f(m),i===h?u[i].p(m,_):(ae(),I(u[h],1,1,()=>{u[h]=null}),ue(),s=u[i],s?s.p(m,_):(s=u[i]=a[i](m),s.c()),A(s,1),s.m(t,null)),(!r||_[0]&8)&&Q(t,"active",m[3]===Pi),m[3]===kl?c?(c.p(m,_),_[0]&8&&A(c,1)):(c=cp(m),c.c(),A(c,1),c.m(e,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue()),m[2].$isAuth?d?(d.p(m,_),_[0]&4&&A(d,1)):(d=dp(m),d.c(),A(d,1),d.m(e,null)):d&&(ae(),I(d,1,1,()=>{d=null}),ue())},i(m){r||(A(s),A(c),A(d),r=!0)},o(m){I(s),I(c),I(d),r=!1},d(m){m&&k(e),u[i].d(),c&&c.d(),d&&d.d()}}}function pp(n){let e,t,i,s,l,o,r;return o=new Kn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[pM]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),i=v("button"),s=v("i"),l=E(),z(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"aria-label","More"),p(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),g(i,s),g(i,l),j(o,i,null),r=!0},p(a,u){const f={};u[1]&1048576&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){I(o.$$.fragment,a),r=!1},d(a){a&&k(e),a&&k(t),a&&k(i),V(o)}}}function pM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=` + `),s=v("strong"),o=U(l),r=E(),a=v("i"),u=E(),f=v("strong"),d=U(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex"),p(e,"class","svelte-xqpcsf")},m(m,_){w(m,e,_),g(e,t),g(t,i),g(t,s),g(s,o),g(t,r),g(t,a),g(t,u),g(t,f),g(f,d)},p(m,_){_&128&&l!==(l=m[17].originalName+"")&&se(o,l),_&128&&c!==(c=m[17].name+"")&&se(d,c)},d(m){m&&k(e)}}}function up(n){let e,t,i,s=n[17].name+"",l,o;return{c(){e=v("li"),t=U("Removed field "),i=v("span"),l=U(s),o=E(),p(i,"class","txt-bold"),p(e,"class","txt-danger svelte-xqpcsf")},m(r,a){w(r,e,a),g(e,t),g(e,i),g(i,l),g(e,o)},p(r,a){a&64&&s!==(s=r[17].name+"")&&se(l,s)},d(r){r&&k(e)}}}function oM(n){let e,t,i,s,l,o,r,a,u=n[6].length&&ip(),f=n[8]&&sp(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=E(),s=v("div"),l=v("p"),l.textContent=`If any of the collection changes is part of another collection rule, filter or view query, + you'll have to update it manually!`,o=E(),u&&u.c(),r=E(),f&&f.c(),a=ye(),p(t,"class","icon"),p(s,"class","content txt-bold"),p(e,"class","alert alert-warning")},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),g(s,l),g(s,o),u&&u.m(s,null),w(c,r,d),f&&f.m(c,d),w(c,a,d)},p(c,d){c[6].length?u||(u=ip(),u.c(),u.m(s,null)):u&&(u.d(1),u=null),c[8]?f?f.p(c,d):(f=sp(c),f.c(),f.m(a.parentNode,a)):f&&(f.d(1),f=null)},d(c){c&&k(e),u&&u.d(),c&&k(r),f&&f.d(c),c&&k(a)}}}function rM(n){let e;return{c(){e=v("h4"),e.textContent="Confirm collection changes"},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function aM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML='Cancel',t=E(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),e.focus(),s||(l=[J(e,"click",n[11]),J(i,"click",n[12])],s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Ee(l)}}}function uM(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[aM],header:[rM],default:[oM]},$$scope:{ctx:n}};return e=new ln({props:i}),n[13](e),e.$on("hide",n[14]),e.$on("show",n[15]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&16777710&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[13](null),z(e,s)}}}function fM(n,e,t){let i,s,l,o,r;const a=$t();let u,f,c;async function d($,T){t(1,f=$),t(2,c=T),await fn(),i||s.length||l.length||o.length?u==null||u.show():_()}function m(){u==null||u.hide()}function _(){m(),a("confirm")}const h=()=>m(),b=()=>_();function y($){ee[$?"unshift":"push"](()=>{u=$,t(4,u)})}function S($){Ne.call(this,n,$)}function C($){Ne.call(this,n,$)}return n.$$.update=()=>{var $,T,M;n.$$.dirty&6&&t(3,i=(f==null?void 0:f.name)!=(c==null?void 0:c.name)),n.$$.dirty&4&&t(7,s=(($=c==null?void 0:c.schema)==null?void 0:$.filter(O=>O.id&&!O.toDelete&&O.originalName!=O.name))||[]),n.$$.dirty&4&&t(6,l=((T=c==null?void 0:c.schema)==null?void 0:T.filter(O=>O.id&&O.toDelete))||[]),n.$$.dirty&6&&t(5,o=((M=c==null?void 0:c.schema)==null?void 0:M.filter(O=>{var L,P,N;const D=(L=f==null?void 0:f.schema)==null?void 0:L.find(F=>F.id==O.id);return D?((P=D.options)==null?void 0:P.maxSelect)!=1&&((N=O.options)==null?void 0:N.maxSelect)==1:!1}))||[]),n.$$.dirty&12&&t(8,r=!(c!=null&&c.$isView)||i)},[m,f,c,i,u,o,l,s,r,_,d,h,b,y,S,C]}class cM extends ge{constructor(e){super(),_e(this,e,fM,uM,me,{show:10,hide:0})}get show(){return this.$$.ctx[10]}get hide(){return this.$$.ctx[0]}}function fp(n,e,t){const i=n.slice();return i[47]=e[t][0],i[48]=e[t][1],i}function dM(n){let e,t,i;function s(o){n[33](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new h4({props:l}),ee.push(()=>de(e,"collection",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function pM(n){let e,t,i;function s(o){n[32](o)}let l={};return n[2]!==void 0&&(l.collection=n[2]),e=new P4({props:l}),ee.push(()=>de(e,"collection",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};!t&&r[0]&4&&(t=!0,a.collection=o[2],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function cp(n){let e,t,i,s;function l(r){n[34](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new O4({props:o}),ee.push(()=>de(t,"collection",l)),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){w(r,e,a),V(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],he(()=>i=!1)),t.$set(u)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&k(e),z(t)}}}function dp(n){let e,t,i,s;function l(r){n[35](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new lM({props:o}),ee.push(()=>de(t,"collection",l)),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[3]===Ns)},m(r,a){w(r,e,a),V(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],he(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&Q(e,"active",r[3]===Ns)},i(r){s||(A(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&k(e),z(t)}}}function mM(n){let e,t,i,s,l,o,r;const a=[pM,dM],u=[];function f(m,_){return m[2].$isView?0:1}i=f(n),s=u[i]=a[i](n);let c=n[3]===kl&&cp(n),d=n[2].$isAuth&&dp(n);return{c(){e=v("div"),t=v("div"),s.c(),l=E(),c&&c.c(),o=E(),d&&d.c(),p(t,"class","tab-item"),Q(t,"active",n[3]===Pi),p(e,"class","tabs-content svelte-12y0yzb")},m(m,_){w(m,e,_),g(e,t),u[i].m(t,null),g(e,l),c&&c.m(e,null),g(e,o),d&&d.m(e,null),r=!0},p(m,_){let h=i;i=f(m),i===h?u[i].p(m,_):(ae(),I(u[h],1,1,()=>{u[h]=null}),ue(),s=u[i],s?s.p(m,_):(s=u[i]=a[i](m),s.c()),A(s,1),s.m(t,null)),(!r||_[0]&8)&&Q(t,"active",m[3]===Pi),m[3]===kl?c?(c.p(m,_),_[0]&8&&A(c,1)):(c=cp(m),c.c(),A(c,1),c.m(e,o)):c&&(ae(),I(c,1,1,()=>{c=null}),ue()),m[2].$isAuth?d?(d.p(m,_),_[0]&4&&A(d,1)):(d=dp(m),d.c(),A(d,1),d.m(e,null)):d&&(ae(),I(d,1,1,()=>{d=null}),ue())},i(m){r||(A(s),A(c),A(d),r=!0)},o(m){I(s),I(c),I(d),r=!1},d(m){m&&k(e),u[i].d(),c&&c.d(),d&&d.d()}}}function pp(n){let e,t,i,s,l,o,r;return o=new Kn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[hM]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=E(),i=v("button"),s=v("i"),l=E(),H(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"aria-label","More"),p(i,"class","btn btn-sm btn-circle btn-transparent flex-gap-0")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),g(i,s),g(i,l),V(o,i,null),r=!0},p(a,u){const f={};u[1]&1048576&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(A(o.$$.fragment,a),r=!0)},o(a){I(o.$$.fragment,a),r=!1},d(a){a&&k(e),a&&k(t),a&&k(i),z(o)}}}function hM(n){let e,t,i,s,l;return{c(){e=v("button"),e.innerHTML=` Duplicate`,t=E(),i=v("button"),i.innerHTML=` - Delete`,p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[K(e,"click",n[24]),K(i,"click",An(et(n[25])))],s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Ee(l)}}}function mp(n){let e,t,i,s;return i=new Kn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[mM]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=E(),z(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){w(l,e,o),w(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&1048576&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&k(e),l&&k(t),V(i,l)}}}function hp(n){let e,t,i,s,l,o=n[48]+"",r,a,u,f,c;function d(){return n[27](n[47])}return{c(){e=v("button"),t=v("i"),s=E(),l=v("span"),r=U(o),a=U(" collection"),u=E(),p(t,"class",i=ls(B.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),Q(e,"selected",n[47]==n[2].type)},m(m,_){w(m,e,_),g(e,t),g(e,s),g(e,l),g(l,r),g(l,a),g(e,u),f||(c=K(e,"click",d),f=!0)},p(m,_){n=m,_[0]&64&&i!==(i=ls(B.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb")&&p(t,"class",i),_[0]&64&&o!==(o=n[48]+"")&&se(r,o),_[0]&68&&Q(e,"selected",n[47]==n[2].type)},d(m){m&&k(e),f=!1,c()}}}function mM(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{N=null}),ue()),(!D||q[0]&4&&$!==($="btn btn-sm p-r-10 p-l-10 "+(R[2].$isNew?"btn-outline":"btn-transparent")))&&p(d,"class",$),(!D||q[0]&4&&T!==(T=!R[2].$isNew))&&(d.disabled=T),R[2].system?F||(F=_p(),F.c(),F.m(O.parentNode,O)):F&&(F.d(1),F=null)},i(R){D||(A(N),D=!0)},o(R){I(N),D=!1},d(R){R&&k(e),R&&k(s),R&&k(l),R&&k(f),R&&k(c),N&&N.d(),R&&k(M),F&&F.d(R),R&&k(O),L=!1,P()}}}function gp(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){w(r,e,a),s=!0,l||(o=Me(t=He.call(null,e,n[11])),l=!0)},p(r,a){t&&qt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&Qe(()=>{s&&(i||(i=je(e,Kt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=je(e,Kt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function bp(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function vp(n){var a,u,f;let e,t,i,s=!B.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&yp();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=E(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),Q(e,"active",n[3]===Ns)},m(c,d){w(c,e,d),g(e,t),g(e,i),r&&r.m(e,null),l||(o=K(e,"click",n[31]),l=!0)},p(c,d){var m,_,h;d[0]&32&&(s=!B.isEmpty((m=c[5])==null?void 0:m.options)&&!((h=(_=c[5])==null?void 0:_.options)!=null&&h.manageRule)),s?r?d[0]&32&&A(r,1):(r=yp(),r.c(),A(r,1),r.m(e,null)):r&&(ae(),I(r,1,1,()=>{r=null}),ue()),d[0]&8&&Q(e,"active",c[3]===Ns)},d(c){c&&k(e),r&&r.d(),l=!1,o()}}}function yp(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function _M(n){var H,W,X,J,Z,le,ne,ie;let e,t=n[2].$isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,m,_=(H=n[2])!=null&&H.$isView?"Query":"Fields",h,b,y=!B.isEmpty(n[11]),S,C,$,T,M=!B.isEmpty((W=n[5])==null?void 0:W.listRule)||!B.isEmpty((X=n[5])==null?void 0:X.viewRule)||!B.isEmpty((J=n[5])==null?void 0:J.createRule)||!B.isEmpty((Z=n[5])==null?void 0:Z.updateRule)||!B.isEmpty((le=n[5])==null?void 0:le.deleteRule)||!B.isEmpty((ie=(ne=n[5])==null?void 0:ne.options)==null?void 0:ie.manageRule),O,D,L,P,N=!n[2].$isNew&&!n[2].system&&pp(n);r=new pe({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[hM,({uniqueId:be})=>({46:be}),({uniqueId:be})=>[0,be?32768:0]]},$$scope:{ctx:n}}});let F=y&&gp(n),R=M&&bp(),q=n[2].$isAuth&&vp(n);return{c(){e=v("h4"),i=U(t),s=E(),N&&N.c(),l=E(),o=v("form"),z(r.$$.fragment),a=E(),u=v("input"),f=E(),c=v("div"),d=v("button"),m=v("span"),h=U(_),b=E(),F&&F.c(),S=E(),C=v("button"),$=v("span"),$.textContent="API Rules",T=E(),R&&R.c(),O=E(),q&&q.c(),p(e,"class","upsert-panel-title svelte-12y0yzb"),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(m,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),Q(d,"active",n[3]===Pi),p($,"class","txt"),p(C,"type","button"),p(C,"class","tab-item"),Q(C,"active",n[3]===kl),p(c,"class","tabs-header stretched")},m(be,Se){w(be,e,Se),g(e,i),w(be,s,Se),N&&N.m(be,Se),w(be,l,Se),w(be,o,Se),j(r,o,null),g(o,a),g(o,u),w(be,f,Se),w(be,c,Se),g(c,d),g(d,m),g(m,h),g(d,b),F&&F.m(d,null),g(c,S),g(c,C),g(C,$),g(C,T),R&&R.m(C,null),g(c,O),q&&q.m(c,null),D=!0,L||(P=[K(o,"submit",et(n[28])),K(d,"click",n[29]),K(C,"click",n[30])],L=!0)},p(be,Se){var Be,ke,Te,Ze,ht,Ge,Ye,we;(!D||Se[0]&4)&&t!==(t=be[2].$isNew?"New collection":"Edit collection")&&se(i,t),!be[2].$isNew&&!be[2].system?N?(N.p(be,Se),Se[0]&4&&A(N,1)):(N=pp(be),N.c(),A(N,1),N.m(l.parentNode,l)):N&&(ae(),I(N,1,1,()=>{N=null}),ue());const Ve={};Se[0]&8192&&(Ve.class="form-field collection-field-name required m-b-0 "+(be[13]?"disabled":"")),Se[0]&8260|Se[1]&1081344&&(Ve.$$scope={dirty:Se,ctx:be}),r.$set(Ve),(!D||Se[0]&4)&&_!==(_=(Be=be[2])!=null&&Be.$isView?"Query":"Fields")&&se(h,_),Se[0]&2048&&(y=!B.isEmpty(be[11])),y?F?(F.p(be,Se),Se[0]&2048&&A(F,1)):(F=gp(be),F.c(),A(F,1),F.m(d,null)):F&&(ae(),I(F,1,1,()=>{F=null}),ue()),(!D||Se[0]&8)&&Q(d,"active",be[3]===Pi),Se[0]&32&&(M=!B.isEmpty((ke=be[5])==null?void 0:ke.listRule)||!B.isEmpty((Te=be[5])==null?void 0:Te.viewRule)||!B.isEmpty((Ze=be[5])==null?void 0:Ze.createRule)||!B.isEmpty((ht=be[5])==null?void 0:ht.updateRule)||!B.isEmpty((Ge=be[5])==null?void 0:Ge.deleteRule)||!B.isEmpty((we=(Ye=be[5])==null?void 0:Ye.options)==null?void 0:we.manageRule)),M?R?Se[0]&32&&A(R,1):(R=bp(),R.c(),A(R,1),R.m(C,null)):R&&(ae(),I(R,1,1,()=>{R=null}),ue()),(!D||Se[0]&8)&&Q(C,"active",be[3]===kl),be[2].$isAuth?q?q.p(be,Se):(q=vp(be),q.c(),q.m(c,null)):q&&(q.d(1),q=null)},i(be){D||(A(N),A(r.$$.fragment,be),A(F),A(R),D=!0)},o(be){I(N),I(r.$$.fragment,be),I(F),I(R),D=!1},d(be){be&&k(e),be&&k(s),N&&N.d(be),be&&k(l),be&&k(o),V(r),be&&k(f),be&&k(c),F&&F.d(),R&&R.d(),q&&q.d(),L=!1,Ee(P)}}}function gM(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=E(),s=v("button"),l=v("span"),r=U(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],Q(s,"btn-loading",n[9])},m(c,d){w(c,e,d),g(e,t),w(c,i,d),w(c,s,d),g(s,l),g(l,r),u||(f=[K(e,"click",n[22]),K(s,"click",n[23])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].$isNew?"Create":"Save changes")&&se(r,o),d[0]&4608&&a!==(a=!c[12]||c[9])&&(s.disabled=a),d[0]&512&&Q(s,"btn-loading",c[9])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function bM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[36],$$slots:{footer:[gM],header:[_M],default:[dM]},$$scope:{ctx:n}};e=new ln({props:l}),n[37](e),e.$on("hide",n[38]),e.$on("show",n[39]);let o={};return i=new uM({props:o}),n[40](i),i.$on("confirm",n[41]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(r,a){j(e,r,a),w(r,t,a),j(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[36]),a[0]&14956|a[1]&1048576&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),s=!1},d(r){n[37](null),V(e,r),r&&k(t),n[40](null),V(i,r)}}}const Pi="schema",kl="api_rules",Ns="options",vM="base",kp="auth",wp="view";function Nr(n){return JSON.stringify(n)}function yM(n,e,t){let i,s,l,o;Je(n,Si,we=>t(5,o=we));const r={};r[vM]="Base",r[wp]="View",r[kp]="Auth";const a=$t();let u,f,c=null,d=new yn,m=!1,_=!1,h=Pi,b=Nr(d),y="";function S(we){t(3,h=we)}function C(we){return T(we),t(10,_=!0),S(Pi),u==null?void 0:u.show()}function $(){return u==null?void 0:u.hide()}async function T(we){en({}),typeof we<"u"?(t(20,c=we),t(2,d=we.$clone())):(t(20,c=null),t(2,d=new yn)),t(2,d.schema=d.schema||[],d),t(2,d.originalName=d.name||"",d),await fn(),t(21,b=Nr(d))}function M(){d.$isNew?O():f==null||f.show(c,d)}function O(){if(m)return;t(9,m=!0);const we=D();let fe;d.$isNew?fe=ce.collections.create(we):fe=ce.collections.update(d.id,we),fe.then(ze=>{Na(),Dy(ze),t(10,_=!1),$(),zt(d.$isNew?"Successfully created collection.":"Successfully updated collection."),a("save",{isNew:d.$isNew,collection:ze})}).catch(ze=>{ce.error(ze)}).finally(()=>{t(9,m=!1)})}function D(){const we=d.$export();we.schema=we.schema.slice(0);for(let fe=we.schema.length-1;fe>=0;fe--)we.schema[fe].toDelete&&we.schema.splice(fe,1);return we}function L(){c!=null&&c.id&&pn(`Do you really want to delete collection "${c==null?void 0:c.name}" and all its records?`,()=>ce.collections.delete(c==null?void 0:c.id).then(()=>{$(),zt(`Successfully deleted collection "${c==null?void 0:c.name}".`),a("delete",c),Ay(c)}).catch(we=>{ce.error(we)}))}function P(we){t(2,d.type=we,d),ai("schema")}function N(){s?pn("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const we=c==null?void 0:c.$clone();if(we){if(we.id="",we.created="",we.updated="",we.name+="_duplicate",!B.isEmpty(we.schema))for(const fe of we.schema)fe.id="";if(!B.isEmpty(we.indexes))for(let fe=0;fe$(),q=()=>M(),H=()=>N(),W=()=>L(),X=we=>{t(2,d.name=B.slugify(we.target.value),d),we.target.value=d.name},J=we=>P(we),Z=()=>{l&&M()},le=()=>S(Pi),ne=()=>S(kl),ie=()=>S(Ns);function be(we){d=we,t(2,d),t(20,c)}function Se(we){d=we,t(2,d),t(20,c)}function Ve(we){d=we,t(2,d),t(20,c)}function Be(we){d=we,t(2,d),t(20,c)}const ke=()=>s&&_?(pn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,_=!1),$()}),!1):!0;function Te(we){ee[we?"unshift":"push"](()=>{u=we,t(7,u)})}function Ze(we){Ne.call(this,n,we)}function ht(we){Ne.call(this,n,we)}function Ge(we){ee[we?"unshift":"push"](()=>{f=we,t(8,f)})}const Ye=()=>O();return n.$$.update=()=>{var we,fe;n.$$.dirty[0]&32&&(o.schema||(we=o.options)!=null&&we.query?t(11,y=B.getNestedVal(o,"schema.message")||"Has errors"):t(11,y="")),n.$$.dirty[0]&4&&d.type===wp&&(t(2,d.createRule=null,d),t(2,d.updateRule=null,d),t(2,d.deleteRule=null,d),t(2,d.indexes=[],d)),n.$$.dirty[0]&1048580&&d!=null&&d.name&&(c==null?void 0:c.name)!=(d==null?void 0:d.name)&&t(2,d.indexes=(fe=d.indexes)==null?void 0:fe.map(ze=>B.replaceIndexTableName(ze,d.name)),d),n.$$.dirty[0]&4&&t(13,i=!d.$isNew&&d.system),n.$$.dirty[0]&2097156&&t(4,s=b!=Nr(d)),n.$$.dirty[0]&20&&t(12,l=d.$isNew||s),n.$$.dirty[0]&12&&h===Ns&&d.type!==kp&&S(Pi)},[S,$,d,h,s,o,r,u,f,m,_,y,l,i,M,O,L,P,N,C,c,b,R,q,H,W,X,J,Z,le,ne,ie,be,Se,Ve,Be,ke,Te,Ze,ht,Ge,Ye]}class cu extends ge{constructor(e){super(),_e(this,e,yM,bM,me,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function Sp(n,e,t){const i=n.slice();return i[15]=e[t],i}function $p(n){let e,t=n[1].length&&Cp();return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1].length?t||(t=Cp(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function Cp(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Tp(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,c,d,m;return{key:n,first:null,c(){var _;t=v("a"),i=v("i"),l=E(),o=v("span"),a=U(r),u=E(),p(i,"class",s=B.getCollectionTypeIcon(e[15].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[15].id),p(t,"class","sidebar-list-item"),p(t,"title",c=e[15].name),Q(t,"active",((_=e[5])==null?void 0:_.id)===e[15].id),this.first=t},m(_,h){w(_,t,h),g(t,i),g(t,l),g(t,o),g(o,a),g(t,u),d||(m=Me(on.call(null,t)),d=!0)},p(_,h){var b;e=_,h&8&&s!==(s=B.getCollectionTypeIcon(e[15].type))&&p(i,"class",s),h&8&&r!==(r=e[15].name+"")&&se(a,r),h&8&&f!==(f="/collections?collectionId="+e[15].id)&&p(t,"href",f),h&8&&c!==(c=e[15].name)&&p(t,"title",c),h&40&&Q(t,"active",((b=e[5])==null?void 0:b.id)===e[15].id)},d(_){_&&k(t),d=!1,m()}}}function Mp(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` - New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){w(l,e,o),g(e,t),i||(s=K(t,"click",n[12]),i=!0)},p:x,d(l){l&&k(e),i=!1,s()}}}function kM(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],m=new Map,_,h,b,y,S,C,$=n[3];const T=L=>L[15].id;for(let L=0;L<$.length;L+=1){let P=Sp(n,$,L),N=T(P);m.set(N,d[L]=Tp(N,P))}let M=null;$.length||(M=$p(n));let O=!n[7]&&Mp(n),D={};return b=new cu({props:D}),n[13](b),b.$on("save",n[14]),{c(){e=v("aside"),t=v("header"),i=v("div"),s=v("div"),l=v("button"),l.innerHTML='',o=E(),r=v("input"),a=E(),u=v("hr"),f=E(),c=v("div");for(let L=0;L20),p(e,"class","page-sidebar collection-sidebar")},m(L,P){w(L,e,P),g(e,t),g(t,i),g(i,s),g(s,l),g(i,o),g(i,r),re(r,n[0]),g(e,a),g(e,u),g(e,f),g(e,c);for(let N=0;N20),L[7]?O&&(O.d(1),O=null):O?O.p(L,P):(O=Mp(L),O.c(),O.m(e,null));const N={};b.$set(N)},i(L){y||(A(b.$$.fragment,L),y=!0)},o(L){I(b.$$.fragment,L),y=!1},d(L){L&&k(e);for(let P=0;P{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function SM(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,S=>t(5,o=S)),Je(n,ci,S=>t(9,r=S)),Je(n,ko,S=>t(6,a=S)),Je(n,As,S=>t(7,u=S));let f,c="";function d(S){sn(ui,o=S,o)}const m=()=>t(0,c="");function _(){c=this.value,t(0,c)}const h=()=>f==null?void 0:f.show();function b(S){ee[S?"unshift":"push"](()=>{f=S,t(2,f)})}const y=S=>{var C;(C=S.detail)!=null&&C.isNew&&S.detail.collection&&d(S.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&wM(),n.$$.dirty&1&&t(1,i=c.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=c!==""),n.$$.dirty&515&&t(3,l=r.filter(S=>S.id==c||S.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[c,i,f,l,s,o,a,u,d,r,m,_,h,b,y]}class $M extends ge{constructor(e){super(),_e(this,e,SM,kM,me,{})}}function Op(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Ep(n){n[18]=n[19].default}function Dp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Ap(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ip(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Ap();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ye(),c&&c.c(),s=E(),l=v("button"),r=U(o),a=E(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(l,"active",e[5]===e[14]),this.first=t},m(m,_){w(m,t,_),c&&c.m(m,_),w(m,s,_),w(m,l,_),g(l,r),g(l,a),u||(f=K(l,"click",d),u=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Ap(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),_&8&&o!==(o=e[15].label+"")&&se(r,o),_&40&&Q(l,"active",e[5]===e[14])},d(m){m&&k(t),c&&c.d(m),m&&k(s),m&&k(l),u=!1,f()}}}function Lp(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:MM,then:TM,catch:CM,value:19,blocks:[,,,]};return gu(t=n[15].component,s),{c(){e=ye(),s.block.c()},m(l,o){w(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&gu(t,s)||e0(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];I(r)}i=!1},d(l){l&&k(e),s.block.d(l),s.token=null,s=null}}}function CM(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function TM(n){Ep(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){z(e.$$.fragment),t=E()},m(s,l){j(e,s,l),w(s,t,l),i=!0},p(s,l){Ep(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){I(e.$$.fragment,s),i=!1},d(s){V(e,s),s&&k(t)}}}function MM(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function Pp(n,e){let t,i,s,l=e[5]===e[14]&&Lp(e);return{key:n,first:null,c(){t=ye(),l&&l.c(),i=ye(),this.first=t},m(o,r){w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Lp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){s||(A(l),s=!0)},o(o){I(l),s=!1},d(o){o&&k(t),l&&l.d(o),o&&k(i)}}}function OM(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=h=>h[14];for(let h=0;hh[14];for(let h=0;hClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function DM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[EM],default:[OM]},$$scope:{ctx:n}};return e=new ln({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[10](null),V(e,s)}}}function AM(n,e,t){const i={list:{label:"List/Search",component:at(()=>import("./ListApiDocs-9496970d.js"),["./ListApiDocs-9496970d.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:at(()=>import("./ViewApiDocs-4c8d969c.js"),["./ViewApiDocs-4c8d969c.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-38f60100.js"],import.meta.url)},create:{label:"Create",component:at(()=>import("./CreateApiDocs-5fb73b64.js"),["./CreateApiDocs-5fb73b64.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-38f60100.js"],import.meta.url)},update:{label:"Update",component:at(()=>import("./UpdateApiDocs-da4d34d2.js"),["./UpdateApiDocs-da4d34d2.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-38f60100.js"],import.meta.url)},delete:{label:"Delete",component:at(()=>import("./DeleteApiDocs-b77c2bda.js"),["./DeleteApiDocs-b77c2bda.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:at(()=>import("./RealtimeApiDocs-fa350ca2.js"),["./RealtimeApiDocs-fa350ca2.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:at(()=>import("./AuthWithPasswordDocs-bfa12c44.js"),["./AuthWithPasswordDocs-bfa12c44.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-38f60100.js"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:at(()=>import("./AuthWithOAuth2Docs-c14d87b2.js"),["./AuthWithOAuth2Docs-c14d87b2.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-38f60100.js"],import.meta.url)},refresh:{label:"Auth refresh",component:at(()=>import("./AuthRefreshDocs-d6051ba5.js"),["./AuthRefreshDocs-d6051ba5.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-38f60100.js"],import.meta.url)},"request-verification":{label:"Request verification",component:at(()=>import("./RequestVerificationDocs-0ec5a242.js"),["./RequestVerificationDocs-0ec5a242.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:at(()=>import("./ConfirmVerificationDocs-25b0cae5.js"),["./ConfirmVerificationDocs-25b0cae5.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:at(()=>import("./RequestPasswordResetDocs-288fb230.js"),["./RequestPasswordResetDocs-288fb230.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:at(()=>import("./ConfirmPasswordResetDocs-dee08d33.js"),["./ConfirmPasswordResetDocs-dee08d33.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:at(()=>import("./RequestEmailChangeDocs-b770c6f7.js"),["./RequestEmailChangeDocs-b770c6f7.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:at(()=>import("./ConfirmEmailChangeDocs-47c2e1d1.js"),["./ConfirmEmailChangeDocs-47c2e1d1.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:at(()=>import("./AuthMethodsDocs-fb2c92b1.js"),["./AuthMethodsDocs-fb2c92b1.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-38f60100.js"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:at(()=>import("./ListExternalAuthsDocs-2d8d09bd.js"),["./ListExternalAuthsDocs-2d8d09bd.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-38f60100.js"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:at(()=>import("./UnlinkExternalAuthDocs-c61aed44.js"),["./UnlinkExternalAuthDocs-c61aed44.js","./SdkTabs-ad20c86c.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new yn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),m=y=>c(y);function _(y){ee[y?"unshift":"push"](()=>{l=y,t(4,l)})}function h(y){Ne.call(this,n,y)}function b(y){Ne.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"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,m,_,h,b]}class IM extends ge{constructor(e){super(),_e(this,e,AM,DM,me,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function LM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Username",o=E(),r=v("input"),p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","text"),p(r,"requried",a=!n[2]),p(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),p(r,"id",f=n[13])},m(m,_){w(m,e,_),g(e,t),g(e,i),g(e,s),w(m,o,_),w(m,r,_),re(r,n[0].username),c||(d=K(r,"input",n[5]),c=!0)},p(m,_){_&8192&&l!==(l=m[13])&&p(e,"for",l),_&4&&a!==(a=!m[2])&&p(r,"requried",a),_&4&&u!==(u=m[2]?"Leave empty to auto generate...":m[4])&&p(r,"placeholder",u),_&8192&&f!==(f=m[13])&&p(r,"id",f),_&1&&r.value!==m[0].username&&re(r,m[0].username)},d(m){m&&k(e),m&&k(o),m&&k(r),c=!1,d()}}}function PM(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,m,_,h,b,y,S,C;return{c(){var $;e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Email",o=E(),r=v("div"),a=v("button"),u=v("span"),f=U("Public: "),d=U(c),_=E(),h=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[13]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(h,"type","email"),h.autofocus=n[2],p(h,"autocomplete","off"),p(h,"id",b=n[13]),h.required=y=($=n[1].options)==null?void 0:$.requireEmail,p(h,"class","svelte-1751a4d")},m($,T){w($,e,T),g(e,t),g(e,i),g(e,s),w($,o,T),w($,r,T),g(r,a),g(a,u),g(u,f),g(u,d),w($,_,T),w($,h,T),re(h,n[0].email),n[2]&&h.focus(),S||(C=[Me(He.call(null,a,{text:"Make email public or private",position:"top-right"})),K(a,"click",n[6]),K(h,"input",n[7])],S=!0)},p($,T){var M;T&8192&&l!==(l=$[13])&&p(e,"for",l),T&1&&c!==(c=$[0].emailVisibility?"On":"Off")&&se(d,c),T&1&&m!==(m="btn btn-sm btn-transparent "+($[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",m),T&4&&(h.autofocus=$[2]),T&8192&&b!==(b=$[13])&&p(h,"id",b),T&2&&y!==(y=(M=$[1].options)==null?void 0:M.requireEmail)&&(h.required=y),T&1&&h.value!==$[0].email&&re(h,$[0].email)},d($){$&&k(e),$&&k(o),$&&k(r),$&&k(_),$&&k(h),S=!1,Ee(C)}}}function Np(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[NM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&24584&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function NM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Fp(n){let e,t,i,s,l,o,r,a,u;return s=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[FM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[RM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),Q(t,"p-t-xs",n[3]),p(e,"class","block")},m(f,c){w(f,e,c),g(e,t),g(t,i),j(s,i,null),g(t,l),g(t,o),j(r,o,null),u=!0},p(f,c){const d={};c&24577&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c&24577&&(m.$$scope={dirty:c,ctx:f}),r.$set(m),(!u||c&8)&&Q(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&Qe(()=>{u&&(a||(a=je(e,ot,{duration:150},!0)),a.run(1))}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(e,ot,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),V(s),V(r),f&&a&&a.end()}}}function FM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[0].password),u||(f=K(r,"input",n[9]),u=!0)},p(c,d){d&8192&&l!==(l=c[13])&&p(e,"for",l),d&8192&&a!==(a=c[13])&&p(r,"id",a),d&1&&r.value!==c[0].password&&re(r,c[0].password)},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function RM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password confirm",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[0].passwordConfirm),u||(f=K(r,"input",n[10]),u=!0)},p(c,d){d&8192&&l!==(l=c[13])&&p(e,"for",l),d&8192&&a!==(a=c[13])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&re(r,c[0].passwordConfirm)},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function qM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[0].verified,w(u,i,f),w(u,s,f),g(s,l),r||(a=[K(e,"change",n[11]),K(e,"change",et(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,Ee(a)}}}function jM(n){var b;let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new pe({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[LM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[PM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}});let _=!n[2]&&Np(n),h=(n[2]||n[3])&&Fp(n);return d=new pe({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[qM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),_&&_.c(),u=E(),h&&h.c(),f=E(),c=v("div"),z(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,S){w(y,e,S),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),g(e,r),g(e,a),_&&_.m(a,null),g(a,u),h&&h.m(a,null),g(e,f),g(e,c),j(d,c,null),m=!0},p(y,[S]){var M;const C={};S&4&&(C.class="form-field "+(y[2]?"":"required")),S&24581&&(C.$$scope={dirty:S,ctx:y}),i.$set(C);const $={};S&2&&($.class="form-field "+((M=y[1].options)!=null&&M.requireEmail?"required":"")),S&24583&&($.$$scope={dirty:S,ctx:y}),o.$set($),y[2]?_&&(ae(),I(_,1,1,()=>{_=null}),ue()):_?(_.p(y,S),S&4&&A(_,1)):(_=Np(y),_.c(),A(_,1),_.m(a,u)),y[2]||y[3]?h?(h.p(y,S),S&12&&A(h,1)):(h=Fp(y),h.c(),A(h,1),h.m(a,null)):h&&(ae(),I(h,1,1,()=>{h=null}),ue());const T={};S&24581&&(T.$$scope={dirty:S,ctx:y}),d.$set(T)},i(y){m||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(_),A(h),A(d.$$.fragment,y),m=!0)},o(y){I(i.$$.fragment,y),I(o.$$.fragment,y),I(_),I(h),I(d.$$.fragment,y),m=!1},d(y){y&&k(e),V(i),V(o),_&&_.d(),h&&h.d(),V(d)}}}function VM(n,e,t){let{collection:i=new yn}=e,{record:s=new yi}=e,{isNew:l=s.$isNew}=e,o=s.username||null,r=!1;function a(){s.username=this.value,t(0,s),t(3,r)}const u=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function f(){s.email=this.value,t(0,s),t(3,r)}function c(){r=this.checked,t(3,r)}function d(){s.password=this.value,t(0,s),t(3,r)}function m(){s.passwordConfirm=this.value,t(0,s),t(3,r)}function _(){s.verified=this.checked,t(0,s),t(3,r)}const h=b=>{l||pn("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),"isNew"in b&&t(2,l=b.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&8&&(r||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),ai("password"),ai("passwordConfirm")))},[s,i,l,r,o,a,u,f,c,d,m,_,h]}class zM extends ge{constructor(e){super(),_e(this,e,VM,jM,me,{collection:1,record:0,isNew:2})}}function HM(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const _=r.closest("form");_!=null&&_.requestSubmit&&_.requestSubmit()}}Gt(()=>(u(),()=>clearTimeout(a)));function c(m){ee[m?"unshift":"push"](()=>{r=m,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=qe(qe({},e),Zt(m)),t(3,s=xe(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class UM extends ge{constructor(e){super(),_e(this,e,BM,HM,me,{value:0,maxHeight:4})}}function WM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(h){n[2](h)}let _={id:n[3],required:n[1].required};return n[0]!==void 0&&(_.value=n[0]),f=new UM({props:_}),ee.push(()=>de(f,"value",m)),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),z(f.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),j(f,h,b),d=!0},p(h,b){(!d||b&2&&i!==(i=B.getFieldTypeIcon(h[1].type)))&&p(t,"class",i),(!d||b&2)&&o!==(o=h[1].name+"")&&se(r,o),(!d||b&8&&a!==(a=h[3]))&&p(e,"for",a);const y={};b&8&&(y.id=h[3]),b&2&&(y.required=h[1].required),!c&&b&1&&(c=!0,y.value=h[0],he(()=>c=!1)),f.$set(y)},i(h){d||(A(f.$$.fragment,h),d=!0)},o(h){I(f.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(u),V(f,h)}}}function YM(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[WM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function KM(n,e,t){let{field:i=new kn}=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 JM extends ge{constructor(e){super(),_e(this,e,KM,YM,me,{field:1,value:0})}}function ZM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_,h,b;return{c(){var y,S;e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("input"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",m=(y=n[1].options)==null?void 0:y.min),p(f,"max",_=(S=n[1].options)==null?void 0:S.max),p(f,"step","any")},m(y,S){w(y,e,S),g(e,t),g(e,s),g(e,l),g(l,r),w(y,u,S),w(y,f,S),re(f,n[0]),h||(b=K(f,"input",n[2]),h=!0)},p(y,S){var C,$;S&2&&i!==(i=B.getFieldTypeIcon(y[1].type))&&p(t,"class",i),S&2&&o!==(o=y[1].name+"")&&se(r,o),S&8&&a!==(a=y[3])&&p(e,"for",a),S&8&&c!==(c=y[3])&&p(f,"id",c),S&2&&d!==(d=y[1].required)&&(f.required=d),S&2&&m!==(m=(C=y[1].options)==null?void 0:C.min)&&p(f,"min",m),S&2&&_!==(_=($=y[1].options)==null?void 0:$.max)&&p(f,"max",_),S&1&&dt(f.value)!==y[0]&&re(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,b()}}}function GM(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[ZM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function XM(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=dt(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 QM extends ge{constructor(e){super(),_e(this,e,XM,GM,me,{field:1,value:0})}}function xM(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=E(),s=v("label"),o=U(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){w(f,e,c),e.checked=n[0],w(f,i,c),w(f,s,c),g(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+"")&&se(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&k(e),f&&k(i),f&&k(s),a=!1,u()}}}function e6(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[xM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function t6(n,e,t){let{field:i=new kn}=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 n6 extends ge{constructor(e){super(),_e(this,e,t6,e6,me,{field:1,value:0})}}function i6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("input"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),w(h,f,b),re(f,n[0]),m||(_=K(f,"input",n[2]),m=!0)},p(h,b){b&2&&i!==(i=B.getFieldTypeIcon(h[1].type))&&p(t,"class",i),b&2&&o!==(o=h[1].name+"")&&se(r,o),b&8&&a!==(a=h[3])&&p(e,"for",a),b&8&&c!==(c=h[3])&&p(f,"id",c),b&2&&d!==(d=h[1].required)&&(f.required=d),b&1&&f.value!==h[0]&&re(f,h[0])},d(h){h&&k(e),h&&k(u),h&&k(f),m=!1,_()}}}function s6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[i6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function l6(n,e,t){let{field:i=new kn}=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 o6 extends ge{constructor(e){super(),_e(this,e,l6,s6,me,{field:1,value:0})}}function r6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("input"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),w(h,f,b),re(f,n[0]),m||(_=K(f,"input",n[2]),m=!0)},p(h,b){b&2&&i!==(i=B.getFieldTypeIcon(h[1].type))&&p(t,"class",i),b&2&&o!==(o=h[1].name+"")&&se(r,o),b&8&&a!==(a=h[3])&&p(e,"for",a),b&8&&c!==(c=h[3])&&p(f,"id",c),b&2&&d!==(d=h[1].required)&&(f.required=d),b&1&&f.value!==h[0]&&re(f,h[0])},d(h){h&&k(e),h&&k(u),h&&k(f),m=!1,_()}}}function a6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[r6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function u6(n,e,t){let{field:i=new kn}=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 f6 extends ge{constructor(e){super(),_e(this,e,u6,a6,me,{field:1,value:0})}}function Rp(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){w(l,e,o),g(e,t),i||(s=[Me(He.call(null,t,"Clear")),K(t,"click",n[5])],i=!0)},p:x,d(l){l&&k(e),i=!1,Ee(s)}}}function c6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_,h,b=n[0]&&!n[1].required&&Rp(n);function y($){n[6]($)}function S($){n[7]($)}let C={id:n[8],options:B.defaultFlatpickrOptions()};return n[2]!==void 0&&(C.value=n[2]),n[0]!==void 0&&(C.formattedValue=n[0]),d=new uu({props:C}),ee.push(()=>de(d,"value",y)),ee.push(()=>de(d,"formattedValue",S)),d.$on("close",n[3]),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),a=U(" (UTC)"),f=E(),b&&b.c(),c=E(),z(d.$$.fragment),p(t,"class",i=ls(B.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[8])},m($,T){w($,e,T),g(e,t),g(e,s),g(e,l),g(l,r),g(l,a),w($,f,T),b&&b.m($,T),w($,c,T),j(d,$,T),h=!0},p($,T){(!h||T&2&&i!==(i=ls(B.getFieldTypeIcon($[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!h||T&2)&&o!==(o=$[1].name+"")&&se(r,o),(!h||T&256&&u!==(u=$[8]))&&p(e,"for",u),$[0]&&!$[1].required?b?b.p($,T):(b=Rp($),b.c(),b.m(c.parentNode,c)):b&&(b.d(1),b=null);const M={};T&256&&(M.id=$[8]),!m&&T&4&&(m=!0,M.value=$[2],he(()=>m=!1)),!_&&T&1&&(_=!0,M.formattedValue=$[0],he(()=>_=!1)),d.$set(M)},i($){h||(A(d.$$.fragment,$),h=!0)},o($){I(d.$$.fragment,$),h=!1},d($){$&&k(e),$&&k(f),b&&b.d($),$&&k(c),V(d,$)}}}function d6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[c6,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function p6(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e,l=s;function o(c){c.detail&&c.detail.length==3&&t(0,s=c.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(c){l=c,t(2,l),t(0,s)}function f(c){s=c,t(0,s)}return n.$$set=c=>{"field"in c&&t(1,i=c.field),"value"in c&&t(0,s=c.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class m6 extends ge{constructor(e){super(),_e(this,e,p6,d6,me,{field:1,value:0})}}function qp(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=U("Select up to "),s=U(i),l=U(" items."),p(e,"class","help-block")},m(o,r){w(o,e,r),g(e,t),g(e,s),g(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&se(s,i)},d(o){o&&k(e)}}}function h6(n){var S,C,$,T,M,O;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_;function h(D){n[3](D)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||((S=n[0])==null?void 0:S.length)>=((C=n[1].options)==null?void 0:C.maxSelect),items:($=n[1].options)==null?void 0:$.values,searchable:((M=(T=n[1].options)==null?void 0:T.values)==null?void 0:M.length)>5};n[0]!==void 0&&(b.selected=n[0]),f=new fu({props:b}),ee.push(()=>de(f,"selected",h));let y=((O=n[1].options)==null?void 0:O.maxSelect)>1&&qp(n);return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),z(f.$$.fragment),d=E(),y&&y.c(),m=ye(),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(D,L){w(D,e,L),g(e,t),g(e,s),g(e,l),g(l,r),w(D,u,L),j(f,D,L),w(D,d,L),y&&y.m(D,L),w(D,m,L),_=!0},p(D,L){var N,F,R,q,H,W;(!_||L&2&&i!==(i=B.getFieldTypeIcon(D[1].type)))&&p(t,"class",i),(!_||L&2)&&o!==(o=D[1].name+"")&&se(r,o),(!_||L&16&&a!==(a=D[4]))&&p(e,"for",a);const P={};L&16&&(P.id=D[4]),L&6&&(P.toggle=!D[1].required||D[2]),L&4&&(P.multiple=D[2]),L&7&&(P.closable=!D[2]||((N=D[0])==null?void 0:N.length)>=((F=D[1].options)==null?void 0:F.maxSelect)),L&2&&(P.items=(R=D[1].options)==null?void 0:R.values),L&2&&(P.searchable=((H=(q=D[1].options)==null?void 0:q.values)==null?void 0:H.length)>5),!c&&L&1&&(c=!0,P.selected=D[0],he(()=>c=!1)),f.$set(P),((W=D[1].options)==null?void 0:W.maxSelect)>1?y?y.p(D,L):(y=qp(D),y.c(),y.m(m.parentNode,m)):y&&(y.d(1),y=null)},i(D){_||(A(f.$$.fragment,D),_=!0)},o(D){I(f.$$.fragment,D),_=!1},d(D){D&&k(e),D&&k(u),V(f,D),D&&k(d),y&&y.d(D),D&&k(m)}}}function _6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[h6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function g6(n,e,t){let i,{field:s=new kn}=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 b6 extends ge{constructor(e){super(),_e(this,e,g6,_6,me,{field:1,value:0})}}function v6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("textarea"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4]),p(f,"id",c=n[4]),p(f,"class","txt-mono"),f.required=d=n[1].required,f.value=n[2]},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),w(h,f,b),m||(_=K(f,"input",n[3]),m=!0)},p(h,b){b&2&&i!==(i=B.getFieldTypeIcon(h[1].type))&&p(t,"class",i),b&2&&o!==(o=h[1].name+"")&&se(r,o),b&16&&a!==(a=h[4])&&p(e,"for",a),b&16&&c!==(c=h[4])&&p(f,"id",c),b&2&&d!==(d=h[1].required)&&(f.required=d),b&4&&(f.value=h[2])},d(h){h&&k(e),h&&k(u),h&&k(f),m=!1,_()}}}function y6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[v6,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function k6(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class w6 extends ge{constructor(e){super(),_e(this,e,k6,y6,me,{field:1,value:0})}}function S6(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function $6(n){let e,t,i;return{c(){e=v("img"),p(e,"draggable",!1),hn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!hn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function C6(n){let e;function t(l,o){return l[2]?$6:S6}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&k(e)}}}function T6(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){B.hasImageExtension(s==null?void 0:s.name)?B.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{t(2,i=""),console.warn("Unable to generate thumb: ",r)}):t(2,i="")}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class M6 extends ge{constructor(e){super(),_e(this,e,T6,C6,me,{file:0,size:1})}}function jp(n){let e;function t(l,o){return l[4]==="image"?E6:O6}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function O6(n){let e,t;return{c(){e=v("object"),t=U("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){w(i,e,s),g(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&k(e)}}}function E6(n){let e,t,i;return{c(){e=v("img"),hn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){w(s,e,l)},p(s,l){l&2&&!hn(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&k(e)}}}function D6(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&jp(n);return{c(){i&&i.c(),t=ye()},m(l,o){i&&i.m(l,o),w(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=jp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&k(t)}}}function A6(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=K(e,"click",et(n[0])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function I6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("a"),t=U(n[2]),i=E(),s=v("i"),l=E(),o=v("div"),r=E(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,l,d),w(c,o,d),w(c,r,d),w(c,a,d),u||(f=K(a,"click",n[0]),u=!0)},p(c,d){d&4&&se(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&k(e),c&&k(l),c&&k(o),c&&k(r),c&&k(a),u=!1,f()}}}function L6(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[I6],header:[A6],default:[D6]},$$scope:{ctx:n}};return e=new ln({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[7](null),V(e,s)}}}function P6(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(m){ee[m?"unshift":"push"](()=>{o=m,t(3,o)})}function c(m){Ne.call(this,n,m)}function d(m){Ne.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=B.getFileType(s))},[u,r,s,o,l,a,i,f,c,d]}class N6 extends ge{constructor(e){super(),_e(this,e,P6,L6,me,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function F6(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?V6:u[3]==="video"||u[3]==="audio"?j6:q6}let r=o(n),a=r(n);return{c(){e=v("a"),a.c(),p(e,"draggable",!1),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){w(u,e,f),a.m(e,null),s||(l=K(e,"click",An(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&p(e,"class",t),f&64&&p(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&p(e,"title",i)},d(u){u&&k(e),a.d(),s=!1,l()}}}function R6(n){let e,t;return{c(){e=v("div"),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){w(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&p(e,"class",t)},d(i){i&&k(e)}}}function q6(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function j6(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function V6(n){let e,t,i,s,l;return{c(){e=v("img"),p(e,"draggable",!1),hn(e.src,t=n[5])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0])},m(o,r){w(o,e,r),s||(l=K(e,"error",n[8]),s=!0)},p(o,r){r&32&&!hn(e.src,t=o[5])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&k(e),s=!1,l()}}}function z6(n){let e,t,i;function s(a,u){return a[2]?R6:F6}let l=s(n),o=l(n),r={};return t=new N6({props:r}),n[12](t),{c(){o.c(),e=E(),z(t.$$.fragment)},m(a,u){o.m(a,u),w(a,e,u),j(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){I(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&k(e),n[12](null),V(t,a)}}}function H6(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",c="",d=!1;m();async function m(){t(2,d=!0);try{t(10,c=await ce.getAdminFileToken(l.collectionId))}catch(y){console.warn("File token failure:",y)}t(2,d=!1)}function _(){t(5,u="")}const h=y=>{s&&(y.preventDefault(),a==null||a.show(f))};function b(y){ee[y?"unshift":"push"](()=>{a=y,t(4,a)})}return n.$$set=y=>{"record"in y&&t(9,l=y.record),"filename"in y&&t(0,o=y.filename),"size"in y&&t(1,r=y.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=B.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=d?"":ce.files.getUrl(l,o,{token:c})),n.$$.dirty&1541&&t(5,u=d?"":ce.files.getUrl(l,o,{thumb:"100x100",token:c}))},[o,r,d,i,a,u,f,s,_,l,c,h,b]}class du extends ge{constructor(e){super(),_e(this,e,H6,z6,me,{record:9,filename:0,size:1})}}function Vp(n,e,t){const i=n.slice();return i[29]=e[t],i[31]=t,i}function zp(n,e,t){const i=n.slice();i[34]=e[t],i[31]=t;const s=i[2].includes(i[34]);return i[35]=s,i}function B6(n){let e,t,i;function s(){return n[17](n[34])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){w(l,e,o),t||(i=[Me(He.call(null,e,"Remove file")),K(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Ee(i)}}}function U6(n){let e,t,i;function s(){return n[16](n[34])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){w(l,e,o),t||(i=K(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,i()}}}function W6(n){let e,t,i,s,l,o,r=n[34]+"",a,u,f,c,d,m;i=new du({props:{record:n[3],filename:n[34]}});function _(y,S){return y[35]?U6:B6}let h=_(n),b=h(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),o=v("a"),a=U(r),c=E(),d=v("div"),b.c(),Q(t,"fade",n[35]),p(o,"draggable",!1),p(o,"href",u=ce.files.getUrl(n[3],n[34],{token:n[10]})),p(o,"class",f="txt-ellipsis "+(n[35]?"txt-strikethrough txt-hint":"link-primary")),p(o,"title","Download"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),p(l,"class","content"),p(d,"class","actions"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(y,S){w(y,e,S),g(e,t),j(i,t,null),g(e,s),g(e,l),g(l,o),g(o,a),g(e,c),g(e,d),b.m(d,null),m=!0},p(y,S){const C={};S[0]&8&&(C.record=y[3]),S[0]&32&&(C.filename=y[34]),i.$set(C),(!m||S[0]&36)&&Q(t,"fade",y[35]),(!m||S[0]&32)&&r!==(r=y[34]+"")&&se(a,r),(!m||S[0]&1064&&u!==(u=ce.files.getUrl(y[3],y[34],{token:y[10]})))&&p(o,"href",u),(!m||S[0]&36&&f!==(f="txt-ellipsis "+(y[35]?"txt-strikethrough txt-hint":"link-primary")))&&p(o,"class",f),h===(h=_(y))&&b?b.p(y,S):(b.d(1),b=h(y),b&&(b.c(),b.m(d,null))),(!m||S[1]&2)&&Q(e,"dragging",y[32]),(!m||S[1]&4)&&Q(e,"dragover",y[33])},i(y){m||(A(i.$$.fragment,y),m=!0)},o(y){I(i.$$.fragment,y),m=!1},d(y){y&&k(e),V(i),b.d()}}}function Hp(n,e){let t,i,s,l;function o(a){e[18](a)}let r={group:e[4].name+"_uploaded",index:e[31],disabled:!e[6],$$slots:{default:[W6,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.list=e[0]),i=new Nl({props:r}),ee.push(()=>de(i,"list",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_uploaded"),u[0]&32&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&1068|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.list=e[0],he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function Y6(n){let e,t,i,s,l,o,r,a,u=n[29].name+"",f,c,d,m,_,h,b;i=new M6({props:{file:n[29]}});function y(){return n[19](n[31])}return{c(){e=v("div"),t=v("figure"),z(i.$$.fragment),s=E(),l=v("div"),o=v("small"),o.textContent="New",r=E(),a=v("span"),f=U(u),d=E(),m=v("button"),m.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename m-r-auto"),p(l,"title",c=n[29].name),p(m,"type","button"),p(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(S,C){w(S,e,C),g(e,t),j(i,t,null),g(e,s),g(e,l),g(l,o),g(l,r),g(l,a),g(a,f),g(e,d),g(e,m),_=!0,h||(b=[Me(He.call(null,m,"Remove file")),K(m,"click",y)],h=!0)},p(S,C){n=S;const $={};C[0]&2&&($.file=n[29]),i.$set($),(!_||C[0]&2)&&u!==(u=n[29].name+"")&&se(f,u),(!_||C[0]&2&&c!==(c=n[29].name))&&p(l,"title",c),(!_||C[1]&2)&&Q(e,"dragging",n[32]),(!_||C[1]&4)&&Q(e,"dragover",n[33])},i(S){_||(A(i.$$.fragment,S),_=!0)},o(S){I(i.$$.fragment,S),_=!1},d(S){S&&k(e),V(i),h=!1,Ee(b)}}}function Bp(n,e){let t,i,s,l;function o(a){e[20](a)}let r={group:e[4].name+"_new",index:e[31],disabled:!e[6],$$slots:{default:[Y6,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[1]!==void 0&&(r.list=e[1]),i=new Nl({props:r}),ee.push(()=>de(i,"list",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_new"),u[0]&2&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&2|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&2&&(s=!0,f.list=e[1],he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function K6(n){let e,t,i,s,l,o=n[4].name+"",r,a,u,f,c=[],d=new Map,m,_=[],h=new Map,b,y,S,C,$,T,M,O,D,L,P,N,F=n[5];const R=W=>W[34]+W[3].id;for(let W=0;WW[29].name+W[31];for(let W=0;WDelete`,p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[J(e,"click",n[24]),J(i,"click",An(et(n[25])))],s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Ee(l)}}}function mp(n){let e,t,i,s;return i=new Kn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[_M]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=E(),H(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){w(l,e,o),w(l,t,o),V(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&1048576&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&k(e),l&&k(t),z(i,l)}}}function hp(n){let e,t,i,s,l,o=n[48]+"",r,a,u,f,c;function d(){return n[27](n[47])}return{c(){e=v("button"),t=v("i"),s=E(),l=v("span"),r=U(o),a=U(" collection"),u=E(),p(t,"class",i=ls(B.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),Q(e,"selected",n[47]==n[2].type)},m(m,_){w(m,e,_),g(e,t),g(e,s),g(e,l),g(l,r),g(l,a),g(e,u),f||(c=J(e,"click",d),f=!0)},p(m,_){n=m,_[0]&64&&i!==(i=ls(B.getCollectionTypeIcon(n[47]))+" svelte-12y0yzb")&&p(t,"class",i),_[0]&64&&o!==(o=n[48]+"")&&se(r,o),_[0]&68&&Q(e,"selected",n[47]==n[2].type)},d(m){m&&k(e),f=!1,c()}}}function _M(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{N=null}),ue()),(!D||q[0]&4&&$!==($="btn btn-sm p-r-10 p-l-10 "+(R[2].$isNew?"btn-outline":"btn-transparent")))&&p(d,"class",$),(!D||q[0]&4&&T!==(T=!R[2].$isNew))&&(d.disabled=T),R[2].system?F||(F=_p(),F.c(),F.m(O.parentNode,O)):F&&(F.d(1),F=null)},i(R){D||(A(N),D=!0)},o(R){I(N),D=!1},d(R){R&&k(e),R&&k(s),R&&k(l),R&&k(f),R&&k(c),N&&N.d(),R&&k(M),F&&F.d(R),R&&k(O),L=!1,P()}}}function gp(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){w(r,e,a),s=!0,l||(o=Me(t=He.call(null,e,n[11])),l=!0)},p(r,a){t&&jt(t.update)&&a[0]&2048&&t.update.call(null,r[11])},i(r){s||(r&&Qe(()=>{s&&(i||(i=je(e,Kt,{duration:150,start:.7},!0)),i.run(1))}),s=!0)},o(r){r&&(i||(i=je(e,Kt,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&k(e),r&&i&&i.end(),l=!1,o()}}}function bp(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function vp(n){var a,u,f;let e,t,i,s=!B.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&yp();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=E(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),Q(e,"active",n[3]===Ns)},m(c,d){w(c,e,d),g(e,t),g(e,i),r&&r.m(e,null),l||(o=J(e,"click",n[31]),l=!0)},p(c,d){var m,_,h;d[0]&32&&(s=!B.isEmpty((m=c[5])==null?void 0:m.options)&&!((h=(_=c[5])==null?void 0:_.options)!=null&&h.manageRule)),s?r?d[0]&32&&A(r,1):(r=yp(),r.c(),A(r,1),r.m(e,null)):r&&(ae(),I(r,1,1,()=>{r=null}),ue()),d[0]&8&&Q(e,"active",c[3]===Ns)},d(c){c&&k(e),r&&r.d(),l=!1,o()}}}function yp(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function bM(n){var j,W,X,K,Z,le,ne,ie;let e,t=n[2].$isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,m,_=(j=n[2])!=null&&j.$isView?"Query":"Fields",h,b,y=!B.isEmpty(n[11]),S,C,$,T,M=!B.isEmpty((W=n[5])==null?void 0:W.listRule)||!B.isEmpty((X=n[5])==null?void 0:X.viewRule)||!B.isEmpty((K=n[5])==null?void 0:K.createRule)||!B.isEmpty((Z=n[5])==null?void 0:Z.updateRule)||!B.isEmpty((le=n[5])==null?void 0:le.deleteRule)||!B.isEmpty((ie=(ne=n[5])==null?void 0:ne.options)==null?void 0:ie.manageRule),O,D,L,P,N=!n[2].$isNew&&!n[2].system&&pp(n);r=new pe({props:{class:"form-field collection-field-name required m-b-0 "+(n[13]?"disabled":""),name:"name",$$slots:{default:[gM,({uniqueId:be})=>({46:be}),({uniqueId:be})=>[0,be?32768:0]]},$$scope:{ctx:n}}});let F=y&&gp(n),R=M&&bp(),q=n[2].$isAuth&&vp(n);return{c(){e=v("h4"),i=U(t),s=E(),N&&N.c(),l=E(),o=v("form"),H(r.$$.fragment),a=E(),u=v("input"),f=E(),c=v("div"),d=v("button"),m=v("span"),h=U(_),b=E(),F&&F.c(),S=E(),C=v("button"),$=v("span"),$.textContent="API Rules",T=E(),R&&R.c(),O=E(),q&&q.c(),p(e,"class","upsert-panel-title svelte-12y0yzb"),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(m,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),Q(d,"active",n[3]===Pi),p($,"class","txt"),p(C,"type","button"),p(C,"class","tab-item"),Q(C,"active",n[3]===kl),p(c,"class","tabs-header stretched")},m(be,Se){w(be,e,Se),g(e,i),w(be,s,Se),N&&N.m(be,Se),w(be,l,Se),w(be,o,Se),V(r,o,null),g(o,a),g(o,u),w(be,f,Se),w(be,c,Se),g(c,d),g(d,m),g(m,h),g(d,b),F&&F.m(d,null),g(c,S),g(c,C),g(C,$),g(C,T),R&&R.m(C,null),g(c,O),q&&q.m(c,null),D=!0,L||(P=[J(o,"submit",et(n[28])),J(d,"click",n[29]),J(C,"click",n[30])],L=!0)},p(be,Se){var Be,ke,Te,Ze,ht,Ge,Ye,we;(!D||Se[0]&4)&&t!==(t=be[2].$isNew?"New collection":"Edit collection")&&se(i,t),!be[2].$isNew&&!be[2].system?N?(N.p(be,Se),Se[0]&4&&A(N,1)):(N=pp(be),N.c(),A(N,1),N.m(l.parentNode,l)):N&&(ae(),I(N,1,1,()=>{N=null}),ue());const Ve={};Se[0]&8192&&(Ve.class="form-field collection-field-name required m-b-0 "+(be[13]?"disabled":"")),Se[0]&8260|Se[1]&1081344&&(Ve.$$scope={dirty:Se,ctx:be}),r.$set(Ve),(!D||Se[0]&4)&&_!==(_=(Be=be[2])!=null&&Be.$isView?"Query":"Fields")&&se(h,_),Se[0]&2048&&(y=!B.isEmpty(be[11])),y?F?(F.p(be,Se),Se[0]&2048&&A(F,1)):(F=gp(be),F.c(),A(F,1),F.m(d,null)):F&&(ae(),I(F,1,1,()=>{F=null}),ue()),(!D||Se[0]&8)&&Q(d,"active",be[3]===Pi),Se[0]&32&&(M=!B.isEmpty((ke=be[5])==null?void 0:ke.listRule)||!B.isEmpty((Te=be[5])==null?void 0:Te.viewRule)||!B.isEmpty((Ze=be[5])==null?void 0:Ze.createRule)||!B.isEmpty((ht=be[5])==null?void 0:ht.updateRule)||!B.isEmpty((Ge=be[5])==null?void 0:Ge.deleteRule)||!B.isEmpty((we=(Ye=be[5])==null?void 0:Ye.options)==null?void 0:we.manageRule)),M?R?Se[0]&32&&A(R,1):(R=bp(),R.c(),A(R,1),R.m(C,null)):R&&(ae(),I(R,1,1,()=>{R=null}),ue()),(!D||Se[0]&8)&&Q(C,"active",be[3]===kl),be[2].$isAuth?q?q.p(be,Se):(q=vp(be),q.c(),q.m(c,null)):q&&(q.d(1),q=null)},i(be){D||(A(N),A(r.$$.fragment,be),A(F),A(R),D=!0)},o(be){I(N),I(r.$$.fragment,be),I(F),I(R),D=!1},d(be){be&&k(e),be&&k(s),N&&N.d(be),be&&k(l),be&&k(o),z(r),be&&k(f),be&&k(c),F&&F.d(),R&&R.d(),q&&q.d(),L=!1,Ee(P)}}}function vM(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=E(),s=v("button"),l=v("span"),r=U(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[12]||n[9],Q(s,"btn-loading",n[9])},m(c,d){w(c,e,d),g(e,t),w(c,i,d),w(c,s,d),g(s,l),g(l,r),u||(f=[J(e,"click",n[22]),J(s,"click",n[23])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].$isNew?"Create":"Save changes")&&se(r,o),d[0]&4608&&a!==(a=!c[12]||c[9])&&(s.disabled=a),d[0]&512&&Q(s,"btn-loading",c[9])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function yM(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",escClose:!1,overlayClose:!n[9],beforeHide:n[36],$$slots:{footer:[vM],header:[bM],default:[mM]},$$scope:{ctx:n}};e=new ln({props:l}),n[37](e),e.$on("hide",n[38]),e.$on("show",n[39]);let o={};return i=new cM({props:o}),n[40](i),i.$on("confirm",n[41]),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(r,a){V(e,r,a),w(r,t,a),V(i,r,a),s=!0},p(r,a){const u={};a[0]&512&&(u.overlayClose=!r[9]),a[0]&1040&&(u.beforeHide=r[36]),a[0]&14956|a[1]&1048576&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),s=!1},d(r){n[37](null),z(e,r),r&&k(t),n[40](null),z(i,r)}}}const Pi="schema",kl="api_rules",Ns="options",kM="base",kp="auth",wp="view";function Fr(n){return JSON.stringify(n)}function wM(n,e,t){let i,s,l,o;Je(n,Si,we=>t(5,o=we));const r={};r[kM]="Base",r[wp]="View",r[kp]="Auth";const a=$t();let u,f,c=null,d=new yn,m=!1,_=!1,h=Pi,b=Fr(d),y="";function S(we){t(3,h=we)}function C(we){return T(we),t(10,_=!0),S(Pi),u==null?void 0:u.show()}function $(){return u==null?void 0:u.hide()}async function T(we){en({}),typeof we<"u"?(t(20,c=we),t(2,d=we.$clone())):(t(20,c=null),t(2,d=new yn)),t(2,d.schema=d.schema||[],d),t(2,d.originalName=d.name||"",d),await fn(),t(21,b=Fr(d))}function M(){d.$isNew?O():f==null||f.show(c,d)}function O(){if(m)return;t(9,m=!0);const we=D();let fe;d.$isNew?fe=ce.collections.create(we):fe=ce.collections.update(d.id,we),fe.then(ze=>{Na(),Iy(ze),t(10,_=!1),$(),zt(d.$isNew?"Successfully created collection.":"Successfully updated collection."),a("save",{isNew:d.$isNew,collection:ze})}).catch(ze=>{ce.error(ze)}).finally(()=>{t(9,m=!1)})}function D(){const we=d.$export();we.schema=we.schema.slice(0);for(let fe=we.schema.length-1;fe>=0;fe--)we.schema[fe].toDelete&&we.schema.splice(fe,1);return we}function L(){c!=null&&c.id&&pn(`Do you really want to delete collection "${c==null?void 0:c.name}" and all its records?`,()=>ce.collections.delete(c==null?void 0:c.id).then(()=>{$(),zt(`Successfully deleted collection "${c==null?void 0:c.name}".`),a("delete",c),Ly(c)}).catch(we=>{ce.error(we)}))}function P(we){t(2,d.type=we,d),ai("schema")}function N(){s?pn("You have unsaved changes. Do you really want to discard them?",()=>{F()}):F()}async function F(){const we=c==null?void 0:c.$clone();if(we){if(we.id="",we.created="",we.updated="",we.name+="_duplicate",!B.isEmpty(we.schema))for(const fe of we.schema)fe.id="";if(!B.isEmpty(we.indexes))for(let fe=0;fe$(),q=()=>M(),j=()=>N(),W=()=>L(),X=we=>{t(2,d.name=B.slugify(we.target.value),d),we.target.value=d.name},K=we=>P(we),Z=()=>{l&&M()},le=()=>S(Pi),ne=()=>S(kl),ie=()=>S(Ns);function be(we){d=we,t(2,d),t(20,c)}function Se(we){d=we,t(2,d),t(20,c)}function Ve(we){d=we,t(2,d),t(20,c)}function Be(we){d=we,t(2,d),t(20,c)}const ke=()=>s&&_?(pn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,_=!1),$()}),!1):!0;function Te(we){ee[we?"unshift":"push"](()=>{u=we,t(7,u)})}function Ze(we){Ne.call(this,n,we)}function ht(we){Ne.call(this,n,we)}function Ge(we){ee[we?"unshift":"push"](()=>{f=we,t(8,f)})}const Ye=()=>O();return n.$$.update=()=>{var we,fe;n.$$.dirty[0]&32&&(o.schema||(we=o.options)!=null&&we.query?t(11,y=B.getNestedVal(o,"schema.message")||"Has errors"):t(11,y="")),n.$$.dirty[0]&4&&d.type===wp&&(t(2,d.createRule=null,d),t(2,d.updateRule=null,d),t(2,d.deleteRule=null,d),t(2,d.indexes=[],d)),n.$$.dirty[0]&1048580&&d!=null&&d.name&&(c==null?void 0:c.name)!=(d==null?void 0:d.name)&&t(2,d.indexes=(fe=d.indexes)==null?void 0:fe.map(ze=>B.replaceIndexTableName(ze,d.name)),d),n.$$.dirty[0]&4&&t(13,i=!d.$isNew&&d.system),n.$$.dirty[0]&2097156&&t(4,s=b!=Fr(d)),n.$$.dirty[0]&20&&t(12,l=d.$isNew||s),n.$$.dirty[0]&12&&h===Ns&&d.type!==kp&&S(Pi)},[S,$,d,h,s,o,r,u,f,m,_,y,l,i,M,O,L,P,N,C,c,b,R,q,j,W,X,K,Z,le,ne,ie,be,Se,Ve,Be,ke,Te,Ze,ht,Ge,Ye]}class cu extends ge{constructor(e){super(),_e(this,e,wM,yM,me,{changeTab:0,show:19,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[19]}get hide(){return this.$$.ctx[1]}}function Sp(n,e,t){const i=n.slice();return i[15]=e[t],i}function $p(n){let e,t=n[1].length&&Cp();return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[1].length?t||(t=Cp(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function Cp(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Tp(n,e){let t,i,s,l,o,r=e[15].name+"",a,u,f,c,d,m;return{key:n,first:null,c(){var _;t=v("a"),i=v("i"),l=E(),o=v("span"),a=U(r),u=E(),p(i,"class",s=B.getCollectionTypeIcon(e[15].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[15].id),p(t,"class","sidebar-list-item"),p(t,"title",c=e[15].name),Q(t,"active",((_=e[5])==null?void 0:_.id)===e[15].id),this.first=t},m(_,h){w(_,t,h),g(t,i),g(t,l),g(t,o),g(o,a),g(t,u),d||(m=Me(on.call(null,t)),d=!0)},p(_,h){var b;e=_,h&8&&s!==(s=B.getCollectionTypeIcon(e[15].type))&&p(i,"class",s),h&8&&r!==(r=e[15].name+"")&&se(a,r),h&8&&f!==(f="/collections?collectionId="+e[15].id)&&p(t,"href",f),h&8&&c!==(c=e[15].name)&&p(t,"title",c),h&40&&Q(t,"active",((b=e[5])==null?void 0:b.id)===e[15].id)},d(_){_&&k(t),d=!1,m()}}}function Mp(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` + New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){w(l,e,o),g(e,t),i||(s=J(t,"click",n[12]),i=!0)},p:x,d(l){l&&k(e),i=!1,s()}}}function SM(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],m=new Map,_,h,b,y,S,C,$=n[3];const T=L=>L[15].id;for(let L=0;L<$.length;L+=1){let P=Sp(n,$,L),N=T(P);m.set(N,d[L]=Tp(N,P))}let M=null;$.length||(M=$p(n));let O=!n[7]&&Mp(n),D={};return b=new cu({props:D}),n[13](b),b.$on("save",n[14]),{c(){e=v("aside"),t=v("header"),i=v("div"),s=v("div"),l=v("button"),l.innerHTML='',o=E(),r=v("input"),a=E(),u=v("hr"),f=E(),c=v("div");for(let L=0;L20),p(e,"class","page-sidebar collection-sidebar")},m(L,P){w(L,e,P),g(e,t),g(t,i),g(i,s),g(s,l),g(i,o),g(i,r),re(r,n[0]),g(e,a),g(e,u),g(e,f),g(e,c);for(let N=0;N20),L[7]?O&&(O.d(1),O=null):O?O.p(L,P):(O=Mp(L),O.c(),O.m(e,null));const N={};b.$set(N)},i(L){y||(A(b.$$.fragment,L),y=!0)},o(L){I(b.$$.fragment,L),y=!1},d(L){L&&k(e);for(let P=0;P{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function CM(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,S=>t(5,o=S)),Je(n,ci,S=>t(9,r=S)),Je(n,wo,S=>t(6,a=S)),Je(n,As,S=>t(7,u=S));let f,c="";function d(S){sn(ui,o=S,o)}const m=()=>t(0,c="");function _(){c=this.value,t(0,c)}const h=()=>f==null?void 0:f.show();function b(S){ee[S?"unshift":"push"](()=>{f=S,t(2,f)})}const y=S=>{var C;(C=S.detail)!=null&&C.isNew&&S.detail.collection&&d(S.detail.collection)};return n.$$.update=()=>{n.$$.dirty&512&&r&&$M(),n.$$.dirty&1&&t(1,i=c.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=c!==""),n.$$.dirty&515&&t(3,l=r.filter(S=>S.id==c||S.name.replace(/\s+/g,"").toLowerCase().includes(i)))},[c,i,f,l,s,o,a,u,d,r,m,_,h,b,y]}class TM extends ge{constructor(e){super(),_e(this,e,CM,SM,me,{})}}function Op(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Ep(n){n[18]=n[19].default}function Dp(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Ap(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Ip(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Ap();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=ye(),c&&c.c(),s=E(),l=v("button"),r=U(o),a=E(),p(l,"type","button"),p(l,"class","sidebar-item"),Q(l,"active",e[5]===e[14]),this.first=t},m(m,_){w(m,t,_),c&&c.m(m,_),w(m,s,_),w(m,l,_),g(l,r),g(l,a),u||(f=J(l,"click",d),u=!0)},p(m,_){e=m,_&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Ap(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),_&8&&o!==(o=e[15].label+"")&&se(r,o),_&40&&Q(l,"active",e[5]===e[14])},d(m){m&&k(t),c&&c.d(m),m&&k(s),m&&k(l),u=!1,f()}}}function Lp(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:EM,then:OM,catch:MM,value:19,blocks:[,,,]};return gu(t=n[15].component,s),{c(){e=ye(),s.block.c()},m(l,o){w(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&gu(t,s)||n0(s,n,o)},i(l){i||(A(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];I(r)}i=!1},d(l){l&&k(e),s.block.d(l),s.token=null,s=null}}}function MM(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function OM(n){Ep(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){H(e.$$.fragment),t=E()},m(s,l){V(e,s,l),w(s,t,l),i=!0},p(s,l){Ep(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(A(e.$$.fragment,s),i=!0)},o(s){I(e.$$.fragment,s),i=!1},d(s){z(e,s),s&&k(t)}}}function EM(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function Pp(n,e){let t,i,s,l=e[5]===e[14]&&Lp(e);return{key:n,first:null,c(){t=ye(),l&&l.c(),i=ye(),this.first=t},m(o,r){w(o,t,r),l&&l.m(o,r),w(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&A(l,1)):(l=Lp(e),l.c(),A(l,1),l.m(i.parentNode,i)):l&&(ae(),I(l,1,1,()=>{l=null}),ue())},i(o){s||(A(l),s=!0)},o(o){I(l),s=!1},d(o){o&&k(t),l&&l.d(o),o&&k(i)}}}function DM(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=h=>h[14];for(let h=0;hh[14];for(let h=0;hClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[8]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function IM(n){let e,t,i={class:"docs-panel",$$slots:{footer:[AM],default:[DM]},$$scope:{ctx:n}};return e=new ln({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[10](null),z(e,s)}}}function LM(n,e,t){const i={list:{label:"List/Search",component:at(()=>import("./ListApiDocs-b3571a57.js"),["./ListApiDocs-b3571a57.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css","./ListApiDocs-68f52edd.css"],import.meta.url)},view:{label:"View",component:at(()=>import("./ViewApiDocs-0b86dfe3.js"),["./ViewApiDocs-0b86dfe3.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b7007fe9.js"],import.meta.url)},create:{label:"Create",component:at(()=>import("./CreateApiDocs-8f33628d.js"),["./CreateApiDocs-8f33628d.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b7007fe9.js"],import.meta.url)},update:{label:"Update",component:at(()=>import("./UpdateApiDocs-97d4a9f2.js"),["./UpdateApiDocs-97d4a9f2.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b7007fe9.js"],import.meta.url)},delete:{label:"Delete",component:at(()=>import("./DeleteApiDocs-0c4ec69e.js"),["./DeleteApiDocs-0c4ec69e.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:at(()=>import("./RealtimeApiDocs-32f89e17.js"),["./RealtimeApiDocs-32f89e17.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:at(()=>import("./AuthWithPasswordDocs-d010af6f.js"),["./AuthWithPasswordDocs-d010af6f.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b7007fe9.js"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:at(()=>import("./AuthWithOAuth2Docs-e2500223.js"),["./AuthWithOAuth2Docs-e2500223.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b7007fe9.js"],import.meta.url)},refresh:{label:"Auth refresh",component:at(()=>import("./AuthRefreshDocs-050ecbaf.js"),["./AuthRefreshDocs-050ecbaf.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b7007fe9.js"],import.meta.url)},"request-verification":{label:"Request verification",component:at(()=>import("./RequestVerificationDocs-6ccba240.js"),["./RequestVerificationDocs-6ccba240.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:at(()=>import("./ConfirmVerificationDocs-70b00c0a.js"),["./ConfirmVerificationDocs-70b00c0a.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:at(()=>import("./RequestPasswordResetDocs-60d01d4d.js"),["./RequestPasswordResetDocs-60d01d4d.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:at(()=>import("./ConfirmPasswordResetDocs-95a862f9.js"),["./ConfirmPasswordResetDocs-95a862f9.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:at(()=>import("./RequestEmailChangeDocs-e46a24c9.js"),["./RequestEmailChangeDocs-e46a24c9.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:at(()=>import("./ConfirmEmailChangeDocs-1ba40b3f.js"),["./ConfirmEmailChangeDocs-1ba40b3f.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:at(()=>import("./AuthMethodsDocs-e443370f.js"),["./AuthMethodsDocs-e443370f.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b7007fe9.js"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:at(()=>import("./ListExternalAuthsDocs-ad614d24.js"),["./ListExternalAuthsDocs-ad614d24.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css","./FieldsQueryParam-b7007fe9.js"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:at(()=>import("./UnlinkExternalAuthDocs-f29fdf14.js"),["./UnlinkExternalAuthDocs-f29fdf14.js","./SdkTabs-cc2b5912.js","./SdkTabs-9b0b7a06.css"],import.meta.url)}};let l,o=new yn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),m=y=>c(y);function _(y){ee[y?"unshift":"push"](()=>{l=y,t(4,l)})}function h(y){Ne.call(this,n,y)}function b(y){Ne.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"]):o.$isView?(t(3,a=Object.assign({},i)),delete a.create,delete a.update,delete a.delete,delete a.realtime):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,m,_,h,b]}class PM extends ge{constructor(e){super(),_e(this,e,LM,IM,me,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function NM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Username",o=E(),r=v("input"),p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","text"),p(r,"requried",a=!n[2]),p(r,"placeholder",u=n[2]?"Leave empty to auto generate...":n[4]),p(r,"id",f=n[13])},m(m,_){w(m,e,_),g(e,t),g(e,i),g(e,s),w(m,o,_),w(m,r,_),re(r,n[0].username),c||(d=J(r,"input",n[5]),c=!0)},p(m,_){_&8192&&l!==(l=m[13])&&p(e,"for",l),_&4&&a!==(a=!m[2])&&p(r,"requried",a),_&4&&u!==(u=m[2]?"Leave empty to auto generate...":m[4])&&p(r,"placeholder",u),_&8192&&f!==(f=m[13])&&p(r,"id",f),_&1&&r.value!==m[0].username&&re(r,m[0].username)},d(m){m&&k(e),m&&k(o),m&&k(r),c=!1,d()}}}function FM(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,m,_,h,b,y,S,C;return{c(){var $;e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Email",o=E(),r=v("div"),a=v("button"),u=v("span"),f=U("Public: "),d=U(c),_=E(),h=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[13]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",m="btn btn-sm btn-transparent "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(h,"type","email"),h.autofocus=n[2],p(h,"autocomplete","off"),p(h,"id",b=n[13]),h.required=y=($=n[1].options)==null?void 0:$.requireEmail,p(h,"class","svelte-1751a4d")},m($,T){w($,e,T),g(e,t),g(e,i),g(e,s),w($,o,T),w($,r,T),g(r,a),g(a,u),g(u,f),g(u,d),w($,_,T),w($,h,T),re(h,n[0].email),n[2]&&h.focus(),S||(C=[Me(He.call(null,a,{text:"Make email public or private",position:"top-right"})),J(a,"click",n[6]),J(h,"input",n[7])],S=!0)},p($,T){var M;T&8192&&l!==(l=$[13])&&p(e,"for",l),T&1&&c!==(c=$[0].emailVisibility?"On":"Off")&&se(d,c),T&1&&m!==(m="btn btn-sm btn-transparent "+($[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",m),T&4&&(h.autofocus=$[2]),T&8192&&b!==(b=$[13])&&p(h,"id",b),T&2&&y!==(y=(M=$[1].options)==null?void 0:M.requireEmail)&&(h.required=y),T&1&&h.value!==$[0].email&&re(h,$[0].email)},d($){$&&k(e),$&&k(o),$&&k(r),$&&k(_),$&&k(h),S=!1,Ee(C)}}}function Np(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[RM,({uniqueId:i})=>({13:i}),({uniqueId:i})=>i?8192:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&24584&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function RM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[3],w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&8&&(e.checked=u[3]),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Fp(n){let e,t,i,s,l,o,r,a,u;return s=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[qM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[jM,({uniqueId:f})=>({13:f}),({uniqueId:f})=>f?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),H(s.$$.fragment),l=E(),o=v("div"),H(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),Q(t,"p-t-xs",n[3]),p(e,"class","block")},m(f,c){w(f,e,c),g(e,t),g(t,i),V(s,i,null),g(t,l),g(t,o),V(r,o,null),u=!0},p(f,c){const d={};c&24577&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c&24577&&(m.$$scope={dirty:c,ctx:f}),r.$set(m),(!u||c&8)&&Q(t,"p-t-xs",f[3])},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&Qe(()=>{u&&(a||(a=je(e,ot,{duration:150},!0)),a.run(1))}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(e,ot,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),z(s),z(r),f&&a&&a.end()}}}function qM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[0].password),u||(f=J(r,"input",n[9]),u=!0)},p(c,d){d&8192&&l!==(l=c[13])&&p(e,"for",l),d&8192&&a!==(a=c[13])&&p(r,"id",a),d&1&&r.value!==c[0].password&&re(r,c[0].password)},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function jM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password confirm",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[13]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[13]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[0].passwordConfirm),u||(f=J(r,"input",n[10]),u=!0)},p(c,d){d&8192&&l!==(l=c[13])&&p(e,"for",l),d&8192&&a!==(a=c[13])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&re(r,c[0].passwordConfirm)},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function VM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[13]),p(s,"for",o=n[13])},m(u,f){w(u,e,f),e.checked=n[0].verified,w(u,i,f),w(u,s,f),g(s,l),r||(a=[J(e,"change",n[11]),J(e,"change",et(n[12]))],r=!0)},p(u,f){f&8192&&t!==(t=u[13])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&8192&&o!==(o=u[13])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,Ee(a)}}}function zM(n){var b;let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new pe({props:{class:"form-field "+(n[2]?"":"required"),name:"username",$$slots:{default:[NM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[FM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}});let _=!n[2]&&Np(n),h=(n[2]||n[3])&&Fp(n);return d=new pe({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[VM,({uniqueId:y})=>({13:y}),({uniqueId:y})=>y?8192:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),r=E(),a=v("div"),_&&_.c(),u=E(),h&&h.c(),f=E(),c=v("div"),H(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,S){w(y,e,S),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),g(e,r),g(e,a),_&&_.m(a,null),g(a,u),h&&h.m(a,null),g(e,f),g(e,c),V(d,c,null),m=!0},p(y,[S]){var M;const C={};S&4&&(C.class="form-field "+(y[2]?"":"required")),S&24581&&(C.$$scope={dirty:S,ctx:y}),i.$set(C);const $={};S&2&&($.class="form-field "+((M=y[1].options)!=null&&M.requireEmail?"required":"")),S&24583&&($.$$scope={dirty:S,ctx:y}),o.$set($),y[2]?_&&(ae(),I(_,1,1,()=>{_=null}),ue()):_?(_.p(y,S),S&4&&A(_,1)):(_=Np(y),_.c(),A(_,1),_.m(a,u)),y[2]||y[3]?h?(h.p(y,S),S&12&&A(h,1)):(h=Fp(y),h.c(),A(h,1),h.m(a,null)):h&&(ae(),I(h,1,1,()=>{h=null}),ue());const T={};S&24581&&(T.$$scope={dirty:S,ctx:y}),d.$set(T)},i(y){m||(A(i.$$.fragment,y),A(o.$$.fragment,y),A(_),A(h),A(d.$$.fragment,y),m=!0)},o(y){I(i.$$.fragment,y),I(o.$$.fragment,y),I(_),I(h),I(d.$$.fragment,y),m=!1},d(y){y&&k(e),z(i),z(o),_&&_.d(),h&&h.d(),z(d)}}}function HM(n,e,t){let{collection:i=new yn}=e,{record:s=new yi}=e,{isNew:l=s.$isNew}=e,o=s.username||null,r=!1;function a(){s.username=this.value,t(0,s),t(3,r)}const u=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function f(){s.email=this.value,t(0,s),t(3,r)}function c(){r=this.checked,t(3,r)}function d(){s.password=this.value,t(0,s),t(3,r)}function m(){s.passwordConfirm=this.value,t(0,s),t(3,r)}function _(){s.verified=this.checked,t(0,s),t(3,r)}const h=b=>{l||pn("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),"isNew"in b&&t(2,l=b.isNew)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&8&&(r||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),ai("password"),ai("passwordConfirm")))},[s,i,l,r,o,a,u,f,c,d,m,_,h]}class BM extends ge{constructor(e){super(),_e(this,e,HM,zM,me,{collection:1,record:0,isNew:2})}}function UM(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight,o)+"px",r))},0)}function f(m){if((m==null?void 0:m.code)==="Enter"&&!(m!=null&&m.shiftKey)&&!(m!=null&&m.isComposing)){m.preventDefault();const _=r.closest("form");_!=null&&_.requestSubmit&&_.requestSubmit()}}Gt(()=>(u(),()=>clearTimeout(a)));function c(m){ee[m?"unshift":"push"](()=>{r=m,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=qe(qe({},e),Zt(m)),t(3,s=xe(e,i)),"value"in m&&t(0,l=m.value),"maxHeight"in m&&t(4,o=m.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class YM extends ge{constructor(e){super(),_e(this,e,WM,UM,me,{value:0,maxHeight:4})}}function KM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(h){n[2](h)}let _={id:n[3],required:n[1].required};return n[0]!==void 0&&(_.value=n[0]),f=new YM({props:_}),ee.push(()=>de(f,"value",m)),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),H(f.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),V(f,h,b),d=!0},p(h,b){(!d||b&2&&i!==(i=B.getFieldTypeIcon(h[1].type)))&&p(t,"class",i),(!d||b&2)&&o!==(o=h[1].name+"")&&se(r,o),(!d||b&8&&a!==(a=h[3]))&&p(e,"for",a);const y={};b&8&&(y.id=h[3]),b&2&&(y.required=h[1].required),!c&&b&1&&(c=!0,y.value=h[0],he(()=>c=!1)),f.$set(y)},i(h){d||(A(f.$$.fragment,h),d=!0)},o(h){I(f.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(u),z(f,h)}}}function JM(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[KM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function ZM(n,e,t){let{field:i=new kn}=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 GM extends ge{constructor(e){super(),_e(this,e,ZM,JM,me,{field:1,value:0})}}function XM(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_,h,b;return{c(){var y,S;e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("input"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",m=(y=n[1].options)==null?void 0:y.min),p(f,"max",_=(S=n[1].options)==null?void 0:S.max),p(f,"step","any")},m(y,S){w(y,e,S),g(e,t),g(e,s),g(e,l),g(l,r),w(y,u,S),w(y,f,S),re(f,n[0]),h||(b=J(f,"input",n[2]),h=!0)},p(y,S){var C,$;S&2&&i!==(i=B.getFieldTypeIcon(y[1].type))&&p(t,"class",i),S&2&&o!==(o=y[1].name+"")&&se(r,o),S&8&&a!==(a=y[3])&&p(e,"for",a),S&8&&c!==(c=y[3])&&p(f,"id",c),S&2&&d!==(d=y[1].required)&&(f.required=d),S&2&&m!==(m=(C=y[1].options)==null?void 0:C.min)&&p(f,"min",m),S&2&&_!==(_=($=y[1].options)==null?void 0:$.max)&&p(f,"max",_),S&1&&dt(f.value)!==y[0]&&re(f,y[0])},d(y){y&&k(e),y&&k(u),y&&k(f),h=!1,b()}}}function QM(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[XM,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function xM(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(){s=dt(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 e5 extends ge{constructor(e){super(),_e(this,e,xM,QM,me,{field:1,value:0})}}function t5(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=E(),s=v("label"),o=U(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){w(f,e,c),e.checked=n[0],w(f,i,c),w(f,s,c),g(s,o),a||(u=J(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+"")&&se(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&k(e),f&&k(i),f&&k(s),a=!1,u()}}}function n5(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[t5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function i5(n,e,t){let{field:i=new kn}=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 s5 extends ge{constructor(e){super(),_e(this,e,i5,n5,me,{field:1,value:0})}}function l5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("input"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),w(h,f,b),re(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(h,b){b&2&&i!==(i=B.getFieldTypeIcon(h[1].type))&&p(t,"class",i),b&2&&o!==(o=h[1].name+"")&&se(r,o),b&8&&a!==(a=h[3])&&p(e,"for",a),b&8&&c!==(c=h[3])&&p(f,"id",c),b&2&&d!==(d=h[1].required)&&(f.required=d),b&1&&f.value!==h[0]&&re(f,h[0])},d(h){h&&k(e),h&&k(u),h&&k(f),m=!1,_()}}}function o5(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[l5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function r5(n,e,t){let{field:i=new kn}=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 a5 extends ge{constructor(e){super(),_e(this,e,r5,o5,me,{field:1,value:0})}}function u5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("input"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),w(h,f,b),re(f,n[0]),m||(_=J(f,"input",n[2]),m=!0)},p(h,b){b&2&&i!==(i=B.getFieldTypeIcon(h[1].type))&&p(t,"class",i),b&2&&o!==(o=h[1].name+"")&&se(r,o),b&8&&a!==(a=h[3])&&p(e,"for",a),b&8&&c!==(c=h[3])&&p(f,"id",c),b&2&&d!==(d=h[1].required)&&(f.required=d),b&1&&f.value!==h[0]&&re(f,h[0])},d(h){h&&k(e),h&&k(u),h&&k(f),m=!1,_()}}}function f5(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[u5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function c5(n,e,t){let{field:i=new kn}=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 d5 extends ge{constructor(e){super(),_e(this,e,c5,f5,me,{field:1,value:0})}}function Rp(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){w(l,e,o),g(e,t),i||(s=[Me(He.call(null,t,"Clear")),J(t,"click",n[5])],i=!0)},p:x,d(l){l&&k(e),i=!1,Ee(s)}}}function p5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_,h,b=n[0]&&!n[1].required&&Rp(n);function y($){n[6]($)}function S($){n[7]($)}let C={id:n[8],options:B.defaultFlatpickrOptions()};return n[2]!==void 0&&(C.value=n[2]),n[0]!==void 0&&(C.formattedValue=n[0]),d=new uu({props:C}),ee.push(()=>de(d,"value",y)),ee.push(()=>de(d,"formattedValue",S)),d.$on("close",n[3]),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),a=U(" (UTC)"),f=E(),b&&b.c(),c=E(),H(d.$$.fragment),p(t,"class",i=ls(B.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[8])},m($,T){w($,e,T),g(e,t),g(e,s),g(e,l),g(l,r),g(l,a),w($,f,T),b&&b.m($,T),w($,c,T),V(d,$,T),h=!0},p($,T){(!h||T&2&&i!==(i=ls(B.getFieldTypeIcon($[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!h||T&2)&&o!==(o=$[1].name+"")&&se(r,o),(!h||T&256&&u!==(u=$[8]))&&p(e,"for",u),$[0]&&!$[1].required?b?b.p($,T):(b=Rp($),b.c(),b.m(c.parentNode,c)):b&&(b.d(1),b=null);const M={};T&256&&(M.id=$[8]),!m&&T&4&&(m=!0,M.value=$[2],he(()=>m=!1)),!_&&T&1&&(_=!0,M.formattedValue=$[0],he(()=>_=!1)),d.$set(M)},i($){h||(A(d.$$.fragment,$),h=!0)},o($){I(d.$$.fragment,$),h=!1},d($){$&&k(e),$&&k(f),b&&b.d($),$&&k(c),z(d,$)}}}function m5(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[p5,({uniqueId:i})=>({8:i}),({uniqueId:i})=>i?256:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&775&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function h5(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e,l=s;function o(c){c.detail&&c.detail.length==3&&t(0,s=c.detail[1])}function r(){t(0,s="")}const a=()=>r();function u(c){l=c,t(2,l),t(0,s)}function f(c){s=c,t(0,s)}return n.$$set=c=>{"field"in c&&t(1,i=c.field),"value"in c&&t(0,s=c.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19)),n.$$.dirty&5&&l!=s&&t(2,l=s)},[s,i,l,o,r,a,u,f]}class _5 extends ge{constructor(e){super(),_e(this,e,h5,m5,me,{field:1,value:0})}}function qp(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=U("Select up to "),s=U(i),l=U(" items."),p(e,"class","help-block")},m(o,r){w(o,e,r),g(e,t),g(e,s),g(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&se(s,i)},d(o){o&&k(e)}}}function g5(n){var S,C,$,T,M,O;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_;function h(D){n[3](D)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],closable:!n[2]||((S=n[0])==null?void 0:S.length)>=((C=n[1].options)==null?void 0:C.maxSelect),items:($=n[1].options)==null?void 0:$.values,searchable:((M=(T=n[1].options)==null?void 0:T.values)==null?void 0:M.length)>5};n[0]!==void 0&&(b.selected=n[0]),f=new fu({props:b}),ee.push(()=>de(f,"selected",h));let y=((O=n[1].options)==null?void 0:O.maxSelect)>1&&qp(n);return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),H(f.$$.fragment),d=E(),y&&y.c(),m=ye(),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(D,L){w(D,e,L),g(e,t),g(e,s),g(e,l),g(l,r),w(D,u,L),V(f,D,L),w(D,d,L),y&&y.m(D,L),w(D,m,L),_=!0},p(D,L){var N,F,R,q,j,W;(!_||L&2&&i!==(i=B.getFieldTypeIcon(D[1].type)))&&p(t,"class",i),(!_||L&2)&&o!==(o=D[1].name+"")&&se(r,o),(!_||L&16&&a!==(a=D[4]))&&p(e,"for",a);const P={};L&16&&(P.id=D[4]),L&6&&(P.toggle=!D[1].required||D[2]),L&4&&(P.multiple=D[2]),L&7&&(P.closable=!D[2]||((N=D[0])==null?void 0:N.length)>=((F=D[1].options)==null?void 0:F.maxSelect)),L&2&&(P.items=(R=D[1].options)==null?void 0:R.values),L&2&&(P.searchable=((j=(q=D[1].options)==null?void 0:q.values)==null?void 0:j.length)>5),!c&&L&1&&(c=!0,P.selected=D[0],he(()=>c=!1)),f.$set(P),((W=D[1].options)==null?void 0:W.maxSelect)>1?y?y.p(D,L):(y=qp(D),y.c(),y.m(m.parentNode,m)):y&&(y.d(1),y=null)},i(D){_||(A(f.$$.fragment,D),_=!0)},o(D){I(f.$$.fragment,D),_=!1},d(D){D&&k(e),D&&k(u),z(f,D),D&&k(d),y&&y.d(D),D&&k(m)}}}function b5(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[g5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function v5(n,e,t){let i,{field:s=new kn}=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 y5 extends ge{constructor(e){super(),_e(this,e,v5,b5,me,{field:1,value:0})}}function k5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,m,_;return{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("textarea"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4]),p(f,"id",c=n[4]),p(f,"class","txt-mono"),f.required=d=n[1].required,f.value=n[2]},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),w(h,f,b),m||(_=J(f,"input",n[3]),m=!0)},p(h,b){b&2&&i!==(i=B.getFieldTypeIcon(h[1].type))&&p(t,"class",i),b&2&&o!==(o=h[1].name+"")&&se(r,o),b&16&&a!==(a=h[4])&&p(e,"for",a),b&16&&c!==(c=h[4])&&p(f,"id",c),b&2&&d!==(d=h[1].required)&&(f.required=d),b&4&&(f.value=h[2])},d(h){h&&k(e),h&&k(u),h&&k(f),m=!1,_()}}}function w5(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[k5,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function S5(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e,l=JSON.stringify(typeof s>"u"?null:s,null,2);const o=r=>{t(2,l=r.target.value),t(0,s=r.target.value.trim())};return n.$$set=r=>{"field"in r&&t(1,i=r.field),"value"in r&&t(0,s=r.value)},n.$$.update=()=>{n.$$.dirty&5&&s!==(l==null?void 0:l.trim())&&(t(2,l=JSON.stringify(typeof s>"u"?null:s,null,2)),t(0,s=l))},[s,i,l,o]}class $5 extends ge{constructor(e){super(),_e(this,e,S5,w5,me,{field:1,value:0})}}function C5(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){w(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&k(e)}}}function T5(n){let e,t,i;return{c(){e=v("img"),p(e,"draggable",!1),hn(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){w(s,e,l)},p(s,l){l&4&&!hn(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&k(e)}}}function M5(n){let e;function t(l,o){return l[2]?T5:C5}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&k(e)}}}function O5(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){B.hasImageExtension(s==null?void 0:s.name)?B.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{t(2,i=""),console.warn("Unable to generate thumb: ",r)}):t(2,i="")}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class E5 extends ge{constructor(e){super(),_e(this,e,O5,M5,me,{file:0,size:1})}}function jp(n){let e;function t(l,o){return l[4]==="image"?A5:D5}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function D5(n){let e,t;return{c(){e=v("object"),t=U("Cannot preview the file."),p(e,"title",n[2]),p(e,"data",n[1])},m(i,s){w(i,e,s),g(e,t)},p(i,s){s&4&&p(e,"title",i[2]),s&2&&p(e,"data",i[1])},d(i){i&&k(e)}}}function A5(n){let e,t,i;return{c(){e=v("img"),hn(e.src,t=n[1])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){w(s,e,l)},p(s,l){l&2&&!hn(e.src,t=s[1])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&k(e)}}}function I5(n){var s;let e=(s=n[3])==null?void 0:s.isActive(),t,i=e&&jp(n);return{c(){i&&i.c(),t=ye()},m(l,o){i&&i.m(l,o),w(l,t,o)},p(l,o){var r;o&8&&(e=(r=l[3])==null?void 0:r.isActive()),e?i?i.p(l,o):(i=jp(l),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(l){i&&i.d(l),l&&k(t)}}}function L5(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){w(s,e,l),t||(i=J(e,"click",et(n[0])),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function P5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("a"),t=U(n[2]),i=E(),s=v("i"),l=E(),o=v("div"),r=E(),a=v("button"),a.textContent="Close",p(s,"class","ri-external-link-line"),p(e,"href",n[1]),p(e,"title",n[2]),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis inline-flex"),p(o,"class","flex-fill"),p(a,"type","button"),p(a,"class","btn btn-transparent")},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,l,d),w(c,o,d),w(c,r,d),w(c,a,d),u||(f=J(a,"click",n[0]),u=!0)},p(c,d){d&4&&se(t,c[2]),d&2&&p(e,"href",c[1]),d&4&&p(e,"title",c[2])},d(c){c&&k(e),c&&k(l),c&&k(o),c&&k(r),c&&k(a),u=!1,f()}}}function N5(n){let e,t,i={class:"preview preview-"+n[4],btnClose:!1,popup:!0,$$slots:{footer:[P5],header:[L5],default:[I5]},$$scope:{ctx:n}};return e=new ln({props:i}),n[7](e),e.$on("show",n[8]),e.$on("hide",n[9]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="preview preview-"+s[4]),l&1054&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[7](null),z(e,s)}}}function F5(n,e,t){let i,s,l,o,r="";function a(m){m!==""&&(t(1,r=m),o==null||o.show())}function u(){return o==null?void 0:o.hide()}function f(m){ee[m?"unshift":"push"](()=>{o=m,t(3,o)})}function c(m){Ne.call(this,n,m)}function d(m){Ne.call(this,n,m)}return n.$$.update=()=>{n.$$.dirty&2&&t(6,i=r.indexOf("?")),n.$$.dirty&66&&t(2,s=r.substring(r.lastIndexOf("/")+1,i>0?i:void 0)),n.$$.dirty&4&&t(4,l=B.getFileType(s))},[u,r,s,o,l,a,i,f,c,d]}class R5 extends ge{constructor(e){super(),_e(this,e,F5,N5,me,{show:5,hide:0})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[0]}}function q5(n){let e,t,i,s,l;function o(u,f){return u[3]==="image"?H5:u[3]==="video"||u[3]==="audio"?z5:V5}let r=o(n),a=r(n);return{c(){e=v("a"),a.c(),p(e,"draggable",!1),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:"")),p(e,"href",n[6]),p(e,"target","_blank"),p(e,"rel","noreferrer"),p(e,"title",i=(n[7]?"Preview":"Download")+" "+n[0])},m(u,f){w(u,e,f),a.m(e,null),s||(l=J(e,"click",An(n[11])),s=!0)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a.d(1),a=r(u),a&&(a.c(),a.m(e,null))),f&2&&t!==(t="thumb "+(u[1]?`thumb-${u[1]}`:""))&&p(e,"class",t),f&64&&p(e,"href",u[6]),f&129&&i!==(i=(u[7]?"Preview":"Download")+" "+u[0])&&p(e,"title",i)},d(u){u&&k(e),a.d(),s=!1,l()}}}function j5(n){let e,t;return{c(){e=v("div"),p(e,"class",t="thumb "+(n[1]?`thumb-${n[1]}`:""))},m(i,s){w(i,e,s)},p(i,s){s&2&&t!==(t="thumb "+(i[1]?`thumb-${i[1]}`:""))&&p(e,"class",t)},d(i){i&&k(e)}}}function V5(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-3-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function z5(n){let e;return{c(){e=v("i"),p(e,"class","ri-video-line")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function H5(n){let e,t,i,s,l;return{c(){e=v("img"),p(e,"draggable",!1),hn(e.src,t=n[5])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0])},m(o,r){w(o,e,r),s||(l=J(e,"error",n[8]),s=!0)},p(o,r){r&32&&!hn(e.src,t=o[5])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i)},d(o){o&&k(e),s=!1,l()}}}function B5(n){let e,t,i;function s(a,u){return a[2]?j5:q5}let l=s(n),o=l(n),r={};return t=new R5({props:r}),n[12](t),{c(){o.c(),e=E(),H(t.$$.fragment)},m(a,u){o.m(a,u),w(a,e,u),V(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){I(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&k(e),n[12](null),z(t,a)}}}function U5(n,e,t){let i,s,{record:l=null}=e,{filename:o=""}=e,{size:r=""}=e,a,u="",f="",c="",d=!1;m();async function m(){t(2,d=!0);try{t(10,c=await ce.getAdminFileToken(l.collectionId))}catch(y){console.warn("File token failure:",y)}t(2,d=!1)}function _(){t(5,u="")}const h=y=>{s&&(y.preventDefault(),a==null||a.show(f))};function b(y){ee[y?"unshift":"push"](()=>{a=y,t(4,a)})}return n.$$set=y=>{"record"in y&&t(9,l=y.record),"filename"in y&&t(0,o=y.filename),"size"in y&&t(1,r=y.size)},n.$$.update=()=>{n.$$.dirty&1&&t(3,i=B.getFileType(o)),n.$$.dirty&9&&t(7,s=["image","audio","video"].includes(i)||o.endsWith(".pdf")),n.$$.dirty&1541&&t(6,f=d?"":ce.files.getUrl(l,o,{token:c})),n.$$.dirty&1541&&t(5,u=d?"":ce.files.getUrl(l,o,{thumb:"100x100",token:c}))},[o,r,d,i,a,u,f,s,_,l,c,h,b]}class du extends ge{constructor(e){super(),_e(this,e,U5,B5,me,{record:9,filename:0,size:1})}}function Vp(n,e,t){const i=n.slice();return i[29]=e[t],i[31]=t,i}function zp(n,e,t){const i=n.slice();i[34]=e[t],i[31]=t;const s=i[2].includes(i[34]);return i[35]=s,i}function W5(n){let e,t,i;function s(){return n[17](n[34])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove")},m(l,o){w(l,e,o),t||(i=[Me(He.call(null,e,"Remove file")),J(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,Ee(i)}}}function Y5(n){let e,t,i;function s(){return n[16](n[34])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-transparent")},m(l,o){w(l,e,o),t||(i=J(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&k(e),t=!1,i()}}}function K5(n){let e,t,i,s,l,o,r=n[34]+"",a,u,f,c,d,m;i=new du({props:{record:n[3],filename:n[34]}});function _(y,S){return y[35]?Y5:W5}let h=_(n),b=h(n);return{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),o=v("a"),a=U(r),c=E(),d=v("div"),b.c(),Q(t,"fade",n[35]),p(o,"draggable",!1),p(o,"href",u=ce.files.getUrl(n[3],n[34],{token:n[10]})),p(o,"class",f="txt-ellipsis "+(n[35]?"txt-strikethrough txt-hint":"link-primary")),p(o,"title","Download"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),p(l,"class","content"),p(d,"class","actions"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(y,S){w(y,e,S),g(e,t),V(i,t,null),g(e,s),g(e,l),g(l,o),g(o,a),g(e,c),g(e,d),b.m(d,null),m=!0},p(y,S){const C={};S[0]&8&&(C.record=y[3]),S[0]&32&&(C.filename=y[34]),i.$set(C),(!m||S[0]&36)&&Q(t,"fade",y[35]),(!m||S[0]&32)&&r!==(r=y[34]+"")&&se(a,r),(!m||S[0]&1064&&u!==(u=ce.files.getUrl(y[3],y[34],{token:y[10]})))&&p(o,"href",u),(!m||S[0]&36&&f!==(f="txt-ellipsis "+(y[35]?"txt-strikethrough txt-hint":"link-primary")))&&p(o,"class",f),h===(h=_(y))&&b?b.p(y,S):(b.d(1),b=h(y),b&&(b.c(),b.m(d,null))),(!m||S[1]&2)&&Q(e,"dragging",y[32]),(!m||S[1]&4)&&Q(e,"dragover",y[33])},i(y){m||(A(i.$$.fragment,y),m=!0)},o(y){I(i.$$.fragment,y),m=!1},d(y){y&&k(e),z(i),b.d()}}}function Hp(n,e){let t,i,s,l;function o(a){e[18](a)}let r={group:e[4].name+"_uploaded",index:e[31],disabled:!e[6],$$slots:{default:[K5,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.list=e[0]),i=new Nl({props:r}),ee.push(()=>de(i,"list",o)),{key:n,first:null,c(){t=ye(),H(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),V(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_uploaded"),u[0]&32&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&1068|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.list=e[0],he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),z(i,a)}}}function J5(n){let e,t,i,s,l,o,r,a,u=n[29].name+"",f,c,d,m,_,h,b;i=new E5({props:{file:n[29]}});function y(){return n[19](n[31])}return{c(){e=v("div"),t=v("figure"),H(i.$$.fragment),s=E(),l=v("div"),o=v("small"),o.textContent="New",r=E(),a=v("span"),f=U(u),d=E(),m=v("button"),m.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename m-r-auto"),p(l,"title",c=n[29].name),p(m,"type","button"),p(m,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(e,"class","list-item"),Q(e,"dragging",n[32]),Q(e,"dragover",n[33])},m(S,C){w(S,e,C),g(e,t),V(i,t,null),g(e,s),g(e,l),g(l,o),g(l,r),g(l,a),g(a,f),g(e,d),g(e,m),_=!0,h||(b=[Me(He.call(null,m,"Remove file")),J(m,"click",y)],h=!0)},p(S,C){n=S;const $={};C[0]&2&&($.file=n[29]),i.$set($),(!_||C[0]&2)&&u!==(u=n[29].name+"")&&se(f,u),(!_||C[0]&2&&c!==(c=n[29].name))&&p(l,"title",c),(!_||C[1]&2)&&Q(e,"dragging",n[32]),(!_||C[1]&4)&&Q(e,"dragover",n[33])},i(S){_||(A(i.$$.fragment,S),_=!0)},o(S){I(i.$$.fragment,S),_=!1},d(S){S&&k(e),z(i),h=!1,Ee(b)}}}function Bp(n,e){let t,i,s,l;function o(a){e[20](a)}let r={group:e[4].name+"_new",index:e[31],disabled:!e[6],$$slots:{default:[J5,({dragging:a,dragover:u})=>({32:a,33:u}),({dragging:a,dragover:u})=>[0,(a?2:0)|(u?4:0)]]},$$scope:{ctx:e}};return e[1]!==void 0&&(r.list=e[1]),i=new Nl({props:r}),ee.push(()=>de(i,"list",o)),{key:n,first:null,c(){t=ye(),H(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),V(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&16&&(f.group=e[4].name+"_new"),u[0]&2&&(f.index=e[31]),u[0]&64&&(f.disabled=!e[6]),u[0]&2|u[1]&70&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&2&&(s=!0,f.list=e[1],he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),z(i,a)}}}function Z5(n){let e,t,i,s,l,o=n[4].name+"",r,a,u,f,c=[],d=new Map,m,_=[],h=new Map,b,y,S,C,$,T,M,O,D,L,P,N,F=n[5];const R=W=>W[34]+W[3].id;for(let W=0;WW[29].name+W[31];for(let W=0;W({28:o}),({uniqueId:o})=>[o?268435456:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","block")},m(o,r){w(o,e,r),j(t,e,null),i=!0,s||(l=[K(e,"dragover",et(n[25])),K(e,"dragleave",n[26]),K(e,"drop",n[15])],s=!0)},p(o,r){const a={};r[0]&528&&(a.class=` + `,name:n[4].name,$$slots:{default:[Z5,({uniqueId:o})=>({28:o}),({uniqueId:o})=>[o?268435456:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","block")},m(o,r){w(o,e,r),V(t,e,null),i=!0,s||(l=[J(e,"dragover",et(n[25])),J(e,"dragleave",n[26]),J(e,"drop",n[15])],s=!0)},p(o,r){const a={};r[0]&528&&(a.class=` form-field form-field-list form-field-file `+(o[4].required?"required":"")+` `+(o[9]?"dragover":"")+` - `),r[0]&16&&(a.name=o[4].name),r[0]&268439039|r[1]&64&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(A(t.$$.fragment,o),i=!0)},o(o){I(t.$$.fragment,o),i=!1},d(o){o&&k(e),V(t),s=!1,Ee(l)}}}function Z6(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileNames:u=[]}=e,{field:f=new kn}=e,c,d,m=!1,_="";function h(H){B.removeByValue(u,H),t(2,u)}function b(H){B.pushUnique(u,H),t(2,u)}function y(H){B.isEmpty(a[H])||a.splice(H,1),t(1,a)}function S(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileNames:u},bubbles:!0}))}function C(H){var X,J;H.preventDefault(),t(9,m=!1);const W=((X=H.dataTransfer)==null?void 0:X.files)||[];if(!(l||!W.length)){for(const Z of W){const le=s.length+a.length-u.length;if(((J=f.options)==null?void 0:J.maxSelect)<=le)break;a.push(Z)}t(1,a)}}Gt(async()=>{t(10,_=await ce.getAdminFileToken(o.collectionId))});const $=H=>h(H),T=H=>b(H);function M(H){r=H,t(0,r),t(6,i),t(4,f)}const O=H=>y(H);function D(H){a=H,t(1,a)}function L(H){ee[H?"unshift":"push"](()=>{c=H,t(7,c)})}const P=()=>{for(let H of c.files)a.push(H);t(1,a),t(7,c.value=null,c)},N=()=>c==null?void 0:c.click();function F(H){ee[H?"unshift":"push"](()=>{d=H,t(8,d)})}const R=()=>{t(9,m=!0)},q=()=>{t(9,m=!1)};return n.$$set=H=>{"record"in H&&t(3,o=H.record),"value"in H&&t(0,r=H.value),"uploadedFiles"in H&&t(1,a=H.uploadedFiles),"deletedFileNames"in H&&t(2,u=H.deletedFileNames),"field"in H&&t(4,f=H.field)},n.$$.update=()=>{var H,W;n.$$.dirty[0]&2&&(Array.isArray(a)||t(1,a=B.toArray(a))),n.$$.dirty[0]&4&&(Array.isArray(u)||t(2,u=B.toArray(u))),n.$$.dirty[0]&16&&t(6,i=((H=f.options)==null?void 0:H.maxSelect)>1),n.$$.dirty[0]&65&&B.isEmpty(r)&&t(0,r=i?[]:""),n.$$.dirty[0]&1&&t(5,s=B.toArray(r)),n.$$.dirty[0]&54&&t(11,l=(s.length||a.length)&&((W=f.options)==null?void 0:W.maxSelect)<=s.length+a.length-u.length),n.$$.dirty[0]&6&&(a!==-1||u!==-1)&&S()},[r,a,u,o,f,s,i,c,d,m,_,l,h,b,y,C,$,T,M,O,D,L,P,N,F,R,q]}class G6 extends ge{constructor(e){super(),_e(this,e,Z6,J6,me,{record:3,value:0,uploadedFiles:1,deletedFileNames:2,field:4},null,[-1,-1])}}function Up(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function X6(n,e){e=Up(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=Up(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}function Wp(n,e,t){const i=n.slice();i[6]=e[t];const s=B.toArray(i[0][i[6]]).slice(0,5);return i[7]=s,i}function Yp(n,e,t){const i=n.slice();return i[10]=e[t],i}function Kp(n){let e,t;return e=new du({props:{record:n[0],filename:n[10],size:"xs"}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&3&&(l.filename=i[10]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function Jp(n){let e=!B.isEmpty(n[10]),t,i,s=e&&Kp(n);return{c(){s&&s.c(),t=ye()},m(l,o){s&&s.m(l,o),w(l,t,o),i=!0},p(l,o){o&3&&(e=!B.isEmpty(l[10])),e?s?(s.p(l,o),o&3&&A(s,1)):(s=Kp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(ae(),I(s,1,1,()=>{s=null}),ue())},i(l){i||(A(s),i=!0)},o(l){I(s),i=!1},d(l){s&&s.d(l),l&&k(t)}}}function Zp(n){let e,t,i=n[7],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oI(m[h],1,1,()=>{m[h]=null});return{c(){e=v("div"),t=v("i"),s=E();for(let h=0;ht(5,o=u));let{record:r}=e,{displayFields:a=[]}=e;return n.$$set=u=>{"record"in u&&t(0,r=u.record),"displayFields"in u&&t(3,a=u.displayFields)},n.$$.update=()=>{n.$$.dirty&33&&t(4,i=o==null?void 0:o.find(u=>u.id==(r==null?void 0:r.collectionId))),n.$$.dirty&24&&t(1,s=(a==null?void 0:a.filter(u=>{var f;return!!((f=i==null?void 0:i.schema)!=null&&f.find(c=>c.name==u&&c.type=="file"))}))||[]),n.$$.dirty&10&&t(2,l=(s.length?a==null?void 0:a.filter(u=>!s.includes(u)):a)||[])},[r,s,l,a,i,o]}class nr extends ge{constructor(e){super(),_e(this,e,x6,Q6,me,{record:0,displayFields:3})}}function Gp(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function Xp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[8](i[49]);return i[6]=s,i}function Qp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='
    New record
    ',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint p-l-sm p-r-sm")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[31]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function xp(n){let e,t;function i(o,r){return o[12]?t5:e5}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=E(),p(e,"class","list-item")},m(o,r){w(o,e,r),l.m(e,null),g(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&k(e),l.d()}}}function e5(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&em(n);return{c(){e=v("span"),e.textContent="No records found.",t=E(),s&&s.c(),i=ye(),p(e,"class","txt txt-hint")},m(o,r){w(o,e,r),w(o,t,r),s&&s.m(o,r),w(o,i,r)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=em(o),s.c(),s.m(i.parentNode,i)):s&&(s.d(1),s=null)},d(o){o&&k(e),o&&k(t),s&&s.d(o),o&&k(i)}}}function t5(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block txt-center")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function em(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-sm")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[35]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function n5(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function i5(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function tm(n){let e,t,i,s;function l(){return n[32](n[49])}return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),p(e,"class","actions nonintrusive")},m(o,r){w(o,e,r),g(e,t),i||(s=[Me(He.call(null,t,"Edit")),K(t,"keydown",An(n[27])),K(t,"click",An(l))],i=!0)},p(o,r){n=o},d(o){o&&k(e),i=!1,Ee(s)}}}function nm(n,e){var y;let t,i,s,l,o,r,a,u,f;function c(S,C){return S[6]?i5:n5}let d=c(e),m=d(e);l=new nr({props:{record:e[49],displayFields:e[13]}});let _=!((y=e[10])!=null&&y.$isView)&&tm(e);function h(){return e[33](e[49])}function b(...S){return e[34](e[49],...S)}return{key:n,first:null,c(){t=v("div"),m.c(),i=E(),s=v("div"),z(l.$$.fragment),o=E(),_&&_.c(),r=E(),p(s,"class","content"),p(t,"tabindex","0"),p(t,"class","list-item handle"),Q(t,"selected",e[6]),Q(t,"disabled",!e[6]&&e[5]>1&&!e[9]),this.first=t},m(S,C){w(S,t,C),m.m(t,null),g(t,i),g(t,s),j(l,s,null),g(t,o),_&&_.m(t,null),g(t,r),a=!0,u||(f=[K(t,"click",h),K(t,"keydown",b)],u=!0)},p(S,C){var T;e=S,d!==(d=c(e))&&(m.d(1),m=d(e),m&&(m.c(),m.m(t,i)));const $={};C[0]&8&&($.record=e[49]),C[0]&8192&&($.displayFields=e[13]),l.$set($),(T=e[10])!=null&&T.$isView?_&&(_.d(1),_=null):_?_.p(e,C):(_=tm(e),_.c(),_.m(t,r)),(!a||C[0]&264)&&Q(t,"selected",e[6]),(!a||C[0]&808)&&Q(t,"disabled",!e[6]&&e[5]>1&&!e[9])},i(S){a||(A(l.$$.fragment,S),a=!0)},o(S){I(l.$$.fragment,S),a=!1},d(S){S&&k(t),m.d(),V(l),_&&_.d(),u=!1,Ee(f)}}}function im(n){let e,t=n[6].length+"",i,s,l,o;return{c(){e=U("("),i=U(t),s=U(" of MAX "),l=U(n[5]),o=U(")")},m(r,a){w(r,e,a),w(r,i,a),w(r,s,a),w(r,l,a),w(r,o,a)},p(r,a){a[0]&64&&t!==(t=r[6].length+"")&&se(i,t),a[0]&32&&se(l,r[5])},d(r){r&&k(e),r&&k(i),r&&k(s),r&&k(l),r&&k(o)}}}function s5(n){let e;return{c(){e=v("p"),e.textContent="No selected records.",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function l5(n){let e,t,i=n[6],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){e=v("div");for(let o=0;o
    ',l=E(),p(s,"type","button"),p(s,"title","Remove"),p(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),p(e,"class","label"),Q(e,"label-danger",n[52]),Q(e,"label-warning",n[53])},m(f,c){w(f,e,c),j(t,e,null),g(e,i),g(e,s),w(f,l,c),o=!0,r||(a=K(s,"click",u),r=!0)},p(f,c){n=f;const d={};c[0]&64&&(d.record=n[49]),c[0]&8192&&(d.displayFields=n[13]),t.$set(d),(!o||c[1]&2097152)&&Q(e,"label-danger",n[52]),(!o||c[1]&4194304)&&Q(e,"label-warning",n[53])},i(f){o||(A(t.$$.fragment,f),o=!0)},o(f){I(t.$$.fragment,f),o=!1},d(f){f&&k(e),V(t),f&&k(l),r=!1,a()}}}function sm(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[o5,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[6]!==void 0&&(l.list=n[6]),e=new Nl({props:l}),ee.push(()=>de(e,"list",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[0]&8256|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&64&&(t=!0,a.list=o[6],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function r5(n){var N;let e,t,i,s,l,o=[],r=new Map,a,u,f,c,d,m,_,h,b,y,S;t=new Jo({props:{value:n[2],autocompleteCollection:n[10]}}),t.$on("submit",n[30]);let C=!((N=n[10])!=null&&N.$isView)&&Qp(n),$=n[3];const T=F=>F[49].id;for(let F=0;F<$.length;F+=1){let R=Xp(n,$,F),q=T(R);r.set(q,o[F]=nm(q,R))}let M=null;$.length||(M=xp(n));let O=n[5]>1&&im(n);const D=[l5,s5],L=[];function P(F,R){return F[6].length?0:1}return m=P(n),_=L[m]=D[m](n),{c(){e=v("div"),z(t.$$.fragment),i=E(),C&&C.c(),s=E(),l=v("div");for(let F=0;F1?O?O.p(F,R):(O=im(F),O.c(),O.m(f,null)):O&&(O.d(1),O=null);let H=m;m=P(F),m===H?L[m].p(F,R):(ae(),I(L[H],1,1,()=>{L[H]=null}),ue(),_=L[m],_?_.p(F,R):(_=L[m]=D[m](F),_.c()),A(_,1),_.m(h.parentNode,h))},i(F){if(!b){A(t.$$.fragment,F);for(let R=0;R<$.length;R+=1)A(o[R]);A(_),b=!0}},o(F){I(t.$$.fragment,F);for(let R=0;RCancel',t=E(),i=v("button"),i.innerHTML='Set selection',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[K(e,"click",n[28]),K(i,"click",n[29])],s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Ee(l)}}}function f5(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[u5],header:[a5],default:[r5]},$$scope:{ctx:n}};for(let a=0;at(26,m=Le));const _=$t(),h="picker_"+B.randomString(5);let{value:b}=e,{field:y}=e,S,C,$="",T=[],M=[],O=1,D=0,L=!1,P=!1;function N(){return t(2,$=""),t(3,T=[]),t(6,M=[]),R(),q(!0),S==null?void 0:S.show()}function F(){return S==null?void 0:S.hide()}async function R(){const Le=B.toArray(b);if(!s||!Le.length)return;t(24,P=!0);let $e=[];const nt=Le.slice(),At=[];for(;nt.length>0;){const jt=[];for(const Ut of nt.splice(0,Fr))jt.push(`id="${Ut}"`);At.push(ce.collection(s).getFullList(Fr,{filter:jt.join("||"),$autoCancel:!1}))}try{await Promise.all(At).then(jt=>{$e=$e.concat(...jt)}),t(6,M=[]);for(const jt of Le){const Ut=B.findByKey($e,"id",jt);Ut&&M.push(Ut)}$.trim()||t(3,T=B.filterDuplicatesByKey(M.concat(T)))}catch(jt){ce.error(jt)}t(24,P=!1)}async function q(Le=!1){if(s){t(4,L=!0),Le&&($.trim()?t(3,T=[]):t(3,T=B.toArray(M).slice()));try{const $e=Le?1:O+1,nt=B.getAllCollectionIdentifiers(o),At=await ce.collection(s).getList($e,Fr,{filter:B.normalizeSearchFilter($,nt),sort:o!=null&&o.$isView?"":"-created",$cancelKey:h+"loadList"});t(3,T=B.filterDuplicatesByKey(T.concat(At.items))),O=At.page,t(23,D=At.totalItems)}catch($e){ce.error($e)}t(4,L=!1)}}function H(Le){i==1?t(6,M=[Le]):u&&(B.pushOrReplaceByKey(M,Le),t(6,M))}function W(Le){B.removeByKey(M,"id",Le.id),t(6,M)}function X(Le){f(Le)?W(Le):H(Le)}function J(){var Le;i!=1?t(20,b=M.map($e=>$e.id)):t(20,b=((Le=M==null?void 0:M[0])==null?void 0:Le.id)||""),_("save",M),F()}function Z(Le){Ne.call(this,n,Le)}const le=()=>F(),ne=()=>J(),ie=Le=>t(2,$=Le.detail),be=()=>C==null?void 0:C.show(),Se=Le=>C==null?void 0:C.show(Le),Ve=Le=>X(Le),Be=(Le,$e)=>{($e.code==="Enter"||$e.code==="Space")&&($e.preventDefault(),$e.stopPropagation(),X(Le))},ke=()=>t(2,$=""),Te=()=>{a&&!L&&q()},Ze=Le=>W(Le);function ht(Le){M=Le,t(6,M)}function Ge(Le){ee[Le?"unshift":"push"](()=>{S=Le,t(1,S)})}function Ye(Le){Ne.call(this,n,Le)}function we(Le){Ne.call(this,n,Le)}function fe(Le){ee[Le?"unshift":"push"](()=>{C=Le,t(7,C)})}const ze=Le=>{B.removeByKey(T,"id",Le.detail.id),T.unshift(Le.detail),t(3,T),H(Le.detail)},Dt=Le=>{B.removeByKey(T,"id",Le.detail.id),t(3,T),W(Le.detail)};return n.$$set=Le=>{e=qe(qe({},e),Zt(Le)),t(19,d=xe(e,c)),"value"in Le&&t(20,b=Le.value),"field"in Le&&t(21,y=Le.field)},n.$$.update=()=>{var Le,$e,nt;n.$$.dirty[0]&2097152&&t(5,i=((Le=y==null?void 0:y.options)==null?void 0:Le.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=($e=y==null?void 0:y.options)==null?void 0:$e.collectionId),n.$$.dirty[0]&2097152&&t(13,l=(nt=y==null?void 0:y.options)==null?void 0:nt.displayFields),n.$$.dirty[0]&100663296&&t(10,o=m.find(At=>At.id==s)||null),n.$$.dirty[0]&16777222&&typeof $<"u"&&!P&&S!=null&&S.isActive()&&q(!0),n.$$.dirty[0]&16777232&&t(12,r=L||P),n.$$.dirty[0]&8388616&&t(11,a=D>T.length),n.$$.dirty[0]&96&&t(9,u=i===null||i>M.length),n.$$.dirty[0]&64&&t(8,f=function(At){return B.findByKey(M,"id",At.id)})},[F,S,$,T,L,i,M,C,f,u,o,a,r,l,q,H,W,X,J,d,b,y,N,D,P,s,m,Z,le,ne,ie,be,Se,Ve,Be,ke,Te,Ze,ht,Ge,Ye,we,fe,ze,Dt]}class d5 extends ge{constructor(e){super(),_e(this,e,c5,f5,me,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function lm(n,e,t){const i=n.slice();return i[20]=e[t],i[22]=t,i}function om(n,e,t){const i=n.slice();return i[25]=e[t],i}function rm(n){let e,t=n[5]&&am(n);return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[5]?t?t.p(i,s):(t=am(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function am(n){let e,t=B.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    - `,p(e,"class","list-item")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function p5(n){var d;let e,t,i,s,l,o,r,a,u,f;i=new nr({props:{record:n[20],displayFields:(d=n[2].options)==null?void 0:d.displayFields}});function c(){return n[10](n[20])}return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),o=v("button"),o.innerHTML='',r=E(),p(t,"class","content"),p(o,"type","button"),p(o,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(l,"class","actions"),p(e,"class","list-item"),Q(e,"dragging",n[23]),Q(e,"dragover",n[24])},m(m,_){w(m,e,_),g(e,t),j(i,t,null),g(e,s),g(e,l),g(l,o),w(m,r,_),a=!0,u||(f=[Me(He.call(null,o,"Remove")),K(o,"click",c)],u=!0)},p(m,_){var b;n=m;const h={};_&16&&(h.record=n[20]),_&4&&(h.displayFields=(b=n[2].options)==null?void 0:b.displayFields),i.$set(h),(!a||_&8388608)&&Q(e,"dragging",n[23]),(!a||_&16777216)&&Q(e,"dragover",n[24])},i(m){a||(A(i.$$.fragment,m),a=!0)},o(m){I(i.$$.fragment,m),a=!1},d(m){m&&k(e),V(i),m&&k(r),u=!1,Ee(f)}}}function fm(n,e){let t,i,s,l;function o(a){e[11](a)}let r={group:e[2].name+"_relation",index:e[22],disabled:!e[6],$$slots:{default:[p5,({dragging:a,dragover:u})=>({23:a,24:u}),({dragging:a,dragover:u})=>(a?8388608:0)|(u?16777216:0)]},$$scope:{ctx:e}};return e[4]!==void 0&&(r.list=e[4]),i=new Nl({props:r}),ee.push(()=>de(i,"list",o)),i.$on("sort",e[12]),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u&4&&(f.group=e[2].name+"_relation"),u&16&&(f.index=e[22]),u&64&&(f.disabled=!e[6]),u&293601300&&(f.$$scope={dirty:u,ctx:e}),!s&&u&16&&(s=!0,f.list=e[4],he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function m5(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d=[],m=new Map,_,h,b,y,S,C,$=n[4];const T=O=>O[20].id;for(let O=0;O<$.length;O+=1){let D=lm(n,$,O),L=T(D);m.set(L,d[O]=fm(L,D))}let M=null;return $.length||(M=rm(n)),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("div"),c=v("div");for(let O=0;O + `),r[0]&16&&(a.name=o[4].name),r[0]&268439039|r[1]&64&&(a.$$scope={dirty:r,ctx:o}),t.$set(a)},i(o){i||(A(t.$$.fragment,o),i=!0)},o(o){I(t.$$.fragment,o),i=!1},d(o){o&&k(e),z(t),s=!1,Ee(l)}}}function X5(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileNames:u=[]}=e,{field:f=new kn}=e,c,d,m=!1,_="";function h(j){B.removeByValue(u,j),t(2,u)}function b(j){B.pushUnique(u,j),t(2,u)}function y(j){B.isEmpty(a[j])||a.splice(j,1),t(1,a)}function S(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileNames:u},bubbles:!0}))}function C(j){var X,K;j.preventDefault(),t(9,m=!1);const W=((X=j.dataTransfer)==null?void 0:X.files)||[];if(!(l||!W.length)){for(const Z of W){const le=s.length+a.length-u.length;if(((K=f.options)==null?void 0:K.maxSelect)<=le)break;a.push(Z)}t(1,a)}}Gt(async()=>{t(10,_=await ce.getAdminFileToken(o.collectionId))});const $=j=>h(j),T=j=>b(j);function M(j){r=j,t(0,r),t(6,i),t(4,f)}const O=j=>y(j);function D(j){a=j,t(1,a)}function L(j){ee[j?"unshift":"push"](()=>{c=j,t(7,c)})}const P=()=>{for(let j of c.files)a.push(j);t(1,a),t(7,c.value=null,c)},N=()=>c==null?void 0:c.click();function F(j){ee[j?"unshift":"push"](()=>{d=j,t(8,d)})}const R=()=>{t(9,m=!0)},q=()=>{t(9,m=!1)};return n.$$set=j=>{"record"in j&&t(3,o=j.record),"value"in j&&t(0,r=j.value),"uploadedFiles"in j&&t(1,a=j.uploadedFiles),"deletedFileNames"in j&&t(2,u=j.deletedFileNames),"field"in j&&t(4,f=j.field)},n.$$.update=()=>{var j,W;n.$$.dirty[0]&2&&(Array.isArray(a)||t(1,a=B.toArray(a))),n.$$.dirty[0]&4&&(Array.isArray(u)||t(2,u=B.toArray(u))),n.$$.dirty[0]&16&&t(6,i=((j=f.options)==null?void 0:j.maxSelect)>1),n.$$.dirty[0]&65&&B.isEmpty(r)&&t(0,r=i?[]:""),n.$$.dirty[0]&1&&t(5,s=B.toArray(r)),n.$$.dirty[0]&54&&t(11,l=(s.length||a.length)&&((W=f.options)==null?void 0:W.maxSelect)<=s.length+a.length-u.length),n.$$.dirty[0]&6&&(a!==-1||u!==-1)&&S()},[r,a,u,o,f,s,i,c,d,m,_,l,h,b,y,C,$,T,M,O,D,L,P,N,F,R,q]}class Q5 extends ge{constructor(e){super(),_e(this,e,X5,G5,me,{record:3,value:0,uploadedFiles:1,deletedFileNames:2,field:4},null,[-1,-1])}}function Up(n){return typeof n=="function"?{threshold:100,callback:n}:n||{}}function x5(n,e){e=Up(e),e!=null&&e.callback&&e.callback();function t(i){if(!(e!=null&&e.callback))return;i.target.scrollHeight-i.target.clientHeight-i.target.scrollTop<=e.threshold&&e.callback()}return n.addEventListener("scroll",t),n.addEventListener("resize",t),{update(i){e=Up(i)},destroy(){n.removeEventListener("scroll",t),n.removeEventListener("resize",t)}}}function Wp(n,e,t){const i=n.slice();i[6]=e[t];const s=B.toArray(i[0][i[6]]).slice(0,5);return i[7]=s,i}function Yp(n,e,t){const i=n.slice();return i[10]=e[t],i}function Kp(n){let e,t;return e=new du({props:{record:n[0],filename:n[10],size:"xs"}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&1&&(l.record=i[0]),s&3&&(l.filename=i[10]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function Jp(n){let e=!B.isEmpty(n[10]),t,i,s=e&&Kp(n);return{c(){s&&s.c(),t=ye()},m(l,o){s&&s.m(l,o),w(l,t,o),i=!0},p(l,o){o&3&&(e=!B.isEmpty(l[10])),e?s?(s.p(l,o),o&3&&A(s,1)):(s=Kp(l),s.c(),A(s,1),s.m(t.parentNode,t)):s&&(ae(),I(s,1,1,()=>{s=null}),ue())},i(l){i||(A(s),i=!0)},o(l){I(s),i=!1},d(l){s&&s.d(l),l&&k(t)}}}function Zp(n){let e,t,i=n[7],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oI(m[h],1,1,()=>{m[h]=null});return{c(){e=v("div"),t=v("i"),s=E();for(let h=0;ht(5,o=u));let{record:r}=e,{displayFields:a=[]}=e;return n.$$set=u=>{"record"in u&&t(0,r=u.record),"displayFields"in u&&t(3,a=u.displayFields)},n.$$.update=()=>{n.$$.dirty&33&&t(4,i=o==null?void 0:o.find(u=>u.id==(r==null?void 0:r.collectionId))),n.$$.dirty&24&&t(1,s=(a==null?void 0:a.filter(u=>{var f;return!!((f=i==null?void 0:i.schema)!=null&&f.find(c=>c.name==u&&c.type=="file"))}))||[]),n.$$.dirty&10&&t(2,l=(s.length?a==null?void 0:a.filter(u=>!s.includes(u)):a)||[])},[r,s,l,a,i,o]}class ir extends ge{constructor(e){super(),_e(this,e,t6,e6,me,{record:0,displayFields:3})}}function Gp(n,e,t){const i=n.slice();return i[49]=e[t],i[51]=t,i}function Xp(n,e,t){const i=n.slice();i[49]=e[t];const s=i[8](i[49]);return i[5]=s,i}function Qp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='
    New record
    ',p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint p-l-sm p-r-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function xp(n){let e,t=!n[12]&&em(n);return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[12]?t&&(t.d(1),t=null):t?t.p(i,s):(t=em(i),t.c(),t.m(e.parentNode,e))},d(i){t&&t.d(i),i&&k(e)}}}function em(n){var l;let e,t,i,s=((l=n[2])==null?void 0:l.length)&&tm(n);return{c(){e=v("div"),t=v("span"),t.textContent="No records found.",i=E(),s&&s.c(),p(t,"class","txt txt-hint"),p(e,"class","list-item")},m(o,r){w(o,e,r),g(e,t),g(e,i),s&&s.m(e,null)},p(o,r){var a;(a=o[2])!=null&&a.length?s?s.p(o,r):(s=tm(o),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(o){o&&k(e),s&&s.d()}}}function tm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[35]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function n6(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-blank-circle-line txt-disabled")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function i6(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function nm(n){let e,t,i,s;function l(){return n[32](n[49])}return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-transparent btn-hint m-l-auto"),p(e,"class","actions nonintrusive")},m(o,r){w(o,e,r),g(e,t),i||(s=[Me(He.call(null,t,"Edit")),J(t,"keydown",An(n[27])),J(t,"click",An(l))],i=!0)},p(o,r){n=o},d(o){o&&k(e),i=!1,Ee(s)}}}function im(n,e){var b;let t,i,s,l,o,r,a,u;function f(y,S){return y[5]?i6:n6}let c=f(e),d=c(e);l=new ir({props:{record:e[49],displayFields:e[13]}});let m=!((b=e[10])!=null&&b.$isView)&&nm(e);function _(){return e[33](e[49])}function h(...y){return e[34](e[49],...y)}return{key:n,first:null,c(){t=v("div"),d.c(),i=E(),s=v("div"),H(l.$$.fragment),o=E(),m&&m.c(),p(s,"class","content"),p(t,"tabindex","0"),p(t,"class","list-item handle"),Q(t,"selected",e[5]),Q(t,"disabled",!e[5]&&e[4]>1&&!e[9]),this.first=t},m(y,S){w(y,t,S),d.m(t,null),g(t,i),g(t,s),V(l,s,null),g(t,o),m&&m.m(t,null),r=!0,a||(u=[J(t,"click",_),J(t,"keydown",h)],a=!0)},p(y,S){var $;e=y,c!==(c=f(e))&&(d.d(1),d=c(e),d&&(d.c(),d.m(t,i)));const C={};S[0]&128&&(C.record=e[49]),S[0]&8192&&(C.displayFields=e[13]),l.$set(C),($=e[10])!=null&&$.$isView?m&&(m.d(1),m=null):m?m.p(e,S):(m=nm(e),m.c(),m.m(t,null)),(!r||S[0]&384)&&Q(t,"selected",e[5]),(!r||S[0]&912)&&Q(t,"disabled",!e[5]&&e[4]>1&&!e[9])},i(y){r||(A(l.$$.fragment,y),r=!0)},o(y){I(l.$$.fragment,y),r=!1},d(y){y&&k(t),d.d(),z(l),m&&m.d(),a=!1,Ee(u)}}}function sm(n){let e;return{c(){e=v("div"),e.innerHTML='
    ',p(e,"class","list-item")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function lm(n){let e,t=n[5].length+"",i,s,l,o;return{c(){e=U("("),i=U(t),s=U(" of MAX "),l=U(n[4]),o=U(")")},m(r,a){w(r,e,a),w(r,i,a),w(r,s,a),w(r,l,a),w(r,o,a)},p(r,a){a[0]&32&&t!==(t=r[5].length+"")&&se(i,t),a[0]&16&&se(l,r[4])},d(r){r&&k(e),r&&k(i),r&&k(s),r&&k(l),r&&k(o)}}}function s6(n){let e;return{c(){e=v("p"),e.textContent="No selected records.",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function l6(n){let e,t,i=n[5],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){e=v("div");for(let o=0;o',l=E(),p(s,"type","button"),p(s,"title","Remove"),p(s,"class","btn btn-circle btn-transparent btn-hint btn-xs"),p(e,"class","label"),Q(e,"label-danger",n[52]),Q(e,"label-warning",n[53])},m(f,c){w(f,e,c),V(t,e,null),g(e,i),g(e,s),w(f,l,c),o=!0,r||(a=J(s,"click",u),r=!0)},p(f,c){n=f;const d={};c[0]&32&&(d.record=n[49]),c[0]&8192&&(d.displayFields=n[13]),t.$set(d),(!o||c[1]&2097152)&&Q(e,"label-danger",n[52]),(!o||c[1]&4194304)&&Q(e,"label-warning",n[53])},i(f){o||(A(t.$$.fragment,f),o=!0)},o(f){I(t.$$.fragment,f),o=!1},d(f){f&&k(e),z(t),f&&k(l),r=!1,a()}}}function om(n){let e,t,i;function s(o){n[38](o)}let l={index:n[51],$$slots:{default:[o6,({dragging:o,dragover:r})=>({52:o,53:r}),({dragging:o,dragover:r})=>[0,(o?2097152:0)|(r?4194304:0)]]},$$scope:{ctx:n}};return n[5]!==void 0&&(l.list=n[5]),e=new Nl({props:l}),ee.push(()=>de(e,"list",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r[0]&8224|r[1]&39845888&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&32&&(t=!0,a.list=o[5],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function r6(n){var R;let e,t,i,s,l,o=[],r=new Map,a,u,f,c,d,m,_,h,b,y,S,C;t=new Zo({props:{value:n[2],autocompleteCollection:n[10]}}),t.$on("submit",n[30]);let $=!((R=n[10])!=null&&R.$isView)&&Qp(n),T=n[7];const M=q=>q[49].id;for(let q=0;q1&&lm(n);const P=[l6,s6],N=[];function F(q,j){return q[5].length?0:1}return _=F(n),h=N[_]=P[_](n),{c(){e=v("div"),H(t.$$.fragment),i=E(),$&&$.c(),s=E(),l=v("div");for(let q=0;q1?L?L.p(q,j):(L=lm(q),L.c(),L.m(c,null)):L&&(L.d(1),L=null);let X=_;_=F(q),_===X?N[_].p(q,j):(ae(),I(N[X],1,1,()=>{N[X]=null}),ue(),h=N[_],h?h.p(q,j):(h=N[_]=P[_](q),h.c()),A(h,1),h.m(b.parentNode,b))},i(q){if(!y){A(t.$$.fragment,q);for(let j=0;jCancel',t=E(),i=v("button"),i.innerHTML='Set selection',p(e,"type","button"),p(e,"class","btn btn-transparent"),p(i,"type","button"),p(i,"class","btn")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=[J(e,"click",n[28]),J(i,"click",n[29])],s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,Ee(l)}}}function f6(n){let e,t,i,s;const l=[{popup:!0},{class:"overlay-panel-xl"},n[19]];let o={$$slots:{footer:[u6],header:[a6],default:[r6]},$$scope:{ctx:n}};for(let a=0;at(26,m=Le));const _=$t(),h="picker_"+B.randomString(5);let{value:b}=e,{field:y}=e,S,C,$="",T=[],M=[],O=1,D=0,L=!1,P=!1;function N(){return t(2,$=""),t(7,T=[]),t(5,M=[]),R(),q(!0),S==null?void 0:S.show()}function F(){return S==null?void 0:S.hide()}async function R(){const Le=B.toArray(b);if(!s||!Le.length)return;t(24,P=!0);let $e=[];const nt=Le.slice(),At=[];for(;nt.length>0;){const It=[];for(const Ut of nt.splice(0,oo))It.push(`id="${Ut}"`);At.push(ce.collection(s).getFullList(oo,{filter:It.join("||"),$autoCancel:!1}))}try{await Promise.all(At).then(It=>{$e=$e.concat(...It)}),t(5,M=[]);for(const It of Le){const Ut=B.findByKey($e,"id",It);Ut&&M.push(Ut)}$.trim()||t(7,T=B.filterDuplicatesByKey(M.concat(T))),t(24,P=!1)}catch(It){It.isAbort||(ce.error(It),t(24,P=!1))}}async function q(Le=!1){if(s){t(3,L=!0),Le&&($.trim()?t(7,T=[]):t(7,T=B.toArray(M).slice()));try{const $e=Le?1:O+1,nt=B.getAllCollectionIdentifiers(o),At=await ce.collection(s).getList($e,oo,{filter:B.normalizeSearchFilter($,nt),sort:o!=null&&o.$isView?"":"-created",skipTotal:1,$cancelKey:h+"loadList"});t(7,T=B.filterDuplicatesByKey(T.concat(At.items))),O=At.page,t(23,D=At.items.length),t(3,L=!1)}catch($e){$e.isAbort||(ce.error($e),t(3,L=!1))}}}function j(Le){i==1?t(5,M=[Le]):u&&(B.pushOrReplaceByKey(M,Le),t(5,M))}function W(Le){B.removeByKey(M,"id",Le.id),t(5,M)}function X(Le){f(Le)?W(Le):j(Le)}function K(){var Le;i!=1?t(20,b=M.map($e=>$e.id)):t(20,b=((Le=M==null?void 0:M[0])==null?void 0:Le.id)||""),_("save",M),F()}function Z(Le){Ne.call(this,n,Le)}const le=()=>F(),ne=()=>K(),ie=Le=>t(2,$=Le.detail),be=()=>C==null?void 0:C.show(),Se=Le=>C==null?void 0:C.show(Le),Ve=Le=>X(Le),Be=(Le,$e)=>{($e.code==="Enter"||$e.code==="Space")&&($e.preventDefault(),$e.stopPropagation(),X(Le))},ke=()=>t(2,$=""),Te=()=>{a&&!L&&q()},Ze=Le=>W(Le);function ht(Le){M=Le,t(5,M)}function Ge(Le){ee[Le?"unshift":"push"](()=>{S=Le,t(1,S)})}function Ye(Le){Ne.call(this,n,Le)}function we(Le){Ne.call(this,n,Le)}function fe(Le){ee[Le?"unshift":"push"](()=>{C=Le,t(6,C)})}const ze=Le=>{B.removeByKey(T,"id",Le.detail.id),T.unshift(Le.detail),t(7,T),j(Le.detail)},Dt=Le=>{B.removeByKey(T,"id",Le.detail.id),t(7,T),W(Le.detail)};return n.$$set=Le=>{e=qe(qe({},e),Zt(Le)),t(19,d=xe(e,c)),"value"in Le&&t(20,b=Le.value),"field"in Le&&t(21,y=Le.field)},n.$$.update=()=>{var Le,$e,nt;n.$$.dirty[0]&2097152&&t(4,i=((Le=y==null?void 0:y.options)==null?void 0:Le.maxSelect)||null),n.$$.dirty[0]&2097152&&t(25,s=($e=y==null?void 0:y.options)==null?void 0:$e.collectionId),n.$$.dirty[0]&2097152&&t(13,l=(nt=y==null?void 0:y.options)==null?void 0:nt.displayFields),n.$$.dirty[0]&100663296&&t(10,o=m.find(At=>At.id==s)||null),n.$$.dirty[0]&6&&typeof $<"u"&&S!=null&&S.isActive()&&q(!0),n.$$.dirty[0]&16777224&&t(12,r=L||P),n.$$.dirty[0]&8388608&&t(11,a=D==oo),n.$$.dirty[0]&48&&t(9,u=i===null||i>M.length),n.$$.dirty[0]&32&&t(8,f=function(At){return B.findByKey(M,"id",At.id)})},[F,S,$,L,i,M,C,T,f,u,o,a,r,l,q,j,W,X,K,d,b,y,N,D,P,s,m,Z,le,ne,ie,be,Se,Ve,Be,ke,Te,Ze,ht,Ge,Ye,we,fe,ze,Dt]}class d6 extends ge{constructor(e){super(),_e(this,e,c6,f6,me,{value:20,field:21,show:22,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[22]}get hide(){return this.$$.ctx[0]}}function rm(n,e,t){const i=n.slice();return i[20]=e[t],i[22]=t,i}function am(n,e,t){const i=n.slice();return i[25]=e[t],i}function um(n){let e,t=n[5]&&fm(n);return{c(){t&&t.c(),e=ye()},m(i,s){t&&t.m(i,s),w(i,e,s)},p(i,s){i[5]?t?t.p(i,s):(t=fm(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&k(e)}}}function fm(n){let e,t=B.toArray(n[0]).slice(0,10),i=[];for(let s=0;s
    + `,p(e,"class","list-item")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function p6(n){var d;let e,t,i,s,l,o,r,a,u,f;i=new ir({props:{record:n[20],displayFields:(d=n[2].options)==null?void 0:d.displayFields}});function c(){return n[10](n[20])}return{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),o=v("button"),o.innerHTML='',r=E(),p(t,"class","content"),p(o,"type","button"),p(o,"class","btn btn-transparent btn-hint btn-sm btn-circle btn-remove"),p(l,"class","actions"),p(e,"class","list-item"),Q(e,"dragging",n[23]),Q(e,"dragover",n[24])},m(m,_){w(m,e,_),g(e,t),V(i,t,null),g(e,s),g(e,l),g(l,o),w(m,r,_),a=!0,u||(f=[Me(He.call(null,o,"Remove")),J(o,"click",c)],u=!0)},p(m,_){var b;n=m;const h={};_&16&&(h.record=n[20]),_&4&&(h.displayFields=(b=n[2].options)==null?void 0:b.displayFields),i.$set(h),(!a||_&8388608)&&Q(e,"dragging",n[23]),(!a||_&16777216)&&Q(e,"dragover",n[24])},i(m){a||(A(i.$$.fragment,m),a=!0)},o(m){I(i.$$.fragment,m),a=!1},d(m){m&&k(e),z(i),m&&k(r),u=!1,Ee(f)}}}function dm(n,e){let t,i,s,l;function o(a){e[11](a)}let r={group:e[2].name+"_relation",index:e[22],disabled:!e[6],$$slots:{default:[p6,({dragging:a,dragover:u})=>({23:a,24:u}),({dragging:a,dragover:u})=>(a?8388608:0)|(u?16777216:0)]},$$scope:{ctx:e}};return e[4]!==void 0&&(r.list=e[4]),i=new Nl({props:r}),ee.push(()=>de(i,"list",o)),i.$on("sort",e[12]),{key:n,first:null,c(){t=ye(),H(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),V(i,a,u),l=!0},p(a,u){e=a;const f={};u&4&&(f.group=e[2].name+"_relation"),u&16&&(f.index=e[22]),u&64&&(f.disabled=!e[6]),u&293601300&&(f.$$scope={dirty:u,ctx:e}),!s&&u&16&&(s=!0,f.list=e[4],he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),z(i,a)}}}function m6(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d=[],m=new Map,_,h,b,y,S,C,$=n[4];const T=O=>O[20].id;for(let O=0;O<$.length;O+=1){let D=rm(n,$,O),L=T(D);m.set(L,d[O]=dm(L,D))}let M=null;return $.length||(M=um(n)),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),f=v("div"),c=v("div");for(let O=0;O - Open picker`,p(t,"class",i=ls(B.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[19]),p(c,"class","relations-list svelte-1ynw0pc"),p(b,"type","button"),p(b,"class","btn btn-transparent btn-sm btn-block"),p(h,"class","list-item list-item-btn"),p(f,"class","list")},m(O,D){w(O,e,D),g(e,t),g(e,s),g(e,l),g(l,r),w(O,u,D),w(O,f,D),g(f,c);for(let L=0;L({19:r}),({uniqueId:r})=>r?524288:0]},$$scope:{ctx:n}};e=new pe({props:l}),n[14](e);let o={value:n[0],field:n[2]};return i=new d5({props:o}),n[15](i),i.$on("save",n[16]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(r,a){j(e,r,a),w(r,t,a),j(i,r,a),s=!0},p(r,[a]){const u={};a&4&&(u.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(u.name=r[2].name),a&268959863&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&1&&(f.value=r[0]),a&4&&(f.field=r[2]),i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),s=!1},d(r){n[14](null),V(e,r),r&&k(t),n[15](null),V(i,r)}}}const cm=100;function _5(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new kn}=e,r,a=[],u=!1,f;function c(){if(u)return!1;const M=B.toArray(s);return t(4,a=a.filter(O=>M.includes(O.id))),M.length!=a.length}async function d(){var L,P;const M=B.toArray(s);if(t(4,a=[]),!((L=o==null?void 0:o.options)!=null&&L.collectionId)||!M.length){t(5,u=!1);return}t(5,u=!0);const O=M.slice(),D=[];for(;O.length>0;){const N=[];for(const F of O.splice(0,cm))N.push(`id="${F}"`);D.push(ce.collection((P=o==null?void 0:o.options)==null?void 0:P.collectionId).getFullList(cm,{filter:N.join("||"),$autoCancel:!1}))}try{let N=[];await Promise.all(D).then(F=>{N=N.concat(...F)});for(const F of M){const R=B.findByKey(N,"id",F);R&&a.push(R)}t(4,a)}catch(N){ce.error(N)}t(5,u=!1)}function m(M){B.removeByKey(a,"id",M.id),t(4,a),_()}function _(){var M;i?t(0,s=a.map(O=>O.id)):t(0,s=((M=a[0])==null?void 0:M.id)||"")}jo(()=>{clearTimeout(f)});const h=M=>m(M);function b(M){a=M,t(4,a)}const y=()=>{_()},S=()=>l==null?void 0:l.show();function C(M){ee[M?"unshift":"push"](()=>{r=M,t(3,r)})}function $(M){ee[M?"unshift":"push"](()=>{l=M,t(1,l)})}const T=M=>{var O;t(4,a=M.detail||[]),t(0,s=i?a.map(D=>D.id):((O=a[0])==null?void 0:O.id)||"")};return n.$$set=M=>{"value"in M&&t(0,s=M.value),"picker"in M&&t(1,l=M.picker),"field"in M&&t(2,o=M.field)},n.$$.update=()=>{var M;n.$$.dirty&4&&t(6,i=((M=o.options)==null?void 0:M.maxSelect)!=1),n.$$.dirty&9&&typeof s<"u"&&(r==null||r.changed()),n.$$.dirty&529&&c()&&(clearTimeout(f),t(9,f=setTimeout(d,0)))},[s,l,o,r,a,u,i,m,_,f,h,b,y,S,C,$,T]}class g5 extends ge{constructor(e){super(),_e(this,e,_5,h5,me,{value:0,picker:1,field:2})}}const b5=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],v5=(n,e)=>{b5.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function y5(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),zr(e,"visibility","hidden")},m(t,i){w(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&k(e),n[18](null)}}}function k5(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){w(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&k(e),n[17](null)}}}function w5(n){let e;function t(l,o){return l[1]?k5:y5}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){w(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&p(e,"class",l[2])},i:x,o:x,d(l){l&&k(e),s.d(),n[19](null)}}}const S1=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),S5=()=>{let n={listeners:[],scriptId:S1("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let $5=S5();function C5(n,e,t){var i;let{id:s=S1("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:c="change input undo redo"}=e,{value:d=""}=e,{text:m=""}=e,{cssClass:_="tinymce-wrapper"}=e,h,b,y,S=d,C=o;const $=$t(),T=()=>{const N=(()=>typeof window<"u"?window:global)();return N&&N.tinymce?N.tinymce:null},M=()=>{const P=Object.assign(Object.assign({},f),{target:b,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:N=>{t(14,y=N),N.on("init",()=>{N.setContent(d),N.on(c,()=>{t(15,S=N.getContent()),S!==d&&(t(5,d=S),t(6,m=N.getContent({format:"text"})))})}),v5(N,$),typeof f.setup=="function"&&f.setup(N)}});t(4,b.style.visibility="",b),T().init(P)};Gt(()=>{if(T()!==null)M();else{const P=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;$5.load(h.ownerDocument,P,()=>{M()})}}),jo(()=>{var P;y&&((P=T())===null||P===void 0||P.remove(y))});function O(P){ee[P?"unshift":"push"](()=>{b=P,t(4,b)})}function D(P){ee[P?"unshift":"push"](()=>{b=P,t(4,b)})}function L(P){ee[P?"unshift":"push"](()=>{h=P,t(3,h)})}return n.$$set=P=>{"id"in P&&t(0,s=P.id),"inline"in P&&t(1,l=P.inline),"disabled"in P&&t(7,o=P.disabled),"apiKey"in P&&t(8,r=P.apiKey),"channel"in P&&t(9,a=P.channel),"scriptSrc"in P&&t(10,u=P.scriptSrc),"conf"in P&&t(11,f=P.conf),"modelEvents"in P&&t(12,c=P.modelEvents),"value"in P&&t(5,d=P.value),"text"in P&&t(6,m=P.text),"cssClass"in P&&t(2,_=P.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(y&&S!==d&&(y.setContent(d),t(6,m=y.getContent({format:"text"}))),y&&o!==C&&(t(16,C=o),typeof(t(13,i=y.mode)===null||i===void 0?void 0:i.set)=="function"?y.mode.set(o?"readonly":"design"):y.setMode(o?"readonly":"design")))},[s,l,_,h,b,d,m,o,r,a,u,f,c,i,y,S,C,O,D,L]}class pu extends ge{constructor(e){super(),_e(this,e,C5,w5,me,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function T5(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(h){n[2](h)}let _={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:B.defaultEditorOptions()};return n[0]!==void 0&&(_.value=n[0]),f=new pu({props:_}),ee.push(()=>de(f,"value",m)),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),z(f.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),j(f,h,b),d=!0},p(h,b){(!d||b&2&&i!==(i=B.getFieldTypeIcon(h[1].type)))&&p(t,"class",i),(!d||b&2)&&o!==(o=h[1].name+"")&&se(r,o),(!d||b&8&&a!==(a=h[3]))&&p(e,"for",a);const y={};b&8&&(y.id=h[3]),!c&&b&1&&(c=!0,y.value=h[0],he(()=>c=!1)),f.$set(y)},i(h){d||(A(f.$$.fragment,h),d=!0)},o(h){I(f.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(u),V(f,h)}}}function M5(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[T5,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function O5(n,e,t){let{field:i=new kn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class E5 extends ge{constructor(e){super(),_e(this,e,O5,M5,me,{field:1,value:0})}}function D5(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Auth URL"),s=E(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(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&&l.value!==u[0].authUrl&&re(l,u[0].authUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function A5(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Token URL"),s=E(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(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&&re(l,u[0].tokenUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function I5(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("User API URL"),s=E(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(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&&re(l,u[0].userApiUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function L5(n){let e,t,i,s,l,o,r,a;return i=new pe({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[D5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[A5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[I5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=E(),z(i.$$.fragment),s=E(),z(l.$$.fragment),o=E(),z(r.$$.fragment),p(e,"class","section-title")},m(u,f){w(u,e,f),w(u,t,f),j(i,u,f),w(u,s,f),j(l,u,f),w(u,o,f),j(r,u,f),a=!0},p(u,[f]){const c={};f&2&&(c.name=u[1]+".authUrl"),f&97&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&2&&(d.name=u[1]+".tokenUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),l.$set(d);const m={};f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){I(i.$$.fragment,u),I(l.$$.fragment,u),I(r.$$.fragment,u),a=!1},d(u){u&&k(e),u&&k(t),V(i,u),u&&k(s),V(l,u),u&&k(o),V(r,u)}}}function P5(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 dm extends ge{constructor(e){super(),_e(this,e,P5,L5,me,{key:1,config:0})}}function N5(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Auth URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.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=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].authUrl),w(d,a,m),w(d,u,m),f||(c=K(l,"input",n[2]),f=!0)},p(d,m){m&16&&i!==(i=d[4])&&p(e,"for",i),m&16&&o!==(o=d[4])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].authUrl&&re(l,d[0].authUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function F5(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Token URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].tokenUrl),w(d,a,m),w(d,u,m),f||(c=K(l,"input",n[3]),f=!0)},p(d,m){m&16&&i!==(i=d[4])&&p(e,"for",i),m&16&&o!==(o=d[4])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].tokenUrl&&re(l,d[0].tokenUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function R5(n){let e,t,i,s,l,o;return i=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[N5,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[F5,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=E(),z(i.$$.fragment),s=E(),z(l.$$.fragment),p(e,"class","section-title")},m(r,a){w(r,e,a),w(r,t,a),j(i,r,a),w(r,s,a),j(l,r,a),o=!0},p(r,[a]){const u={};a&1&&(u.class="form-field "+(r[0].enabled?"required":"")),a&2&&(u.name=r[1]+".authUrl"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&1&&(f.class="form-field "+(r[0].enabled?"required":"")),a&2&&(f.name=r[1]+".tokenUrl"),a&49&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){I(i.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){r&&k(e),r&&k(t),V(i,r),r&&k(s),V(l,r)}}}function q5(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 j5 extends ge{constructor(e){super(),_e(this,e,q5,R5,me,{key:1,config:0})}}function V5(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Auth URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.textContent="Eg. https://example.com/authorize/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].authUrl),w(d,a,m),w(d,u,m),f||(c=K(l,"input",n[2]),f=!0)},p(d,m){m&32&&i!==(i=d[5])&&p(e,"for",i),m&32&&o!==(o=d[5])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].authUrl&&re(l,d[0].authUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function z5(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Token URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.textContent="Eg. https://example.com/token/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].tokenUrl),w(d,a,m),w(d,u,m),f||(c=K(l,"input",n[3]),f=!0)},p(d,m){m&32&&i!==(i=d[5])&&p(e,"for",i),m&32&&o!==(o=d[5])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].tokenUrl&&re(l,d[0].tokenUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function H5(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("User API URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.textContent="Eg. https://example.com/userinfo/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].userApiUrl),w(d,a,m),w(d,u,m),f||(c=K(l,"input",n[4]),f=!0)},p(d,m){m&32&&i!==(i=d[5])&&p(e,"for",i),m&32&&o!==(o=d[5])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].userApiUrl&&re(l,d[0].userApiUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function B5(n){let e,t,i,s,l,o,r,a;return i=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[V5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[z5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".userApiUrl",$$slots:{default:[H5,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Endpoints",t=E(),z(i.$$.fragment),s=E(),z(l.$$.fragment),o=E(),z(r.$$.fragment),p(e,"class","section-title")},m(u,f){w(u,e,f),w(u,t,f),j(i,u,f),w(u,s,f),j(l,u,f),w(u,o,f),j(r,u,f),a=!0},p(u,[f]){const c={};f&1&&(c.class="form-field "+(u[0].enabled?"required":"")),f&2&&(c.name=u[1]+".authUrl"),f&97&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(u[0].enabled?"required":"")),f&2&&(d.name=u[1]+".tokenUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),l.$set(d);const m={};f&1&&(m.class="form-field "+(u[0].enabled?"required":"")),f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){I(i.$$.fragment,u),I(l.$$.fragment,u),I(r.$$.fragment,u),a=!1},d(u){u&&k(e),u&&k(t),V(i,u),u&&k(s),V(l,u),u&&k(o),V(r,u)}}}function U5(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}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 Rr extends ge{constructor(e){super(),_e(this,e,U5,B5,me,{key:1,config:0})}}function W5(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Client ID"),s=E(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[2]),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&4&&l.value!==u[2]&&re(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function Y5(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Team ID"),s=E(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[3]),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&8&&l.value!==u[3]&&re(l,u[3])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function K5(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Key ID"),s=E(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[4]),r||(a=K(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&16&&l.value!==u[4]&&re(l,u[4])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function J5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Duration (in seconds)",i=E(),s=v("i"),o=E(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[23]),p(r,"type","text"),p(r,"id",a=n[23]),p(r,"max",po),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[6]),u||(f=[Me(He.call(null,s,{text:`Max ${po} seconds (~${po/(60*60*24*30)<<0} months).`,position:"top"})),K(r,"input",n[15])],u=!0)},p(c,d){d&8388608&&l!==(l=c[23])&&p(e,"for",l),d&8388608&&a!==(a=c[23])&&p(r,"id",a),d&64&&r.value!==c[6]&&re(r,c[6])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,Ee(f)}}}function Z5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Private key"),s=E(),l=v("textarea"),r=E(),a=v("div"),a.textContent="The key is not stored on the server and it is used only for generating the signed JWT.",p(e,"for",i=n[23]),p(l,"id",o=n[23]),l.required=!0,p(l,"rows","8"),p(l,"placeholder",`-----BEGIN PRIVATE KEY----- + Open picker`,p(t,"class",i=ls(B.getFieldTypeIcon(n[2].type))+" svelte-1ynw0pc"),p(l,"class","txt"),p(e,"for",a=n[19]),p(c,"class","relations-list svelte-1ynw0pc"),p(b,"type","button"),p(b,"class","btn btn-transparent btn-sm btn-block"),p(h,"class","list-item list-item-btn"),p(f,"class","list")},m(O,D){w(O,e,D),g(e,t),g(e,s),g(e,l),g(l,r),w(O,u,D),w(O,f,D),g(f,c);for(let L=0;L({19:r}),({uniqueId:r})=>r?524288:0]},$$scope:{ctx:n}};e=new pe({props:l}),n[14](e);let o={value:n[0],field:n[2]};return i=new d6({props:o}),n[15](i),i.$on("save",n[16]),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(r,a){V(e,r,a),w(r,t,a),V(i,r,a),s=!0},p(r,[a]){const u={};a&4&&(u.class="form-field form-field-list "+(r[2].required?"required":"")),a&4&&(u.name=r[2].name),a&268959863&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a&1&&(f.value=r[0]),a&4&&(f.field=r[2]),i.$set(f)},i(r){s||(A(e.$$.fragment,r),A(i.$$.fragment,r),s=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),s=!1},d(r){n[14](null),z(e,r),r&&k(t),n[15](null),z(i,r)}}}const pm=100;function _6(n,e,t){let i,{value:s}=e,{picker:l}=e,{field:o=new kn}=e,r,a=[],u=!1,f;function c(){if(u)return!1;const M=B.toArray(s);return t(4,a=a.filter(O=>M.includes(O.id))),M.length!=a.length}async function d(){var L,P;const M=B.toArray(s);if(t(4,a=[]),!((L=o==null?void 0:o.options)!=null&&L.collectionId)||!M.length){t(5,u=!1);return}t(5,u=!0);const O=M.slice(),D=[];for(;O.length>0;){const N=[];for(const F of O.splice(0,pm))N.push(`id="${F}"`);D.push(ce.collection((P=o==null?void 0:o.options)==null?void 0:P.collectionId).getFullList(pm,{filter:N.join("||"),$autoCancel:!1}))}try{let N=[];await Promise.all(D).then(F=>{N=N.concat(...F)});for(const F of M){const R=B.findByKey(N,"id",F);R&&a.push(R)}t(4,a)}catch(N){ce.error(N)}t(5,u=!1)}function m(M){B.removeByKey(a,"id",M.id),t(4,a),_()}function _(){var M;i?t(0,s=a.map(O=>O.id)):t(0,s=((M=a[0])==null?void 0:M.id)||"")}Vo(()=>{clearTimeout(f)});const h=M=>m(M);function b(M){a=M,t(4,a)}const y=()=>{_()},S=()=>l==null?void 0:l.show();function C(M){ee[M?"unshift":"push"](()=>{r=M,t(3,r)})}function $(M){ee[M?"unshift":"push"](()=>{l=M,t(1,l)})}const T=M=>{var O;t(4,a=M.detail||[]),t(0,s=i?a.map(D=>D.id):((O=a[0])==null?void 0:O.id)||"")};return n.$$set=M=>{"value"in M&&t(0,s=M.value),"picker"in M&&t(1,l=M.picker),"field"in M&&t(2,o=M.field)},n.$$.update=()=>{var M;n.$$.dirty&4&&t(6,i=((M=o.options)==null?void 0:M.maxSelect)!=1),n.$$.dirty&9&&typeof s<"u"&&(r==null||r.changed()),n.$$.dirty&529&&c()&&(clearTimeout(f),t(9,f=setTimeout(d,0)))},[s,l,o,r,a,u,i,m,_,f,h,b,y,S,C,$,T]}class g6 extends ge{constructor(e){super(),_e(this,e,_6,h6,me,{value:0,picker:1,field:2})}}const b6=["Activate","AddUndo","BeforeAddUndo","BeforeExecCommand","BeforeGetContent","BeforeRenderUI","BeforeSetContent","BeforePaste","Blur","Change","ClearUndos","Click","ContextMenu","Copy","Cut","Dblclick","Deactivate","Dirty","Drag","DragDrop","DragEnd","DragGesture","DragOver","Drop","ExecCommand","Focus","FocusIn","FocusOut","GetContent","Hide","Init","KeyDown","KeyPress","KeyUp","LoadContent","MouseDown","MouseEnter","MouseLeave","MouseMove","MouseOut","MouseOver","MouseUp","NodeChange","ObjectResizeStart","ObjectResized","ObjectSelected","Paste","PostProcess","PostRender","PreProcess","ProgressState","Redo","Remove","Reset","ResizeEditor","SaveContent","SelectionChange","SetAttrib","SetContent","Show","Submit","Undo","VisualAid"],v6=(n,e)=>{b6.forEach(t=>{n.on(t,i=>{e(t.toLowerCase(),{eventName:t,event:i,editor:n})})})};function y6(n){let e;return{c(){e=v("textarea"),p(e,"id",n[0]),zr(e,"visibility","hidden")},m(t,i){w(t,e,i),n[18](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&k(e),n[18](null)}}}function k6(n){let e;return{c(){e=v("div"),p(e,"id",n[0])},m(t,i){w(t,e,i),n[17](e)},p(t,i){i&1&&p(e,"id",t[0])},d(t){t&&k(e),n[17](null)}}}function w6(n){let e;function t(l,o){return l[1]?k6:y6}let i=t(n),s=i(n);return{c(){e=v("div"),s.c(),p(e,"class",n[2])},m(l,o){w(l,e,o),s.m(e,null),n[19](e)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null))),o&4&&p(e,"class",l[2])},i:x,o:x,d(l){l&&k(e),s.d(),n[19](null)}}}const C1=n=>n+"_"+Math.floor(Math.random()*1e9)+String(Date.now()),S6=()=>{let n={listeners:[],scriptId:C1("tiny-script"),scriptLoaded:!1,injected:!1};const e=(i,s,l,o)=>{n.injected=!0;const r=s.createElement("script");r.referrerPolicy="origin",r.type="application/javascript",r.src=l,r.onload=()=>{o()},s.head&&s.head.appendChild(r)};return{load:(i,s,l)=>{n.scriptLoaded?l():(n.listeners.push(l),n.injected||e(n.scriptId,i,s,()=>{n.listeners.forEach(o=>o()),n.scriptLoaded=!0}))}}};let $6=S6();function C6(n,e,t){var i;let{id:s=C1("tinymce-svelte")}=e,{inline:l=void 0}=e,{disabled:o=!1}=e,{apiKey:r="no-api-key"}=e,{channel:a="6"}=e,{scriptSrc:u=void 0}=e,{conf:f={}}=e,{modelEvents:c="change input undo redo"}=e,{value:d=""}=e,{text:m=""}=e,{cssClass:_="tinymce-wrapper"}=e,h,b,y,S=d,C=o;const $=$t(),T=()=>{const N=(()=>typeof window<"u"?window:global)();return N&&N.tinymce?N.tinymce:null},M=()=>{const P=Object.assign(Object.assign({},f),{target:b,inline:l!==void 0?l:f.inline!==void 0?f.inline:!1,readonly:o,setup:N=>{t(14,y=N),N.on("init",()=>{N.setContent(d),N.on(c,()=>{t(15,S=N.getContent()),S!==d&&(t(5,d=S),t(6,m=N.getContent({format:"text"})))})}),v6(N,$),typeof f.setup=="function"&&f.setup(N)}});t(4,b.style.visibility="",b),T().init(P)};Gt(()=>{if(T()!==null)M();else{const P=u||`https://cdn.tiny.cloud/1/${r}/tinymce/${a}/tinymce.min.js`;$6.load(h.ownerDocument,P,()=>{M()})}}),Vo(()=>{var P;y&&((P=T())===null||P===void 0||P.remove(y))});function O(P){ee[P?"unshift":"push"](()=>{b=P,t(4,b)})}function D(P){ee[P?"unshift":"push"](()=>{b=P,t(4,b)})}function L(P){ee[P?"unshift":"push"](()=>{h=P,t(3,h)})}return n.$$set=P=>{"id"in P&&t(0,s=P.id),"inline"in P&&t(1,l=P.inline),"disabled"in P&&t(7,o=P.disabled),"apiKey"in P&&t(8,r=P.apiKey),"channel"in P&&t(9,a=P.channel),"scriptSrc"in P&&t(10,u=P.scriptSrc),"conf"in P&&t(11,f=P.conf),"modelEvents"in P&&t(12,c=P.modelEvents),"value"in P&&t(5,d=P.value),"text"in P&&t(6,m=P.text),"cssClass"in P&&t(2,_=P.cssClass)},n.$$.update=()=>{n.$$.dirty&123040&&(y&&S!==d&&(y.setContent(d),t(6,m=y.getContent({format:"text"}))),y&&o!==C&&(t(16,C=o),typeof(t(13,i=y.mode)===null||i===void 0?void 0:i.set)=="function"?y.mode.set(o?"readonly":"design"):y.setMode(o?"readonly":"design")))},[s,l,_,h,b,d,m,o,r,a,u,f,c,i,y,S,C,O,D,L]}class pu extends ge{constructor(e){super(),_e(this,e,C6,w6,me,{id:0,inline:1,disabled:7,apiKey:8,channel:9,scriptSrc:10,conf:11,modelEvents:12,value:5,text:6,cssClass:2})}}function T6(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function m(h){n[2](h)}let _={id:n[3],scriptSrc:"./libs/tinymce/tinymce.min.js",conf:B.defaultEditorOptions()};return n[0]!==void 0&&(_.value=n[0]),f=new pu({props:_}),ee.push(()=>de(f,"value",m)),{c(){e=v("label"),t=v("i"),s=E(),l=v("span"),r=U(o),u=E(),H(f.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(h,b){w(h,e,b),g(e,t),g(e,s),g(e,l),g(l,r),w(h,u,b),V(f,h,b),d=!0},p(h,b){(!d||b&2&&i!==(i=B.getFieldTypeIcon(h[1].type)))&&p(t,"class",i),(!d||b&2)&&o!==(o=h[1].name+"")&&se(r,o),(!d||b&8&&a!==(a=h[3]))&&p(e,"for",a);const y={};b&8&&(y.id=h[3]),!c&&b&1&&(c=!0,y.value=h[0],he(()=>c=!1)),f.$set(y)},i(h){d||(A(f.$$.fragment,h),d=!0)},o(h){I(f.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(u),z(f,h)}}}function M6(n){let e,t;return e=new pe({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[T6,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function O6(n,e,t){let{field:i=new kn}=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 E6 extends ge{constructor(e){super(),_e(this,e,O6,M6,me,{field:1,value:0})}}function D6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Auth URL"),s=E(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].authUrl),r||(a=J(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&&l.value!==u[0].authUrl&&re(l,u[0].authUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function A6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Token URL"),s=E(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].tokenUrl),r||(a=J(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&&re(l,u[0].tokenUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function I6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("User API URL"),s=E(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].userApiUrl),r||(a=J(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&&re(l,u[0].userApiUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function L6(n){let e,t,i,s,l,o,r,a;return i=new pe({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[D6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[A6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[I6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment),o=E(),H(r.$$.fragment),p(e,"class","section-title")},m(u,f){w(u,e,f),w(u,t,f),V(i,u,f),w(u,s,f),V(l,u,f),w(u,o,f),V(r,u,f),a=!0},p(u,[f]){const c={};f&2&&(c.name=u[1]+".authUrl"),f&97&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&2&&(d.name=u[1]+".tokenUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),l.$set(d);const m={};f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){I(i.$$.fragment,u),I(l.$$.fragment,u),I(r.$$.fragment,u),a=!1},d(u){u&&k(e),u&&k(t),z(i,u),u&&k(s),z(l,u),u&&k(o),z(r,u)}}}function P6(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 ge{constructor(e){super(),_e(this,e,P6,L6,me,{key:1,config:0})}}function N6(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Auth URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.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=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].authUrl),w(d,a,m),w(d,u,m),f||(c=J(l,"input",n[2]),f=!0)},p(d,m){m&16&&i!==(i=d[4])&&p(e,"for",i),m&16&&o!==(o=d[4])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].authUrl&&re(l,d[0].authUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function F6(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Token URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].tokenUrl),w(d,a,m),w(d,u,m),f||(c=J(l,"input",n[3]),f=!0)},p(d,m){m&16&&i!==(i=d[4])&&p(e,"for",i),m&16&&o!==(o=d[4])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].tokenUrl&&re(l,d[0].tokenUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function R6(n){let e,t,i,s,l,o;return i=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[N6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[F6,({uniqueId:r})=>({4:r}),({uniqueId:r})=>r?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment),p(e,"class","section-title")},m(r,a){w(r,e,a),w(r,t,a),V(i,r,a),w(r,s,a),V(l,r,a),o=!0},p(r,[a]){const u={};a&1&&(u.class="form-field "+(r[0].enabled?"required":"")),a&2&&(u.name=r[1]+".authUrl"),a&49&&(u.$$scope={dirty:a,ctx:r}),i.$set(u);const f={};a&1&&(f.class="form-field "+(r[0].enabled?"required":"")),a&2&&(f.name=r[1]+".tokenUrl"),a&49&&(f.$$scope={dirty:a,ctx:r}),l.$set(f)},i(r){o||(A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){I(i.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){r&&k(e),r&&k(t),z(i,r),r&&k(s),z(l,r)}}}function q6(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 j6 extends ge{constructor(e){super(),_e(this,e,q6,R6,me,{key:1,config:0})}}function V6(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Auth URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.textContent="Eg. https://example.com/authorize/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].authUrl),w(d,a,m),w(d,u,m),f||(c=J(l,"input",n[2]),f=!0)},p(d,m){m&32&&i!==(i=d[5])&&p(e,"for",i),m&32&&o!==(o=d[5])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].authUrl&&re(l,d[0].authUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function z6(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Token URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.textContent="Eg. https://example.com/token/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].tokenUrl),w(d,a,m),w(d,u,m),f||(c=J(l,"input",n[3]),f=!0)},p(d,m){m&32&&i!==(i=d[5])&&p(e,"for",i),m&32&&o!==(o=d[5])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].tokenUrl&&re(l,d[0].tokenUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function H6(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("User API URL"),s=E(),l=v("input"),a=E(),u=v("div"),u.textContent="Eg. https://example.com/userinfo/",p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5]),l.required=r=n[0].enabled,p(u,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0].userApiUrl),w(d,a,m),w(d,u,m),f||(c=J(l,"input",n[4]),f=!0)},p(d,m){m&32&&i!==(i=d[5])&&p(e,"for",i),m&32&&o!==(o=d[5])&&p(l,"id",o),m&1&&r!==(r=d[0].enabled)&&(l.required=r),m&1&&l.value!==d[0].userApiUrl&&re(l,d[0].userApiUrl)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(a),d&&k(u),f=!1,c()}}}function B6(n){let e,t,i,s,l,o,r,a;return i=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".authUrl",$$slots:{default:[V6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".tokenUrl",$$slots:{default:[z6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field "+(n[0].enabled?"required":""),name:n[1]+".userApiUrl",$$slots:{default:[H6,({uniqueId:u})=>({5:u}),({uniqueId:u})=>u?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Endpoints",t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment),o=E(),H(r.$$.fragment),p(e,"class","section-title")},m(u,f){w(u,e,f),w(u,t,f),V(i,u,f),w(u,s,f),V(l,u,f),w(u,o,f),V(r,u,f),a=!0},p(u,[f]){const c={};f&1&&(c.class="form-field "+(u[0].enabled?"required":"")),f&2&&(c.name=u[1]+".authUrl"),f&97&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(u[0].enabled?"required":"")),f&2&&(d.name=u[1]+".tokenUrl"),f&97&&(d.$$scope={dirty:f,ctx:u}),l.$set(d);const m={};f&1&&(m.class="form-field "+(u[0].enabled?"required":"")),f&2&&(m.name=u[1]+".userApiUrl"),f&97&&(m.$$scope={dirty:f,ctx:u}),r.$set(m)},i(u){a||(A(i.$$.fragment,u),A(l.$$.fragment,u),A(r.$$.fragment,u),a=!0)},o(u){I(i.$$.fragment,u),I(l.$$.fragment,u),I(r.$$.fragment,u),a=!1},d(u){u&&k(e),u&&k(t),z(i,u),u&&k(s),z(l,u),u&&k(o),z(r,u)}}}function U6(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 Rr extends ge{constructor(e){super(),_e(this,e,U6,B6,me,{key:1,config:0})}}function W6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Client ID"),s=E(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[2]),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&4&&l.value!==u[2]&&re(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function Y6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Team ID"),s=E(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[3]),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&8&&l.value!==u[3]&&re(l,u[3])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function K6(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Key ID"),s=E(),l=v("input"),p(e,"for",i=n[23]),p(l,"type","text"),p(l,"id",o=n[23]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[4]),r||(a=J(l,"input",n[14]),r=!0)},p(u,f){f&8388608&&i!==(i=u[23])&&p(e,"for",i),f&8388608&&o!==(o=u[23])&&p(l,"id",o),f&16&&l.value!==u[4]&&re(l,u[4])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function J6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Duration (in seconds)",i=E(),s=v("i"),o=E(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[23]),p(r,"type","text"),p(r,"id",a=n[23]),p(r,"max",mo),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[6]),u||(f=[Me(He.call(null,s,{text:`Max ${mo} seconds (~${mo/(60*60*24*30)<<0} months).`,position:"top"})),J(r,"input",n[15])],u=!0)},p(c,d){d&8388608&&l!==(l=c[23])&&p(e,"for",l),d&8388608&&a!==(a=c[23])&&p(r,"id",a),d&64&&r.value!==c[6]&&re(r,c[6])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,Ee(f)}}}function Z6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Private key"),s=E(),l=v("textarea"),r=E(),a=v("div"),a.textContent="The key is not stored on the server and it is used only for generating the signed JWT.",p(e,"for",i=n[23]),p(l,"id",o=n[23]),l.required=!0,p(l,"rows","8"),p(l,"placeholder",`-----BEGIN PRIVATE KEY----- ... ------END PRIVATE KEY-----`),p(a,"class","help-block")},m(c,d){w(c,e,d),g(e,t),w(c,s,d),w(c,l,d),re(l,n[5]),w(c,r,d),w(c,a,d),u||(f=K(l,"input",n[16]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&32&&re(l,c[5])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function G5(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S;return s=new pe({props:{class:"form-field required",name:"clientId",$$slots:{default:[W5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"teamId",$$slots:{default:[Y5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),f=new pe({props:{class:"form-field required",name:"keyId",$$slots:{default:[K5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),m=new pe({props:{class:"form-field required",name:"duration",$$slots:{default:[J5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),h=new pe({props:{class:"form-field required",name:"privateKey",$$slots:{default:[Z5,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),a=E(),u=v("div"),z(f.$$.fragment),c=E(),d=v("div"),z(m.$$.fragment),_=E(),z(h.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(u,"class","col-lg-6"),p(d,"class","col-lg-6"),p(t,"class","grid"),p(e,"id",n[9]),p(e,"autocomplete","off")},m(C,$){w(C,e,$),g(e,t),g(t,i),j(s,i,null),g(t,l),g(t,o),j(r,o,null),g(t,a),g(t,u),j(f,u,null),g(t,c),g(t,d),j(m,d,null),g(t,_),j(h,t,null),b=!0,y||(S=K(e,"submit",et(n[17])),y=!0)},p(C,$){const T={};$&25165828&&(T.$$scope={dirty:$,ctx:C}),s.$set(T);const M={};$&25165832&&(M.$$scope={dirty:$,ctx:C}),r.$set(M);const O={};$&25165840&&(O.$$scope={dirty:$,ctx:C}),f.$set(O);const D={};$&25165888&&(D.$$scope={dirty:$,ctx:C}),m.$set(D);const L={};$&25165856&&(L.$$scope={dirty:$,ctx:C}),h.$set(L)},i(C){b||(A(s.$$.fragment,C),A(r.$$.fragment,C),A(f.$$.fragment,C),A(m.$$.fragment,C),A(h.$$.fragment,C),b=!0)},o(C){I(s.$$.fragment,C),I(r.$$.fragment,C),I(f.$$.fragment,C),I(m.$$.fragment,C),I(h.$$.fragment,C),b=!1},d(C){C&&k(e),V(s),V(r),V(f),V(m),V(h),y=!1,S()}}}function X5(n){let e;return{c(){e=v("h4"),e.textContent="Generate Apple client secret",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Q5(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=U("Close"),i=E(),s=v("button"),l=v("i"),o=E(),r=v("span"),r.textContent="Generate and set secret",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[7],p(l,"class","ri-key-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[9]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],Q(s,"btn-loading",n[7])},m(c,d){w(c,e,d),g(e,t),w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=K(e,"click",n[0]),u=!0)},p(c,d){d&128&&(e.disabled=c[7]),d&384&&a!==(a=!c[8]||c[7])&&(s.disabled=a),d&128&&Q(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function x5(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[Q5],header:[X5],default:[G5]},$$scope:{ctx:n}};return e=new ln({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[19](null),V(e,s)}}}const po=15777e3;function eO(n,e,t){let i;const s=$t(),l="apple_secret_"+B.randomString(5);let o,r,a,u,f,c,d=!1;function m(P={}){t(2,r=P.clientId||""),t(3,a=P.teamId||""),t(4,u=P.keyId||""),t(5,f=P.privateKey||""),t(6,c=P.duration||po),en({}),o==null||o.show()}function _(){return o==null?void 0:o.hide()}async function h(){t(7,d=!0);try{const P=await ce.settings.generateAppleClientSecret(r,a,u,f.trim(),c);t(7,d=!1),zt("Successfully generated client secret."),s("submit",P),o==null||o.hide()}catch(P){ce.error(P)}t(7,d=!1)}function b(){r=this.value,t(2,r)}function y(){a=this.value,t(3,a)}function S(){u=this.value,t(4,u)}function C(){c=this.value,t(6,c)}function $(){f=this.value,t(5,f)}const T=()=>h(),M=()=>!d;function O(P){ee[P?"unshift":"push"](()=>{o=P,t(1,o)})}function D(P){Ne.call(this,n,P)}function L(P){Ne.call(this,n,P)}return t(8,i=!0),[_,o,r,a,u,f,c,d,i,l,h,m,b,y,S,C,$,T,M,O,D,L]}class tO extends ge{constructor(e){super(),_e(this,e,eO,x5,me,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function nO(n){let e,t,i,s,l,o,r,a,u,f,c={};return r=new tO({props:c}),n[4](r),r.$on("submit",n[5]),{c(){e=v("button"),t=v("i"),i=E(),s=v("span"),s.textContent="Generate secret",o=E(),z(r.$$.fragment),p(t,"class","ri-key-line"),p(s,"class","txt"),p(e,"type","button"),p(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(d,m){w(d,e,m),g(e,t),g(e,i),g(e,s),w(d,o,m),j(r,d,m),a=!0,u||(f=K(e,"click",n[3]),u=!0)},p(d,[m]){(!a||m&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+d[1]))&&p(e,"class",l);const _={};r.$set(_)},i(d){a||(A(r.$$.fragment,d),a=!0)},o(d){I(r.$$.fragment,d),a=!1},d(d){d&&k(e),d&&k(o),n[4](null),V(r,d),u=!1,f()}}}function iO(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(u){ee[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{var f;t(0,s.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",s)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class sO extends ge{constructor(e){super(),_e(this,e,iO,nO,me,{key:1,config:0})}}const mo=[{key:"appleAuth",title:"Apple",logo:"apple.svg",optionsComponent:sO},{key:"googleAuth",title:"Google",logo:"google.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"microsoft.svg",optionsComponent:j5},{key:"yandexAuth",title:"Yandex",logo:"yandex.svg"},{key:"facebookAuth",title:"Facebook",logo:"facebook.svg"},{key:"instagramAuth",title:"Instagram",logo:"instagram.svg"},{key:"githubAuth",title:"GitHub",logo:"github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"gitlab.svg",optionsComponent:dm},{key:"giteeAuth",title:"Gitee",logo:"gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"gitea.svg",optionsComponent:dm},{key:"discordAuth",title:"Discord",logo:"discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"kakao.svg"},{key:"vkAuth",title:"VK",logo:"vk.svg"},{key:"spotifyAuth",title:"Spotify",logo:"spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:Rr},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:Rr},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:Rr}];function pm(n,e,t){const i=n.slice();return i[9]=e[t],i}function lO(n){let e;return{c(){e=v("h6"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function oO(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function mm(n){let e,t,i,s,l,o,r=n[4](n[9].provider)+"",a,u,f,c,d=n[9].providerId+"",m,_,h,b,y,S;function C(){return n[6](n[9])}return{c(){var $;e=v("div"),t=v("figure"),i=v("img"),l=E(),o=v("span"),a=U(r),u=E(),f=v("div"),c=U("ID: "),m=U(d),_=E(),h=v("button"),h.innerHTML='',b=E(),hn(i.src,s="./images/oauth2/"+(($=n[3](n[9].provider))==null?void 0:$.logo))||p(i,"src",s),p(i,"alt","Provider logo"),p(t,"class","provider-logo"),p(o,"class","txt"),p(f,"class","txt-hint"),p(h,"type","button"),p(h,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m($,T){w($,e,T),g(e,t),g(t,i),g(e,l),g(e,o),g(o,a),g(e,u),g(e,f),g(f,c),g(f,m),g(e,_),g(e,h),g(e,b),y||(S=K(h,"click",C),y=!0)},p($,T){var M;n=$,T&2&&!hn(i.src,s="./images/oauth2/"+((M=n[3](n[9].provider))==null?void 0:M.logo))&&p(i,"src",s),T&2&&r!==(r=n[4](n[9].provider)+"")&&se(a,r),T&2&&d!==(d=n[9].providerId+"")&&se(m,d)},d($){$&&k(e),y=!1,S()}}}function aO(n){let e;function t(l,o){var r;return l[2]?rO:(r=l[0])!=null&&r.id&&l[1].length?oO:lO}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&k(e)}}}function uO(n,e,t){const i=$t();let{record:s}=e,l=[],o=!1;function r(d){return mo.find(m=>m.key==d+"Auth")||{}}function a(d){var m;return((m=r(d))==null?void 0:m.title)||B.sentenize(d,!1)}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 ce.collection(s.collectionId).listExternalAuths(s.id))}catch(d){ce.error(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||pn(`Do you really want to unlink the ${a(d)} provider?`,()=>ce.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{zt(`Successfully unlinked the ${a(d)} provider.`),i("unlink",d),u()}).catch(m=>{ce.error(m)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class fO extends ge{constructor(e){super(),_e(this,e,uO,aO,me,{record:0})}}function hm(n,e,t){const i=n.slice();return i[66]=e[t],i[67]=e,i[68]=t,i}function _m(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=E(),l=v("div"),o=U(`The record has previous unsaved changes. - `),r=v("button"),r.textContent="Restore draft",a=E(),u=v("button"),u.innerHTML='',f=E(),c=v("div"),p(i,"class","icon"),p(r,"type","button"),p(r,"class","btn btn-sm btn-secondary"),p(l,"class","flex flex-gap-xs"),p(u,"type","button"),p(u,"class","close"),p(u,"aria-label","Discard draft"),p(t,"class","alert alert-info m-0"),p(c,"class","clearfix p-b-base"),p(e,"class","block")},m(b,y){w(b,e,y),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),g(l,r),g(t,a),g(t,u),g(e,f),g(e,c),m=!0,_||(h=[K(r,"click",n[36]),Me(He.call(null,u,"Discard draft")),K(u,"click",et(n[37]))],_=!0)},p:x,i(b){m||(d&&d.end(1),m=!0)},o(b){d=$a(e,ot,{duration:150}),m=!1},d(b){b&&k(e),b&&d&&d.end(),_=!1,Ee(h)}}}function gm(n){let e,t,i,s,l;return{c(){e=v("div"),t=v("i"),p(t,"class","ri-calendar-event-line txt-disabled"),p(e,"class","form-field-addon")},m(o,r){w(o,e,r),g(e,t),s||(l=Me(i=He.call(null,t,{text:`Created: ${n[3].created} -Updated: ${n[3].updated}`,position:"left"})),s=!0)},p(o,r){i&&qt(i.update)&&r[0]&8&&i.update.call(null,{text:`Created: ${o[3].created} -Updated: ${o[3].updated}`,position:"left"})},d(o){o&&k(e),s=!1,l()}}}function cO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h=!n[6]&&gm(n);return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="id",l=E(),o=v("span"),a=E(),h&&h.c(),u=E(),f=v("input"),p(t,"class",ls(B.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[69]),p(f,"type","text"),p(f,"id",c=n[69]),p(f,"placeholder","Leave empty to auto generate..."),p(f,"minlength","15"),f.readOnly=d=!n[6]},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),g(e,l),g(e,o),w(b,a,y),h&&h.m(b,y),w(b,u,y),w(b,f,y),re(f,n[3].id),m||(_=K(f,"input",n[38]),m=!0)},p(b,y){y[2]&128&&r!==(r=b[69])&&p(e,"for",r),b[6]?h&&(h.d(1),h=null):h?h.p(b,y):(h=gm(b),h.c(),h.m(u.parentNode,u)),y[2]&128&&c!==(c=b[69])&&p(f,"id",c),y[0]&64&&d!==(d=!b[6])&&(f.readOnly=d),y[0]&8&&f.value!==b[3].id&&re(f,b[3].id)},d(b){b&&k(e),b&&k(a),h&&h.d(b),b&&k(u),b&&k(f),m=!1,_()}}}function bm(n){var u,f;let e,t,i,s,l;function o(c){n[39](c)}let r={isNew:n[6],collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new zM({props:r}),ee.push(()=>de(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&vm();return{c(){z(e.$$.fragment),i=E(),a&&a.c(),s=ye()},m(c,d){j(e,c,d),w(c,i,d),a&&a.m(c,d),w(c,s,d),l=!0},p(c,d){var _,h;const m={};d[0]&64&&(m.isNew=c[6]),d[0]&1&&(m.collection=c[0]),!t&&d[0]&8&&(t=!0,m.record=c[3],he(()=>t=!1)),e.$set(m),(h=(_=c[0])==null?void 0:_.schema)!=null&&h.length?a||(a=vm(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){I(e.$$.fragment,c),l=!1},d(c){V(e,c),c&&k(i),a&&a.d(c),c&&k(s)}}}function vm(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dO(n){let e,t,i;function s(o){n[52](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new g5({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function pO(n){let e,t,i,s,l;function o(f){n[49](f,n[66])}function r(f){n[50](f,n[66])}function a(f){n[51](f,n[66])}let u={field:n[66],record:n[3]};return n[3][n[66].name]!==void 0&&(u.value=n[3][n[66].name]),n[4][n[66].name]!==void 0&&(u.uploadedFiles=n[4][n[66].name]),n[5][n[66].name]!==void 0&&(u.deletedFileNames=n[5][n[66].name]),e=new G6({props:u}),ee.push(()=>de(e,"value",o)),ee.push(()=>de(e,"uploadedFiles",r)),ee.push(()=>de(e,"deletedFileNames",a)),{c(){z(e.$$.fragment)},m(f,c){j(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[66]),c[0]&8&&(d.record=n[3]),!t&&c[0]&9&&(t=!0,d.value=n[3][n[66].name],he(()=>t=!1)),!i&&c[0]&17&&(i=!0,d.uploadedFiles=n[4][n[66].name],he(()=>i=!1)),!s&&c[0]&33&&(s=!0,d.deletedFileNames=n[5][n[66].name],he(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){I(e.$$.fragment,f),l=!1},d(f){V(e,f)}}}function mO(n){let e,t,i;function s(o){n[48](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new w6({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function hO(n){let e,t,i;function s(o){n[47](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new b6({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function _O(n){let e,t,i;function s(o){n[46](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new m6({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function gO(n){let e,t,i;function s(o){n[45](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new E5({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function bO(n){let e,t,i;function s(o){n[44](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new f6({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function vO(n){let e,t,i;function s(o){n[43](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new o6({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function yO(n){let e,t,i;function s(o){n[42](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new n6({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function kO(n){let e,t,i;function s(o){n[41](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new QM({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function wO(n){let e,t,i;function s(o){n[40](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new JM({props:l}),ee.push(()=>de(e,"value",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function ym(n,e){let t,i,s,l,o;const r=[wO,kO,yO,vO,bO,gO,_O,hO,mO,pO,dO],a=[];function u(f,c){return f[66].type==="text"?0:f[66].type==="number"?1:f[66].type==="bool"?2:f[66].type==="email"?3:f[66].type==="url"?4:f[66].type==="editor"?5:f[66].type==="date"?6:f[66].type==="select"?7:f[66].type==="json"?8:f[66].type==="file"?9:f[66].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=ye(),s&&s.c(),l=ye(),this.first=t},m(f,c){w(f,t,c),~i&&a[i].m(f,c),w(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(ae(),I(a[d],1,1,()=>{a[d]=null}),ue()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){I(s),o=!1},d(f){f&&k(t),~i&&a[i].d(f),f&&k(l)}}}function km(n){let e,t,i;return t=new fO({props:{record:n[3]}}),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[12]===wl)},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.record=s[3]),t.$set(o),(!i||l[0]&4096)&&Q(e,"active",s[12]===wl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function SO(n){var S,C;let e,t,i,s,l,o,r=[],a=new Map,u,f,c,d,m=!n[7]&&n[9]&&_m(n);s=new pe({props:{class:"form-field "+(n[6]?"":"readonly"),name:"id",$$slots:{default:[cO,({uniqueId:$})=>({69:$}),({uniqueId:$})=>[0,0,$?128:0]]},$$scope:{ctx:n}}});let _=((S=n[0])==null?void 0:S.isAuth)&&bm(n),h=((C=n[0])==null?void 0:C.schema)||[];const b=$=>$[66].name;for(let $=0;${m=null}),ue());const M={};T[0]&64&&(M.class="form-field "+($[6]?"":"readonly")),T[0]&72|T[2]&384&&(M.$$scope={dirty:T,ctx:$}),s.$set(M),(O=$[0])!=null&&O.isAuth?_?(_.p($,T),T[0]&1&&A(_,1)):(_=bm($),_.c(),A(_,1),_.m(t,o)):_&&(ae(),I(_,1,1,()=>{_=null}),ue()),T[0]&57&&(h=((D=$[0])==null?void 0:D.schema)||[],ae(),r=bt(r,T,b,1,$,h,a,t,Bt,ym,null,hm),ue()),(!f||T[0]&4096)&&Q(t,"active",$[12]===ss),$[0].$isAuth&&!$[6]?y?(y.p($,T),T[0]&65&&A(y,1)):(y=km($),y.c(),A(y,1),y.m(e,null)):y&&(ae(),I(y,1,1,()=>{y=null}),ue())},i($){if(!f){A(m),A(s.$$.fragment,$),A(_);for(let T=0;T - Send verification email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[30]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function $m(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send password reset email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[31]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function $O(n){let e,t,i,s,l,o,r,a=n[0].$isAuth&&!n[2].verified&&n[2].email&&Sm(n),u=n[0].$isAuth&&n[2].email&&$m(n);return{c(){a&&a.c(),e=E(),u&&u.c(),t=E(),i=v("button"),i.innerHTML=` +-----END PRIVATE KEY-----`),p(a,"class","help-block")},m(c,d){w(c,e,d),g(e,t),w(c,s,d),w(c,l,d),re(l,n[5]),w(c,r,d),w(c,a,d),u||(f=J(l,"input",n[16]),u=!0)},p(c,d){d&8388608&&i!==(i=c[23])&&p(e,"for",i),d&8388608&&o!==(o=c[23])&&p(l,"id",o),d&32&&re(l,c[5])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function G6(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S;return s=new pe({props:{class:"form-field required",name:"clientId",$$slots:{default:[W6,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"teamId",$$slots:{default:[Y6,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),f=new pe({props:{class:"form-field required",name:"keyId",$$slots:{default:[K6,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),m=new pe({props:{class:"form-field required",name:"duration",$$slots:{default:[J6,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),h=new pe({props:{class:"form-field required",name:"privateKey",$$slots:{default:[Z6,({uniqueId:C})=>({23:C}),({uniqueId:C})=>C?8388608:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),i=v("div"),H(s.$$.fragment),l=E(),o=v("div"),H(r.$$.fragment),a=E(),u=v("div"),H(f.$$.fragment),c=E(),d=v("div"),H(m.$$.fragment),_=E(),H(h.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(u,"class","col-lg-6"),p(d,"class","col-lg-6"),p(t,"class","grid"),p(e,"id",n[9]),p(e,"autocomplete","off")},m(C,$){w(C,e,$),g(e,t),g(t,i),V(s,i,null),g(t,l),g(t,o),V(r,o,null),g(t,a),g(t,u),V(f,u,null),g(t,c),g(t,d),V(m,d,null),g(t,_),V(h,t,null),b=!0,y||(S=J(e,"submit",et(n[17])),y=!0)},p(C,$){const T={};$&25165828&&(T.$$scope={dirty:$,ctx:C}),s.$set(T);const M={};$&25165832&&(M.$$scope={dirty:$,ctx:C}),r.$set(M);const O={};$&25165840&&(O.$$scope={dirty:$,ctx:C}),f.$set(O);const D={};$&25165888&&(D.$$scope={dirty:$,ctx:C}),m.$set(D);const L={};$&25165856&&(L.$$scope={dirty:$,ctx:C}),h.$set(L)},i(C){b||(A(s.$$.fragment,C),A(r.$$.fragment,C),A(f.$$.fragment,C),A(m.$$.fragment,C),A(h.$$.fragment,C),b=!0)},o(C){I(s.$$.fragment,C),I(r.$$.fragment,C),I(f.$$.fragment,C),I(m.$$.fragment,C),I(h.$$.fragment,C),b=!1},d(C){C&&k(e),z(s),z(r),z(f),z(m),z(h),y=!1,S()}}}function X6(n){let e;return{c(){e=v("h4"),e.textContent="Generate Apple client secret",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Q6(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=U("Close"),i=E(),s=v("button"),l=v("i"),o=E(),r=v("span"),r.textContent="Generate and set secret",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[7],p(l,"class","ri-key-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[9]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[8]||n[7],Q(s,"btn-loading",n[7])},m(c,d){w(c,e,d),g(e,t),w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(c,d){d&128&&(e.disabled=c[7]),d&384&&a!==(a=!c[8]||c[7])&&(s.disabled=a),d&128&&Q(s,"btn-loading",c[7])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function x6(n){let e,t,i={overlayClose:!n[7],escClose:!n[7],beforeHide:n[18],popup:!0,$$slots:{footer:[Q6],header:[X6],default:[G6]},$$scope:{ctx:n}};return e=new ln({props:i}),n[19](e),e.$on("show",n[20]),e.$on("hide",n[21]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&128&&(o.overlayClose=!s[7]),l&128&&(o.escClose=!s[7]),l&128&&(o.beforeHide=s[18]),l&16777724&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[19](null),z(e,s)}}}const mo=15777e3;function eO(n,e,t){let i;const s=$t(),l="apple_secret_"+B.randomString(5);let o,r,a,u,f,c,d=!1;function m(P={}){t(2,r=P.clientId||""),t(3,a=P.teamId||""),t(4,u=P.keyId||""),t(5,f=P.privateKey||""),t(6,c=P.duration||mo),en({}),o==null||o.show()}function _(){return o==null?void 0:o.hide()}async function h(){t(7,d=!0);try{const P=await ce.settings.generateAppleClientSecret(r,a,u,f.trim(),c);t(7,d=!1),zt("Successfully generated client secret."),s("submit",P),o==null||o.hide()}catch(P){ce.error(P)}t(7,d=!1)}function b(){r=this.value,t(2,r)}function y(){a=this.value,t(3,a)}function S(){u=this.value,t(4,u)}function C(){c=this.value,t(6,c)}function $(){f=this.value,t(5,f)}const T=()=>h(),M=()=>!d;function O(P){ee[P?"unshift":"push"](()=>{o=P,t(1,o)})}function D(P){Ne.call(this,n,P)}function L(P){Ne.call(this,n,P)}return t(8,i=!0),[_,o,r,a,u,f,c,d,i,l,h,m,b,y,S,C,$,T,M,O,D,L]}class tO extends ge{constructor(e){super(),_e(this,e,eO,x6,me,{show:11,hide:0})}get show(){return this.$$.ctx[11]}get hide(){return this.$$.ctx[0]}}function nO(n){let e,t,i,s,l,o,r,a,u,f,c={};return r=new tO({props:c}),n[4](r),r.$on("submit",n[5]),{c(){e=v("button"),t=v("i"),i=E(),s=v("span"),s.textContent="Generate secret",o=E(),H(r.$$.fragment),p(t,"class","ri-key-line"),p(s,"class","txt"),p(e,"type","button"),p(e,"class",l="btn btn-sm btn-secondary btn-provider-"+n[1])},m(d,m){w(d,e,m),g(e,t),g(e,i),g(e,s),w(d,o,m),V(r,d,m),a=!0,u||(f=J(e,"click",n[3]),u=!0)},p(d,[m]){(!a||m&2&&l!==(l="btn btn-sm btn-secondary btn-provider-"+d[1]))&&p(e,"class",l);const _={};r.$set(_)},i(d){a||(A(r.$$.fragment,d),a=!0)},o(d){I(r.$$.fragment,d),a=!1},d(d){d&&k(e),d&&k(o),n[4](null),z(r,d),u=!1,f()}}}function iO(n,e,t){let{key:i=""}=e,{config:s={}}=e,l;const o=()=>l==null?void 0:l.show({clientId:s.clientId});function r(u){ee[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{var f;t(0,s.clientSecret=((f=u.detail)==null?void 0:f.secret)||"",s)};return n.$$set=u=>{"key"in u&&t(1,i=u.key),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class sO extends ge{constructor(e){super(),_e(this,e,iO,nO,me,{key:1,config:0})}}const ho=[{key:"appleAuth",title:"Apple",logo:"apple.svg",optionsComponent:sO},{key:"googleAuth",title:"Google",logo:"google.svg"},{key:"microsoftAuth",title:"Microsoft",logo:"microsoft.svg",optionsComponent:j6},{key:"yandexAuth",title:"Yandex",logo:"yandex.svg"},{key:"facebookAuth",title:"Facebook",logo:"facebook.svg"},{key:"instagramAuth",title:"Instagram",logo:"instagram.svg"},{key:"githubAuth",title:"GitHub",logo:"github.svg"},{key:"gitlabAuth",title:"GitLab",logo:"gitlab.svg",optionsComponent:mm},{key:"giteeAuth",title:"Gitee",logo:"gitee.svg"},{key:"giteaAuth",title:"Gitea",logo:"gitea.svg",optionsComponent:mm},{key:"discordAuth",title:"Discord",logo:"discord.svg"},{key:"twitterAuth",title:"Twitter",logo:"twitter.svg"},{key:"kakaoAuth",title:"Kakao",logo:"kakao.svg"},{key:"vkAuth",title:"VK",logo:"vk.svg"},{key:"spotifyAuth",title:"Spotify",logo:"spotify.svg"},{key:"twitchAuth",title:"Twitch",logo:"twitch.svg"},{key:"stravaAuth",title:"Strava",logo:"strava.svg"},{key:"livechatAuth",title:"LiveChat",logo:"livechat.svg"},{key:"oidcAuth",title:"OpenID Connect",logo:"oidc.svg",optionsComponent:Rr},{key:"oidc2Auth",title:"(2) OpenID Connect",logo:"oidc.svg",optionsComponent:Rr},{key:"oidc3Auth",title:"(3) OpenID Connect",logo:"oidc.svg",optionsComponent:Rr}];function hm(n,e,t){const i=n.slice();return i[9]=e[t],i}function lO(n){let e;return{c(){e=v("h6"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center m-t-sm m-b-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function oO(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function _m(n){let e,t,i,s,l,o,r=n[4](n[9].provider)+"",a,u,f,c,d=n[9].providerId+"",m,_,h,b,y,S;function C(){return n[6](n[9])}return{c(){var $;e=v("div"),t=v("figure"),i=v("img"),l=E(),o=v("span"),a=U(r),u=E(),f=v("div"),c=U("ID: "),m=U(d),_=E(),h=v("button"),h.innerHTML='',b=E(),hn(i.src,s="./images/oauth2/"+(($=n[3](n[9].provider))==null?void 0:$.logo))||p(i,"src",s),p(i,"alt","Provider logo"),p(t,"class","provider-logo"),p(o,"class","txt"),p(f,"class","txt-hint"),p(h,"type","button"),p(h,"class","btn btn-transparent link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m($,T){w($,e,T),g(e,t),g(t,i),g(e,l),g(e,o),g(o,a),g(e,u),g(e,f),g(f,c),g(f,m),g(e,_),g(e,h),g(e,b),y||(S=J(h,"click",C),y=!0)},p($,T){var M;n=$,T&2&&!hn(i.src,s="./images/oauth2/"+((M=n[3](n[9].provider))==null?void 0:M.logo))&&p(i,"src",s),T&2&&r!==(r=n[4](n[9].provider)+"")&&se(a,r),T&2&&d!==(d=n[9].providerId+"")&&se(m,d)},d($){$&&k(e),y=!1,S()}}}function aO(n){let e;function t(l,o){var r;return l[2]?rO:(r=l[0])!=null&&r.id&&l[1].length?oO:lO}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&k(e)}}}function uO(n,e,t){const i=$t();let{record:s}=e,l=[],o=!1;function r(d){return ho.find(m=>m.key==d+"Auth")||{}}function a(d){var m;return((m=r(d))==null?void 0:m.title)||B.sentenize(d,!1)}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 ce.collection(s.collectionId).listExternalAuths(s.id))}catch(d){ce.error(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||pn(`Do you really want to unlink the ${a(d)} provider?`,()=>ce.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{zt(`Successfully unlinked the ${a(d)} provider.`),i("unlink",d),u()}).catch(m=>{ce.error(m)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class fO extends ge{constructor(e){super(),_e(this,e,uO,aO,me,{record:0})}}function gm(n,e,t){const i=n.slice();return i[66]=e[t],i[67]=e,i[68]=t,i}function bm(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=E(),l=v("div"),o=U(`The record has previous unsaved changes. + `),r=v("button"),r.textContent="Restore draft",a=E(),u=v("button"),u.innerHTML='',f=E(),c=v("div"),p(i,"class","icon"),p(r,"type","button"),p(r,"class","btn btn-sm btn-secondary"),p(l,"class","flex flex-gap-xs"),p(u,"type","button"),p(u,"class","close"),p(u,"aria-label","Discard draft"),p(t,"class","alert alert-info m-0"),p(c,"class","clearfix p-b-base"),p(e,"class","block")},m(b,y){w(b,e,y),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),g(l,r),g(t,a),g(t,u),g(e,f),g(e,c),m=!0,_||(h=[J(r,"click",n[36]),Me(He.call(null,u,"Discard draft")),J(u,"click",et(n[37]))],_=!0)},p:x,i(b){m||(d&&d.end(1),m=!0)},o(b){d=$a(e,ot,{duration:150}),m=!1},d(b){b&&k(e),b&&d&&d.end(),_=!1,Ee(h)}}}function vm(n){let e,t,i,s,l;return{c(){e=v("div"),t=v("i"),p(t,"class","ri-calendar-event-line txt-disabled"),p(e,"class","form-field-addon")},m(o,r){w(o,e,r),g(e,t),s||(l=Me(i=He.call(null,t,{text:`Created: ${n[3].created} +Updated: ${n[3].updated}`,position:"left"})),s=!0)},p(o,r){i&&jt(i.update)&&r[0]&8&&i.update.call(null,{text:`Created: ${o[3].created} +Updated: ${o[3].updated}`,position:"left"})},d(o){o&&k(e),s=!1,l()}}}function cO(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h=!n[6]&&vm(n);return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="id",l=E(),o=v("span"),a=E(),h&&h.c(),u=E(),f=v("input"),p(t,"class",ls(B.getFieldTypeIcon("primary"))+" svelte-qc5ngu"),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[69]),p(f,"type","text"),p(f,"id",c=n[69]),p(f,"placeholder","Leave empty to auto generate..."),p(f,"minlength","15"),f.readOnly=d=!n[6]},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),g(e,l),g(e,o),w(b,a,y),h&&h.m(b,y),w(b,u,y),w(b,f,y),re(f,n[3].id),m||(_=J(f,"input",n[38]),m=!0)},p(b,y){y[2]&128&&r!==(r=b[69])&&p(e,"for",r),b[6]?h&&(h.d(1),h=null):h?h.p(b,y):(h=vm(b),h.c(),h.m(u.parentNode,u)),y[2]&128&&c!==(c=b[69])&&p(f,"id",c),y[0]&64&&d!==(d=!b[6])&&(f.readOnly=d),y[0]&8&&f.value!==b[3].id&&re(f,b[3].id)},d(b){b&&k(e),b&&k(a),h&&h.d(b),b&&k(u),b&&k(f),m=!1,_()}}}function ym(n){var u,f;let e,t,i,s,l;function o(c){n[39](c)}let r={isNew:n[6],collection:n[0]};n[3]!==void 0&&(r.record=n[3]),e=new BM({props:r}),ee.push(()=>de(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&km();return{c(){H(e.$$.fragment),i=E(),a&&a.c(),s=ye()},m(c,d){V(e,c,d),w(c,i,d),a&&a.m(c,d),w(c,s,d),l=!0},p(c,d){var _,h;const m={};d[0]&64&&(m.isNew=c[6]),d[0]&1&&(m.collection=c[0]),!t&&d[0]&8&&(t=!0,m.record=c[3],he(()=>t=!1)),e.$set(m),(h=(_=c[0])==null?void 0:_.schema)!=null&&h.length?a||(a=km(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(A(e.$$.fragment,c),l=!0)},o(c){I(e.$$.fragment,c),l=!1},d(c){z(e,c),c&&k(i),a&&a.d(c),c&&k(s)}}}function km(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function dO(n){let e,t,i;function s(o){n[52](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new g6({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function pO(n){let e,t,i,s,l;function o(f){n[49](f,n[66])}function r(f){n[50](f,n[66])}function a(f){n[51](f,n[66])}let u={field:n[66],record:n[3]};return n[3][n[66].name]!==void 0&&(u.value=n[3][n[66].name]),n[4][n[66].name]!==void 0&&(u.uploadedFiles=n[4][n[66].name]),n[5][n[66].name]!==void 0&&(u.deletedFileNames=n[5][n[66].name]),e=new Q5({props:u}),ee.push(()=>de(e,"value",o)),ee.push(()=>de(e,"uploadedFiles",r)),ee.push(()=>de(e,"deletedFileNames",a)),{c(){H(e.$$.fragment)},m(f,c){V(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[66]),c[0]&8&&(d.record=n[3]),!t&&c[0]&9&&(t=!0,d.value=n[3][n[66].name],he(()=>t=!1)),!i&&c[0]&17&&(i=!0,d.uploadedFiles=n[4][n[66].name],he(()=>i=!1)),!s&&c[0]&33&&(s=!0,d.deletedFileNames=n[5][n[66].name],he(()=>s=!1)),e.$set(d)},i(f){l||(A(e.$$.fragment,f),l=!0)},o(f){I(e.$$.fragment,f),l=!1},d(f){z(e,f)}}}function mO(n){let e,t,i;function s(o){n[48](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new $5({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function hO(n){let e,t,i;function s(o){n[47](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new y5({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function _O(n){let e,t,i;function s(o){n[46](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new _5({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function gO(n){let e,t,i;function s(o){n[45](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new E6({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function bO(n){let e,t,i;function s(o){n[44](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new d5({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function vO(n){let e,t,i;function s(o){n[43](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new a5({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function yO(n){let e,t,i;function s(o){n[42](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new s5({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function kO(n){let e,t,i;function s(o){n[41](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new e5({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function wO(n){let e,t,i;function s(o){n[40](o,n[66])}let l={field:n[66]};return n[3][n[66].name]!==void 0&&(l.value=n[3][n[66].name]),e=new GM({props:l}),ee.push(()=>de(e,"value",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[66]),!t&&r[0]&9&&(t=!0,a.value=n[3][n[66].name],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function wm(n,e){let t,i,s,l,o;const r=[wO,kO,yO,vO,bO,gO,_O,hO,mO,pO,dO],a=[];function u(f,c){return f[66].type==="text"?0:f[66].type==="number"?1:f[66].type==="bool"?2:f[66].type==="email"?3:f[66].type==="url"?4:f[66].type==="editor"?5:f[66].type==="date"?6:f[66].type==="select"?7:f[66].type==="json"?8:f[66].type==="file"?9:f[66].type==="relation"?10:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=ye(),s&&s.c(),l=ye(),this.first=t},m(f,c){w(f,t,c),~i&&a[i].m(f,c),w(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(ae(),I(a[d],1,1,()=>{a[d]=null}),ue()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),A(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(A(s),o=!0)},o(f){I(s),o=!1},d(f){f&&k(t),~i&&a[i].d(f),f&&k(l)}}}function Sm(n){let e,t,i;return t=new fO({props:{record:n[3]}}),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","tab-item"),Q(e,"active",n[12]===wl)},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l[0]&8&&(o.record=s[3]),t.$set(o),(!i||l[0]&4096)&&Q(e,"active",s[12]===wl)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),z(t)}}}function SO(n){var S,C;let e,t,i,s,l,o,r=[],a=new Map,u,f,c,d,m=!n[7]&&n[9]&&bm(n);s=new pe({props:{class:"form-field "+(n[6]?"":"readonly"),name:"id",$$slots:{default:[cO,({uniqueId:$})=>({69:$}),({uniqueId:$})=>[0,0,$?128:0]]},$$scope:{ctx:n}}});let _=((S=n[0])==null?void 0:S.isAuth)&&ym(n),h=((C=n[0])==null?void 0:C.schema)||[];const b=$=>$[66].name;for(let $=0;${m=null}),ue());const M={};T[0]&64&&(M.class="form-field "+($[6]?"":"readonly")),T[0]&72|T[2]&384&&(M.$$scope={dirty:T,ctx:$}),s.$set(M),(O=$[0])!=null&&O.isAuth?_?(_.p($,T),T[0]&1&&A(_,1)):(_=ym($),_.c(),A(_,1),_.m(t,o)):_&&(ae(),I(_,1,1,()=>{_=null}),ue()),T[0]&57&&(h=((D=$[0])==null?void 0:D.schema)||[],ae(),r=bt(r,T,b,1,$,h,a,t,Bt,wm,null,gm),ue()),(!f||T[0]&4096)&&Q(t,"active",$[12]===ss),$[0].$isAuth&&!$[6]?y?(y.p($,T),T[0]&65&&A(y,1)):(y=Sm($),y.c(),A(y,1),y.m(e,null)):y&&(ae(),I(y,1,1,()=>{y=null}),ue())},i($){if(!f){A(m),A(s.$$.fragment,$),A(_);for(let T=0;T + Send verification email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[30]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Tm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Send password reset email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[31]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function $O(n){let e,t,i,s,l,o,r,a=n[0].$isAuth&&!n[2].verified&&n[2].email&&Cm(n),u=n[0].$isAuth&&n[2].email&&Tm(n);return{c(){a&&a.c(),e=E(),u&&u.c(),t=E(),i=v("button"),i.innerHTML=` Duplicate`,s=E(),l=v("button"),l.innerHTML=` - Delete`,p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item txt-danger closable")},m(f,c){a&&a.m(f,c),w(f,e,c),u&&u.m(f,c),w(f,t,c),w(f,i,c),w(f,s,c),w(f,l,c),o||(r=[K(i,"click",n[32]),K(l,"click",An(et(n[33])))],o=!0)},p(f,c){f[0].$isAuth&&!f[2].verified&&f[2].email?a?a.p(f,c):(a=Sm(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].$isAuth&&f[2].email?u?u.p(f,c):(u=$m(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&k(e),u&&u.d(f),f&&k(t),f&&k(i),f&&k(s),f&&k(l),o=!1,Ee(r)}}}function Cm(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=E(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),Q(t,"active",n[12]===ss),p(s,"type","button"),p(s,"class","tab-item"),Q(s,"active",n[12]===wl),p(e,"class","tabs-header stretched")},m(r,a){w(r,e,a),g(e,t),g(e,i),g(e,s),l||(o=[K(t,"click",n[34]),K(s,"click",n[35])],l=!0)},p(r,a){a[0]&4096&&Q(t,"active",r[12]===ss),a[0]&4096&&Q(s,"active",r[12]===wl)},d(r){r&&k(e),l=!1,Ee(o)}}}function CO(n){var h;let e,t=n[6]?"New":"Edit",i,s,l,o=((h=n[0])==null?void 0:h.name)+"",r,a,u,f,c,d,m=!n[6]&&wm(n),_=n[0].$isAuth&&!n[6]&&Cm(n);return{c(){e=v("h4"),i=U(t),s=E(),l=v("strong"),r=U(o),a=U(" record"),u=E(),m&&m.c(),f=E(),_&&_.c(),c=ye(),p(e,"class","panel-title svelte-qc5ngu")},m(b,y){w(b,e,y),g(e,i),g(e,s),g(e,l),g(l,r),g(e,a),w(b,u,y),m&&m.m(b,y),w(b,f,y),_&&_.m(b,y),w(b,c,y),d=!0},p(b,y){var S;(!d||y[0]&64)&&t!==(t=b[6]?"New":"Edit")&&se(i,t),(!d||y[0]&1)&&o!==(o=((S=b[0])==null?void 0:S.name)+"")&&se(r,o),b[6]?m&&(ae(),I(m,1,1,()=>{m=null}),ue()):m?(m.p(b,y),y[0]&64&&A(m,1)):(m=wm(b),m.c(),A(m,1),m.m(f.parentNode,f)),b[0].$isAuth&&!b[6]?_?_.p(b,y):(_=Cm(b),_.c(),_.m(c.parentNode,c)):_&&(_.d(1),_=null)},i(b){d||(A(m),d=!0)},o(b){I(m),d=!1},d(b){b&&k(e),b&&k(u),m&&m.d(b),b&&k(f),_&&_.d(b),b&&k(c)}}}function TO(n){let e,t,i,s,l,o=n[6]?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),r=U(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[10],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[15]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[13]||n[10],Q(s,"btn-loading",n[10])},m(c,d){w(c,e,d),g(e,t),w(c,i,d),w(c,s,d),g(s,l),g(l,r),u||(f=K(e,"click",n[29]),u=!0)},p(c,d){d[0]&1024&&(e.disabled=c[10]),d[0]&64&&o!==(o=c[6]?"Create":"Save changes")&&se(r,o),d[0]&9216&&a!==(a=!c[13]||c[10])&&(s.disabled=a),d[0]&1024&&Q(s,"btn-loading",c[10])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function MO(n){var s;let e,t,i={class:` + Delete`,p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item txt-danger closable")},m(f,c){a&&a.m(f,c),w(f,e,c),u&&u.m(f,c),w(f,t,c),w(f,i,c),w(f,s,c),w(f,l,c),o||(r=[J(i,"click",n[32]),J(l,"click",An(et(n[33])))],o=!0)},p(f,c){f[0].$isAuth&&!f[2].verified&&f[2].email?a?a.p(f,c):(a=Cm(f),a.c(),a.m(e.parentNode,e)):a&&(a.d(1),a=null),f[0].$isAuth&&f[2].email?u?u.p(f,c):(u=Tm(f),u.c(),u.m(t.parentNode,t)):u&&(u.d(1),u=null)},d(f){a&&a.d(f),f&&k(e),u&&u.d(f),f&&k(t),f&&k(i),f&&k(s),f&&k(l),o=!1,Ee(r)}}}function Mm(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=E(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),Q(t,"active",n[12]===ss),p(s,"type","button"),p(s,"class","tab-item"),Q(s,"active",n[12]===wl),p(e,"class","tabs-header stretched")},m(r,a){w(r,e,a),g(e,t),g(e,i),g(e,s),l||(o=[J(t,"click",n[34]),J(s,"click",n[35])],l=!0)},p(r,a){a[0]&4096&&Q(t,"active",r[12]===ss),a[0]&4096&&Q(s,"active",r[12]===wl)},d(r){r&&k(e),l=!1,Ee(o)}}}function CO(n){var h;let e,t=n[6]?"New":"Edit",i,s,l,o=((h=n[0])==null?void 0:h.name)+"",r,a,u,f,c,d,m=!n[6]&&$m(n),_=n[0].$isAuth&&!n[6]&&Mm(n);return{c(){e=v("h4"),i=U(t),s=E(),l=v("strong"),r=U(o),a=U(" record"),u=E(),m&&m.c(),f=E(),_&&_.c(),c=ye(),p(e,"class","panel-title svelte-qc5ngu")},m(b,y){w(b,e,y),g(e,i),g(e,s),g(e,l),g(l,r),g(e,a),w(b,u,y),m&&m.m(b,y),w(b,f,y),_&&_.m(b,y),w(b,c,y),d=!0},p(b,y){var S;(!d||y[0]&64)&&t!==(t=b[6]?"New":"Edit")&&se(i,t),(!d||y[0]&1)&&o!==(o=((S=b[0])==null?void 0:S.name)+"")&&se(r,o),b[6]?m&&(ae(),I(m,1,1,()=>{m=null}),ue()):m?(m.p(b,y),y[0]&64&&A(m,1)):(m=$m(b),m.c(),A(m,1),m.m(f.parentNode,f)),b[0].$isAuth&&!b[6]?_?_.p(b,y):(_=Mm(b),_.c(),_.m(c.parentNode,c)):_&&(_.d(1),_=null)},i(b){d||(A(m),d=!0)},o(b){I(m),d=!1},d(b){b&&k(e),b&&k(u),m&&m.d(b),b&&k(f),_&&_.d(b),b&&k(c)}}}function TO(n){let e,t,i,s,l,o=n[6]?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),r=U(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[10],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[15]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[13]||n[10],Q(s,"btn-loading",n[10])},m(c,d){w(c,e,d),g(e,t),w(c,i,d),w(c,s,d),g(s,l),g(l,r),u||(f=J(e,"click",n[29]),u=!0)},p(c,d){d[0]&1024&&(e.disabled=c[10]),d[0]&64&&o!==(o=c[6]?"Create":"Save changes")&&se(r,o),d[0]&9216&&a!==(a=!c[13]||c[10])&&(s.disabled=a),d[0]&1024&&Q(s,"btn-loading",c[10])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function MO(n){var s;let e,t,i={class:` record-panel `+(n[14]?"overlay-panel-xl":"overlay-panel-lg")+` `+((s=n[0])!=null&&s.$isAuth&&!n[6]?"colored-header":"")+` - `,beforeHide:n[53],$$slots:{footer:[TO],header:[CO],default:[SO]},$$scope:{ctx:n}};return e=new ln({props:i}),n[54](e),e.$on("hide",n[55]),e.$on("show",n[56]),{c(){z(e.$$.fragment)},m(l,o){j(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&16449&&(r.class=` + `,beforeHide:n[53],$$slots:{footer:[TO],header:[CO],default:[SO]},$$scope:{ctx:n}};return e=new ln({props:i}),n[54](e),e.$on("hide",n[55]),e.$on("show",n[56]),{c(){H(e.$$.fragment)},m(l,o){V(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&16449&&(r.class=` record-panel `+(l[14]?"overlay-panel-xl":"overlay-panel-lg")+` `+((a=l[0])!=null&&a.$isAuth&&!l[6]?"colored-header":"")+` - `),o[0]&2176&&(r.beforeHide=l[53]),o[0]&14077|o[2]&256&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){n[54](null),V(e,l)}}}const ss="form",wl="providers";function OO(n,e,t){let i,s,l,o;const r=$t(),a="record_"+B.randomString(5);let{collection:u}=e,f,c=null,d=null,m=null,_=!1,h=!1,b={},y={},S=JSON.stringify(null),C=S,$=ss,T=!0,M=!1;function O(ve){return L(ve),t(11,h=!0),t(12,$=ss),f==null?void 0:f.show()}function D(){return f==null?void 0:f.hide()}async function L(ve){t(27,M=!1),en({}),t(2,c=ve||new yi),t(3,d=c.$clone()),t(4,b={}),t(5,y={}),await fn(),t(9,m=F()),!m||H(d,m)?t(9,m=null):(delete m.password,delete m.passwordConfirm),t(25,S=JSON.stringify(d)),t(27,M=!0)}async function P(ve){var Fe,Xe;en({}),t(2,c=ve||new yi),t(4,b={}),t(5,y={});const De=((Xe=(Fe=u==null?void 0:u.schema)==null?void 0:Fe.filter(Ot=>Ot.type!="file"))==null?void 0:Xe.map(Ot=>Ot.name))||[];for(let Ot in ve.$export())De.includes(Ot)||t(3,d[Ot]=ve[Ot],d);await fn(),t(25,S=JSON.stringify(d)),W()}function N(){return"record_draft_"+((u==null?void 0:u.id)||"")+"_"+((c==null?void 0:c.id)||"")}function F(ve){try{const De=window.localStorage.getItem(N());if(De)return new yi(JSON.parse(De))}catch{}return ve}function R(ve){window.localStorage.setItem(N(),ve)}function q(){m&&(t(3,d=m),t(9,m=null))}function H(ve,De){var $n;const Fe=ve==null?void 0:ve.$clone(),Xe=De==null?void 0:De.$clone(),Ot=($n=u==null?void 0:u.schema)==null?void 0:$n.filter(Nn=>Nn.type==="file");for(let Nn of Ot)Fe==null||delete Fe[Nn.name],Xe==null||delete Xe[Nn.name];return Fe==null||delete Fe.password,Fe==null||delete Fe.passwordConfirm,Xe==null||delete Xe.password,Xe==null||delete Xe.passwordConfirm,JSON.stringify(Fe)==JSON.stringify(Xe)}function W(){t(9,m=null),window.localStorage.removeItem(N())}function X(ve=!0){if(_||!o||!(u!=null&&u.id))return;t(10,_=!0);const De=Z();let Fe;T?Fe=ce.collection(u.id).create(De):Fe=ce.collection(u.id).update(d.id,De),Fe.then(Xe=>{zt(T?"Successfully created record.":"Successfully updated record."),W(),ve?(t(11,h=!1),D()):P(Xe),r("save",Xe)}).catch(Xe=>{ce.error(Xe)}).finally(()=>{t(10,_=!1)})}function J(){c!=null&&c.id&&pn("Do you really want to delete the selected record?",()=>ce.collection(c.collectionId).delete(c.id).then(()=>{D(),zt("Successfully deleted record."),r("delete",c)}).catch(ve=>{ce.error(ve)}))}function Z(){const ve=(d==null?void 0:d.$export())||{},De=new FormData,Fe={id:ve.id};for(const Xe of(u==null?void 0:u.schema)||[])Fe[Xe.name]=!0;u!=null&&u.isAuth&&(Fe.username=!0,Fe.email=!0,Fe.emailVisibility=!0,Fe.password=!0,Fe.passwordConfirm=!0,Fe.verified=!0);for(const Xe in ve)Fe[Xe]&&(typeof ve[Xe]>"u"&&(ve[Xe]=null),B.addValueToFormData(De,Xe,ve[Xe]));for(const Xe in b){const Ot=B.toArray(b[Xe]);for(const $n of Ot)De.append(Xe,$n)}for(const Xe in y){const Ot=B.toArray(y[Xe]);for(const $n of Ot)De.append(Xe+"."+$n,"")}return De}function le(){!(u!=null&&u.id)||!(c!=null&&c.email)||pn(`Do you really want to sent verification email to ${c.email}?`,()=>ce.collection(u.id).requestVerification(c.email).then(()=>{zt(`Successfully sent verification email to ${c.email}.`)}).catch(ve=>{ce.error(ve)}))}function ne(){!(u!=null&&u.id)||!(c!=null&&c.email)||pn(`Do you really want to sent password reset email to ${c.email}?`,()=>ce.collection(u.id).requestPasswordReset(c.email).then(()=>{zt(`Successfully sent password reset email to ${c.email}.`)}).catch(ve=>{ce.error(ve)}))}function ie(){l?pn("You have unsaved changes. Do you really want to discard them?",()=>{be()}):be()}async function be(){const ve=c==null?void 0:c.$clone();if(ve){ve.id="",ve.created="",ve.updated="";const De=(u==null?void 0:u.schema)||[];for(const Fe of De)Fe.type==="file"&&delete ve[Fe.name]}W(),O(ve),await fn(),t(25,S="")}function Se(ve){(ve.ctrlKey||ve.metaKey)&&ve.code=="KeyS"&&(ve.preventDefault(),ve.stopPropagation(),X(!1))}const Ve=()=>D(),Be=()=>le(),ke=()=>ne(),Te=()=>ie(),Ze=()=>J(),ht=()=>t(12,$=ss),Ge=()=>t(12,$=wl),Ye=()=>q(),we=()=>W();function fe(){d.id=this.value,t(3,d)}function ze(ve){d=ve,t(3,d)}function Dt(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function Le(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function $e(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function nt(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function At(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function jt(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function Ut(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function Ln(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function ei(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function Sn(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function _t(ve,De){n.$$.not_equal(b[De.name],ve)&&(b[De.name]=ve,t(4,b))}function Pn(ve,De){n.$$.not_equal(y[De.name],ve)&&(y[De.name]=ve,t(5,y))}function ds(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}const ti=()=>l&&h?(pn("You have unsaved changes. Do you really want to close the panel?",()=>{t(11,h=!1),D()}),!1):(en({}),W(),!0);function Ti(ve){ee[ve?"unshift":"push"](()=>{f=ve,t(8,f)})}function ps(ve){Ne.call(this,n,ve)}function pi(ve){Ne.call(this,n,ve)}return n.$$set=ve=>{"collection"in ve&&t(0,u=ve.collection)},n.$$.update=()=>{var ve;n.$$.dirty[0]&1&&t(14,i=!!((ve=u==null?void 0:u.schema)!=null&&ve.find(De=>De.type==="editor"))),n.$$.dirty[0]&48&&t(28,s=B.hasNonEmptyProps(b)||B.hasNonEmptyProps(y)),n.$$.dirty[0]&8&&t(26,C=JSON.stringify(d)),n.$$.dirty[0]&369098752&&t(7,l=s||S!=C),n.$$.dirty[0]&4&&t(6,T=!c||c.$isNew),n.$$.dirty[0]&192&&t(13,o=T||l),n.$$.dirty[0]&201326592&&M&&R(C)},[u,D,c,d,b,y,T,l,f,m,_,h,$,o,i,a,q,W,X,J,le,ne,ie,Se,O,S,C,M,s,Ve,Be,ke,Te,Ze,ht,Ge,Ye,we,fe,ze,Dt,Le,$e,nt,At,jt,Ut,Ln,ei,Sn,_t,Pn,ds,ti,Ti,ps,pi]}class $1 extends ge{constructor(e){super(),_e(this,e,OO,MO,me,{collection:0,show:24,hide:1},null,[-1,-1,-1])}get show(){return this.$$.ctx[24]}get hide(){return this.$$.ctx[1]}}function EO(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0])},m(o,r){w(o,e,r),s||(l=[Me(i=He.call(null,e,n[2]?"":"Copy")),K(e,"click",An(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&qt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:x,o:x,d(o){o&&k(e),s=!1,Ee(l)}}}function DO(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(B.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return Gt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class Fl extends ge{constructor(e){super(),_e(this,e,DO,EO,me,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function Tm(n,e,t){const i=n.slice();return i[18]=e[t],i[8]=t,i}function Mm(n,e,t){const i=n.slice();return i[13]=e[t],i}function Om(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function Em(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function AO(n){const e=n.slice(),t=B.toArray(e[3]);e[16]=t;const i=e[2]?10:500;return e[17]=i,e}function IO(n){const e=n.slice(),t=B.toArray(e[3]);e[9]=t;const i=B.toArray(e[0].expand[e[1].name]);e[10]=i;const s=e[2]?20:500;return e[11]=s,e}function LO(n){const e=n.slice(),t=B.trimQuotedValue(JSON.stringify(e[3]))||'""';return e[5]=t,e}function PO(n){let e,t;return{c(){e=v("div"),t=U(n[3]),p(e,"class","block txt-break fallback-block svelte-jdf51v")},m(i,s){w(i,e,s),g(e,t)},p(i,s){s&8&&se(t,i[3])},i:x,o:x,d(i){i&&k(e)}}}function NO(n){let e,t=B.truncate(n[3])+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=B.truncate(n[3]))},m(l,o){w(l,e,o),g(e,i)},p(l,o){o&8&&t!==(t=B.truncate(l[3])+"")&&se(i,t),o&8&&s!==(s=B.truncate(l[3]))&&p(e,"title",s)},i:x,o:x,d(l){l&&k(e)}}}function FO(n){let e,t=[],i=new Map,s,l,o=n[16].slice(0,n[17]);const r=u=>u[8]+u[18];for(let u=0;un[17]&&Am();return{c(){e=v("div");for(let u=0;uu[17]?a||(a=Am(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(u){if(!l){for(let f=0;fn[11]&&Pm();return{c(){e=v("div"),i.c(),s=E(),u&&u.c(),p(e,"class","inline-flex")},m(f,c){w(f,e,c),r[t].m(e,null),g(e,s),u&&u.m(e,null),l=!0},p(f,c){let d=t;t=a(f),t===d?r[t].p(f,c):(ae(),I(r[d],1,1,()=>{r[d]=null}),ue(),i=r[t],i?i.p(f,c):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[9].length>f[11]?u||(u=Pm(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){I(i),l=!1},d(f){f&&k(e),r[t].d(),u&&u.d()}}}function qO(n){let e,t=[],i=new Map,s=B.toArray(n[3]);const l=o=>o[8]+o[6];for(let o=0;o{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function zO(n){let e,t=B.truncate(n[3])+"",i,s,l;return{c(){e=v("a"),i=U(t),p(e,"class","txt-ellipsis"),p(e,"href",n[3]),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(o,r){w(o,e,r),g(e,i),s||(l=[Me(He.call(null,e,"Open in new tab")),K(e,"click",An(n[4]))],s=!0)},p(o,r){r&8&&t!==(t=B.truncate(o[3])+"")&&se(i,t),r&8&&p(e,"href",o[3])},i:x,o:x,d(o){o&&k(e),s=!1,Ee(l)}}}function HO(n){let e,t;return{c(){e=v("span"),t=U(n[3]),p(e,"class","txt")},m(i,s){w(i,e,s),g(e,t)},p(i,s){s&8&&se(t,i[3])},i:x,o:x,d(i){i&&k(e)}}}function BO(n){let e,t=n[3]?"True":"False",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt")},m(s,l){w(s,e,l),g(e,i)},p(s,l){l&8&&t!==(t=s[3]?"True":"False")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function UO(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function WO(n){let e,t,i,s;const l=[XO,GO],o=[];function r(a,u){return a[2]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function Dm(n,e){let t,i,s;return i=new du({props:{record:e[0],filename:e[18],size:"sm"}}),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o&1&&(r.record=e[0]),o&12&&(r.filename=e[18]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&k(t),V(i,l)}}}function Am(n){let e;return{c(){e=U("...")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function YO(n){let e,t=n[9].slice(0,n[11]),i=[];for(let s=0;sr[8]+r[6];for(let r=0;r500&&Fm(n);return{c(){e=v("span"),i=U(t),s=E(),r&&r.c(),l=ye(),p(e,"class","txt")},m(a,u){w(a,e,u),g(e,i),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){(!o||u&8)&&t!==(t=B.truncate(a[5],500,!0)+"")&&se(i,t),a[5].length>500?r?(r.p(a,u),u&8&&A(r,1)):(r=Fm(a),r.c(),A(r,1),r.m(l.parentNode,l)):r&&(ae(),I(r,1,1,()=>{r=null}),ue())},i(a){o||(A(r),o=!0)},o(a){I(r),o=!1},d(a){a&&k(e),a&&k(s),r&&r.d(a),a&&k(l)}}}function XO(n){let e,t=B.truncate(n[5])+"",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis")},m(s,l){w(s,e,l),g(e,i)},p(s,l){l&8&&t!==(t=B.truncate(s[5])+"")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function Fm(n){let e,t;return e=new Fl({props:{value:JSON.stringify(n[3],null,2)}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.value=JSON.stringify(i[3],null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function QO(n){let e,t,i,s,l;const o=[WO,UO,BO,HO,zO,VO,jO,qO,RO,FO,NO,PO],r=[];function a(f,c){return c&8&&(e=null),f[1].type==="json"?0:(e==null&&(e=!!B.isEmpty(f[3])),e?1:f[1].type==="bool"?2:f[1].type==="number"?3:f[1].type==="url"?4:f[1].type==="editor"?5:f[1].type==="date"?6:f[1].type==="select"?7:f[1].type==="relation"?8:f[1].type==="file"?9:f[2]?10:11)}function u(f,c){return c===0?LO(f):c===8?IO(f):c===9?AO(f):f}return t=a(n,-1),i=r[t]=o[t](u(n,t)),{c(){i.c(),s=ye()},m(f,c){r[t].m(f,c),w(f,s,c),l=!0},p(f,[c]){let d=t;t=a(f,c),t===d?r[t].p(u(f,t),c):(ae(),I(r[d],1,1,()=>{r[d]=null}),ue(),i=r[t],i?i.p(u(f,t),c):(i=r[t]=o[t](u(f,t)),i.c()),A(i,1),i.m(s.parentNode,s))},i(f){l||(A(i),l=!0)},o(f){I(i),l=!1},d(f){r[t].d(f),f&&k(s)}}}function xO(n,e,t){let i,{record:s}=e,{field:l}=e,{short:o=!1}=e;function r(a){Ne.call(this,n,a)}return n.$$set=a=>{"record"in a&&t(0,s=a.record),"field"in a&&t(1,l=a.field),"short"in a&&t(2,o=a.short)},n.$$.update=()=>{n.$$.dirty&3&&t(3,i=s[l.name])},[s,l,o,i,r]}class C1 extends ge{constructor(e){super(),_e(this,e,xO,QO,me,{record:0,field:1,short:2})}}function Rm(n,e,t){const i=n.slice();return i[10]=e[t],i}function qm(n){let e,t,i=n[10].name+"",s,l,o,r,a;return r=new C1({props:{field:n[10],record:n[3]}}),{c(){e=v("tr"),t=v("td"),s=U(i),l=E(),o=v("td"),z(r.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(o,"class","col-field svelte-1nt58f7")},m(u,f){w(u,e,f),g(e,t),g(t,s),g(e,l),g(e,o),j(r,o,null),a=!0},p(u,f){(!a||f&1)&&i!==(i=u[10].name+"")&&se(s,i);const c={};f&1&&(c.field=u[10]),f&8&&(c.record=u[3]),r.$set(c)},i(u){a||(A(r.$$.fragment,u),a=!0)},o(u){I(r.$$.fragment,u),a=!1},d(u){u&&k(e),V(r)}}}function jm(n){let e,t,i,s,l,o;return l=new wi({props:{date:n[3].created}}),{c(){e=v("tr"),t=v("td"),t.textContent="created",i=E(),s=v("td"),z(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(s,"class","col-field svelte-1nt58f7")},m(r,a){w(r,e,a),g(e,t),g(e,i),g(e,s),j(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].created),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){I(l.$$.fragment,r),o=!1},d(r){r&&k(e),V(l)}}}function Vm(n){let e,t,i,s,l,o;return l=new wi({props:{date:n[3].updated}}),{c(){e=v("tr"),t=v("td"),t.textContent="updated",i=E(),s=v("td"),z(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(s,"class","col-field svelte-1nt58f7")},m(r,a){w(r,e,a),g(e,t),g(e,i),g(e,s),j(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].updated),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){I(l.$$.fragment,r),o=!1},d(r){r&&k(e),V(l)}}}function eE(n){var M;let e,t,i,s,l,o,r,a,u,f,c=n[3].id+"",d,m,_,h,b;a=new Fl({props:{value:n[3].id}});let y=(M=n[0])==null?void 0:M.schema,S=[];for(let O=0;OI(S[O],1,1,()=>{S[O]=null});let $=n[3].created&&jm(n),T=n[3].updated&&Vm(n);return{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="id",l=E(),o=v("td"),r=v("div"),z(a.$$.fragment),u=E(),f=v("span"),d=U(c),m=E();for(let O=0;O{$=null}),ue()),O[3].updated?T?(T.p(O,D),D&8&&A(T,1)):(T=Vm(O),T.c(),A(T,1),T.m(t,null)):T&&(ae(),I(T,1,1,()=>{T=null}),ue())},i(O){if(!b){A(a.$$.fragment,O);for(let D=0;DClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[6]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function iE(n){let e,t,i={class:"record-preview-panel "+(n[4]?"overlay-panel-xl":"overlay-panel-lg"),$$slots:{footer:[nE],header:[tE],default:[eE]},$$scope:{ctx:n}};return e=new ln({props:i}),n[7](e),e.$on("hide",n[8]),e.$on("show",n[9]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="record-preview-panel "+(s[4]?"overlay-panel-xl":"overlay-panel-lg")),l&8201&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[7](null),V(e,s)}}}function sE(n,e,t){let i,{collection:s}=e,l,o=new yi;function r(m){return t(3,o=m),l==null?void 0:l.show()}function a(){return l==null?void 0:l.hide()}const u=()=>a();function f(m){ee[m?"unshift":"push"](()=>{l=m,t(2,l)})}function c(m){Ne.call(this,n,m)}function d(m){Ne.call(this,n,m)}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{var m;n.$$.dirty&1&&t(4,i=!!((m=s==null?void 0:s.schema)!=null&&m.find(_=>_.type==="editor")))},[s,a,l,o,i,r,u,f,c,d]}class lE extends ge{constructor(e){super(),_e(this,e,sE,iE,me,{collection:0,show:5,hide:1})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[1]}}function zm(n,e,t){const i=n.slice();return i[55]=e[t],i}function Hm(n,e,t){const i=n.slice();return i[58]=e[t],i}function Bm(n,e,t){const i=n.slice();return i[58]=e[t],i}function Um(n,e,t){const i=n.slice();return i[51]=e[t],i}function Wm(n){let e;function t(l,o){return l[12]?rE:oE}let i=t(n),s=i(n);return{c(){e=v("th"),s.c(),p(e,"class","bulk-select-col min-width")},m(l,o){w(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&k(e),s.d()}}}function oE(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=E(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[16],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){w(a,e,u),g(e,t),g(e,s),g(e,l),o||(r=K(t,"change",n[28]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&65536&&(t.checked=a[16])},d(a){a&&k(e),o=!1,r()}}}function rE(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Ym(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[aE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function aE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function Km(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Jm(n),r=i&&Zm(n);return{c(){o&&o.c(),t=E(),r&&r.c(),s=ye()},m(a,u){o&&o.m(a,u),w(a,t,u),r&&r.m(a,u),w(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&A(o,1)):(o=Jm(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(ae(),I(o,1,1,()=>{o=null}),ue()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&A(r,1)):(r=Zm(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(ae(),I(r,1,1,()=>{r=null}),ue())},i(a){l||(A(o),A(r),l=!0)},o(a){I(o),I(r),l=!1},d(a){o&&o.d(a),a&&k(t),r&&r.d(a),a&&k(s)}}}function Jm(n){let e,t,i;function s(o){n[30](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[uE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function uE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="username",p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function Zm(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[fE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function fE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function cE(n){let e,t,i,s,l,o=n[58].name+"",r;return{c(){e=v("div"),t=v("i"),s=E(),l=v("span"),r=U(o),p(t,"class",i=B.getFieldTypeIcon(n[58].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){w(a,e,u),g(e,t),g(e,s),g(e,l),g(l,r)},p(a,u){u[0]&262144&&i!==(i=B.getFieldTypeIcon(a[58].type))&&p(t,"class",i),u[0]&262144&&o!==(o=a[58].name+"")&&se(r,o)},d(a){a&&k(e)}}}function Gm(n,e){let t,i,s,l;function o(a){e[32](a)}let r={class:"col-type-"+e[58].type+" col-field-"+e[58].name,name:e[58].name,$$slots:{default:[cE]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new an({props:r}),ee.push(()=>de(i,"sort",o)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),j(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&262144&&(f.class="col-type-"+e[58].type+" col-field-"+e[58].name),u[0]&262144&&(f.name=e[58].name),u[0]&262144|u[2]&2&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),V(i,a)}}}function Xm(n){let e,t,i;function s(o){n[33](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[dE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function dE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function Qm(n){let e,t,i;function s(o){n[34](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[pE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){z(e.$$.fragment)},m(o,r){j(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){V(e,o)}}}function pE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function xm(n){let e;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Toggle columns"),p(e,"class","btn btn-sm btn-transparent p-0")},m(t,i){w(t,e,i),n[35](e)},p:x,d(t){t&&k(e),n[35](null)}}}function eh(n){let e;function t(l,o){return l[12]?hE:mE}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function mE(n){let e,t,i,s,l;function o(u,f){var c,d;if((c=u[1])!=null&&c.length)return gE;if(!((d=u[2])!=null&&d.$isView))return _E}let r=o(n),a=r&&r(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=E(),a&&a.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(u,f){w(u,e,f),g(e,t),g(t,i),g(t,s),a&&a.m(t,null),g(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a&&a.d(1),a=r&&r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&k(e),a&&a.d()}}}function hE(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `),o[0]&2176&&(r.beforeHide=l[53]),o[0]&14077|o[2]&256&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(A(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){n[54](null),z(e,l)}}}const ss="form",wl="providers";function OO(n,e,t){let i,s,l,o;const r=$t(),a="record_"+B.randomString(5);let{collection:u}=e,f,c=null,d=null,m=null,_=!1,h=!1,b={},y={},S=JSON.stringify(null),C=S,$=ss,T=!0,M=!1;function O(ve){return L(ve),t(11,h=!0),t(12,$=ss),f==null?void 0:f.show()}function D(){return f==null?void 0:f.hide()}async function L(ve){t(27,M=!1),en({}),t(2,c=ve||new yi),t(3,d=c.$clone()),t(4,b={}),t(5,y={}),await fn(),t(9,m=F()),!m||j(d,m)?t(9,m=null):(delete m.password,delete m.passwordConfirm),t(25,S=JSON.stringify(d)),t(27,M=!0)}async function P(ve){var Fe,Xe;en({}),t(2,c=ve||new yi),t(4,b={}),t(5,y={});const De=((Xe=(Fe=u==null?void 0:u.schema)==null?void 0:Fe.filter(Ot=>Ot.type!="file"))==null?void 0:Xe.map(Ot=>Ot.name))||[];for(let Ot in ve.$export())De.includes(Ot)||t(3,d[Ot]=ve[Ot],d);await fn(),t(25,S=JSON.stringify(d)),W()}function N(){return"record_draft_"+((u==null?void 0:u.id)||"")+"_"+((c==null?void 0:c.id)||"")}function F(ve){try{const De=window.localStorage.getItem(N());if(De)return new yi(JSON.parse(De))}catch{}return ve}function R(ve){window.localStorage.setItem(N(),ve)}function q(){m&&(t(3,d=m),t(9,m=null))}function j(ve,De){var $n;const Fe=ve==null?void 0:ve.$clone(),Xe=De==null?void 0:De.$clone(),Ot=($n=u==null?void 0:u.schema)==null?void 0:$n.filter(Nn=>Nn.type==="file");for(let Nn of Ot)Fe==null||delete Fe[Nn.name],Xe==null||delete Xe[Nn.name];return Fe==null||delete Fe.password,Fe==null||delete Fe.passwordConfirm,Xe==null||delete Xe.password,Xe==null||delete Xe.passwordConfirm,JSON.stringify(Fe)==JSON.stringify(Xe)}function W(){t(9,m=null),window.localStorage.removeItem(N())}function X(ve=!0){if(_||!o||!(u!=null&&u.id))return;t(10,_=!0);const De=Z();let Fe;T?Fe=ce.collection(u.id).create(De):Fe=ce.collection(u.id).update(d.id,De),Fe.then(Xe=>{zt(T?"Successfully created record.":"Successfully updated record."),W(),ve?(t(11,h=!1),D()):P(Xe),r("save",Xe)}).catch(Xe=>{ce.error(Xe)}).finally(()=>{t(10,_=!1)})}function K(){c!=null&&c.id&&pn("Do you really want to delete the selected record?",()=>ce.collection(c.collectionId).delete(c.id).then(()=>{D(),zt("Successfully deleted record."),r("delete",c)}).catch(ve=>{ce.error(ve)}))}function Z(){const ve=(d==null?void 0:d.$export())||{},De=new FormData,Fe={id:ve.id};for(const Xe of(u==null?void 0:u.schema)||[])Fe[Xe.name]=!0;u!=null&&u.isAuth&&(Fe.username=!0,Fe.email=!0,Fe.emailVisibility=!0,Fe.password=!0,Fe.passwordConfirm=!0,Fe.verified=!0);for(const Xe in ve)Fe[Xe]&&(typeof ve[Xe]>"u"&&(ve[Xe]=null),B.addValueToFormData(De,Xe,ve[Xe]));for(const Xe in b){const Ot=B.toArray(b[Xe]);for(const $n of Ot)De.append(Xe,$n)}for(const Xe in y){const Ot=B.toArray(y[Xe]);for(const $n of Ot)De.append(Xe+"."+$n,"")}return De}function le(){!(u!=null&&u.id)||!(c!=null&&c.email)||pn(`Do you really want to sent verification email to ${c.email}?`,()=>ce.collection(u.id).requestVerification(c.email).then(()=>{zt(`Successfully sent verification email to ${c.email}.`)}).catch(ve=>{ce.error(ve)}))}function ne(){!(u!=null&&u.id)||!(c!=null&&c.email)||pn(`Do you really want to sent password reset email to ${c.email}?`,()=>ce.collection(u.id).requestPasswordReset(c.email).then(()=>{zt(`Successfully sent password reset email to ${c.email}.`)}).catch(ve=>{ce.error(ve)}))}function ie(){l?pn("You have unsaved changes. Do you really want to discard them?",()=>{be()}):be()}async function be(){const ve=c==null?void 0:c.$clone();if(ve){ve.id="",ve.created="",ve.updated="";const De=(u==null?void 0:u.schema)||[];for(const Fe of De)Fe.type==="file"&&delete ve[Fe.name]}W(),O(ve),await fn(),t(25,S="")}function Se(ve){(ve.ctrlKey||ve.metaKey)&&ve.code=="KeyS"&&(ve.preventDefault(),ve.stopPropagation(),X(!1))}const Ve=()=>D(),Be=()=>le(),ke=()=>ne(),Te=()=>ie(),Ze=()=>K(),ht=()=>t(12,$=ss),Ge=()=>t(12,$=wl),Ye=()=>q(),we=()=>W();function fe(){d.id=this.value,t(3,d)}function ze(ve){d=ve,t(3,d)}function Dt(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function Le(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function $e(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function nt(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function At(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function It(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function Ut(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function Ln(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function ei(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function Sn(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}function _t(ve,De){n.$$.not_equal(b[De.name],ve)&&(b[De.name]=ve,t(4,b))}function Pn(ve,De){n.$$.not_equal(y[De.name],ve)&&(y[De.name]=ve,t(5,y))}function ds(ve,De){n.$$.not_equal(d[De.name],ve)&&(d[De.name]=ve,t(3,d))}const ti=()=>l&&h?(pn("You have unsaved changes. Do you really want to close the panel?",()=>{t(11,h=!1),D()}),!1):(en({}),W(),!0);function Ti(ve){ee[ve?"unshift":"push"](()=>{f=ve,t(8,f)})}function ps(ve){Ne.call(this,n,ve)}function pi(ve){Ne.call(this,n,ve)}return n.$$set=ve=>{"collection"in ve&&t(0,u=ve.collection)},n.$$.update=()=>{var ve;n.$$.dirty[0]&1&&t(14,i=!!((ve=u==null?void 0:u.schema)!=null&&ve.find(De=>De.type==="editor"))),n.$$.dirty[0]&48&&t(28,s=B.hasNonEmptyProps(b)||B.hasNonEmptyProps(y)),n.$$.dirty[0]&8&&t(26,C=JSON.stringify(d)),n.$$.dirty[0]&369098752&&t(7,l=s||S!=C),n.$$.dirty[0]&4&&t(6,T=!c||c.$isNew),n.$$.dirty[0]&192&&t(13,o=T||l),n.$$.dirty[0]&201326592&&M&&R(C)},[u,D,c,d,b,y,T,l,f,m,_,h,$,o,i,a,q,W,X,K,le,ne,ie,Se,O,S,C,M,s,Ve,Be,ke,Te,Ze,ht,Ge,Ye,we,fe,ze,Dt,Le,$e,nt,At,It,Ut,Ln,ei,Sn,_t,Pn,ds,ti,Ti,ps,pi]}class T1 extends ge{constructor(e){super(),_e(this,e,OO,MO,me,{collection:0,show:24,hide:1},null,[-1,-1,-1])}get show(){return this.$$.ctx[24]}get hide(){return this.$$.ctx[1]}}function EO(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class",t=n[2]?n[1]:n[0])},m(o,r){w(o,e,r),s||(l=[Me(i=He.call(null,e,n[2]?"":"Copy")),J(e,"click",An(n[3]))],s=!0)},p(o,[r]){r&7&&t!==(t=o[2]?o[1]:o[0])&&p(e,"class",t),i&&jt(i.update)&&r&4&&i.update.call(null,o[2]?"":"Copy")},i:x,o:x,d(o){o&&k(e),s=!1,Ee(l)}}}function DO(n,e,t){let{value:i=""}=e,{idleClasses:s="ri-file-copy-line txt-sm link-hint"}=e,{successClasses:l="ri-check-line txt-sm txt-success"}=e,{successDuration:o=500}=e,r;function a(){i&&(B.copyToClipboard(i),clearTimeout(r),t(2,r=setTimeout(()=>{clearTimeout(r),t(2,r=null)},o)))}return Gt(()=>()=>{r&&clearTimeout(r)}),n.$$set=u=>{"value"in u&&t(4,i=u.value),"idleClasses"in u&&t(0,s=u.idleClasses),"successClasses"in u&&t(1,l=u.successClasses),"successDuration"in u&&t(5,o=u.successDuration)},[s,l,r,a,i,o]}class Fl extends ge{constructor(e){super(),_e(this,e,DO,EO,me,{value:4,idleClasses:0,successClasses:1,successDuration:5})}}function Om(n,e,t){const i=n.slice();return i[18]=e[t],i[8]=t,i}function Em(n,e,t){const i=n.slice();return i[13]=e[t],i}function Dm(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function Am(n,e,t){const i=n.slice();return i[6]=e[t],i[8]=t,i}function AO(n){const e=n.slice(),t=B.toArray(e[3]);e[16]=t;const i=e[2]?10:500;return e[17]=i,e}function IO(n){const e=n.slice(),t=B.toArray(e[3]);e[9]=t;const i=B.toArray(e[0].expand[e[1].name]);e[10]=i;const s=e[2]?20:500;return e[11]=s,e}function LO(n){const e=n.slice(),t=B.trimQuotedValue(JSON.stringify(e[3]))||'""';return e[5]=t,e}function PO(n){let e,t;return{c(){e=v("div"),t=U(n[3]),p(e,"class","block txt-break fallback-block svelte-jdf51v")},m(i,s){w(i,e,s),g(e,t)},p(i,s){s&8&&se(t,i[3])},i:x,o:x,d(i){i&&k(e)}}}function NO(n){let e,t=B.truncate(n[3])+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=B.truncate(n[3]))},m(l,o){w(l,e,o),g(e,i)},p(l,o){o&8&&t!==(t=B.truncate(l[3])+"")&&se(i,t),o&8&&s!==(s=B.truncate(l[3]))&&p(e,"title",s)},i:x,o:x,d(l){l&&k(e)}}}function FO(n){let e,t=[],i=new Map,s,l,o=n[16].slice(0,n[17]);const r=u=>u[8]+u[18];for(let u=0;un[17]&&Lm();return{c(){e=v("div");for(let u=0;uu[17]?a||(a=Lm(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},i(u){if(!l){for(let f=0;fn[11]&&Fm();return{c(){e=v("div"),i.c(),s=E(),u&&u.c(),p(e,"class","inline-flex")},m(f,c){w(f,e,c),r[t].m(e,null),g(e,s),u&&u.m(e,null),l=!0},p(f,c){let d=t;t=a(f),t===d?r[t].p(f,c):(ae(),I(r[d],1,1,()=>{r[d]=null}),ue(),i=r[t],i?i.p(f,c):(i=r[t]=o[t](f),i.c()),A(i,1),i.m(e,s)),f[9].length>f[11]?u||(u=Fm(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){l||(A(i),l=!0)},o(f){I(i),l=!1},d(f){f&&k(e),r[t].d(),u&&u.d()}}}function qO(n){let e,t=[],i=new Map,s=B.toArray(n[3]);const l=o=>o[8]+o[6];for(let o=0;o{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function zO(n){let e,t=B.truncate(n[3])+"",i,s,l;return{c(){e=v("a"),i=U(t),p(e,"class","txt-ellipsis"),p(e,"href",n[3]),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(o,r){w(o,e,r),g(e,i),s||(l=[Me(He.call(null,e,"Open in new tab")),J(e,"click",An(n[4]))],s=!0)},p(o,r){r&8&&t!==(t=B.truncate(o[3])+"")&&se(i,t),r&8&&p(e,"href",o[3])},i:x,o:x,d(o){o&&k(e),s=!1,Ee(l)}}}function HO(n){let e,t;return{c(){e=v("span"),t=U(n[3]),p(e,"class","txt")},m(i,s){w(i,e,s),g(e,t)},p(i,s){s&8&&se(t,i[3])},i:x,o:x,d(i){i&&k(e)}}}function BO(n){let e,t=n[3]?"True":"False",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt")},m(s,l){w(s,e,l),g(e,i)},p(s,l){l&8&&t!==(t=s[3]?"True":"False")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function UO(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function WO(n){let e,t,i,s;const l=[XO,GO],o=[];function r(a,u){return a[2]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=ye()},m(a,u){o[e].m(a,u),w(a,i,u),s=!0},p(a,u){let f=e;e=r(a),e===f?o[e].p(a,u):(ae(),I(o[f],1,1,()=>{o[f]=null}),ue(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),A(t,1),t.m(i.parentNode,i))},i(a){s||(A(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&k(i)}}}function Im(n,e){let t,i,s;return i=new du({props:{record:e[0],filename:e[18],size:"sm"}}),{key:n,first:null,c(){t=ye(),H(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),V(i,l,o),s=!0},p(l,o){e=l;const r={};o&1&&(r.record=e[0]),o&12&&(r.filename=e[18]),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function Lm(n){let e;return{c(){e=U("...")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function YO(n){let e,t=n[9].slice(0,n[11]),i=[];for(let s=0;sr[8]+r[6];for(let r=0;r500&&qm(n);return{c(){e=v("span"),i=U(t),s=E(),r&&r.c(),l=ye(),p(e,"class","txt")},m(a,u){w(a,e,u),g(e,i),w(a,s,u),r&&r.m(a,u),w(a,l,u),o=!0},p(a,u){(!o||u&8)&&t!==(t=B.truncate(a[5],500,!0)+"")&&se(i,t),a[5].length>500?r?(r.p(a,u),u&8&&A(r,1)):(r=qm(a),r.c(),A(r,1),r.m(l.parentNode,l)):r&&(ae(),I(r,1,1,()=>{r=null}),ue())},i(a){o||(A(r),o=!0)},o(a){I(r),o=!1},d(a){a&&k(e),a&&k(s),r&&r.d(a),a&&k(l)}}}function XO(n){let e,t=B.truncate(n[5])+"",i;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis")},m(s,l){w(s,e,l),g(e,i)},p(s,l){l&8&&t!==(t=B.truncate(s[5])+"")&&se(i,t)},i:x,o:x,d(s){s&&k(e)}}}function qm(n){let e,t;return e=new Fl({props:{value:JSON.stringify(n[3],null,2)}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&8&&(l.value=JSON.stringify(i[3],null,2)),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function QO(n){let e,t,i,s,l;const o=[WO,UO,BO,HO,zO,VO,jO,qO,RO,FO,NO,PO],r=[];function a(f,c){return c&8&&(e=null),f[1].type==="json"?0:(e==null&&(e=!!B.isEmpty(f[3])),e?1:f[1].type==="bool"?2:f[1].type==="number"?3:f[1].type==="url"?4:f[1].type==="editor"?5:f[1].type==="date"?6:f[1].type==="select"?7:f[1].type==="relation"?8:f[1].type==="file"?9:f[2]?10:11)}function u(f,c){return c===0?LO(f):c===8?IO(f):c===9?AO(f):f}return t=a(n,-1),i=r[t]=o[t](u(n,t)),{c(){i.c(),s=ye()},m(f,c){r[t].m(f,c),w(f,s,c),l=!0},p(f,[c]){let d=t;t=a(f,c),t===d?r[t].p(u(f,t),c):(ae(),I(r[d],1,1,()=>{r[d]=null}),ue(),i=r[t],i?i.p(u(f,t),c):(i=r[t]=o[t](u(f,t)),i.c()),A(i,1),i.m(s.parentNode,s))},i(f){l||(A(i),l=!0)},o(f){I(i),l=!1},d(f){r[t].d(f),f&&k(s)}}}function xO(n,e,t){let i,{record:s}=e,{field:l}=e,{short:o=!1}=e;function r(a){Ne.call(this,n,a)}return n.$$set=a=>{"record"in a&&t(0,s=a.record),"field"in a&&t(1,l=a.field),"short"in a&&t(2,o=a.short)},n.$$.update=()=>{n.$$.dirty&3&&t(3,i=s[l.name])},[s,l,o,i,r]}class M1 extends ge{constructor(e){super(),_e(this,e,xO,QO,me,{record:0,field:1,short:2})}}function jm(n,e,t){const i=n.slice();return i[10]=e[t],i}function Vm(n){let e,t,i=n[10].name+"",s,l,o,r,a;return r=new M1({props:{field:n[10],record:n[3]}}),{c(){e=v("tr"),t=v("td"),s=U(i),l=E(),o=v("td"),H(r.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(o,"class","col-field svelte-1nt58f7")},m(u,f){w(u,e,f),g(e,t),g(t,s),g(e,l),g(e,o),V(r,o,null),a=!0},p(u,f){(!a||f&1)&&i!==(i=u[10].name+"")&&se(s,i);const c={};f&1&&(c.field=u[10]),f&8&&(c.record=u[3]),r.$set(c)},i(u){a||(A(r.$$.fragment,u),a=!0)},o(u){I(r.$$.fragment,u),a=!1},d(u){u&&k(e),z(r)}}}function zm(n){let e,t,i,s,l,o;return l=new wi({props:{date:n[3].created}}),{c(){e=v("tr"),t=v("td"),t.textContent="created",i=E(),s=v("td"),H(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(s,"class","col-field svelte-1nt58f7")},m(r,a){w(r,e,a),g(e,t),g(e,i),g(e,s),V(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].created),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){I(l.$$.fragment,r),o=!1},d(r){r&&k(e),z(l)}}}function Hm(n){let e,t,i,s,l,o;return l=new wi({props:{date:n[3].updated}}),{c(){e=v("tr"),t=v("td"),t.textContent="updated",i=E(),s=v("td"),H(l.$$.fragment),p(t,"class","min-width txt-hint txt-bold"),p(s,"class","col-field svelte-1nt58f7")},m(r,a){w(r,e,a),g(e,t),g(e,i),g(e,s),V(l,s,null),o=!0},p(r,a){const u={};a&8&&(u.date=r[3].updated),l.$set(u)},i(r){o||(A(l.$$.fragment,r),o=!0)},o(r){I(l.$$.fragment,r),o=!1},d(r){r&&k(e),z(l)}}}function eE(n){var M;let e,t,i,s,l,o,r,a,u,f,c=n[3].id+"",d,m,_,h,b;a=new Fl({props:{value:n[3].id}});let y=(M=n[0])==null?void 0:M.schema,S=[];for(let O=0;OI(S[O],1,1,()=>{S[O]=null});let $=n[3].created&&zm(n),T=n[3].updated&&Hm(n);return{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="id",l=E(),o=v("td"),r=v("div"),H(a.$$.fragment),u=E(),f=v("span"),d=U(c),m=E();for(let O=0;O{$=null}),ue()),O[3].updated?T?(T.p(O,D),D&8&&A(T,1)):(T=Hm(O),T.c(),A(T,1),T.m(t,null)):T&&(ae(),I(T,1,1,()=>{T=null}),ue())},i(O){if(!b){A(a.$$.fragment,O);for(let D=0;DClose',p(e,"type","button"),p(e,"class","btn btn-transparent")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[6]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function iE(n){let e,t,i={class:"record-preview-panel "+(n[4]?"overlay-panel-xl":"overlay-panel-lg"),$$slots:{footer:[nE],header:[tE],default:[eE]},$$scope:{ctx:n}};return e=new ln({props:i}),n[7](e),e.$on("hide",n[8]),e.$on("show",n[9]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.class="record-preview-panel "+(s[4]?"overlay-panel-xl":"overlay-panel-lg")),l&8201&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[7](null),z(e,s)}}}function sE(n,e,t){let i,{collection:s}=e,l,o=new yi;function r(m){return t(3,o=m),l==null?void 0:l.show()}function a(){return l==null?void 0:l.hide()}const u=()=>a();function f(m){ee[m?"unshift":"push"](()=>{l=m,t(2,l)})}function c(m){Ne.call(this,n,m)}function d(m){Ne.call(this,n,m)}return n.$$set=m=>{"collection"in m&&t(0,s=m.collection)},n.$$.update=()=>{var m;n.$$.dirty&1&&t(4,i=!!((m=s==null?void 0:s.schema)!=null&&m.find(_=>_.type==="editor")))},[s,a,l,o,i,r,u,f,c,d]}class lE extends ge{constructor(e){super(),_e(this,e,sE,iE,me,{collection:0,show:5,hide:1})}get show(){return this.$$.ctx[5]}get hide(){return this.$$.ctx[1]}}function Bm(n,e,t){const i=n.slice();return i[55]=e[t],i}function Um(n,e,t){const i=n.slice();return i[58]=e[t],i}function Wm(n,e,t){const i=n.slice();return i[58]=e[t],i}function Ym(n,e,t){const i=n.slice();return i[51]=e[t],i}function Km(n){let e;function t(l,o){return l[12]?rE:oE}let i=t(n),s=i(n);return{c(){e=v("th"),s.c(),p(e,"class","bulk-select-col min-width")},m(l,o){w(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&k(e),s.d()}}}function oE(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=E(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[16],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){w(a,e,u),g(e,t),g(e,s),g(e,l),o||(r=J(t,"change",n[28]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&65536&&(t.checked=a[16])},d(a){a&&k(e),o=!1,r()}}}function rE(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Jm(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[aE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function aE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function Zm(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Gm(n),r=i&&Xm(n);return{c(){o&&o.c(),t=E(),r&&r.c(),s=ye()},m(a,u){o&&o.m(a,u),w(a,t,u),r&&r.m(a,u),w(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&A(o,1)):(o=Gm(a),o.c(),A(o,1),o.m(t.parentNode,t)):o&&(ae(),I(o,1,1,()=>{o=null}),ue()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&A(r,1)):(r=Xm(a),r.c(),A(r,1),r.m(s.parentNode,s)):r&&(ae(),I(r,1,1,()=>{r=null}),ue())},i(a){l||(A(o),A(r),l=!0)},o(a){I(o),I(r),l=!1},d(a){o&&o.d(a),a&&k(t),r&&r.d(a),a&&k(s)}}}function Gm(n){let e,t,i;function s(o){n[30](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[uE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function uE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="username",p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function Xm(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[fE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function fE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function cE(n){let e,t,i,s,l,o=n[58].name+"",r;return{c(){e=v("div"),t=v("i"),s=E(),l=v("span"),r=U(o),p(t,"class",i=B.getFieldTypeIcon(n[58].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){w(a,e,u),g(e,t),g(e,s),g(e,l),g(l,r)},p(a,u){u[0]&262144&&i!==(i=B.getFieldTypeIcon(a[58].type))&&p(t,"class",i),u[0]&262144&&o!==(o=a[58].name+"")&&se(r,o)},d(a){a&&k(e)}}}function Qm(n,e){let t,i,s,l;function o(a){e[32](a)}let r={class:"col-type-"+e[58].type+" col-field-"+e[58].name,name:e[58].name,$$slots:{default:[cE]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new an({props:r}),ee.push(()=>de(i,"sort",o)),{key:n,first:null,c(){t=ye(),H(i.$$.fragment),this.first=t},m(a,u){w(a,t,u),V(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&262144&&(f.class="col-type-"+e[58].type+" col-field-"+e[58].name),u[0]&262144&&(f.name=e[58].name),u[0]&262144|u[2]&2&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],he(()=>s=!1)),i.$set(f)},i(a){l||(A(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&k(t),z(i,a)}}}function xm(n){let e,t,i;function s(o){n[33](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[dE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function dE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function eh(n){let e,t,i;function s(o){n[34](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[pE]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new an({props:l}),ee.push(()=>de(e,"sort",s)),{c(){H(e.$$.fragment)},m(o,r){V(e,o,r),i=!0},p(o,r){const a={};r[2]&2&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],he(()=>t=!1)),e.$set(a)},i(o){i||(A(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){z(e,o)}}}function pE(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function th(n){let e;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Toggle columns"),p(e,"class","btn btn-sm btn-transparent p-0")},m(t,i){w(t,e,i),n[35](e)},p:x,d(t){t&&k(e),n[35](null)}}}function nh(n){let e;function t(l,o){return l[12]?hE:mE}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function mE(n){let e,t,i,s,l;function o(u,f){var c,d;if((c=u[1])!=null&&c.length)return gE;if(!((d=u[2])!=null&&d.$isView))return _E}let r=o(n),a=r&&r(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=E(),a&&a.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(u,f){w(u,e,f),g(e,t),g(t,i),g(t,s),a&&a.m(t,null),g(e,l)},p(u,f){r===(r=o(u))&&a?a.p(u,f):(a&&a.d(1),a=r&&r(u),a&&(a.c(),a.m(t,null)))},d(u){u&&k(e),a&&a.d()}}}function hE(n){let e;return{c(){e=v("tr"),e.innerHTML=` `},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function _E(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - New record`,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[40]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function gE(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[39]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function th(n){let e,t,i,s,l,o,r,a,u,f;function c(){return n[36](n[55])}return{c(){e=v("td"),t=v("div"),i=v("input"),o=E(),r=v("label"),p(i,"type","checkbox"),p(i,"id",s="checkbox_"+n[55].id),i.checked=l=n[6][n[55].id],p(r,"for",a="checkbox_"+n[55].id),p(t,"class","form-field"),p(e,"class","bulk-select-col min-width")},m(d,m){w(d,e,m),g(e,t),g(t,i),g(t,o),g(t,r),u||(f=[K(i,"change",c),K(t,"click",An(n[26]))],u=!0)},p(d,m){n=d,m[0]&16&&s!==(s="checkbox_"+n[55].id)&&p(i,"id",s),m[0]&80&&l!==(l=n[6][n[55].id])&&(i.checked=l),m[0]&16&&a!==(a="checkbox_"+n[55].id)&&p(r,"for",a)},d(d){d&&k(e),u=!1,Ee(f)}}}function nh(n){let e,t,i,s,l,o,r=n[55].id+"",a,u,f;s=new Fl({props:{value:n[55].id}});let c=n[2].$isAuth&&ih(n);return{c(){e=v("td"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),a=U(r),u=E(),c&&c.c(),p(o,"class","txt"),p(i,"class","label"),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(d,m){w(d,e,m),g(e,t),g(t,i),j(s,i,null),g(i,l),g(i,o),g(o,a),g(t,u),c&&c.m(t,null),f=!0},p(d,m){const _={};m[0]&16&&(_.value=d[55].id),s.$set(_),(!f||m[0]&16)&&r!==(r=d[55].id+"")&&se(a,r),d[2].$isAuth?c?c.p(d,m):(c=ih(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){f||(A(s.$$.fragment,d),f=!0)},o(d){I(s.$$.fragment,d),f=!1},d(d){d&&k(e),V(s),c&&c.d()}}}function ih(n){let e;function t(l,o){return l[55].verified?vE:bE}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function bE(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){w(s,e,l),t||(i=Me(He.call(null,e,"Unverified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function vE(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){w(s,e,l),t||(i=Me(He.call(null,e,"Verified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function sh(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&lh(n),o=i&&oh(n);return{c(){l&&l.c(),t=E(),o&&o.c(),s=ye()},m(r,a){l&&l.m(r,a),w(r,t,a),o&&o.m(r,a),w(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=lh(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=oh(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&k(t),o&&o.d(r),r&&k(s)}}}function lh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[55].username)),t?kE:yE}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){w(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&k(e),l.d()}}}function yE(n){let e,t=n[55].username+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[55].username)},m(l,o){w(l,e,o),g(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].username+"")&&se(i,t),o[0]&16&&s!==(s=l[55].username)&&p(e,"title",s)},d(l){l&&k(e)}}}function kE(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function oh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[55].email)),t?SE:wE}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){w(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&k(e),l.d()}}}function wE(n){let e,t=n[55].email+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[55].email)},m(l,o){w(l,e,o),g(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].email+"")&&se(i,t),o[0]&16&&s!==(s=l[55].email)&&p(e,"title",s)},d(l){l&&k(e)}}}function SE(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function rh(n,e){let t,i,s,l;return i=new C1({props:{short:!0,record:e[55],field:e[58]}}),{key:n,first:null,c(){t=v("td"),z(i.$$.fragment),p(t,"class",s="col-type-"+e[58].type+" col-field-"+e[58].name),this.first=t},m(o,r){w(o,t,r),j(i,t,null),l=!0},p(o,r){e=o;const a={};r[0]&16&&(a.record=e[55]),r[0]&262144&&(a.field=e[58]),i.$set(a),(!l||r[0]&262144&&s!==(s="col-type-"+e[58].type+" col-field-"+e[58].name))&&p(t,"class",s)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){I(i.$$.fragment,o),l=!1},d(o){o&&k(t),V(i)}}}function ah(n){let e,t,i;return t=new wi({props:{date:n[55].created}}),{c(){e=v("td"),z(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function uh(n){let e,t,i;return t=new wi({props:{date:n[55].updated}}),{c(){e=v("td"),z(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function fh(n,e){let t,i,s=!e[7].includes("@id"),l,o,r=[],a=new Map,u,f=e[10]&&!e[7].includes("@created"),c,d=e[9]&&!e[7].includes("@updated"),m,_,h,b,y,S,C=!e[2].$isView&&th(e),$=s&&nh(e),T=e[2].$isAuth&&sh(e),M=e[18];const O=F=>F[58].name;for(let F=0;F',h=E(),p(_,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(F,R){w(F,t,R),C&&C.m(t,null),g(t,i),$&&$.m(t,null),g(t,l),T&&T.m(t,null),g(t,o);for(let q=0;q{$=null}),ue()),e[2].$isAuth?T?T.p(e,R):(T=sh(e),T.c(),T.m(t,o)):T&&(T.d(1),T=null),R[0]&262160&&(M=e[18],ae(),r=bt(r,R,O,1,e,M,a,t,Bt,rh,u,Hm),ue()),R[0]&1152&&(f=e[10]&&!e[7].includes("@created")),f?D?(D.p(e,R),R[0]&1152&&A(D,1)):(D=ah(e),D.c(),A(D,1),D.m(t,c)):D&&(ae(),I(D,1,1,()=>{D=null}),ue()),R[0]&640&&(d=e[9]&&!e[7].includes("@updated")),d?L?(L.p(e,R),R[0]&640&&A(L,1)):(L=uh(e),L.c(),A(L,1),L.m(t,m)):L&&(ae(),I(L,1,1,()=>{L=null}),ue())},i(F){if(!b){A($);for(let R=0;RW[58].name;for(let W=0;WW[2].$isView?W[55]:W[55].id;for(let W=0;W{M=null}),ue()),W[2].$isAuth?O?(O.p(W,X),X[0]&4&&A(O,1)):(O=Km(W),O.c(),A(O,1),O.m(i,r)):O&&(ae(),I(O,1,1,()=>{O=null}),ue()),X[0]&262145&&(D=W[18],ae(),a=bt(a,X,L,1,W,D,u,i,Bt,Gm,f,Bm),ue()),X[0]&1152&&(c=W[10]&&!W[7].includes("@created")),c?P?(P.p(W,X),X[0]&1152&&A(P,1)):(P=Xm(W),P.c(),A(P,1),P.m(i,d)):P&&(ae(),I(P,1,1,()=>{P=null}),ue()),X[0]&640&&(m=W[9]&&!W[7].includes("@updated")),m?N?(N.p(W,X),X[0]&640&&A(N,1)):(N=Qm(W),N.c(),A(N,1),N.m(i,_)):N&&(ae(),I(N,1,1,()=>{N=null}),ue()),W[15].length?F?F.p(W,X):(F=xm(W),F.c(),F.m(h,null)):F&&(F.d(1),F=null),X[0]&4986582&&(R=W[4],ae(),S=bt(S,X,q,1,W,R,C,y,Bt,fh,null,zm),ue(),!R.length&&H?H.p(W,X):R.length?H&&(H.d(1),H=null):(H=eh(W),H.c(),H.m(y,null))),(!$||X[0]&4096)&&Q(e,"table-loading",W[12])},i(W){if(!$){A(M),A(O);for(let X=0;X({54:l}),({uniqueId:l})=>[0,l?8388608:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),j(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&32896|o[1]&8388608|o[2]&2&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&k(t),V(i,l)}}}function TE(n){let e,t,i=[],s=new Map,l,o,r=n[15];const a=u=>u[51].id+u[51].name;for(let u=0;u{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function ph(n){let e,t,i=n[4].length+"",s,l,o;return{c(){e=v("small"),t=U("Showing "),s=U(i),l=U(" of "),o=U(n[5]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),g(e,t),g(e,s),g(e,l),g(e,o)},p(r,a){a[0]&16&&i!==(i=r[4].length+"")&&se(s,i),a[0]&32&&se(o,r[5])},d(r){r&&k(e)}}}function mh(n){let e,t,i,s,l=n[5]-n[4].length+"",o,r,a,u;return{c(){e=v("div"),t=v("button"),i=v("span"),s=U("Load more ("),o=U(l),r=U(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[12]),Q(t,"btn-disabled",n[12]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),g(e,t),g(t,i),g(i,s),g(i,o),g(i,r),a||(u=K(t,"click",n[41]),a=!0)},p(f,c){c[0]&48&&l!==(l=f[5]-f[4].length+"")&&se(o,l),c[0]&4096&&Q(t,"btn-loading",f[12]),c[0]&4096&&Q(t,"btn-disabled",f[12])},d(f){f&&k(e),a=!1,u()}}}function hh(n){let e,t,i,s,l,o,r=n[8]===1?"record":"records",a,u,f,c,d,m,_,h,b,y,S;return{c(){e=v("div"),t=v("div"),i=U("Selected "),s=v("strong"),l=U(n[8]),o=E(),a=U(r),u=E(),f=v("button"),f.innerHTML='Reset',c=E(),d=v("div"),m=E(),_=v("button"),_.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),Q(f,"btn-disabled",n[13]),p(d,"class","flex-fill"),p(_,"type","button"),p(_,"class","btn btn-sm btn-transparent btn-danger"),Q(_,"btn-loading",n[13]),Q(_,"btn-disabled",n[13]),p(e,"class","bulkbar")},m(C,$){w(C,e,$),g(e,t),g(t,i),g(t,s),g(s,l),g(t,o),g(t,a),g(e,u),g(e,f),g(e,c),g(e,d),g(e,m),g(e,_),b=!0,y||(S=[K(f,"click",n[42]),K(_,"click",n[43])],y=!0)},p(C,$){(!b||$[0]&256)&&se(l,C[8]),(!b||$[0]&256)&&r!==(r=C[8]===1?"record":"records")&&se(a,r),(!b||$[0]&8192)&&Q(f,"btn-disabled",C[13]),(!b||$[0]&8192)&&Q(_,"btn-loading",C[13]),(!b||$[0]&8192)&&Q(_,"btn-disabled",C[13])},i(C){b||(C&&Qe(()=>{b&&(h||(h=je(e,fi,{duration:150,y:5},!0)),h.run(1))}),b=!0)},o(C){C&&(h||(h=je(e,fi,{duration:150,y:5},!1)),h.run(0)),b=!1},d(C){C&&k(e),C&&h&&h.end(),y=!1,Ee(S)}}}function OE(n){let e,t,i,s,l,o;e=new ja({props:{class:"table-wrapper",$$slots:{before:[ME],default:[$E]},$$scope:{ctx:n}}});let r=n[4].length&&ph(n),a=n[4].length&&n[17]&&mh(n),u=n[8]&&hh(n);return{c(){z(e.$$.fragment),t=E(),r&&r.c(),i=E(),a&&a.c(),s=E(),u&&u.c(),l=ye()},m(f,c){j(e,f,c),w(f,t,c),r&&r.m(f,c),w(f,i,c),a&&a.m(f,c),w(f,s,c),u&&u.m(f,c),w(f,l,c),o=!0},p(f,c){const d={};c[0]&382679|c[2]&2&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=ph(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[17]?a?a.p(f,c):(a=mh(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&A(u,1)):(u=hh(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(ae(),I(u,1,1,()=>{u=null}),ue())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){I(e.$$.fragment,f),I(u),o=!1},d(f){V(e,f),f&&k(t),r&&r.d(f),f&&k(i),a&&a.d(f),f&&k(s),u&&u.d(f),f&&k(l)}}}const EE=/^([\+\-])?(\w+)$/;function DE(n,e,t){let i,s,l,o,r,a,u,f;const c=$t();let{collection:d}=e,{sort:m=""}=e,{filter:_=""}=e,h=[],b=1,y=0,S={},C=!0,$=!1,T=0,M,O=[],D=[];function L(){d!=null&&d.id&&localStorage.setItem((d==null?void 0:d.id)+"@hiddenCollumns",JSON.stringify(O))}function P(){if(t(7,O=[]),!!(d!=null&&d.id))try{const $e=localStorage.getItem(d.id+"@hiddenCollumns");$e&&t(7,O=JSON.parse($e)||[])}catch{}}async function N(){const $e=b;for(let nt=1;nt<=$e;nt++)(nt===1||o)&&await F(nt,!1)}async function F($e=1,nt=!0){var ei,Sn;if(!(d!=null&&d.id))return;t(12,C=!0);let At=m;const jt=At.match(EE),Ut=jt?s.find(_t=>_t.name===jt[2]):null;if(jt&&((Sn=(ei=Ut==null?void 0:Ut.options)==null?void 0:ei.displayFields)==null?void 0:Sn.length)>0){const _t=[];for(const Pn of Ut.options.displayFields)_t.push((jt[1]||"")+jt[2]+"."+Pn);At=_t.join(",")}const Ln=B.getAllCollectionIdentifiers(d);return ce.collection(d.id).getList($e,30,{sort:At,filter:B.normalizeSearchFilter(_,Ln),expand:s.map(_t=>_t.name).join(","),$cancelKey:"records_list"}).then(async _t=>{if($e<=1&&R(),t(12,C=!1),t(11,b=_t.page),t(5,y=_t.totalItems),c("load",h.concat(_t.items)),nt){const Pn=++T;for(;_t.items.length&&T==Pn;)t(4,h=h.concat(_t.items.splice(0,15))),await B.yieldToMain()}else t(4,h=h.concat(_t.items))}).catch(_t=>{_t!=null&&_t.isAbort||(t(12,C=!1),console.warn(_t),R(),ce.error(_t,!1))})}function R(){t(4,h=[]),t(11,b=1),t(5,y=0),t(6,S={})}function q(){a?H():W()}function H(){t(6,S={})}function W(){for(const $e of h)t(6,S[$e.id]=$e,S);t(6,S)}function X($e){S[$e.id]?delete S[$e.id]:t(6,S[$e.id]=$e,S),t(6,S)}function J(){pn(`Do you really want to delete the selected ${r===1?"record":"records"}?`,Z)}async function Z(){if($||!r||!(d!=null&&d.id))return;let $e=[];for(const nt of Object.keys(S))$e.push(ce.collection(d.id).delete(nt));return t(13,$=!0),Promise.all($e).then(()=>{zt(`Successfully deleted the selected ${r===1?"record":"records"}.`),H()}).catch(nt=>{ce.error(nt)}).finally(()=>(t(13,$=!1),N()))}function le($e){Ne.call(this,n,$e)}const ne=($e,nt)=>{nt.target.checked?B.removeByValue(O,$e.id):B.pushUnique(O,$e.id),t(7,O)},ie=()=>q();function be($e){m=$e,t(0,m)}function Se($e){m=$e,t(0,m)}function Ve($e){m=$e,t(0,m)}function Be($e){m=$e,t(0,m)}function ke($e){m=$e,t(0,m)}function Te($e){m=$e,t(0,m)}function Ze($e){ee[$e?"unshift":"push"](()=>{M=$e,t(14,M)})}const ht=$e=>X($e),Ge=$e=>c("select",$e),Ye=($e,nt)=>{nt.code==="Enter"&&(nt.preventDefault(),c("select",$e))},we=()=>t(1,_=""),fe=()=>c("new"),ze=()=>F(b+1),Dt=()=>H(),Le=()=>J();return n.$$set=$e=>{"collection"in $e&&t(2,d=$e.collection),"sort"in $e&&t(0,m=$e.sort),"filter"in $e&&t(1,_=$e.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&d!=null&&d.id&&(P(),R()),n.$$.dirty[0]&4&&t(25,i=(d==null?void 0:d.schema)||[]),n.$$.dirty[0]&33554432&&(s=i.filter($e=>$e.type==="relation")),n.$$.dirty[0]&33554560&&t(18,l=i.filter($e=>!O.includes($e.id))),n.$$.dirty[0]&7&&d!=null&&d.id&&m!==-1&&_!==-1&&F(1),n.$$.dirty[0]&48&&t(17,o=y>h.length),n.$$.dirty[0]&64&&t(8,r=Object.keys(S).length),n.$$.dirty[0]&272&&t(16,a=h.length&&r===h.length),n.$$.dirty[0]&128&&O!==-1&&L(),n.$$.dirty[0]&20&&t(10,u=!(d!=null&&d.$isView)||h.length>0&&h[0].created!=""),n.$$.dirty[0]&20&&t(9,f=!(d!=null&&d.$isView)||h.length>0&&h[0].updated!=""),n.$$.dirty[0]&33555972&&t(15,D=[].concat(d.$isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map($e=>({id:$e.id,name:$e.name})),u?{id:"@created",name:"created"}:[],f?{id:"@updated",name:"updated"}:[]))},[m,_,d,F,h,y,S,O,r,f,u,b,C,$,M,D,a,o,l,c,q,H,X,J,N,i,le,ne,ie,be,Se,Ve,Be,ke,Te,Ze,ht,Ge,Ye,we,fe,ze,Dt,Le]}class AE extends ge{constructor(e){super(),_e(this,e,DE,OE,me,{collection:2,sort:0,filter:1,reloadLoadedPages:24,load:3},null,[-1,-1,-1])}get reloadLoadedPages(){return this.$$.ctx[24]}get load(){return this.$$.ctx[3]}}function IE(n){let e,t,i,s;return e=new $M({}),i=new wn({props:{$$slots:{default:[NE]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&1527|o[1]&16&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&k(t),V(i,l)}}}function LE(n){let e,t;return e=new wn({props:{center:!0,$$slots:{default:[qE]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&1040|s[1]&16&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function PE(n){let e,t;return e=new wn({props:{center:!0,$$slots:{default:[jE]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[1]&16&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function _h(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Edit collection"),p(e,"class","btn btn-transparent btn-circle")},m(s,l){w(s,e,l),t||(i=[Me(He.call(null,e,{text:"Edit collection",position:"right"})),K(e,"click",n[15])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ee(i)}}}function gh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - New record`,p(e,"type","button"),p(e,"class","btn btn-expanded")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[18]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function NE(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L,P,N=!n[10]&&_h(n);c=new Zo({}),c.$on("refresh",n[16]);let F=!n[2].$isView&&gh(n);y=new Jo({props:{value:n[0],autocompleteCollection:n[2]}}),y.$on("submit",n[19]);function R(W){n[21](W)}function q(W){n[22](W)}let H={collection:n[2]};return n[0]!==void 0&&(H.filter=n[0]),n[1]!==void 0&&(H.sort=n[1]),T=new AE({props:H}),n[20](T),ee.push(()=>de(T,"filter",R)),ee.push(()=>de(T,"sort",q)),T.$on("select",n[23]),T.$on("new",n[24]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=E(),l=v("div"),r=U(o),a=E(),u=v("div"),N&&N.c(),f=E(),z(c.$$.fragment),d=E(),m=v("div"),_=v("button"),_.innerHTML=` - API Preview`,h=E(),F&&F.c(),b=E(),z(y.$$.fragment),S=E(),C=v("div"),$=E(),z(T.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(_,"type","button"),p(_,"class","btn btn-outline"),p(m,"class","btns-group"),p(e,"class","page-header"),p(C,"class","clearfix m-b-base")},m(W,X){w(W,e,X),g(e,t),g(t,i),g(t,s),g(t,l),g(l,r),g(e,a),g(e,u),N&&N.m(u,null),g(u,f),j(c,u,null),g(e,d),g(e,m),g(m,_),g(m,h),F&&F.m(m,null),w(W,b,X),j(y,W,X),w(W,S,X),w(W,C,X),w(W,$,X),j(T,W,X),D=!0,L||(P=K(_,"click",n[17]),L=!0)},p(W,X){(!D||X[0]&4)&&o!==(o=W[2].name+"")&&se(r,o),W[10]?N&&(N.d(1),N=null):N?N.p(W,X):(N=_h(W),N.c(),N.m(u,f)),W[2].$isView?F&&(F.d(1),F=null):F?F.p(W,X):(F=gh(W),F.c(),F.m(m,null));const J={};X[0]&1&&(J.value=W[0]),X[0]&4&&(J.autocompleteCollection=W[2]),y.$set(J);const Z={};X[0]&4&&(Z.collection=W[2]),!M&&X[0]&1&&(M=!0,Z.filter=W[0],he(()=>M=!1)),!O&&X[0]&2&&(O=!0,Z.sort=W[1],he(()=>O=!1)),T.$set(Z)},i(W){D||(A(c.$$.fragment,W),A(y.$$.fragment,W),A(T.$$.fragment,W),D=!0)},o(W){I(c.$$.fragment,W),I(y.$$.fragment,W),I(T.$$.fragment,W),D=!1},d(W){W&&k(e),N&&N.d(),V(c),F&&F.d(),W&&k(b),V(y,W),W&&k(S),W&&k(C),W&&k($),n[20](null),V(T,W),L=!1,P()}}}function FE(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=E(),i=v("button"),i.innerHTML=` - Create new collection`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=K(i,"click",n[14]),s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,l()}}}function RE(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function qE(n){let e,t,i;function s(r,a){return r[10]?RE:FE}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=E(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){w(r,e,a),g(e,t),g(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&k(e),o.d()}}}function jE(n){let e;return{c(){e=v("div"),e.innerHTML=` -

    Loading collections...

    `,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function VE(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[PE,LE,IE],m=[];function _(C,$){return C[3]&&!C[9].length?0:C[9].length?2:1}e=_(n),t=m[e]=d[e](n);let h={};s=new cu({props:h}),n[25](s);let b={};o=new IM({props:b}),n[26](o);let y={collection:n[2]};a=new $1({props:y}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let S={collection:n[2]};return f=new lE({props:S}),n[30](f),{c(){t.c(),i=E(),z(s.$$.fragment),l=E(),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),z(f.$$.fragment)},m(C,$){m[e].m(C,$),w(C,i,$),j(s,C,$),w(C,l,$),j(o,C,$),w(C,r,$),j(a,C,$),w(C,u,$),j(f,C,$),c=!0},p(C,$){let T=e;e=_(C),e===T?m[e].p(C,$):(ae(),I(m[T],1,1,()=>{m[T]=null}),ue(),t=m[e],t?t.p(C,$):(t=m[e]=d[e](C),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const O={};o.$set(O);const D={};$[0]&4&&(D.collection=C[2]),a.$set(D);const L={};$[0]&4&&(L.collection=C[2]),f.$set(L)},i(C){c||(A(t),A(s.$$.fragment,C),A(o.$$.fragment,C),A(a.$$.fragment,C),A(f.$$.fragment,C),c=!0)},o(C){I(t),I(s.$$.fragment,C),I(o.$$.fragment,C),I(a.$$.fragment,C),I(f.$$.fragment,C),c=!1},d(C){m[e].d(C),C&&k(i),n[25](null),V(s,C),C&&k(l),n[26](null),V(o,C),C&&k(r),n[27](null),V(a,C),C&&k(u),n[30](null),V(f,C)}}}function zE(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,ie=>t(2,s=ie)),Je(n,Tt,ie=>t(31,l=ie)),Je(n,ko,ie=>t(3,o=ie)),Je(n,Ca,ie=>t(13,r=ie)),Je(n,ci,ie=>t(9,a=ie)),Je(n,As,ie=>t(10,u=ie));const f=new URLSearchParams(r);let c,d,m,_,h,b=f.get("filter")||"",y=f.get("sort")||"-created",S=f.get("collectionId")||(s==null?void 0:s.id);function C(){t(11,S=s==null?void 0:s.id),t(0,b=""),t(1,y="-created"),$()}async function $(){if(!y)return;const ie=B.getAllCollectionIdentifiers(s),be=y.split(",").map(Se=>Se.startsWith("+")||Se.startsWith("-")?Se.substring(1):Se);be.filter(Se=>ie.includes(Se)).length!=be.length&&(ie.includes("created")?t(1,y="-created"):t(1,y=""))}Iy(S);const T=()=>c==null?void 0:c.show(),M=()=>c==null?void 0:c.show(s),O=()=>h==null?void 0:h.load(),D=()=>d==null?void 0:d.show(s),L=()=>m==null?void 0:m.show(),P=ie=>t(0,b=ie.detail);function N(ie){ee[ie?"unshift":"push"](()=>{h=ie,t(8,h)})}function F(ie){b=ie,t(0,b)}function R(ie){y=ie,t(1,y)}const q=ie=>{s.$isView?_.show(ie==null?void 0:ie.detail):m==null||m.show(ie==null?void 0:ie.detail)},H=()=>m==null?void 0:m.show();function W(ie){ee[ie?"unshift":"push"](()=>{c=ie,t(4,c)})}function X(ie){ee[ie?"unshift":"push"](()=>{d=ie,t(5,d)})}function J(ie){ee[ie?"unshift":"push"](()=>{m=ie,t(6,m)})}const Z=()=>h==null?void 0:h.reloadLoadedPages(),le=()=>h==null?void 0:h.reloadLoadedPages();function ne(ie){ee[ie?"unshift":"push"](()=>{_=ie,t(7,_)})}return n.$$.update=()=>{if(n.$$.dirty[0]&8192&&t(12,i=new URLSearchParams(r)),n.$$.dirty[0]&6152&&!o&&i.get("collectionId")&&i.get("collectionId")!=S&&Ey(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&S!=s.id&&C(),n.$$.dirty[0]&4&&s!=null&&s.id&&$(),n.$$.dirty[0]&7&&(y||b||s!=null&&s.id)){const ie=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:y}).toString();ji("/collections?"+ie)}n.$$.dirty[0]&4&&sn(Tt,l=(s==null?void 0:s.name)||"Collections",l)},[b,y,s,o,c,d,m,_,h,a,u,S,i,r,T,M,O,D,L,P,N,F,R,q,H,W,X,J,Z,le,ne]}class HE extends ge{constructor(e){super(),_e(this,e,zE,VE,me,{},null,[-1,-1])}}function BE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L,P,N;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=E(),l=v("a"),l.innerHTML=` + New record`,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[40]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function gE(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[39]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function ih(n){let e,t,i,s,l,o,r,a,u,f;function c(){return n[36](n[55])}return{c(){e=v("td"),t=v("div"),i=v("input"),o=E(),r=v("label"),p(i,"type","checkbox"),p(i,"id",s="checkbox_"+n[55].id),i.checked=l=n[6][n[55].id],p(r,"for",a="checkbox_"+n[55].id),p(t,"class","form-field"),p(e,"class","bulk-select-col min-width")},m(d,m){w(d,e,m),g(e,t),g(t,i),g(t,o),g(t,r),u||(f=[J(i,"change",c),J(t,"click",An(n[26]))],u=!0)},p(d,m){n=d,m[0]&16&&s!==(s="checkbox_"+n[55].id)&&p(i,"id",s),m[0]&80&&l!==(l=n[6][n[55].id])&&(i.checked=l),m[0]&16&&a!==(a="checkbox_"+n[55].id)&&p(r,"for",a)},d(d){d&&k(e),u=!1,Ee(f)}}}function sh(n){let e,t,i,s,l,o,r=n[55].id+"",a,u,f;s=new Fl({props:{value:n[55].id}});let c=n[2].$isAuth&&lh(n);return{c(){e=v("td"),t=v("div"),i=v("div"),H(s.$$.fragment),l=E(),o=v("div"),a=U(r),u=E(),c&&c.c(),p(o,"class","txt"),p(i,"class","label"),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(d,m){w(d,e,m),g(e,t),g(t,i),V(s,i,null),g(i,l),g(i,o),g(o,a),g(t,u),c&&c.m(t,null),f=!0},p(d,m){const _={};m[0]&16&&(_.value=d[55].id),s.$set(_),(!f||m[0]&16)&&r!==(r=d[55].id+"")&&se(a,r),d[2].$isAuth?c?c.p(d,m):(c=lh(d),c.c(),c.m(t,null)):c&&(c.d(1),c=null)},i(d){f||(A(s.$$.fragment,d),f=!0)},o(d){I(s.$$.fragment,d),f=!1},d(d){d&&k(e),z(s),c&&c.d()}}}function lh(n){let e;function t(l,o){return l[55].verified?vE:bE}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function bE(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){w(s,e,l),t||(i=Me(He.call(null,e,"Unverified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function vE(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){w(s,e,l),t||(i=Me(He.call(null,e,"Verified")),t=!0)},d(s){s&&k(e),t=!1,i()}}}function oh(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&rh(n),o=i&&ah(n);return{c(){l&&l.c(),t=E(),o&&o.c(),s=ye()},m(r,a){l&&l.m(r,a),w(r,t,a),o&&o.m(r,a),w(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=rh(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=ah(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&k(t),o&&o.d(r),r&&k(s)}}}function rh(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[55].username)),t?kE:yE}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){w(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&k(e),l.d()}}}function yE(n){let e,t=n[55].username+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[55].username)},m(l,o){w(l,e,o),g(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].username+"")&&se(i,t),o[0]&16&&s!==(s=l[55].username)&&p(e,"title",s)},d(l){l&&k(e)}}}function kE(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function ah(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(o[55].email)),t?SE:wE}let s=i(n,[-1,-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){w(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&k(e),l.d()}}}function wE(n){let e,t=n[55].email+"",i,s;return{c(){e=v("span"),i=U(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[55].email)},m(l,o){w(l,e,o),g(e,i)},p(l,o){o[0]&16&&t!==(t=l[55].email+"")&&se(i,t),o[0]&16&&s!==(s=l[55].email)&&p(e,"title",s)},d(l){l&&k(e)}}}function SE(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function uh(n,e){let t,i,s,l;return i=new M1({props:{short:!0,record:e[55],field:e[58]}}),{key:n,first:null,c(){t=v("td"),H(i.$$.fragment),p(t,"class",s="col-type-"+e[58].type+" col-field-"+e[58].name),this.first=t},m(o,r){w(o,t,r),V(i,t,null),l=!0},p(o,r){e=o;const a={};r[0]&16&&(a.record=e[55]),r[0]&262144&&(a.field=e[58]),i.$set(a),(!l||r[0]&262144&&s!==(s="col-type-"+e[58].type+" col-field-"+e[58].name))&&p(t,"class",s)},i(o){l||(A(i.$$.fragment,o),l=!0)},o(o){I(i.$$.fragment,o),l=!1},d(o){o&&k(t),z(i)}}}function fh(n){let e,t,i;return t=new wi({props:{date:n[55].created}}),{c(){e=v("td"),H(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].created),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),z(t)}}}function ch(n){let e,t,i;return t=new wi({props:{date:n[55].updated}}),{c(){e=v("td"),H(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[55].updated),t.$set(o)},i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),z(t)}}}function dh(n,e){let t,i,s=!e[7].includes("@id"),l,o,r=[],a=new Map,u,f=e[10]&&!e[7].includes("@created"),c,d=e[9]&&!e[7].includes("@updated"),m,_,h,b,y,S,C=!e[2].$isView&&ih(e),$=s&&sh(e),T=e[2].$isAuth&&oh(e),M=e[18];const O=F=>F[58].name;for(let F=0;F',h=E(),p(_,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(F,R){w(F,t,R),C&&C.m(t,null),g(t,i),$&&$.m(t,null),g(t,l),T&&T.m(t,null),g(t,o);for(let q=0;q{$=null}),ue()),e[2].$isAuth?T?T.p(e,R):(T=oh(e),T.c(),T.m(t,o)):T&&(T.d(1),T=null),R[0]&262160&&(M=e[18],ae(),r=bt(r,R,O,1,e,M,a,t,Bt,uh,u,Um),ue()),R[0]&1152&&(f=e[10]&&!e[7].includes("@created")),f?D?(D.p(e,R),R[0]&1152&&A(D,1)):(D=fh(e),D.c(),A(D,1),D.m(t,c)):D&&(ae(),I(D,1,1,()=>{D=null}),ue()),R[0]&640&&(d=e[9]&&!e[7].includes("@updated")),d?L?(L.p(e,R),R[0]&640&&A(L,1)):(L=ch(e),L.c(),A(L,1),L.m(t,m)):L&&(ae(),I(L,1,1,()=>{L=null}),ue())},i(F){if(!b){A($);for(let R=0;RW[58].name;for(let W=0;WW[2].$isView?W[55]:W[55].id;for(let W=0;W{M=null}),ue()),W[2].$isAuth?O?(O.p(W,X),X[0]&4&&A(O,1)):(O=Zm(W),O.c(),A(O,1),O.m(i,r)):O&&(ae(),I(O,1,1,()=>{O=null}),ue()),X[0]&262145&&(D=W[18],ae(),a=bt(a,X,L,1,W,D,u,i,Bt,Qm,f,Wm),ue()),X[0]&1152&&(c=W[10]&&!W[7].includes("@created")),c?P?(P.p(W,X),X[0]&1152&&A(P,1)):(P=xm(W),P.c(),A(P,1),P.m(i,d)):P&&(ae(),I(P,1,1,()=>{P=null}),ue()),X[0]&640&&(m=W[9]&&!W[7].includes("@updated")),m?N?(N.p(W,X),X[0]&640&&A(N,1)):(N=eh(W),N.c(),A(N,1),N.m(i,_)):N&&(ae(),I(N,1,1,()=>{N=null}),ue()),W[15].length?F?F.p(W,X):(F=th(W),F.c(),F.m(h,null)):F&&(F.d(1),F=null),X[0]&4986582&&(R=W[4],ae(),S=bt(S,X,q,1,W,R,C,y,Bt,dh,null,Bm),ue(),!R.length&&j?j.p(W,X):R.length?j&&(j.d(1),j=null):(j=nh(W),j.c(),j.m(y,null))),(!$||X[0]&4096)&&Q(e,"table-loading",W[12])},i(W){if(!$){A(M),A(O);for(let X=0;X({54:l}),({uniqueId:l})=>[0,l?8388608:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=ye(),H(i.$$.fragment),this.first=t},m(l,o){w(l,t,o),V(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&32896|o[1]&8388608|o[2]&2&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(A(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&k(t),z(i,l)}}}function TE(n){let e,t,i=[],s=new Map,l,o,r=n[15];const a=u=>u[51].id+u[51].name;for(let u=0;u{i=null}),ue())},i(s){t||(A(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&k(e)}}}function hh(n){let e,t,i=n[4].length+"",s,l,o;return{c(){e=v("small"),t=U("Showing "),s=U(i),l=U(" of "),o=U(n[5]),p(e,"class","block txt-hint txt-right m-t-sm")},m(r,a){w(r,e,a),g(e,t),g(e,s),g(e,l),g(e,o)},p(r,a){a[0]&16&&i!==(i=r[4].length+"")&&se(s,i),a[0]&32&&se(o,r[5])},d(r){r&&k(e)}}}function _h(n){let e,t,i,s,l=n[5]-n[4].length+"",o,r,a,u;return{c(){e=v("div"),t=v("button"),i=v("span"),s=U("Load more ("),o=U(l),r=U(")"),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-lg btn-secondary btn-expanded"),Q(t,"btn-loading",n[12]),Q(t,"btn-disabled",n[12]),p(e,"class","block txt-center m-t-xs")},m(f,c){w(f,e,c),g(e,t),g(t,i),g(i,s),g(i,o),g(i,r),a||(u=J(t,"click",n[41]),a=!0)},p(f,c){c[0]&48&&l!==(l=f[5]-f[4].length+"")&&se(o,l),c[0]&4096&&Q(t,"btn-loading",f[12]),c[0]&4096&&Q(t,"btn-disabled",f[12])},d(f){f&&k(e),a=!1,u()}}}function gh(n){let e,t,i,s,l,o,r=n[8]===1?"record":"records",a,u,f,c,d,m,_,h,b,y,S;return{c(){e=v("div"),t=v("div"),i=U("Selected "),s=v("strong"),l=U(n[8]),o=E(),a=U(r),u=E(),f=v("button"),f.innerHTML='Reset',c=E(),d=v("div"),m=E(),_=v("button"),_.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-transparent btn-outline p-l-5 p-r-5"),Q(f,"btn-disabled",n[13]),p(d,"class","flex-fill"),p(_,"type","button"),p(_,"class","btn btn-sm btn-transparent btn-danger"),Q(_,"btn-loading",n[13]),Q(_,"btn-disabled",n[13]),p(e,"class","bulkbar")},m(C,$){w(C,e,$),g(e,t),g(t,i),g(t,s),g(s,l),g(t,o),g(t,a),g(e,u),g(e,f),g(e,c),g(e,d),g(e,m),g(e,_),b=!0,y||(S=[J(f,"click",n[42]),J(_,"click",n[43])],y=!0)},p(C,$){(!b||$[0]&256)&&se(l,C[8]),(!b||$[0]&256)&&r!==(r=C[8]===1?"record":"records")&&se(a,r),(!b||$[0]&8192)&&Q(f,"btn-disabled",C[13]),(!b||$[0]&8192)&&Q(_,"btn-loading",C[13]),(!b||$[0]&8192)&&Q(_,"btn-disabled",C[13])},i(C){b||(C&&Qe(()=>{b&&(h||(h=je(e,fi,{duration:150,y:5},!0)),h.run(1))}),b=!0)},o(C){C&&(h||(h=je(e,fi,{duration:150,y:5},!1)),h.run(0)),b=!1},d(C){C&&k(e),C&&h&&h.end(),y=!1,Ee(S)}}}function OE(n){let e,t,i,s,l,o;e=new ja({props:{class:"table-wrapper",$$slots:{before:[ME],default:[$E]},$$scope:{ctx:n}}});let r=n[4].length&&hh(n),a=n[4].length&&n[17]&&_h(n),u=n[8]&&gh(n);return{c(){H(e.$$.fragment),t=E(),r&&r.c(),i=E(),a&&a.c(),s=E(),u&&u.c(),l=ye()},m(f,c){V(e,f,c),w(f,t,c),r&&r.m(f,c),w(f,i,c),a&&a.m(f,c),w(f,s,c),u&&u.m(f,c),w(f,l,c),o=!0},p(f,c){const d={};c[0]&382679|c[2]&2&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=hh(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[17]?a?a.p(f,c):(a=_h(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&A(u,1)):(u=gh(f),u.c(),A(u,1),u.m(l.parentNode,l)):u&&(ae(),I(u,1,1,()=>{u=null}),ue())},i(f){o||(A(e.$$.fragment,f),A(u),o=!0)},o(f){I(e.$$.fragment,f),I(u),o=!1},d(f){z(e,f),f&&k(t),r&&r.d(f),f&&k(i),a&&a.d(f),f&&k(s),u&&u.d(f),f&&k(l)}}}const EE=/^([\+\-])?(\w+)$/;function DE(n,e,t){let i,s,l,o,r,a,u,f;const c=$t();let{collection:d}=e,{sort:m=""}=e,{filter:_=""}=e,h=[],b=1,y=0,S={},C=!0,$=!1,T=0,M,O=[],D=[];function L(){d!=null&&d.id&&localStorage.setItem((d==null?void 0:d.id)+"@hiddenCollumns",JSON.stringify(O))}function P(){if(t(7,O=[]),!!(d!=null&&d.id))try{const $e=localStorage.getItem(d.id+"@hiddenCollumns");$e&&t(7,O=JSON.parse($e)||[])}catch{}}async function N(){const $e=b;for(let nt=1;nt<=$e;nt++)(nt===1||o)&&await F(nt,!1)}async function F($e=1,nt=!0){var ei,Sn;if(!(d!=null&&d.id))return;t(12,C=!0);let At=m;const It=At.match(EE),Ut=It?s.find(_t=>_t.name===It[2]):null;if(It&&((Sn=(ei=Ut==null?void 0:Ut.options)==null?void 0:ei.displayFields)==null?void 0:Sn.length)>0){const _t=[];for(const Pn of Ut.options.displayFields)_t.push((It[1]||"")+It[2]+"."+Pn);At=_t.join(",")}const Ln=B.getAllCollectionIdentifiers(d);return ce.collection(d.id).getList($e,30,{sort:At,filter:B.normalizeSearchFilter(_,Ln),expand:s.map(_t=>_t.name).join(","),$cancelKey:"records_list"}).then(async _t=>{if($e<=1&&R(),t(12,C=!1),t(11,b=_t.page),t(5,y=_t.totalItems),c("load",h.concat(_t.items)),nt){const Pn=++T;for(;_t.items.length&&T==Pn;)t(4,h=h.concat(_t.items.splice(0,15))),await B.yieldToMain()}else t(4,h=h.concat(_t.items))}).catch(_t=>{_t!=null&&_t.isAbort||(t(12,C=!1),console.warn(_t),R(),ce.error(_t,!1))})}function R(){t(4,h=[]),t(11,b=1),t(5,y=0),t(6,S={})}function q(){a?j():W()}function j(){t(6,S={})}function W(){for(const $e of h)t(6,S[$e.id]=$e,S);t(6,S)}function X($e){S[$e.id]?delete S[$e.id]:t(6,S[$e.id]=$e,S),t(6,S)}function K(){pn(`Do you really want to delete the selected ${r===1?"record":"records"}?`,Z)}async function Z(){if($||!r||!(d!=null&&d.id))return;let $e=[];for(const nt of Object.keys(S))$e.push(ce.collection(d.id).delete(nt));return t(13,$=!0),Promise.all($e).then(()=>{zt(`Successfully deleted the selected ${r===1?"record":"records"}.`),j()}).catch(nt=>{ce.error(nt)}).finally(()=>(t(13,$=!1),N()))}function le($e){Ne.call(this,n,$e)}const ne=($e,nt)=>{nt.target.checked?B.removeByValue(O,$e.id):B.pushUnique(O,$e.id),t(7,O)},ie=()=>q();function be($e){m=$e,t(0,m)}function Se($e){m=$e,t(0,m)}function Ve($e){m=$e,t(0,m)}function Be($e){m=$e,t(0,m)}function ke($e){m=$e,t(0,m)}function Te($e){m=$e,t(0,m)}function Ze($e){ee[$e?"unshift":"push"](()=>{M=$e,t(14,M)})}const ht=$e=>X($e),Ge=$e=>c("select",$e),Ye=($e,nt)=>{nt.code==="Enter"&&(nt.preventDefault(),c("select",$e))},we=()=>t(1,_=""),fe=()=>c("new"),ze=()=>F(b+1),Dt=()=>j(),Le=()=>K();return n.$$set=$e=>{"collection"in $e&&t(2,d=$e.collection),"sort"in $e&&t(0,m=$e.sort),"filter"in $e&&t(1,_=$e.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&d!=null&&d.id&&(P(),R()),n.$$.dirty[0]&4&&t(25,i=(d==null?void 0:d.schema)||[]),n.$$.dirty[0]&33554432&&(s=i.filter($e=>$e.type==="relation")),n.$$.dirty[0]&33554560&&t(18,l=i.filter($e=>!O.includes($e.id))),n.$$.dirty[0]&7&&d!=null&&d.id&&m!==-1&&_!==-1&&F(1),n.$$.dirty[0]&48&&t(17,o=y>h.length),n.$$.dirty[0]&64&&t(8,r=Object.keys(S).length),n.$$.dirty[0]&272&&t(16,a=h.length&&r===h.length),n.$$.dirty[0]&128&&O!==-1&&L(),n.$$.dirty[0]&20&&t(10,u=!(d!=null&&d.$isView)||h.length>0&&h[0].created!=""),n.$$.dirty[0]&20&&t(9,f=!(d!=null&&d.$isView)||h.length>0&&h[0].updated!=""),n.$$.dirty[0]&33555972&&t(15,D=[].concat(d.$isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],i.map($e=>({id:$e.id,name:$e.name})),u?{id:"@created",name:"created"}:[],f?{id:"@updated",name:"updated"}:[]))},[m,_,d,F,h,y,S,O,r,f,u,b,C,$,M,D,a,o,l,c,q,j,X,K,N,i,le,ne,ie,be,Se,Ve,Be,ke,Te,Ze,ht,Ge,Ye,we,fe,ze,Dt,Le]}class AE extends ge{constructor(e){super(),_e(this,e,DE,OE,me,{collection:2,sort:0,filter:1,reloadLoadedPages:24,load:3},null,[-1,-1,-1])}get reloadLoadedPages(){return this.$$.ctx[24]}get load(){return this.$$.ctx[3]}}function IE(n){let e,t,i,s;return e=new TM({}),i=new wn({props:{$$slots:{default:[NE]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,o){const r={};o[0]&1527|o[1]&16&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){z(e,l),l&&k(t),z(i,l)}}}function LE(n){let e,t;return e=new wn({props:{center:!0,$$slots:{default:[qE]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&1040|s[1]&16&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function PE(n){let e,t;return e=new wn({props:{center:!0,$$slots:{default:[jE]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[1]&16&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function bh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"aria-label","Edit collection"),p(e,"class","btn btn-transparent btn-circle")},m(s,l){w(s,e,l),t||(i=[Me(He.call(null,e,{text:"Edit collection",position:"right"})),J(e,"click",n[15])],t=!0)},p:x,d(s){s&&k(e),t=!1,Ee(i)}}}function vh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + New record`,p(e,"type","button"),p(e,"class","btn btn-expanded")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[18]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function NE(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L,P,N=!n[10]&&bh(n);c=new Go({}),c.$on("refresh",n[16]);let F=!n[2].$isView&&vh(n);y=new Zo({props:{value:n[0],autocompleteCollection:n[2]}}),y.$on("submit",n[19]);function R(W){n[21](W)}function q(W){n[22](W)}let j={collection:n[2]};return n[0]!==void 0&&(j.filter=n[0]),n[1]!==void 0&&(j.sort=n[1]),T=new AE({props:j}),n[20](T),ee.push(()=>de(T,"filter",R)),ee.push(()=>de(T,"sort",q)),T.$on("select",n[23]),T.$on("new",n[24]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=E(),l=v("div"),r=U(o),a=E(),u=v("div"),N&&N.c(),f=E(),H(c.$$.fragment),d=E(),m=v("div"),_=v("button"),_.innerHTML=` + API Preview`,h=E(),F&&F.c(),b=E(),H(y.$$.fragment),S=E(),C=v("div"),$=E(),H(T.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(_,"type","button"),p(_,"class","btn btn-outline"),p(m,"class","btns-group"),p(e,"class","page-header"),p(C,"class","clearfix m-b-base")},m(W,X){w(W,e,X),g(e,t),g(t,i),g(t,s),g(t,l),g(l,r),g(e,a),g(e,u),N&&N.m(u,null),g(u,f),V(c,u,null),g(e,d),g(e,m),g(m,_),g(m,h),F&&F.m(m,null),w(W,b,X),V(y,W,X),w(W,S,X),w(W,C,X),w(W,$,X),V(T,W,X),D=!0,L||(P=J(_,"click",n[17]),L=!0)},p(W,X){(!D||X[0]&4)&&o!==(o=W[2].name+"")&&se(r,o),W[10]?N&&(N.d(1),N=null):N?N.p(W,X):(N=bh(W),N.c(),N.m(u,f)),W[2].$isView?F&&(F.d(1),F=null):F?F.p(W,X):(F=vh(W),F.c(),F.m(m,null));const K={};X[0]&1&&(K.value=W[0]),X[0]&4&&(K.autocompleteCollection=W[2]),y.$set(K);const Z={};X[0]&4&&(Z.collection=W[2]),!M&&X[0]&1&&(M=!0,Z.filter=W[0],he(()=>M=!1)),!O&&X[0]&2&&(O=!0,Z.sort=W[1],he(()=>O=!1)),T.$set(Z)},i(W){D||(A(c.$$.fragment,W),A(y.$$.fragment,W),A(T.$$.fragment,W),D=!0)},o(W){I(c.$$.fragment,W),I(y.$$.fragment,W),I(T.$$.fragment,W),D=!1},d(W){W&&k(e),N&&N.d(),z(c),F&&F.d(),W&&k(b),z(y,W),W&&k(S),W&&k(C),W&&k($),n[20](null),z(T,W),L=!1,P()}}}function FE(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=E(),i=v("button"),i.innerHTML=` + Create new collection`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){w(o,e,r),w(o,t,r),w(o,i,r),s||(l=J(i,"click",n[14]),s=!0)},p:x,d(o){o&&k(e),o&&k(t),o&&k(i),s=!1,l()}}}function RE(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function qE(n){let e,t,i;function s(r,a){return r[10]?RE:FE}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=E(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){w(r,e,a),g(e,t),g(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&k(e),o.d()}}}function jE(n){let e;return{c(){e=v("div"),e.innerHTML=` +

    Loading collections...

    `,p(e,"class","placeholder-section m-b-base")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function VE(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[PE,LE,IE],m=[];function _(C,$){return C[3]&&!C[9].length?0:C[9].length?2:1}e=_(n),t=m[e]=d[e](n);let h={};s=new cu({props:h}),n[25](s);let b={};o=new PM({props:b}),n[26](o);let y={collection:n[2]};a=new T1({props:y}),n[27](a),a.$on("save",n[28]),a.$on("delete",n[29]);let S={collection:n[2]};return f=new lE({props:S}),n[30](f),{c(){t.c(),i=E(),H(s.$$.fragment),l=E(),H(o.$$.fragment),r=E(),H(a.$$.fragment),u=E(),H(f.$$.fragment)},m(C,$){m[e].m(C,$),w(C,i,$),V(s,C,$),w(C,l,$),V(o,C,$),w(C,r,$),V(a,C,$),w(C,u,$),V(f,C,$),c=!0},p(C,$){let T=e;e=_(C),e===T?m[e].p(C,$):(ae(),I(m[T],1,1,()=>{m[T]=null}),ue(),t=m[e],t?t.p(C,$):(t=m[e]=d[e](C),t.c()),A(t,1),t.m(i.parentNode,i));const M={};s.$set(M);const O={};o.$set(O);const D={};$[0]&4&&(D.collection=C[2]),a.$set(D);const L={};$[0]&4&&(L.collection=C[2]),f.$set(L)},i(C){c||(A(t),A(s.$$.fragment,C),A(o.$$.fragment,C),A(a.$$.fragment,C),A(f.$$.fragment,C),c=!0)},o(C){I(t),I(s.$$.fragment,C),I(o.$$.fragment,C),I(a.$$.fragment,C),I(f.$$.fragment,C),c=!1},d(C){m[e].d(C),C&&k(i),n[25](null),z(s,C),C&&k(l),n[26](null),z(o,C),C&&k(r),n[27](null),z(a,C),C&&k(u),n[30](null),z(f,C)}}}function zE(n,e,t){let i,s,l,o,r,a,u;Je(n,ui,ie=>t(2,s=ie)),Je(n,Tt,ie=>t(31,l=ie)),Je(n,wo,ie=>t(3,o=ie)),Je(n,Ca,ie=>t(13,r=ie)),Je(n,ci,ie=>t(9,a=ie)),Je(n,As,ie=>t(10,u=ie));const f=new URLSearchParams(r);let c,d,m,_,h,b=f.get("filter")||"",y=f.get("sort")||"-created",S=f.get("collectionId")||(s==null?void 0:s.id);function C(){t(11,S=s==null?void 0:s.id),t(0,b=""),t(1,y="-created"),$()}async function $(){if(!y)return;const ie=B.getAllCollectionIdentifiers(s),be=y.split(",").map(Se=>Se.startsWith("+")||Se.startsWith("-")?Se.substring(1):Se);be.filter(Se=>ie.includes(Se)).length!=be.length&&(ie.includes("created")?t(1,y="-created"):t(1,y=""))}Py(S);const T=()=>c==null?void 0:c.show(),M=()=>c==null?void 0:c.show(s),O=()=>h==null?void 0:h.load(),D=()=>d==null?void 0:d.show(s),L=()=>m==null?void 0:m.show(),P=ie=>t(0,b=ie.detail);function N(ie){ee[ie?"unshift":"push"](()=>{h=ie,t(8,h)})}function F(ie){b=ie,t(0,b)}function R(ie){y=ie,t(1,y)}const q=ie=>{s.$isView?_.show(ie==null?void 0:ie.detail):m==null||m.show(ie==null?void 0:ie.detail)},j=()=>m==null?void 0:m.show();function W(ie){ee[ie?"unshift":"push"](()=>{c=ie,t(4,c)})}function X(ie){ee[ie?"unshift":"push"](()=>{d=ie,t(5,d)})}function K(ie){ee[ie?"unshift":"push"](()=>{m=ie,t(6,m)})}const Z=()=>h==null?void 0:h.reloadLoadedPages(),le=()=>h==null?void 0:h.reloadLoadedPages();function ne(ie){ee[ie?"unshift":"push"](()=>{_=ie,t(7,_)})}return n.$$.update=()=>{if(n.$$.dirty[0]&8192&&t(12,i=new URLSearchParams(r)),n.$$.dirty[0]&6152&&!o&&i.get("collectionId")&&i.get("collectionId")!=S&&Ay(i.get("collectionId")),n.$$.dirty[0]&2052&&s!=null&&s.id&&S!=s.id&&C(),n.$$.dirty[0]&4&&s!=null&&s.id&&$(),n.$$.dirty[0]&7&&(y||b||s!=null&&s.id)){const ie=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:y}).toString();ji("/collections?"+ie)}n.$$.dirty[0]&4&&sn(Tt,l=(s==null?void 0:s.name)||"Collections",l)},[b,y,s,o,c,d,m,_,h,a,u,S,i,r,T,M,O,D,L,P,N,F,R,q,j,W,X,K,Z,le,ne]}class HE extends ge{constructor(e){super(),_e(this,e,zE,VE,me,{},null,[-1,-1])}}function BE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L,P,N;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=E(),l=v("a"),l.innerHTML=` Application`,o=E(),r=v("a"),r.innerHTML=` Mail settings`,a=E(),u=v("a"),u.innerHTML=` Files storage`,f=E(),c=v("a"),c.innerHTML=` @@ -158,24 +158,24 @@ Updated: ${o[3].updated}`,position:"left"})},d(o){o&&k(e),s=!1,l()}}}function cO Import collections`,S=E(),C=v("div"),C.textContent="Authentication",$=E(),T=v("a"),T.innerHTML=` Auth providers`,M=E(),O=v("a"),O.innerHTML=` Token options`,D=E(),L=v("a"),L.innerHTML=` - Admins`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"href","/settings/backups"),p(c,"class","sidebar-list-item"),p(m,"class","sidebar-title"),p(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(y,"href","/settings/import-collections"),p(y,"class","sidebar-list-item"),p(C,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"class","sidebar-list-item"),p(O,"href","/settings/tokens"),p(O,"class","sidebar-list-item"),p(L,"href","/settings/admins"),p(L,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(F,R){w(F,e,R),g(e,t),g(t,i),g(t,s),g(t,l),g(t,o),g(t,r),g(t,a),g(t,u),g(t,f),g(t,c),g(t,d),g(t,m),g(t,_),g(t,h),g(t,b),g(t,y),g(t,S),g(t,C),g(t,$),g(t,T),g(t,M),g(t,O),g(t,D),g(t,L),P||(N=[Me(Vn.call(null,l,{path:"/settings"})),Me(on.call(null,l)),Me(Vn.call(null,r,{path:"/settings/mail/?.*"})),Me(on.call(null,r)),Me(Vn.call(null,u,{path:"/settings/storage/?.*"})),Me(on.call(null,u)),Me(Vn.call(null,c,{path:"/settings/backups/?.*"})),Me(on.call(null,c)),Me(Vn.call(null,h,{path:"/settings/export-collections/?.*"})),Me(on.call(null,h)),Me(Vn.call(null,y,{path:"/settings/import-collections/?.*"})),Me(on.call(null,y)),Me(Vn.call(null,T,{path:"/settings/auth-providers/?.*"})),Me(on.call(null,T)),Me(Vn.call(null,O,{path:"/settings/tokens/?.*"})),Me(on.call(null,O)),Me(Vn.call(null,L,{path:"/settings/admins/?.*"})),Me(on.call(null,L))],P=!0)},p:x,i:x,o:x,d(F){F&&k(e),P=!1,Ee(N)}}}class Ci extends ge{constructor(e){super(),_e(this,e,null,BE,me,{})}}function bh(n,e,t){const i=n.slice();return i[30]=e[t],i}function vh(n){let e,t;return e=new pe({props:{class:"form-field readonly",name:"id",$$slots:{default:[UE,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function UE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="id",o=E(),r=v("div"),a=v("i"),f=E(),c=v("input"),p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[29]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[29]),c.value=m=n[1].id,c.readOnly=!0},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),w(b,r,y),g(r,a),w(b,f,y),w(b,c,y),_||(h=Me(u=He.call(null,a,{text:`Created: ${n[1].created} -Updated: ${n[1].updated}`,position:"left"})),_=!0)},p(b,y){y[0]&536870912&&l!==(l=b[29])&&p(e,"for",l),u&&qt(u.update)&&y[0]&2&&u.update.call(null,{text:`Created: ${b[1].created} -Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c,"id",d),y[0]&2&&m!==(m=b[1].id)&&c.value!==m&&(c.value=m)},d(b){b&&k(e),b&&k(o),b&&k(r),b&&k(f),b&&k(c),_=!1,h()}}}function yh(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=E(),hn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){w(u,e,f),g(e,t),g(e,s),o||(r=K(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&k(e),o=!1,r()}}}function WE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Email",o=E(),r=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[3]),u||(f=K(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&re(r,c[3])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function kh(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle",$$slots:{default:[YE,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function YE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function wh(n){let e,t,i,s,l,o,r,a,u;return s=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[KE,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[JE,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){w(f,e,c),g(e,t),g(t,i),j(s,i,null),g(t,l),g(t,o),j(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&536871424|c[1]&4&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&Qe(()=>{u&&(a||(a=je(t,ot,{duration:150},!0)),a.run(1))}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(t,ot,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),V(s),V(r),f&&a&&a.end()}}}function KE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[8]),u||(f=K(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&re(r,c[8])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function JE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password confirm",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[9]),u||(f=K(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&re(r,c[9])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function ZE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_=!n[1].$isNew&&vh(n),h=[0,1,2,3,4,5,6,7,8,9],b=[];for(let C=0;C<10;C+=1)b[C]=yh(bh(n,h,C));a=new pe({props:{class:"form-field required",name:"email",$$slots:{default:[WE,({uniqueId:C})=>({29:C}),({uniqueId:C})=>[C?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].$isNew&&kh(n),S=(n[1].$isNew||n[4])&&wh(n);return{c(){e=v("form"),_&&_.c(),t=E(),i=v("div"),s=v("p"),s.textContent="Avatar",l=E(),o=v("div");for(let C=0;C<10;C+=1)b[C].c();r=E(),z(a.$$.fragment),u=E(),y&&y.c(),f=E(),S&&S.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(C,$){w(C,e,$),_&&_.m(e,null),g(e,t),g(e,i),g(i,s),g(i,l),g(i,o);for(let T=0;T<10;T+=1)b[T]&&b[T].m(o,null);g(e,r),j(a,e,null),g(e,u),y&&y.m(e,null),g(e,f),S&&S.m(e,null),c=!0,d||(m=K(e,"submit",et(n[12])),d=!0)},p(C,$){if(C[1].$isNew?_&&(ae(),I(_,1,1,()=>{_=null}),ue()):_?(_.p(C,$),$[0]&2&&A(_,1)):(_=vh(C),_.c(),A(_,1),_.m(e,t)),$[0]&4){h=[0,1,2,3,4,5,6,7,8,9];let M;for(M=0;M<10;M+=1){const O=bh(C,h,M);b[M]?b[M].p(O,$):(b[M]=yh(O),b[M].c(),b[M].m(o,null))}for(;M<10;M+=1)b[M].d(1)}const T={};$[0]&536870920|$[1]&4&&(T.$$scope={dirty:$,ctx:C}),a.$set(T),C[1].$isNew?y&&(ae(),I(y,1,1,()=>{y=null}),ue()):y?(y.p(C,$),$[0]&2&&A(y,1)):(y=kh(C),y.c(),A(y,1),y.m(e,f)),C[1].$isNew||C[4]?S?(S.p(C,$),$[0]&18&&A(S,1)):(S=wh(C),S.c(),A(S,1),S.m(e,null)):S&&(ae(),I(S,1,1,()=>{S=null}),ue())},i(C){c||(A(_),A(a.$$.fragment,C),A(y),A(S),c=!0)},o(C){I(_),I(a.$$.fragment,C),I(y),I(S),c=!1},d(C){C&&k(e),_&&_.d(),mt(b,C),V(a),y&&y.d(),S&&S.d(),d=!1,m()}}}function GE(n){let e,t=n[1].$isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=U(t)},m(s,l){w(s,e,l),g(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].$isNew?"New admin":"Edit admin")&&se(i,t)},d(s){s&&k(e)}}}function Sh(n){let e,t,i,s,l,o,r,a,u;return o=new Kn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[XE]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=E(),s=v("i"),l=E(),z(o.$$.fragment),r=E(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"aria-label","More"),p(e,"class","btn btn-sm btn-circle btn-transparent"),p(a,"class","flex-fill")},m(f,c){w(f,e,c),g(e,t),g(e,i),g(e,s),g(e,l),j(o,e,null),w(f,r,c),w(f,a,c),u=!0},p(f,c){const d={};c[1]&4&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){I(o.$$.fragment,f),u=!1},d(f){f&&k(e),V(o),f&&k(r),f&&k(a)}}}function XE(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[15]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function QE(n){let e,t,i,s,l,o,r=n[1].$isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].$isNew&&Sh(n);return{c(){m&&m.c(),e=E(),t=v("button"),i=v("span"),i.textContent="Cancel",s=E(),l=v("button"),o=v("span"),a=U(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-transparent"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],Q(l,"btn-loading",n[6])},m(_,h){m&&m.m(_,h),w(_,e,h),w(_,t,h),g(t,i),w(_,s,h),w(_,l,h),g(l,o),g(o,a),f=!0,c||(d=K(t,"click",n[16]),c=!0)},p(_,h){_[1].$isNew?m&&(ae(),I(m,1,1,()=>{m=null}),ue()):m?(m.p(_,h),h[0]&2&&A(m,1)):(m=Sh(_),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||h[0]&64)&&(t.disabled=_[6]),(!f||h[0]&2)&&r!==(r=_[1].$isNew?"Create":"Save changes")&&se(a,r),(!f||h[0]&1088&&u!==(u=!_[10]||_[6]))&&(l.disabled=u),(!f||h[0]&64)&&Q(l,"btn-loading",_[6])},i(_){f||(A(m),f=!0)},o(_){I(m),f=!1},d(_){m&&m.d(_),_&&k(e),_&&k(t),_&&k(s),_&&k(l),c=!1,d()}}}function xE(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[QE],header:[GE],default:[ZE]},$$scope:{ctx:n}};return e=new ln({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[23](null),V(e,s)}}}function eD(n,e,t){let i;const s=$t(),l="admin_"+B.randomString(5);let o,r=new os,a=!1,u=!1,f=0,c="",d="",m="",_=!1;function h(W){return y(W),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(W){t(1,r=W!=null&&W.$clone?W.$clone():new os),S()}function S(){t(4,_=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,m=""),en({})}function C(){if(a||!i)return;t(6,a=!0);const W={email:c,avatar:f};(r.$isNew||_)&&(W.password=d,W.passwordConfirm=m);let X;r.$isNew?X=ce.admins.create(W):X=ce.admins.update(r.id,W),X.then(async J=>{var Z;t(7,u=!1),b(),zt(r.$isNew?"Successfully created admin.":"Successfully updated admin."),((Z=ce.authStore.model)==null?void 0:Z.id)===J.id&&ce.authStore.save(ce.authStore.token,J),s("save",J)}).catch(J=>{ce.error(J)}).finally(()=>{t(6,a=!1)})}function $(){r!=null&&r.id&&pn("Do you really want to delete the selected admin?",()=>ce.admins.delete(r.id).then(()=>{t(7,u=!1),b(),zt("Successfully deleted admin."),s("delete",r)}).catch(W=>{ce.error(W)}))}const T=()=>$(),M=()=>b(),O=W=>t(2,f=W);function D(){c=this.value,t(3,c)}function L(){_=this.checked,t(4,_)}function P(){d=this.value,t(8,d)}function N(){m=this.value,t(9,m)}const F=()=>i&&u?(pn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function R(W){ee[W?"unshift":"push"](()=>{o=W,t(5,o)})}function q(W){Ne.call(this,n,W)}function H(W){Ne.call(this,n,W)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.$isNew&&c!=""||_||c!==r.email||f!==r.avatar)},[b,r,f,c,_,o,a,u,d,m,i,l,C,$,h,T,M,O,D,L,P,N,F,R,q,H]}class tD extends ge{constructor(e){super(),_e(this,e,eD,xE,me,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function $h(n,e,t){const i=n.slice();return i[24]=e[t],i}function nD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function iD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function sD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function lD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function Ch(n){let e;function t(l,o){return l[5]?rD:oD}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function oD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Th(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),g(e,t),g(t,i),g(t,s),o&&o.m(t,null),g(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Th(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function rD(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Th(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Mh(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Oh(n,e){let t,i,s,l,o,r,a,u,f,c,d,m=e[24].id+"",_,h,b,y,S,C=e[24].email+"",$,T,M,O,D,L,P,N,F,R,q,H,W,X;f=new Fl({props:{value:e[24].id}});let J=e[24].id===e[7].id&&Mh();D=new wi({props:{date:e[24].created}}),N=new wi({props:{date:e[24].updated}});function Z(){return e[15](e[24])}function le(...ne){return e[16](e[24],...ne)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=E(),a=v("td"),u=v("div"),z(f.$$.fragment),c=E(),d=v("span"),_=U(m),h=E(),J&&J.c(),b=E(),y=v("td"),S=v("span"),$=U(C),M=E(),O=v("td"),z(D.$$.fragment),L=E(),P=v("td"),z(N.$$.fragment),F=E(),R=v("td"),R.innerHTML='',q=E(),hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(d,"class","txt"),p(u,"class","label"),p(a,"class","col-type-text col-field-id"),p(S,"class","txt txt-ellipsis"),p(S,"title",T=e[24].email),p(y,"class","col-type-email col-field-email"),p(O,"class","col-type-date col-field-created"),p(P,"class","col-type-date col-field-updated"),p(R,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ne,ie){w(ne,t,ie),g(t,i),g(i,s),g(s,l),g(t,r),g(t,a),g(a,u),j(f,u,null),g(u,c),g(u,d),g(d,_),g(a,h),J&&J.m(a,null),g(t,b),g(t,y),g(y,S),g(S,$),g(t,M),g(t,O),j(D,O,null),g(t,L),g(t,P),j(N,P,null),g(t,F),g(t,R),g(t,q),H=!0,W||(X=[K(t,"click",Z),K(t,"keydown",le)],W=!0)},p(ne,ie){e=ne,(!H||ie&16&&!hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const be={};ie&16&&(be.value=e[24].id),f.$set(be),(!H||ie&16)&&m!==(m=e[24].id+"")&&se(_,m),e[24].id===e[7].id?J||(J=Mh(),J.c(),J.m(a,null)):J&&(J.d(1),J=null),(!H||ie&16)&&C!==(C=e[24].email+"")&&se($,C),(!H||ie&16&&T!==(T=e[24].email))&&p(S,"title",T);const Se={};ie&16&&(Se.date=e[24].created),D.$set(Se);const Ve={};ie&16&&(Ve.date=e[24].updated),N.$set(Ve)},i(ne){H||(A(f.$$.fragment,ne),A(D.$$.fragment,ne),A(N.$$.fragment,ne),H=!0)},o(ne){I(f.$$.fragment,ne),I(D.$$.fragment,ne),I(N.$$.fragment,ne),H=!1},d(ne){ne&&k(t),V(f),J&&J.d(),V(D),V(N),W=!1,Ee(X)}}}function aD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T=[],M=new Map,O;function D(Z){n[11](Z)}let L={class:"col-type-text",name:"id",$$slots:{default:[nD]},$$scope:{ctx:n}};n[2]!==void 0&&(L.sort=n[2]),o=new an({props:L}),ee.push(()=>de(o,"sort",D));function P(Z){n[12](Z)}let N={class:"col-type-email col-field-email",name:"email",$$slots:{default:[iD]},$$scope:{ctx:n}};n[2]!==void 0&&(N.sort=n[2]),u=new an({props:N}),ee.push(()=>de(u,"sort",P));function F(Z){n[13](Z)}let R={class:"col-type-date col-field-created",name:"created",$$slots:{default:[sD]},$$scope:{ctx:n}};n[2]!==void 0&&(R.sort=n[2]),d=new an({props:R}),ee.push(()=>de(d,"sort",F));function q(Z){n[14](Z)}let H={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[lD]},$$scope:{ctx:n}};n[2]!==void 0&&(H.sort=n[2]),h=new an({props:H}),ee.push(()=>de(h,"sort",q));let W=n[4];const X=Z=>Z[24].id;for(let Z=0;Zr=!1)),o.$set(ne);const ie={};le&134217728&&(ie.$$scope={dirty:le,ctx:Z}),!f&&le&4&&(f=!0,ie.sort=Z[2],he(()=>f=!1)),u.$set(ie);const be={};le&134217728&&(be.$$scope={dirty:le,ctx:Z}),!m&&le&4&&(m=!0,be.sort=Z[2],he(()=>m=!1)),d.$set(be);const Se={};le&134217728&&(Se.$$scope={dirty:le,ctx:Z}),!b&&le&4&&(b=!0,Se.sort=Z[2],he(()=>b=!1)),h.$set(Se),le&186&&(W=Z[4],ae(),T=bt(T,le,X,1,Z,W,M,$,Bt,Oh,null,$h),ue(),!W.length&&J?J.p(Z,le):W.length?J&&(J.d(1),J=null):(J=Ch(Z),J.c(),J.m($,null))),(!O||le&32)&&Q(e,"table-loading",Z[5])},i(Z){if(!O){A(o.$$.fragment,Z),A(u.$$.fragment,Z),A(d.$$.fragment,Z),A(h.$$.fragment,Z);for(let le=0;le - New admin`,m=E(),z(_.$$.fragment),h=E(),b=v("div"),y=E(),z(S.$$.fragment),C=E(),D&&D.c(),$=ye(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p(b,"class","clearfix m-b-base")},m(L,P){w(L,e,P),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),g(e,r),j(a,e,null),g(e,u),g(e,f),g(e,c),g(e,d),w(L,m,P),j(_,L,P),w(L,h,P),w(L,b,P),w(L,y,P),j(S,L,P),w(L,C,P),D&&D.m(L,P),w(L,$,P),T=!0,M||(O=K(d,"click",n[9]),M=!0)},p(L,P){(!T||P&64)&&se(o,L[6]);const N={};P&2&&(N.value=L[1]),_.$set(N);const F={};P&134217918&&(F.$$scope={dirty:P,ctx:L}),S.$set(F),L[4].length?D?D.p(L,P):(D=Eh(L),D.c(),D.m($.parentNode,$)):D&&(D.d(1),D=null)},i(L){T||(A(a.$$.fragment,L),A(_.$$.fragment,L),A(S.$$.fragment,L),T=!0)},o(L){I(a.$$.fragment,L),I(_.$$.fragment,L),I(S.$$.fragment,L),T=!1},d(L){L&&k(e),V(a),L&&k(m),V(_,L),L&&k(h),L&&k(b),L&&k(y),V(S,L),L&&k(C),D&&D.d(L),L&&k($),M=!1,O()}}}function fD(n){let e,t,i,s,l,o;e=new Ci({}),i=new wn({props:{$$slots:{default:[uD]},$$scope:{ctx:n}}});let r={};return l=new tD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(l.$$.fragment)},m(a,u){j(e,a,u),w(a,t,u),j(i,a,u),w(a,s,u),j(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){V(e,a),a&&k(t),V(i,a),a&&k(s),n[18](null),V(l,a)}}}function cD(n,e,t){let i,s,l;Je(n,Ca,N=>t(21,i=N)),Je(n,Tt,N=>t(6,s=N)),Je(n,Ra,N=>t(7,l=N)),sn(Tt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){t(5,u=!0),t(4,a=[]);const N=B.normalizeSearchFilter(f,["id","email","created","updated"]);return ce.admins.getFullList(100,{sort:c||"-created",filter:N}).then(F=>{t(4,a=F),t(5,u=!1)}).catch(F=>{F!=null&&F.isAbort||(t(5,u=!1),console.warn(F),m(),ce.error(F,!1))})}function m(){t(4,a=[])}const _=()=>d(),h=()=>r==null?void 0:r.show(),b=N=>t(1,f=N.detail);function y(N){c=N,t(2,c)}function S(N){c=N,t(2,c)}function C(N){c=N,t(2,c)}function $(N){c=N,t(2,c)}const T=N=>r==null?void 0:r.show(N),M=(N,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(N))},O=()=>t(1,f="");function D(N){ee[N?"unshift":"push"](()=>{r=N,t(3,r)})}const L=()=>d(),P=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const N=new URLSearchParams({filter:f,sort:c}).toString();ji("/settings/admins?"+N),d()}},[d,f,c,r,a,u,s,l,_,h,b,y,S,C,$,T,M,O,D,L,P]}class dD extends ge{constructor(e){super(),_e(this,e,cD,fD,me,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=E(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0]),l.focus(),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&re(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function mD(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Password"),s=E(),l=v("input"),r=E(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[1]),w(d,r,m),w(d,a,m),g(a,u),f||(c=[K(l,"input",n[5]),Me(on.call(null,u))],f=!0)},p(d,m){m&256&&i!==(i=d[8])&&p(e,"for",i),m&256&&o!==(o=d[8])&&p(l,"id",o),m&2&&l.value!==d[1]&&re(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),d&&k(a),f=!1,Ee(c)}}}function hD(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new pe({props:{class:"form-field required",name:"identity",$$slots:{default:[pD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[mD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=E(),z(s.$$.fragment),l=E(),z(o.$$.fragment),r=E(),a=v("button"),a.innerHTML=`Login - `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),Q(a,"btn-disabled",n[2]),Q(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){w(d,e,m),g(e,t),g(e,i),j(s,e,null),g(e,l),j(o,e,null),g(e,r),g(e,a),u=!0,f||(c=K(e,"submit",et(n[3])),f=!0)},p(d,m){const _={};m&769&&(_.$$scope={dirty:m,ctx:d}),s.$set(_);const h={};m&770&&(h.$$scope={dirty:m,ctx:d}),o.$set(h),(!u||m&4)&&Q(a,"btn-disabled",d[2]),(!u||m&4)&&Q(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){I(s.$$.fragment,d),I(o.$$.fragment,d),u=!1},d(d){d&&k(e),V(s),V(o),f=!1,c()}}}function _D(n){let e,t;return e=new gb({props:{$$slots:{default:[hD]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function gD(n,e,t){let i;Je(n,Ca,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),ce.admins.authWithPassword(l,o).then(()=>{Na(),ji("/")}).catch(()=>{Ds("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class bD extends ge{constructor(e){super(),_e(this,e,gD,_D,me,{})}}function vD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T;i=new pe({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[kD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[wD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new pe({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[SD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new pe({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[$D,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&Dh(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),z(f.$$.fragment),c=E(),d=v("div"),m=v("div"),_=E(),M&&M.c(),h=E(),b=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(m,"class","flex-fill"),p(y,"class","txt"),p(b,"type","submit"),p(b,"class","btn btn-expanded"),b.disabled=S=!n[3]||n[2],Q(b,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,D){w(O,e,D),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),g(e,r),j(a,e,null),g(e,u),j(f,e,null),g(e,c),g(e,d),g(d,m),g(d,_),M&&M.m(d,null),g(d,h),g(d,b),g(b,y),C=!0,$||(T=K(b,"click",n[13]),$=!0)},p(O,D){const L={};D&1572865&&(L.$$scope={dirty:D,ctx:O}),i.$set(L);const P={};D&1572865&&(P.$$scope={dirty:D,ctx:O}),o.$set(P);const N={};D&1572865&&(N.$$scope={dirty:D,ctx:O}),a.$set(N);const F={};D&1572865&&(F.$$scope={dirty:D,ctx:O}),f.$set(F),O[3]?M?M.p(O,D):(M=Dh(O),M.c(),M.m(d,h)):M&&(M.d(1),M=null),(!C||D&12&&S!==(S=!O[3]||O[2]))&&(b.disabled=S),(!C||D&4)&&Q(b,"btn-loading",O[2])},i(O){C||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),C=!0)},o(O){I(i.$$.fragment,O),I(o.$$.fragment,O),I(a.$$.fragment,O),I(f.$$.fragment,O),C=!1},d(O){O&&k(e),V(i),V(o),V(a),V(f),M&&M.d(),$=!1,T()}}}function yD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function kD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Application name"),s=E(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].meta.appName),r||(a=K(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&re(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function wD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Application URL"),s=E(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].meta.appUrl),r||(a=K(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&re(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function SD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Logs max days retention"),s=E(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].logs.maxDays),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].logs.maxDays&&re(l,u[0].logs.maxDays)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function $D(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){w(c,e,d),e.checked=n[0].meta.hideControls,w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=[K(e,"change",n[11]),Me(He.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function Dh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){w(l,e,o),g(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&k(e),i=!1,s()}}}function CD(n){let e,t,i,s,l,o,r,a,u;const f=[yD,vD],c=[];function d(m,_){return m[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=E(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(m,_){w(m,e,_),w(m,t,_),w(m,i,_),g(i,s),c[l].m(s,null),r=!0,a||(u=K(s,"submit",et(n[4])),a=!0)},p(m,_){let h=l;l=d(m),l===h?c[l].p(m,_):(ae(),I(c[h],1,1,()=>{c[h]=null}),ue(),o=c[l],o?o.p(m,_):(o=c[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){I(o),r=!1},d(m){m&&k(e),m&&k(t),m&&k(i),c[l].d(),a=!1,u()}}}function TD(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[CD]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&k(t),V(i,l)}}}function MD(n,e,t){let i,s,l,o;Je(n,As,M=>t(14,s=M)),Je(n,So,M=>t(15,l=M)),Je(n,Tt,M=>t(16,o=M)),sn(Tt,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const M=await ce.settings.getAll()||{};_(M)}catch(M){ce.error(M)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const M=await ce.settings.update(B.filterRedactedProps(a));_(M),zt("Successfully saved application settings.")}catch(M){ce.error(M)}t(2,f=!1)}}function _(M={}){var O,D;sn(So,l=(O=M==null?void 0:M.meta)==null?void 0:O.appName,l),sn(As,s=!!((D=M==null?void 0:M.meta)!=null&&D.hideControls),s),t(0,a={meta:(M==null?void 0:M.meta)||{},logs:(M==null?void 0:M.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function S(){a.logs.maxDays=dt(this.value),t(0,a)}function C(){a.meta.hideControls=this.checked,t(0,a)}const $=()=>h(),T=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,m,h,r,c,b,y,S,C,$,T]}class OD extends ge{constructor(e){super(),_e(this,e,MD,TD,me,{})}}function ED(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=E(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),ri(s,a)},m(u,f){w(u,e,f),g(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(o=[Me(He.call(null,t,{position:"left",text:"Set new value"})),K(t,"click",n[6])],l=!0)},p(u,f){ri(s,a=Mt(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&k(e),u&&k(i),u&&k(s),l=!1,Ee(o)}}}function AD(n){let e;function t(l,o){return l[3]?DD:ED}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&k(e)}}}function ID(n,e,t){const i=["value","mask"];let s=xe(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await fn(),r==null||r.focus()}const f=()=>u();function c(m){ee[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=qe(qe({},e),Zt(m)),t(5,s=xe(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&t(3,a=l===o)},[l,o,r,a,u,s,f,c,d]}class mu extends ge{constructor(e){super(),_e(this,e,ID,AD,me,{value:0,mask:1})}}function LD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h;return{c(){e=v("label"),t=U("Subject"),s=E(),l=v("input"),r=E(),a=v("div"),u=U(`Available placeholder parameters: + Admins`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"href","/settings/backups"),p(c,"class","sidebar-list-item"),p(m,"class","sidebar-title"),p(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(y,"href","/settings/import-collections"),p(y,"class","sidebar-list-item"),p(C,"class","sidebar-title"),p(T,"href","/settings/auth-providers"),p(T,"class","sidebar-list-item"),p(O,"href","/settings/tokens"),p(O,"class","sidebar-list-item"),p(L,"href","/settings/admins"),p(L,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(F,R){w(F,e,R),g(e,t),g(t,i),g(t,s),g(t,l),g(t,o),g(t,r),g(t,a),g(t,u),g(t,f),g(t,c),g(t,d),g(t,m),g(t,_),g(t,h),g(t,b),g(t,y),g(t,S),g(t,C),g(t,$),g(t,T),g(t,M),g(t,O),g(t,D),g(t,L),P||(N=[Me(Vn.call(null,l,{path:"/settings"})),Me(on.call(null,l)),Me(Vn.call(null,r,{path:"/settings/mail/?.*"})),Me(on.call(null,r)),Me(Vn.call(null,u,{path:"/settings/storage/?.*"})),Me(on.call(null,u)),Me(Vn.call(null,c,{path:"/settings/backups/?.*"})),Me(on.call(null,c)),Me(Vn.call(null,h,{path:"/settings/export-collections/?.*"})),Me(on.call(null,h)),Me(Vn.call(null,y,{path:"/settings/import-collections/?.*"})),Me(on.call(null,y)),Me(Vn.call(null,T,{path:"/settings/auth-providers/?.*"})),Me(on.call(null,T)),Me(Vn.call(null,O,{path:"/settings/tokens/?.*"})),Me(on.call(null,O)),Me(Vn.call(null,L,{path:"/settings/admins/?.*"})),Me(on.call(null,L))],P=!0)},p:x,i:x,o:x,d(F){F&&k(e),P=!1,Ee(N)}}}class Ci extends ge{constructor(e){super(),_e(this,e,null,BE,me,{})}}function yh(n,e,t){const i=n.slice();return i[30]=e[t],i}function kh(n){let e,t;return e=new pe({props:{class:"form-field readonly",name:"id",$$slots:{default:[UE,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function UE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="id",o=E(),r=v("div"),a=v("i"),f=E(),c=v("input"),p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[29]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[29]),c.value=m=n[1].id,c.readOnly=!0},m(b,y){w(b,e,y),g(e,t),g(e,i),g(e,s),w(b,o,y),w(b,r,y),g(r,a),w(b,f,y),w(b,c,y),_||(h=Me(u=He.call(null,a,{text:`Created: ${n[1].created} +Updated: ${n[1].updated}`,position:"left"})),_=!0)},p(b,y){y[0]&536870912&&l!==(l=b[29])&&p(e,"for",l),u&&jt(u.update)&&y[0]&2&&u.update.call(null,{text:`Created: ${b[1].created} +Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c,"id",d),y[0]&2&&m!==(m=b[1].id)&&c.value!==m&&(c.value=m)},d(b){b&&k(e),b&&k(o),b&&k(r),b&&k(f),b&&k(c),_=!1,h()}}}function wh(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=E(),hn(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){w(u,e,f),g(e,t),g(e,s),o||(r=J(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&k(e),o=!1,r()}}}function WE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Email",o=E(),r=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[3]),u||(f=J(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&re(r,c[3])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function Sh(n){let e,t;return e=new pe({props:{class:"form-field form-field-toggle",$$slots:{default:[YE,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function YE(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){w(u,e,f),e.checked=n[4],w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function $h(n){let e,t,i,s,l,o,r,a,u;return s=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[KE,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[JE,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),H(s.$$.fragment),l=E(),o=v("div"),H(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){w(f,e,c),g(e,t),g(t,i),V(s,i,null),g(t,l),g(t,o),V(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&536871424|c[1]&4&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&Qe(()=>{u&&(a||(a=je(t,ot,{duration:150},!0)),a.run(1))}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(t,ot,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),z(s),z(r),f&&a&&a.end()}}}function KE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[8]),u||(f=J(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&re(r,c[8])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function JE(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=E(),s=v("span"),s.textContent="Password confirm",o=E(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),w(c,o,d),w(c,r,d),re(r,n[9]),u||(f=J(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&re(r,c[9])},d(c){c&&k(e),c&&k(o),c&&k(r),u=!1,f()}}}function ZE(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_=!n[1].$isNew&&kh(n),h=[0,1,2,3,4,5,6,7,8,9],b=[];for(let C=0;C<10;C+=1)b[C]=wh(yh(n,h,C));a=new pe({props:{class:"form-field required",name:"email",$$slots:{default:[WE,({uniqueId:C})=>({29:C}),({uniqueId:C})=>[C?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].$isNew&&Sh(n),S=(n[1].$isNew||n[4])&&$h(n);return{c(){e=v("form"),_&&_.c(),t=E(),i=v("div"),s=v("p"),s.textContent="Avatar",l=E(),o=v("div");for(let C=0;C<10;C+=1)b[C].c();r=E(),H(a.$$.fragment),u=E(),y&&y.c(),f=E(),S&&S.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(C,$){w(C,e,$),_&&_.m(e,null),g(e,t),g(e,i),g(i,s),g(i,l),g(i,o);for(let T=0;T<10;T+=1)b[T]&&b[T].m(o,null);g(e,r),V(a,e,null),g(e,u),y&&y.m(e,null),g(e,f),S&&S.m(e,null),c=!0,d||(m=J(e,"submit",et(n[12])),d=!0)},p(C,$){if(C[1].$isNew?_&&(ae(),I(_,1,1,()=>{_=null}),ue()):_?(_.p(C,$),$[0]&2&&A(_,1)):(_=kh(C),_.c(),A(_,1),_.m(e,t)),$[0]&4){h=[0,1,2,3,4,5,6,7,8,9];let M;for(M=0;M<10;M+=1){const O=yh(C,h,M);b[M]?b[M].p(O,$):(b[M]=wh(O),b[M].c(),b[M].m(o,null))}for(;M<10;M+=1)b[M].d(1)}const T={};$[0]&536870920|$[1]&4&&(T.$$scope={dirty:$,ctx:C}),a.$set(T),C[1].$isNew?y&&(ae(),I(y,1,1,()=>{y=null}),ue()):y?(y.p(C,$),$[0]&2&&A(y,1)):(y=Sh(C),y.c(),A(y,1),y.m(e,f)),C[1].$isNew||C[4]?S?(S.p(C,$),$[0]&18&&A(S,1)):(S=$h(C),S.c(),A(S,1),S.m(e,null)):S&&(ae(),I(S,1,1,()=>{S=null}),ue())},i(C){c||(A(_),A(a.$$.fragment,C),A(y),A(S),c=!0)},o(C){I(_),I(a.$$.fragment,C),I(y),I(S),c=!1},d(C){C&&k(e),_&&_.d(),mt(b,C),z(a),y&&y.d(),S&&S.d(),d=!1,m()}}}function GE(n){let e,t=n[1].$isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=U(t)},m(s,l){w(s,e,l),g(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].$isNew?"New admin":"Edit admin")&&se(i,t)},d(s){s&&k(e)}}}function Ch(n){let e,t,i,s,l,o,r,a,u;return o=new Kn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[XE]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=E(),s=v("i"),l=E(),H(o.$$.fragment),r=E(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"aria-label","More"),p(e,"class","btn btn-sm btn-circle btn-transparent"),p(a,"class","flex-fill")},m(f,c){w(f,e,c),g(e,t),g(e,i),g(e,s),g(e,l),V(o,e,null),w(f,r,c),w(f,a,c),u=!0},p(f,c){const d={};c[1]&4&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(A(o.$$.fragment,f),u=!0)},o(f){I(o.$$.fragment,f),u=!1},d(f){f&&k(e),z(o),f&&k(r),f&&k(a)}}}function XE(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[15]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function QE(n){let e,t,i,s,l,o,r=n[1].$isNew?"Create":"Save changes",a,u,f,c,d,m=!n[1].$isNew&&Ch(n);return{c(){m&&m.c(),e=E(),t=v("button"),i=v("span"),i.textContent="Cancel",s=E(),l=v("button"),o=v("span"),a=U(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-transparent"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],Q(l,"btn-loading",n[6])},m(_,h){m&&m.m(_,h),w(_,e,h),w(_,t,h),g(t,i),w(_,s,h),w(_,l,h),g(l,o),g(o,a),f=!0,c||(d=J(t,"click",n[16]),c=!0)},p(_,h){_[1].$isNew?m&&(ae(),I(m,1,1,()=>{m=null}),ue()):m?(m.p(_,h),h[0]&2&&A(m,1)):(m=Ch(_),m.c(),A(m,1),m.m(e.parentNode,e)),(!f||h[0]&64)&&(t.disabled=_[6]),(!f||h[0]&2)&&r!==(r=_[1].$isNew?"Create":"Save changes")&&se(a,r),(!f||h[0]&1088&&u!==(u=!_[10]||_[6]))&&(l.disabled=u),(!f||h[0]&64)&&Q(l,"btn-loading",_[6])},i(_){f||(A(m),f=!0)},o(_){I(m),f=!1},d(_){m&&m.d(_),_&&k(e),_&&k(t),_&&k(s),_&&k(l),c=!1,d()}}}function xE(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[QE],header:[GE],default:[ZE]},$$scope:{ctx:n}};return e=new ln({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[23](null),z(e,s)}}}function eD(n,e,t){let i;const s=$t(),l="admin_"+B.randomString(5);let o,r=new os,a=!1,u=!1,f=0,c="",d="",m="",_=!1;function h(W){return y(W),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(W){t(1,r=W!=null&&W.$clone?W.$clone():new os),S()}function S(){t(4,_=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,m=""),en({})}function C(){if(a||!i)return;t(6,a=!0);const W={email:c,avatar:f};(r.$isNew||_)&&(W.password=d,W.passwordConfirm=m);let X;r.$isNew?X=ce.admins.create(W):X=ce.admins.update(r.id,W),X.then(async K=>{var Z;t(7,u=!1),b(),zt(r.$isNew?"Successfully created admin.":"Successfully updated admin."),((Z=ce.authStore.model)==null?void 0:Z.id)===K.id&&ce.authStore.save(ce.authStore.token,K),s("save",K)}).catch(K=>{ce.error(K)}).finally(()=>{t(6,a=!1)})}function $(){r!=null&&r.id&&pn("Do you really want to delete the selected admin?",()=>ce.admins.delete(r.id).then(()=>{t(7,u=!1),b(),zt("Successfully deleted admin."),s("delete",r)}).catch(W=>{ce.error(W)}))}const T=()=>$(),M=()=>b(),O=W=>t(2,f=W);function D(){c=this.value,t(3,c)}function L(){_=this.checked,t(4,_)}function P(){d=this.value,t(8,d)}function N(){m=this.value,t(9,m)}const F=()=>i&&u?(pn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function R(W){ee[W?"unshift":"push"](()=>{o=W,t(5,o)})}function q(W){Ne.call(this,n,W)}function j(W){Ne.call(this,n,W)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.$isNew&&c!=""||_||c!==r.email||f!==r.avatar)},[b,r,f,c,_,o,a,u,d,m,i,l,C,$,h,T,M,O,D,L,P,N,F,R,q,j]}class tD extends ge{constructor(e){super(),_e(this,e,eD,xE,me,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function Th(n,e,t){const i=n.slice();return i[24]=e[t],i}function nD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function iD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function sD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function lD(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(e,s)},p:x,d(l){l&&k(e)}}}function Mh(n){let e;function t(l,o){return l[5]?rD:oD}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function oD(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Oh(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=E(),o&&o.c(),l=E(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){w(a,e,u),g(e,t),g(t,i),g(t,s),o&&o.m(t,null),g(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Oh(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&k(e),o&&o.d()}}}function rD(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Oh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[17]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function Eh(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Dh(n,e){let t,i,s,l,o,r,a,u,f,c,d,m=e[24].id+"",_,h,b,y,S,C=e[24].email+"",$,T,M,O,D,L,P,N,F,R,q,j,W,X;f=new Fl({props:{value:e[24].id}});let K=e[24].id===e[7].id&&Eh();D=new wi({props:{date:e[24].created}}),N=new wi({props:{date:e[24].updated}});function Z(){return e[15](e[24])}function le(...ne){return e[16](e[24],...ne)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=E(),a=v("td"),u=v("div"),H(f.$$.fragment),c=E(),d=v("span"),_=U(m),h=E(),K&&K.c(),b=E(),y=v("td"),S=v("span"),$=U(C),M=E(),O=v("td"),H(D.$$.fragment),L=E(),P=v("td"),H(N.$$.fragment),F=E(),R=v("td"),R.innerHTML='',q=E(),hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(d,"class","txt"),p(u,"class","label"),p(a,"class","col-type-text col-field-id"),p(S,"class","txt txt-ellipsis"),p(S,"title",T=e[24].email),p(y,"class","col-type-email col-field-email"),p(O,"class","col-type-date col-field-created"),p(P,"class","col-type-date col-field-updated"),p(R,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ne,ie){w(ne,t,ie),g(t,i),g(i,s),g(s,l),g(t,r),g(t,a),g(a,u),V(f,u,null),g(u,c),g(u,d),g(d,_),g(a,h),K&&K.m(a,null),g(t,b),g(t,y),g(y,S),g(S,$),g(t,M),g(t,O),V(D,O,null),g(t,L),g(t,P),V(N,P,null),g(t,F),g(t,R),g(t,q),j=!0,W||(X=[J(t,"click",Z),J(t,"keydown",le)],W=!0)},p(ne,ie){e=ne,(!j||ie&16&&!hn(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const be={};ie&16&&(be.value=e[24].id),f.$set(be),(!j||ie&16)&&m!==(m=e[24].id+"")&&se(_,m),e[24].id===e[7].id?K||(K=Eh(),K.c(),K.m(a,null)):K&&(K.d(1),K=null),(!j||ie&16)&&C!==(C=e[24].email+"")&&se($,C),(!j||ie&16&&T!==(T=e[24].email))&&p(S,"title",T);const Se={};ie&16&&(Se.date=e[24].created),D.$set(Se);const Ve={};ie&16&&(Ve.date=e[24].updated),N.$set(Ve)},i(ne){j||(A(f.$$.fragment,ne),A(D.$$.fragment,ne),A(N.$$.fragment,ne),j=!0)},o(ne){I(f.$$.fragment,ne),I(D.$$.fragment,ne),I(N.$$.fragment,ne),j=!1},d(ne){ne&&k(t),z(f),K&&K.d(),z(D),z(N),W=!1,Ee(X)}}}function aD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T=[],M=new Map,O;function D(Z){n[11](Z)}let L={class:"col-type-text",name:"id",$$slots:{default:[nD]},$$scope:{ctx:n}};n[2]!==void 0&&(L.sort=n[2]),o=new an({props:L}),ee.push(()=>de(o,"sort",D));function P(Z){n[12](Z)}let N={class:"col-type-email col-field-email",name:"email",$$slots:{default:[iD]},$$scope:{ctx:n}};n[2]!==void 0&&(N.sort=n[2]),u=new an({props:N}),ee.push(()=>de(u,"sort",P));function F(Z){n[13](Z)}let R={class:"col-type-date col-field-created",name:"created",$$slots:{default:[sD]},$$scope:{ctx:n}};n[2]!==void 0&&(R.sort=n[2]),d=new an({props:R}),ee.push(()=>de(d,"sort",F));function q(Z){n[14](Z)}let j={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[lD]},$$scope:{ctx:n}};n[2]!==void 0&&(j.sort=n[2]),h=new an({props:j}),ee.push(()=>de(h,"sort",q));let W=n[4];const X=Z=>Z[24].id;for(let Z=0;Zr=!1)),o.$set(ne);const ie={};le&134217728&&(ie.$$scope={dirty:le,ctx:Z}),!f&&le&4&&(f=!0,ie.sort=Z[2],he(()=>f=!1)),u.$set(ie);const be={};le&134217728&&(be.$$scope={dirty:le,ctx:Z}),!m&&le&4&&(m=!0,be.sort=Z[2],he(()=>m=!1)),d.$set(be);const Se={};le&134217728&&(Se.$$scope={dirty:le,ctx:Z}),!b&&le&4&&(b=!0,Se.sort=Z[2],he(()=>b=!1)),h.$set(Se),le&186&&(W=Z[4],ae(),T=bt(T,le,X,1,Z,W,M,$,Bt,Dh,null,Th),ue(),!W.length&&K?K.p(Z,le):W.length?K&&(K.d(1),K=null):(K=Mh(Z),K.c(),K.m($,null))),(!O||le&32)&&Q(e,"table-loading",Z[5])},i(Z){if(!O){A(o.$$.fragment,Z),A(u.$$.fragment,Z),A(d.$$.fragment,Z),A(h.$$.fragment,Z);for(let le=0;le + New admin`,m=E(),H(_.$$.fragment),h=E(),b=v("div"),y=E(),H(S.$$.fragment),C=E(),D&&D.c(),$=ye(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header"),p(b,"class","clearfix m-b-base")},m(L,P){w(L,e,P),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),g(e,r),V(a,e,null),g(e,u),g(e,f),g(e,c),g(e,d),w(L,m,P),V(_,L,P),w(L,h,P),w(L,b,P),w(L,y,P),V(S,L,P),w(L,C,P),D&&D.m(L,P),w(L,$,P),T=!0,M||(O=J(d,"click",n[9]),M=!0)},p(L,P){(!T||P&64)&&se(o,L[6]);const N={};P&2&&(N.value=L[1]),_.$set(N);const F={};P&134217918&&(F.$$scope={dirty:P,ctx:L}),S.$set(F),L[4].length?D?D.p(L,P):(D=Ah(L),D.c(),D.m($.parentNode,$)):D&&(D.d(1),D=null)},i(L){T||(A(a.$$.fragment,L),A(_.$$.fragment,L),A(S.$$.fragment,L),T=!0)},o(L){I(a.$$.fragment,L),I(_.$$.fragment,L),I(S.$$.fragment,L),T=!1},d(L){L&&k(e),z(a),L&&k(m),z(_,L),L&&k(h),L&&k(b),L&&k(y),z(S,L),L&&k(C),D&&D.d(L),L&&k($),M=!1,O()}}}function fD(n){let e,t,i,s,l,o;e=new Ci({}),i=new wn({props:{$$slots:{default:[uD]},$$scope:{ctx:n}}});let r={};return l=new tD({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment)},m(a,u){V(e,a,u),w(a,t,u),V(i,a,u),w(a,s,u),V(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){z(e,a),a&&k(t),z(i,a),a&&k(s),n[18](null),z(l,a)}}}function cD(n,e,t){let i,s,l;Je(n,Ca,N=>t(21,i=N)),Je(n,Tt,N=>t(6,s=N)),Je(n,Ra,N=>t(7,l=N)),sn(Tt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){t(5,u=!0),t(4,a=[]);const N=B.normalizeSearchFilter(f,["id","email","created","updated"]);return ce.admins.getFullList(100,{sort:c||"-created",filter:N}).then(F=>{t(4,a=F),t(5,u=!1)}).catch(F=>{F!=null&&F.isAbort||(t(5,u=!1),console.warn(F),m(),ce.error(F,!1))})}function m(){t(4,a=[])}const _=()=>d(),h=()=>r==null?void 0:r.show(),b=N=>t(1,f=N.detail);function y(N){c=N,t(2,c)}function S(N){c=N,t(2,c)}function C(N){c=N,t(2,c)}function $(N){c=N,t(2,c)}const T=N=>r==null?void 0:r.show(N),M=(N,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(N))},O=()=>t(1,f="");function D(N){ee[N?"unshift":"push"](()=>{r=N,t(3,r)})}const L=()=>d(),P=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const N=new URLSearchParams({filter:f,sort:c}).toString();ji("/settings/admins?"+N),d()}},[d,f,c,r,a,u,s,l,_,h,b,y,S,C,$,T,M,O,D,L,P]}class dD extends ge{constructor(e){super(),_e(this,e,cD,fD,me,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Email"),s=E(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0]),l.focus(),r||(a=J(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&re(l,u[0])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function mD(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=U("Password"),s=E(),l=v("input"),r=E(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[1]),w(d,r,m),w(d,a,m),g(a,u),f||(c=[J(l,"input",n[5]),Me(on.call(null,u))],f=!0)},p(d,m){m&256&&i!==(i=d[8])&&p(e,"for",i),m&256&&o!==(o=d[8])&&p(l,"id",o),m&2&&l.value!==d[1]&&re(l,d[1])},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),d&&k(a),f=!1,Ee(c)}}}function hD(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new pe({props:{class:"form-field required",name:"identity",$$slots:{default:[pD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"password",$$slots:{default:[mD,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=E(),H(s.$$.fragment),l=E(),H(o.$$.fragment),r=E(),a=v("button"),a.innerHTML=`Login + `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),Q(a,"btn-disabled",n[2]),Q(a,"btn-loading",n[2]),p(e,"class","block")},m(d,m){w(d,e,m),g(e,t),g(e,i),V(s,e,null),g(e,l),V(o,e,null),g(e,r),g(e,a),u=!0,f||(c=J(e,"submit",et(n[3])),f=!0)},p(d,m){const _={};m&769&&(_.$$scope={dirty:m,ctx:d}),s.$set(_);const h={};m&770&&(h.$$scope={dirty:m,ctx:d}),o.$set(h),(!u||m&4)&&Q(a,"btn-disabled",d[2]),(!u||m&4)&&Q(a,"btn-loading",d[2])},i(d){u||(A(s.$$.fragment,d),A(o.$$.fragment,d),u=!0)},o(d){I(s.$$.fragment,d),I(o.$$.fragment,d),u=!1},d(d){d&&k(e),z(s),z(o),f=!1,c()}}}function _D(n){let e,t;return e=new vb({props:{$$slots:{default:[hD]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function gD(n,e,t){let i;Je(n,Ca,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),ce.admins.authWithPassword(l,o).then(()=>{Na(),ji("/")}).catch(()=>{Ds("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class bD extends ge{constructor(e){super(),_e(this,e,gD,_D,me,{})}}function vD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T;i=new pe({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[kD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[wD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),a=new pe({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[SD,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}}),f=new pe({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[$D,({uniqueId:O})=>({19:O}),({uniqueId:O})=>O?524288:0]},$$scope:{ctx:n}}});let M=n[3]&&Ih(n);return{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),r=E(),H(a.$$.fragment),u=E(),H(f.$$.fragment),c=E(),d=v("div"),m=v("div"),_=E(),M&&M.c(),h=E(),b=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(m,"class","flex-fill"),p(y,"class","txt"),p(b,"type","submit"),p(b,"class","btn btn-expanded"),b.disabled=S=!n[3]||n[2],Q(b,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(O,D){w(O,e,D),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),g(e,r),V(a,e,null),g(e,u),V(f,e,null),g(e,c),g(e,d),g(d,m),g(d,_),M&&M.m(d,null),g(d,h),g(d,b),g(b,y),C=!0,$||(T=J(b,"click",n[13]),$=!0)},p(O,D){const L={};D&1572865&&(L.$$scope={dirty:D,ctx:O}),i.$set(L);const P={};D&1572865&&(P.$$scope={dirty:D,ctx:O}),o.$set(P);const N={};D&1572865&&(N.$$scope={dirty:D,ctx:O}),a.$set(N);const F={};D&1572865&&(F.$$scope={dirty:D,ctx:O}),f.$set(F),O[3]?M?M.p(O,D):(M=Ih(O),M.c(),M.m(d,h)):M&&(M.d(1),M=null),(!C||D&12&&S!==(S=!O[3]||O[2]))&&(b.disabled=S),(!C||D&4)&&Q(b,"btn-loading",O[2])},i(O){C||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(a.$$.fragment,O),A(f.$$.fragment,O),C=!0)},o(O){I(i.$$.fragment,O),I(o.$$.fragment,O),I(a.$$.fragment,O),I(f.$$.fragment,O),C=!1},d(O){O&&k(e),z(i),z(o),z(a),z(f),M&&M.d(),$=!1,T()}}}function yD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function kD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Application name"),s=E(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].meta.appName),r||(a=J(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&re(l,u[0].meta.appName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function wD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Application URL"),s=E(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].meta.appUrl),r||(a=J(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&re(l,u[0].meta.appUrl)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function SD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Logs max days retention"),s=E(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].logs.maxDays),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&dt(l.value)!==u[0].logs.maxDays&&re(l,u[0].logs.maxDays)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function $D(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){w(c,e,d),e.checked=n[0].meta.hideControls,w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=[J(e,"change",n[11]),Me(He.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function Ih(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){w(l,e,o),g(e,t),i||(s=J(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&k(e),i=!1,s()}}}function CD(n){let e,t,i,s,l,o,r,a,u;const f=[yD,vD],c=[];function d(m,_){return m[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=E(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(m,_){w(m,e,_),w(m,t,_),w(m,i,_),g(i,s),c[l].m(s,null),r=!0,a||(u=J(s,"submit",et(n[4])),a=!0)},p(m,_){let h=l;l=d(m),l===h?c[l].p(m,_):(ae(),I(c[h],1,1,()=>{c[h]=null}),ue(),o=c[l],o?o.p(m,_):(o=c[l]=f[l](m),o.c()),A(o,1),o.m(s,null))},i(m){r||(A(o),r=!0)},o(m){I(o),r=!1},d(m){m&&k(e),m&&k(t),m&&k(i),c[l].d(),a=!1,u()}}}function TD(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[CD]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){z(e,l),l&&k(t),z(i,l)}}}function MD(n,e,t){let i,s,l,o;Je(n,As,M=>t(14,s=M)),Je(n,$o,M=>t(15,l=M)),Je(n,Tt,M=>t(16,o=M)),sn(Tt,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const M=await ce.settings.getAll()||{};_(M)}catch(M){ce.error(M)}t(1,u=!1)}async function m(){if(!(f||!i)){t(2,f=!0);try{const M=await ce.settings.update(B.filterRedactedProps(a));_(M),zt("Successfully saved application settings.")}catch(M){ce.error(M)}t(2,f=!1)}}function _(M={}){var O,D;sn($o,l=(O=M==null?void 0:M.meta)==null?void 0:O.appName,l),sn(As,s=!!((D=M==null?void 0:M.meta)!=null&&D.hideControls),s),t(0,a={meta:(M==null?void 0:M.meta)||{},logs:(M==null?void 0:M.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function h(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function S(){a.logs.maxDays=dt(this.value),t(0,a)}function C(){a.meta.hideControls=this.checked,t(0,a)}const $=()=>h(),T=()=>m();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,m,h,r,c,b,y,S,C,$,T]}class OD extends ge{constructor(e){super(),_e(this,e,MD,TD,me,{})}}function ED(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=E(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-transparent btn-circle"),p(e,"class","form-field-addon"),ri(s,a)},m(u,f){w(u,e,f),g(e,t),w(u,i,f),w(u,s,f),s.autofocus&&s.focus(),l||(o=[Me(He.call(null,t,{position:"left",text:"Set new value"})),J(t,"click",n[6])],l=!0)},p(u,f){ri(s,a=Mt(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&k(e),u&&k(i),u&&k(s),l=!1,Ee(o)}}}function AD(n){let e;function t(l,o){return l[3]?DD:ED}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&k(e)}}}function ID(n,e,t){const i=["value","mask"];let s=xe(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await fn(),r==null||r.focus()}const f=()=>u();function c(m){ee[m?"unshift":"push"](()=>{r=m,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=m=>{e=qe(qe({},e),Zt(m)),t(5,s=xe(e,i)),"value"in m&&t(0,l=m.value),"mask"in m&&t(1,o=m.mask)},n.$$.update=()=>{n.$$.dirty&3&&t(3,a=l===o)},[l,o,r,a,u,s,f,c,d]}class mu extends ge{constructor(e){super(),_e(this,e,ID,AD,me,{value:0,mask:1})}}function LD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h;return{c(){e=v("label"),t=U("Subject"),s=E(),l=v("input"),r=E(),a=v("div"),u=U(`Available placeholder parameters: `),f=v("button"),f.textContent=`{APP_NAME} `,c=U(`, `),d=v("button"),d.textContent=`{APP_URL} - `,m=U("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(b,y){w(b,e,y),g(e,t),w(b,s,y),w(b,l,y),re(l,n[0].subject),w(b,r,y),w(b,a,y),g(a,u),g(a,f),g(a,c),g(a,d),g(a,m),_||(h=[K(l,"input",n[13]),K(f,"click",n[14]),K(d,"click",n[15])],_=!0)},p(b,y){y[1]&1&&i!==(i=b[31])&&p(e,"for",i),y[1]&1&&o!==(o=b[31])&&p(l,"id",o),y[0]&1&&l.value!==b[0].subject&&re(l,b[0].subject)},d(b){b&&k(e),b&&k(s),b&&k(l),b&&k(r),b&&k(a),_=!1,Ee(h)}}}function PD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y;return{c(){e=v("label"),t=U("Action URL"),s=E(),l=v("input"),r=E(),a=v("div"),u=U(`Available placeholder parameters: + `,m=U("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(b,y){w(b,e,y),g(e,t),w(b,s,y),w(b,l,y),re(l,n[0].subject),w(b,r,y),w(b,a,y),g(a,u),g(a,f),g(a,c),g(a,d),g(a,m),_||(h=[J(l,"input",n[13]),J(f,"click",n[14]),J(d,"click",n[15])],_=!0)},p(b,y){y[1]&1&&i!==(i=b[31])&&p(e,"for",i),y[1]&1&&o!==(o=b[31])&&p(l,"id",o),y[0]&1&&l.value!==b[0].subject&&re(l,b[0].subject)},d(b){b&&k(e),b&&k(s),b&&k(l),b&&k(r),b&&k(a),_=!1,Ee(h)}}}function PD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y;return{c(){e=v("label"),t=U("Action URL"),s=E(),l=v("input"),r=E(),a=v("div"),u=U(`Available placeholder parameters: `),f=v("button"),f.textContent=`{APP_NAME} `,c=U(`, `),d=v("button"),d.textContent=`{APP_URL} `,m=U(`, `),_=v("button"),_.textContent=`{TOKEN} - `,h=U("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(_,"title","Required parameter"),p(a,"class","help-block")},m(S,C){w(S,e,C),g(e,t),w(S,s,C),w(S,l,C),re(l,n[0].actionUrl),w(S,r,C),w(S,a,C),g(a,u),g(a,f),g(a,c),g(a,d),g(a,m),g(a,_),g(a,h),b||(y=[K(l,"input",n[16]),K(f,"click",n[17]),K(d,"click",n[18]),K(_,"click",n[19])],b=!0)},p(S,C){C[1]&1&&i!==(i=S[31])&&p(e,"for",i),C[1]&1&&o!==(o=S[31])&&p(l,"id",o),C[0]&1&&l.value!==S[0].actionUrl&&re(l,S[0].actionUrl)},d(S){S&&k(e),S&&k(s),S&&k(l),S&&k(r),S&&k(a),b=!1,Ee(y)}}}function ND(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){w(l,e,o),re(e,n[0].body),i||(s=K(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&re(e,l[0].body)},i:x,o:x,d(l){l&&k(e),i=!1,s()}}}function FD(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=Ft(o,r(n)),ee.push(()=>de(e,"value",l))),{c(){e&&z(e.$$.fragment),i=ye()},m(a,u){e&&j(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,he(()=>t=!1)),u[0]&16&&o!==(o=a[4])){if(e){ae();const c=e;I(c.$$.fragment,1,0,()=>{V(c,1)}),ue()}o?(e=Ft(o,r(a)),ee.push(()=>de(e,"value",l)),z(e.$$.fragment),A(e.$$.fragment,1),j(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&V(e,a)}}}function RD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$;const T=[FD,ND],M=[];function O(D,L){return D[4]&&!D[5]?0:1}return l=O(n),o=M[l]=T[l](n),{c(){e=v("label"),t=U("Body (HTML)"),s=E(),o.c(),r=E(),a=v("div"),u=U(`Available placeholder parameters: + `,h=U("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(_,"title","Required parameter"),p(a,"class","help-block")},m(S,C){w(S,e,C),g(e,t),w(S,s,C),w(S,l,C),re(l,n[0].actionUrl),w(S,r,C),w(S,a,C),g(a,u),g(a,f),g(a,c),g(a,d),g(a,m),g(a,_),g(a,h),b||(y=[J(l,"input",n[16]),J(f,"click",n[17]),J(d,"click",n[18]),J(_,"click",n[19])],b=!0)},p(S,C){C[1]&1&&i!==(i=S[31])&&p(e,"for",i),C[1]&1&&o!==(o=S[31])&&p(l,"id",o),C[0]&1&&l.value!==S[0].actionUrl&&re(l,S[0].actionUrl)},d(S){S&&k(e),S&&k(s),S&&k(l),S&&k(r),S&&k(a),b=!1,Ee(y)}}}function ND(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){w(l,e,o),re(e,n[0].body),i||(s=J(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&re(e,l[0].body)},i:x,o:x,d(l){l&&k(e),i=!1,s()}}}function FD(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=Rt(o,r(n)),ee.push(()=>de(e,"value",l))),{c(){e&&H(e.$$.fragment),i=ye()},m(a,u){e&&V(e,a,u),w(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,he(()=>t=!1)),u[0]&16&&o!==(o=a[4])){if(e){ae();const c=e;I(c.$$.fragment,1,0,()=>{z(c,1)}),ue()}o?(e=Rt(o,r(a)),ee.push(()=>de(e,"value",l)),H(e.$$.fragment),A(e.$$.fragment,1),V(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&A(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&k(i),e&&z(e,a)}}}function RD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$;const T=[FD,ND],M=[];function O(D,L){return D[4]&&!D[5]?0:1}return l=O(n),o=M[l]=T[l](n),{c(){e=v("label"),t=U("Body (HTML)"),s=E(),o.c(),r=E(),a=v("div"),u=U(`Available placeholder parameters: `),f=v("button"),f.textContent=`{APP_NAME} `,c=U(`, `),d=v("button"),d.textContent=`{APP_URL} @@ -183,8 +183,8 @@ Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c," `),_=v("button"),_.textContent=`{TOKEN} `,h=U(`, `),b=v("button"),b.textContent=`{ACTION_URL} - `,y=U("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(b,"type","button"),p(b,"class","label label-sm link-primary txt-mono"),p(b,"title","Required parameter"),p(a,"class","help-block")},m(D,L){w(D,e,L),g(e,t),w(D,s,L),M[l].m(D,L),w(D,r,L),w(D,a,L),g(a,u),g(a,f),g(a,c),g(a,d),g(a,m),g(a,_),g(a,h),g(a,b),g(a,y),S=!0,C||($=[K(f,"click",n[22]),K(d,"click",n[23]),K(_,"click",n[24]),K(b,"click",n[25])],C=!0)},p(D,L){(!S||L[1]&1&&i!==(i=D[31]))&&p(e,"for",i);let P=l;l=O(D),l===P?M[l].p(D,L):(ae(),I(M[P],1,1,()=>{M[P]=null}),ue(),o=M[l],o?o.p(D,L):(o=M[l]=T[l](D),o.c()),A(o,1),o.m(r.parentNode,r))},i(D){S||(A(o),S=!0)},o(D){I(o),S=!1},d(D){D&&k(e),D&&k(s),M[l].d(D),D&&k(r),D&&k(a),C=!1,Ee($)}}}function qD(n){let e,t,i,s,l,o;return e=new pe({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[LD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new pe({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[PD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[RD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(l.$$.fragment)},m(r,a){j(e,r,a),w(r,t,a),j(i,r,a),w(r,s,a),j(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){V(e,r),r&&k(t),V(i,r),r&&k(s),V(l,r)}}}function Ah(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function jD(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Ah();return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),l=U(n[2]),o=E(),r=v("div"),a=E(),f&&f.c(),u=ye(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),g(s,l),w(c,o,d),w(c,r,d),w(c,a,d),f&&f.m(c,d),w(c,u,d)},p(c,d){d[0]&4&&se(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Ah(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(ae(),I(f,1,1,()=>{f=null}),ue())},d(c){c&&k(e),c&&k(o),c&&k(r),c&&k(a),f&&f.d(c),c&&k(u)}}}function VD(n){let e,t;const i=[n[8]];let s={$$slots:{header:[jD],default:[qD]},$$scope:{ctx:n}};for(let l=0;lt(12,o=Z));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Ih,d=!1;function m(){f==null||f.expand()}function _(){f==null||f.collapse()}function h(){f==null||f.collapseSiblings()}async function b(){c||d||(t(5,d=!0),t(4,c=(await at(()=>import("./CodeEditor-bc0a826d.js"),["./CodeEditor-bc0a826d.js","./index-fd4289fb.js"],import.meta.url)).default),Ih=c,t(5,d=!1))}function y(Z){B.copyToClipboard(Z),yo(`Copied ${Z} to clipboard`,2e3)}b();function S(){u.subject=this.value,t(0,u)}const C=()=>y("{APP_NAME}"),$=()=>y("{APP_URL}");function T(){u.actionUrl=this.value,t(0,u)}const M=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),D=()=>y("{TOKEN}");function L(Z){n.$$.not_equal(u.body,Z)&&(u.body=Z,t(0,u))}function P(){u.body=this.value,t(0,u)}const N=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),R=()=>y("{TOKEN}"),q=()=>y("{ACTION_URL}");function H(Z){ee[Z?"unshift":"push"](()=>{f=Z,t(3,f)})}function W(Z){Ne.call(this,n,Z)}function X(Z){Ne.call(this,n,Z)}function J(Z){Ne.call(this,n,Z)}return n.$$set=Z=>{e=qe(qe({},e),Zt(Z)),t(8,l=xe(e,s)),"key"in Z&&t(1,r=Z.key),"title"in Z&&t(2,a=Z.title),"config"in Z&&t(0,u=Z.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||ai(r))},[u,r,a,f,c,d,i,y,l,m,_,h,o,S,C,$,T,M,O,D,L,P,N,F,R,q,H,W,X,J]}class qr extends ge{constructor(e){super(),_e(this,e,zD,VD,me,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Lh(n,e,t){const i=n.slice();return i[21]=e[t],i}function Ph(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,c,d,m;return c=U1(e[11][0]),{key:n,first:null,c(){t=v("div"),i=v("input"),l=E(),o=v("label"),a=U(r),f=E(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,p(o,"for",u=e[20]+e[21].value),p(t,"class","form-field-block"),c.p(i),this.first=t},m(_,h){w(_,t,h),g(t,i),i.checked=i.__value===e[2],g(t,l),g(t,o),g(o,a),g(t,f),d||(m=K(i,"change",e[10]),d=!0)},p(_,h){e=_,h&1048576&&s!==(s=e[20]+e[21].value)&&p(i,"id",s),h&4&&(i.checked=i.__value===e[2]),h&1048576&&u!==(u=e[20]+e[21].value)&&p(o,"for",u)},d(_){_&&k(t),c.r(),d=!1,m()}}}function HD(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new pe({props:{class:"form-field required m-0",name:"email",$$slots:{default:[BD,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),z(t.$$.fragment),i=E(),z(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){w(a,e,u),j(t,e,null),g(e,i),j(s,e,null),l=!0,o||(r=K(e,"submit",et(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&17825794&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){I(t.$$.fragment,a),I(s.$$.fragment,a),l=!1},d(a){a&&k(e),V(t),V(s),o=!1,r()}}}function WD(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function YD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=U("Close"),i=E(),s=v("button"),l=v("i"),o=E(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(c,d){w(c,e,d),g(e,t),w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=K(e,"click",n[0]),u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&Q(s,"btn-loading",c[4])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function KD(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[YD],header:[WD],default:[UD]},$$scope:{ctx:n}};return e=new ln({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[15](null),V(e,s)}}}const jr="last_email_test",Nh="email_test_request";function JD(n,e,t){let i;const s=$t(),l="email_test_"+B.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(jr),u=o[0].value,f=!1,c=null;function d(O="",D=""){t(1,a=O||localStorage.getItem(jr)),t(2,u=D||o[0].value),en({}),r==null||r.show()}function m(){return clearTimeout(c),r==null?void 0:r.hide()}async function _(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(jr,a),clearTimeout(c),c=setTimeout(()=>{ce.cancelRequest(Nh),Ds("Test email send timeout.")},3e4);try{await ce.settings.testEmail(a,u,{$cancelKey:Nh}),zt("Successfully sent test email."),s("submit"),t(4,f=!1),await fn(),m()}catch(O){t(4,f=!1),ce.error(O)}clearTimeout(c)}}const h=[[]];function b(){u=this.__value,t(2,u)}function y(){a=this.value,t(1,a)}const S=()=>_(),C=()=>!f;function $(O){ee[O?"unshift":"push"](()=>{r=O,t(3,r)})}function T(O){Ne.call(this,n,O)}function M(O){Ne.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,_,d,b,h,y,S,C,$,T,M]}class ZD extends ge{constructor(e){super(),_e(this,e,JD,KD,me,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function GD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L,P;i=new pe({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[QD,({uniqueId:ne})=>({31:ne}),({uniqueId:ne})=>[0,ne?1:0]]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[xD,({uniqueId:ne})=>({31:ne}),({uniqueId:ne})=>[0,ne?1:0]]},$$scope:{ctx:n}}});function N(ne){n[14](ne)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new qr({props:F}),ee.push(()=>de(u,"config",N));function R(ne){n[15](ne)}let q={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(q.config=n[0].meta.resetPasswordTemplate),d=new qr({props:q}),ee.push(()=>de(d,"config",R));function H(ne){n[16](ne)}let W={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(W.config=n[0].meta.confirmEmailChangeTemplate),h=new qr({props:W}),ee.push(()=>de(h,"config",H)),$=new pe({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[eA,({uniqueId:ne})=>({31:ne}),({uniqueId:ne})=>[0,ne?1:0]]},$$scope:{ctx:n}}});let X=n[0].smtp.enabled&&Fh(n);function J(ne,ie){return ne[4]?aA:rA}let Z=J(n),le=Z(n);return{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),c=E(),z(d.$$.fragment),_=E(),z(h.$$.fragment),y=E(),S=v("hr"),C=E(),z($.$$.fragment),T=E(),X&&X.c(),M=E(),O=v("div"),D=v("div"),L=E(),le.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(D,"class","flex-fill"),p(O,"class","flex")},m(ne,ie){w(ne,e,ie),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),w(ne,r,ie),w(ne,a,ie),j(u,a,null),g(a,c),j(d,a,null),g(a,_),j(h,a,null),w(ne,y,ie),w(ne,S,ie),w(ne,C,ie),j($,ne,ie),w(ne,T,ie),X&&X.m(ne,ie),w(ne,M,ie),w(ne,O,ie),g(O,D),g(O,L),le.m(O,null),P=!0},p(ne,ie){const be={};ie[0]&1|ie[1]&3&&(be.$$scope={dirty:ie,ctx:ne}),i.$set(be);const Se={};ie[0]&1|ie[1]&3&&(Se.$$scope={dirty:ie,ctx:ne}),o.$set(Se);const Ve={};!f&&ie[0]&1&&(f=!0,Ve.config=ne[0].meta.verificationTemplate,he(()=>f=!1)),u.$set(Ve);const Be={};!m&&ie[0]&1&&(m=!0,Be.config=ne[0].meta.resetPasswordTemplate,he(()=>m=!1)),d.$set(Be);const ke={};!b&&ie[0]&1&&(b=!0,ke.config=ne[0].meta.confirmEmailChangeTemplate,he(()=>b=!1)),h.$set(ke);const Te={};ie[0]&1|ie[1]&3&&(Te.$$scope={dirty:ie,ctx:ne}),$.$set(Te),ne[0].smtp.enabled?X?(X.p(ne,ie),ie[0]&1&&A(X,1)):(X=Fh(ne),X.c(),A(X,1),X.m(M.parentNode,M)):X&&(ae(),I(X,1,1,()=>{X=null}),ue()),Z===(Z=J(ne))&&le?le.p(ne,ie):(le.d(1),le=Z(ne),le&&(le.c(),le.m(O,null)))},i(ne){P||(A(i.$$.fragment,ne),A(o.$$.fragment,ne),A(u.$$.fragment,ne),A(d.$$.fragment,ne),A(h.$$.fragment,ne),A($.$$.fragment,ne),A(X),P=!0)},o(ne){I(i.$$.fragment,ne),I(o.$$.fragment,ne),I(u.$$.fragment,ne),I(d.$$.fragment,ne),I(h.$$.fragment,ne),I($.$$.fragment,ne),I(X),P=!1},d(ne){ne&&k(e),V(i),V(o),ne&&k(r),ne&&k(a),V(u),V(d),V(h),ne&&k(y),ne&&k(S),ne&&k(C),V($,ne),ne&&k(T),X&&X.d(ne),ne&&k(M),ne&&k(O),le.d()}}}function XD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function QD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Sender name"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].meta.senderName),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&re(l,u[0].meta.senderName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function xD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Sender address"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","email"),p(l,"id",o=n[31]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].meta.senderAddress),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&re(l,u[0].meta.senderAddress)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function eA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[31])},m(c,d){w(c,e,d),e.checked=n[0].smtp.enabled,w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=[K(e,"change",n[17]),Me(He.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&1&&t!==(t=c[31])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&1&&a!==(a=c[31])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function Fh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M;return i=new pe({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[tA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[nA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[iA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),d=new pe({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[sA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),h=new pe({props:{class:"form-field",name:"smtp.username",$$slots:{default:[lA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),S=new pe({props:{class:"form-field",name:"smtp.password",$$slots:{default:[oA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),f=E(),c=v("div"),z(d.$$.fragment),m=E(),_=v("div"),z(h.$$.fragment),b=E(),y=v("div"),z(S.$$.fragment),C=E(),$=v("div"),p(t,"class","col-lg-4"),p(l,"class","col-lg-2"),p(a,"class","col-lg-3"),p(c,"class","col-lg-3"),p(_,"class","col-lg-6"),p(y,"class","col-lg-6"),p($,"class","col-lg-12"),p(e,"class","grid")},m(O,D){w(O,e,D),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),g(e,r),g(e,a),j(u,a,null),g(e,f),g(e,c),j(d,c,null),g(e,m),g(e,_),j(h,_,null),g(e,b),g(e,y),j(S,y,null),g(e,C),g(e,$),M=!0},p(O,D){const L={};D[0]&1|D[1]&3&&(L.$$scope={dirty:D,ctx:O}),i.$set(L);const P={};D[0]&1|D[1]&3&&(P.$$scope={dirty:D,ctx:O}),o.$set(P);const N={};D[0]&1|D[1]&3&&(N.$$scope={dirty:D,ctx:O}),u.$set(N);const F={};D[0]&1|D[1]&3&&(F.$$scope={dirty:D,ctx:O}),d.$set(F);const R={};D[0]&1|D[1]&3&&(R.$$scope={dirty:D,ctx:O}),h.$set(R);const q={};D[0]&1|D[1]&3&&(q.$$scope={dirty:D,ctx:O}),S.$set(q)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(h.$$.fragment,O),A(S.$$.fragment,O),O&&Qe(()=>{M&&(T||(T=je(e,ot,{duration:150},!0)),T.run(1))}),M=!0)},o(O){I(i.$$.fragment,O),I(o.$$.fragment,O),I(u.$$.fragment,O),I(d.$$.fragment,O),I(h.$$.fragment,O),I(S.$$.fragment,O),O&&(T||(T=je(e,ot,{duration:150},!1)),T.run(0)),M=!1},d(O){O&&k(e),V(i),V(o),V(u),V(d),V(h),V(S),O&&T&&T.end()}}}function tA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("SMTP server host"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].smtp.host),r||(a=K(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&re(l,u[0].smtp.host)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function nA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Port"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].smtp.port),r||(a=K(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&dt(l.value)!==u[0].smtp.port&&re(l,u[0].smtp.port)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function iA(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Hi({props:u}),ee.push(()=>de(l,"keyOfSelected",a)),{c(){e=v("label"),t=U("TLS encryption"),s=E(),z(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),V(l,f)}}}function sA(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Hi({props:u}),ee.push(()=>de(l,"keyOfSelected",a)),{c(){e=v("label"),t=U("AUTH method"),s=E(),z(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),V(l,f)}}}function lA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Username"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].smtp.username),r||(a=K(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&re(l,u[0].smtp.username)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function oA(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new mu({props:u}),ee.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Password"),s=E(),z(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),V(l,f)}}}function rA(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[26]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function aA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],Q(s,"btn-loading",n[3])},m(u,f){w(u,e,f),g(e,t),w(u,i,f),w(u,s,f),g(s,l),r||(a=[K(e,"click",n[24]),K(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&Q(s,"btn-loading",u[3])},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,Ee(a)}}}function uA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;const y=[XD,GD],S=[];function C($,T){return $[2]?0:1}return d=C(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[5]),r=E(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,T){w($,e,T),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w($,r,T),w($,a,T),g(a,u),g(u,f),g(u,c),S[d].m(u,null),_=!0,h||(b=K(u,"submit",et(n[27])),h=!0)},p($,T){(!_||T[0]&32)&&se(o,$[5]);let M=d;d=C($),d===M?S[d].p($,T):(ae(),I(S[M],1,1,()=>{S[M]=null}),ue(),m=S[d],m?m.p($,T):(m=S[d]=y[d]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){I(m),_=!1},d($){$&&k(e),$&&k(r),$&&k(a),S[d].d(),h=!1,b()}}}function fA(n){let e,t,i,s,l,o;e=new Ci({}),i=new wn({props:{$$slots:{default:[uA]},$$scope:{ctx:n}}});let r={};return l=new ZD({props:r}),n[28](l),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(l.$$.fragment)},m(a,u){j(e,a,u),w(a,t,u),j(i,a,u),w(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){V(e,a),a&&k(t),V(i,a),a&&k(s),n[28](null),V(l,a)}}}function cA(n,e,t){let i,s,l;Je(n,Tt,J=>t(5,l=J));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];sn(Tt,l="Mail settings",l);let a,u={},f={},c=!1,d=!1;m();async function m(){t(2,c=!0);try{const J=await ce.settings.getAll()||{};h(J)}catch(J){ce.error(J)}t(2,c=!1)}async function _(){if(!(d||!s)){t(3,d=!0);try{const J=await ce.settings.update(B.filterRedactedProps(f));h(J),en({}),zt("Successfully saved mail settings.")}catch(J){ce.error(J)}t(3,d=!1)}}function h(J={}){t(0,f={meta:(J==null?void 0:J.meta)||{},smtp:(J==null?void 0:J.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function y(){f.meta.senderName=this.value,t(0,f)}function S(){f.meta.senderAddress=this.value,t(0,f)}function C(J){n.$$.not_equal(f.meta.verificationTemplate,J)&&(f.meta.verificationTemplate=J,t(0,f))}function $(J){n.$$.not_equal(f.meta.resetPasswordTemplate,J)&&(f.meta.resetPasswordTemplate=J,t(0,f))}function T(J){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,J)&&(f.meta.confirmEmailChangeTemplate=J,t(0,f))}function M(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function D(){f.smtp.port=dt(this.value),t(0,f)}function L(J){n.$$.not_equal(f.smtp.tls,J)&&(f.smtp.tls=J,t(0,f))}function P(J){n.$$.not_equal(f.smtp.authMethod,J)&&(f.smtp.authMethod=J,t(0,f))}function N(){f.smtp.username=this.value,t(0,f)}function F(J){n.$$.not_equal(f.smtp.password,J)&&(f.smtp.password=J,t(0,f))}const R=()=>b(),q=()=>_(),H=()=>a==null?void 0:a.show(),W=()=>_();function X(J){ee[J?"unshift":"push"](()=>{a=J,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,c,d,s,l,o,r,_,b,u,i,y,S,C,$,T,M,O,D,L,P,N,F,R,q,H,W,X]}class dA extends ge{constructor(e){super(),_e(this,e,cA,fA,me,{},null,[-1,-1])}}const pA=n=>({isTesting:n&4,testError:n&2,enabled:n&1}),Rh=n=>({isTesting:n[2],testError:n[1],enabled:n[0].enabled});function mA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U(n[4]),p(e,"type","checkbox"),p(e,"id",t=n[20]),e.required=!0,p(s,"for",o=n[20])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"change",n[8]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&16&&se(l,u[4]),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function qh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M;return i=new pe({props:{class:"form-field required",name:n[3]+".endpoint",$$slots:{default:[hA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:n[3]+".bucket",$$slots:{default:[_A,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field required",name:n[3]+".region",$$slots:{default:[gA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),d=new pe({props:{class:"form-field required",name:n[3]+".accessKey",$$slots:{default:[bA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),h=new pe({props:{class:"form-field required",name:n[3]+".secret",$$slots:{default:[vA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),S=new pe({props:{class:"form-field",name:n[3]+".forcePathStyle",$$slots:{default:[yA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),z(i.$$.fragment),s=E(),l=v("div"),z(o.$$.fragment),r=E(),a=v("div"),z(u.$$.fragment),f=E(),c=v("div"),z(d.$$.fragment),m=E(),_=v("div"),z(h.$$.fragment),b=E(),y=v("div"),z(S.$$.fragment),C=E(),$=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(_,"class","col-lg-6"),p(y,"class","col-lg-12"),p($,"class","col-lg-12"),p(e,"class","grid")},m(O,D){w(O,e,D),g(e,t),j(i,t,null),g(e,s),g(e,l),j(o,l,null),g(e,r),g(e,a),j(u,a,null),g(e,f),g(e,c),j(d,c,null),g(e,m),g(e,_),j(h,_,null),g(e,b),g(e,y),j(S,y,null),g(e,C),g(e,$),M=!0},p(O,D){const L={};D&8&&(L.name=O[3]+".endpoint"),D&1081345&&(L.$$scope={dirty:D,ctx:O}),i.$set(L);const P={};D&8&&(P.name=O[3]+".bucket"),D&1081345&&(P.$$scope={dirty:D,ctx:O}),o.$set(P);const N={};D&8&&(N.name=O[3]+".region"),D&1081345&&(N.$$scope={dirty:D,ctx:O}),u.$set(N);const F={};D&8&&(F.name=O[3]+".accessKey"),D&1081345&&(F.$$scope={dirty:D,ctx:O}),d.$set(F);const R={};D&8&&(R.name=O[3]+".secret"),D&1081345&&(R.$$scope={dirty:D,ctx:O}),h.$set(R);const q={};D&8&&(q.name=O[3]+".forcePathStyle"),D&1081345&&(q.$$scope={dirty:D,ctx:O}),S.$set(q)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(h.$$.fragment,O),A(S.$$.fragment,O),O&&Qe(()=>{M&&(T||(T=je(e,ot,{duration:150},!0)),T.run(1))}),M=!0)},o(O){I(i.$$.fragment,O),I(o.$$.fragment,O),I(u.$$.fragment,O),I(d.$$.fragment,O),I(h.$$.fragment,O),I(S.$$.fragment,O),O&&(T||(T=je(e,ot,{duration:150},!1)),T.run(0)),M=!1},d(O){O&&k(e),V(i),V(o),V(u),V(d),V(h),V(S),O&&T&&T.end()}}}function hA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Endpoint"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].endpoint),r||(a=K(l,"input",n[9]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].endpoint&&re(l,u[0].endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function _A(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Bucket"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].bucket),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].bucket&&re(l,u[0].bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function gA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Region"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].region),r||(a=K(l,"input",n[11]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].region&&re(l,u[0].region)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function bA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Access key"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].accessKey),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].accessKey&&re(l,u[0].accessKey)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function vA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:!0};return n[0].secret!==void 0&&(u.value=n[0].secret),l=new mu({props:u}),ee.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Secret"),s=E(),z(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].secret,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),V(l,f)}}}function yA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[20])},m(c,d){w(c,e,d),e.checked=n[0].forcePathStyle,w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=[K(e,"change",n[14]),Me(He.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&1048576&&t!==(t=c[20])&&p(e,"id",t),d&1&&(e.checked=c[0].forcePathStyle),d&1048576&&a!==(a=c[20])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function kA(n){let e,t,i,s,l;e=new pe({props:{class:"form-field form-field-toggle",$$slots:{default:[mA,({uniqueId:u})=>({20:u}),({uniqueId:u})=>u?1048576:0]},$$scope:{ctx:n}}});const o=n[7].default,r=yt(o,n,n[15],Rh);let a=n[0].enabled&&qh(n);return{c(){z(e.$$.fragment),t=E(),r&&r.c(),i=E(),a&&a.c(),s=ye()},m(u,f){j(e,u,f),w(u,t,f),r&&r.m(u,f),w(u,i,f),a&&a.m(u,f),w(u,s,f),l=!0},p(u,[f]){const c={};f&1081361&&(c.$$scope={dirty:f,ctx:u}),e.$set(c),r&&r.p&&(!l||f&32775)&&wt(r,o,u,u[15],l?kt(o,u[15],f,pA):St(u[15]),Rh),u[0].enabled?a?(a.p(u,f),f&1&&A(a,1)):(a=qh(u),a.c(),A(a,1),a.m(s.parentNode,s)):a&&(ae(),I(a,1,1,()=>{a=null}),ue())},i(u){l||(A(e.$$.fragment,u),A(r,u),A(a),l=!0)},o(u){I(e.$$.fragment,u),I(r,u),I(a),l=!1},d(u){V(e,u),u&&k(t),r&&r.d(u),u&&k(i),a&&a.d(u),u&&k(s)}}}const Vr="s3_test_request";function wA(n,e,t){let{$$slots:i={},$$scope:s}=e,{originalConfig:l={}}=e,{config:o={}}=e,{configKey:r="s3"}=e,{toggleLabel:a="Enable S3"}=e,{testFilesystem:u="storage"}=e,{testError:f=null}=e,{isTesting:c=!1}=e,d=null,m=null;function _(O){t(2,c=!0),clearTimeout(m),m=setTimeout(()=>{h()},O)}async function h(){if(t(1,f=null),!o.enabled)return t(2,c=!1),f;ce.cancelRequest(Vr),clearTimeout(d),d=setTimeout(()=>{ce.cancelRequest(Vr),t(1,f=new Error("S3 test connection timeout.")),t(2,c=!1)},3e4),t(2,c=!0);let O;try{await ce.settings.testS3(u,{$cancelKey:Vr})}catch(D){O=D}return O!=null&&O.isAbort||(t(1,f=O),t(2,c=!1),clearTimeout(d)),f}Gt(()=>()=>{clearTimeout(d),clearTimeout(m)});function b(){o.enabled=this.checked,t(0,o)}function y(){o.endpoint=this.value,t(0,o)}function S(){o.bucket=this.value,t(0,o)}function C(){o.region=this.value,t(0,o)}function $(){o.accessKey=this.value,t(0,o)}function T(O){n.$$.not_equal(o.secret,O)&&(o.secret=O,t(0,o))}function M(){o.forcePathStyle=this.checked,t(0,o)}return n.$$set=O=>{"originalConfig"in O&&t(5,l=O.originalConfig),"config"in O&&t(0,o=O.config),"configKey"in O&&t(3,r=O.configKey),"toggleLabel"in O&&t(4,a=O.toggleLabel),"testFilesystem"in O&&t(6,u=O.testFilesystem),"testError"in O&&t(1,f=O.testError),"isTesting"in O&&t(2,c=O.isTesting),"$$scope"in O&&t(15,s=O.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&l!=null&&l.enabled&&_(100),n.$$.dirty&9&&(o.enabled||ai(r))},[o,f,c,r,a,l,u,i,b,y,S,C,$,T,M,s]}class T1 extends ge{constructor(e){super(),_e(this,e,wA,kA,me,{originalConfig:5,config:0,configKey:3,toggleLabel:4,testFilesystem:6,testError:1,isTesting:2})}}function SA(n){var O;let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;function y(D){n[11](D)}function S(D){n[12](D)}function C(D){n[13](D)}let $={toggleLabel:"Use S3 storage",originalConfig:n[0].s3,$$slots:{default:[CA]},$$scope:{ctx:n}};n[1].s3!==void 0&&($.config=n[1].s3),n[4]!==void 0&&($.isTesting=n[4]),n[5]!==void 0&&($.testError=n[5]),e=new T1({props:$}),ee.push(()=>de(e,"config",y)),ee.push(()=>de(e,"isTesting",S)),ee.push(()=>de(e,"testError",C));let T=((O=n[1].s3)==null?void 0:O.enabled)&&!n[6]&&!n[3]&&Vh(n),M=n[6]&&zh(n);return{c(){z(e.$$.fragment),l=E(),o=v("div"),r=v("div"),a=E(),T&&T.c(),u=E(),M&&M.c(),f=E(),c=v("button"),d=v("span"),d.textContent="Save changes",p(r,"class","flex-fill"),p(d,"class","txt"),p(c,"type","submit"),p(c,"class","btn btn-expanded"),c.disabled=m=!n[6]||n[3],Q(c,"btn-loading",n[3]),p(o,"class","flex")},m(D,L){j(e,D,L),w(D,l,L),w(D,o,L),g(o,r),g(o,a),T&&T.m(o,null),g(o,u),M&&M.m(o,null),g(o,f),g(o,c),g(c,d),_=!0,h||(b=K(c,"click",n[15]),h=!0)},p(D,L){var N;const P={};L&1&&(P.originalConfig=D[0].s3),L&524291&&(P.$$scope={dirty:L,ctx:D}),!t&&L&2&&(t=!0,P.config=D[1].s3,he(()=>t=!1)),!i&&L&16&&(i=!0,P.isTesting=D[4],he(()=>i=!1)),!s&&L&32&&(s=!0,P.testError=D[5],he(()=>s=!1)),e.$set(P),(N=D[1].s3)!=null&&N.enabled&&!D[6]&&!D[3]?T?T.p(D,L):(T=Vh(D),T.c(),T.m(o,u)):T&&(T.d(1),T=null),D[6]?M?M.p(D,L):(M=zh(D),M.c(),M.m(o,f)):M&&(M.d(1),M=null),(!_||L&72&&m!==(m=!D[6]||D[3]))&&(c.disabled=m),(!_||L&8)&&Q(c,"btn-loading",D[3])},i(D){_||(A(e.$$.fragment,D),_=!0)},o(D){I(e.$$.fragment,D),_=!1},d(D){V(e,D),D&&k(l),D&&k(o),T&&T.d(),M&&M.d(),h=!1,b()}}}function $A(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function jh(n){var L;let e,t,i,s,l,o,r,a=(L=n[0].s3)!=null&&L.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",m,_,h,b,y,S,C,$,T,M,O,D;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=E(),l=v("div"),o=U(`If you have existing uploaded files, you'll have to migrate them manually + `,y=U("."),p(e,"for",i=n[31]),p(f,"type","button"),p(f,"class","label label-sm link-primary txt-mono"),p(d,"type","button"),p(d,"class","label label-sm link-primary txt-mono"),p(_,"type","button"),p(_,"class","label label-sm link-primary txt-mono"),p(b,"type","button"),p(b,"class","label label-sm link-primary txt-mono"),p(b,"title","Required parameter"),p(a,"class","help-block")},m(D,L){w(D,e,L),g(e,t),w(D,s,L),M[l].m(D,L),w(D,r,L),w(D,a,L),g(a,u),g(a,f),g(a,c),g(a,d),g(a,m),g(a,_),g(a,h),g(a,b),g(a,y),S=!0,C||($=[J(f,"click",n[22]),J(d,"click",n[23]),J(_,"click",n[24]),J(b,"click",n[25])],C=!0)},p(D,L){(!S||L[1]&1&&i!==(i=D[31]))&&p(e,"for",i);let P=l;l=O(D),l===P?M[l].p(D,L):(ae(),I(M[P],1,1,()=>{M[P]=null}),ue(),o=M[l],o?o.p(D,L):(o=M[l]=T[l](D),o.c()),A(o,1),o.m(r.parentNode,r))},i(D){S||(A(o),S=!0)},o(D){I(o),S=!1},d(D){D&&k(e),D&&k(s),M[l].d(D),D&&k(r),D&&k(a),C=!1,Ee($)}}}function qD(n){let e,t,i,s,l,o;return e=new pe({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[LD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new pe({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[PD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new pe({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[RD,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment)},m(r,a){V(e,r,a),w(r,t,a),V(i,r,a),w(r,s,a),V(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(A(e.$$.fragment,r),A(i.$$.fragment,r),A(l.$$.fragment,r),o=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){z(e,r),r&&k(t),z(i,r),r&&k(s),z(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){w(o,e,r),i=!0,s||(l=Me(He.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&Qe(()=>{i&&(t||(t=je(e,Kt,{duration:150,start:.7},!0)),t.run(1))}),i=!0)},o(o){o&&(t||(t=je(e,Kt,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&k(e),o&&t&&t.end(),s=!1,l()}}}function jD(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&Lh();return{c(){e=v("div"),t=v("i"),i=E(),s=v("span"),l=U(n[2]),o=E(),r=v("div"),a=E(),f&&f.c(),u=ye(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){w(c,e,d),g(e,t),g(e,i),g(e,s),g(s,l),w(c,o,d),w(c,r,d),w(c,a,d),f&&f.m(c,d),w(c,u,d)},p(c,d){d[0]&4&&se(l,c[2]),c[6]?f?d[0]&64&&A(f,1):(f=Lh(),f.c(),A(f,1),f.m(u.parentNode,u)):f&&(ae(),I(f,1,1,()=>{f=null}),ue())},d(c){c&&k(e),c&&k(o),c&&k(r),c&&k(a),f&&f.d(c),c&&k(u)}}}function VD(n){let e,t;const i=[n[8]];let s={$$slots:{header:[jD],default:[qD]},$$scope:{ctx:n}};for(let l=0;lt(12,o=Z));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Ph,d=!1;function m(){f==null||f.expand()}function _(){f==null||f.collapse()}function h(){f==null||f.collapseSiblings()}async function b(){c||d||(t(5,d=!0),t(4,c=(await at(()=>import("./CodeEditor-14802b79.js"),["./CodeEditor-14802b79.js","./index-fd4289fb.js"],import.meta.url)).default),Ph=c,t(5,d=!1))}function y(Z){B.copyToClipboard(Z),ko(`Copied ${Z} to clipboard`,2e3)}b();function S(){u.subject=this.value,t(0,u)}const C=()=>y("{APP_NAME}"),$=()=>y("{APP_URL}");function T(){u.actionUrl=this.value,t(0,u)}const M=()=>y("{APP_NAME}"),O=()=>y("{APP_URL}"),D=()=>y("{TOKEN}");function L(Z){n.$$.not_equal(u.body,Z)&&(u.body=Z,t(0,u))}function P(){u.body=this.value,t(0,u)}const N=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),R=()=>y("{TOKEN}"),q=()=>y("{ACTION_URL}");function j(Z){ee[Z?"unshift":"push"](()=>{f=Z,t(3,f)})}function W(Z){Ne.call(this,n,Z)}function X(Z){Ne.call(this,n,Z)}function K(Z){Ne.call(this,n,Z)}return n.$$set=Z=>{e=qe(qe({},e),Zt(Z)),t(8,l=xe(e,s)),"key"in Z&&t(1,r=Z.key),"title"in Z&&t(2,a=Z.title),"config"in Z&&t(0,u=Z.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||ai(r))},[u,r,a,f,c,d,i,y,l,m,_,h,o,S,C,$,T,M,O,D,L,P,N,F,R,q,j,W,X,K]}class qr extends ge{constructor(e){super(),_e(this,e,zD,VD,me,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function Nh(n,e,t){const i=n.slice();return i[21]=e[t],i}function Fh(n,e){let t,i,s,l,o,r=e[21].label+"",a,u,f,c,d,m;return c=Y1(e[11][0]),{key:n,first:null,c(){t=v("div"),i=v("input"),l=E(),o=v("label"),a=U(r),f=E(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[20]+e[21].value),i.__value=e[21].value,i.value=i.__value,p(o,"for",u=e[20]+e[21].value),p(t,"class","form-field-block"),c.p(i),this.first=t},m(_,h){w(_,t,h),g(t,i),i.checked=i.__value===e[2],g(t,l),g(t,o),g(o,a),g(t,f),d||(m=J(i,"change",e[10]),d=!0)},p(_,h){e=_,h&1048576&&s!==(s=e[20]+e[21].value)&&p(i,"id",s),h&4&&(i.checked=i.__value===e[2]),h&1048576&&u!==(u=e[20]+e[21].value)&&p(o,"for",u)},d(_){_&&k(t),c.r(),d=!1,m()}}}function HD(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[21].value;for(let o=0;o({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),s=new pe({props:{class:"form-field required m-0",name:"email",$$slots:{default:[BD,({uniqueId:a})=>({20:a}),({uniqueId:a})=>a?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),H(t.$$.fragment),i=E(),H(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){w(a,e,u),V(t,e,null),g(e,i),V(s,e,null),l=!0,o||(r=J(e,"submit",et(n[13])),o=!0)},p(a,u){const f={};u&17825796&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&17825794&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(A(t.$$.fragment,a),A(s.$$.fragment,a),l=!0)},o(a){I(t.$$.fragment,a),I(s.$$.fragment,a),l=!1},d(a){a&&k(e),z(t),z(s),o=!1,r()}}}function WD(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function YD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=U("Close"),i=E(),s=v("button"),l=v("i"),o=E(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(c,d){w(c,e,d),g(e,t),w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=J(e,"click",n[0]),u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&Q(s,"btn-loading",c[4])},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,f()}}}function KD(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[14],popup:!0,$$slots:{footer:[YD],header:[WD],default:[UD]},$$scope:{ctx:n}};return e=new ln({props:i}),n[15](e),e.$on("show",n[16]),e.$on("hide",n[17]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[14]),l&16777270&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[15](null),z(e,s)}}}const jr="last_email_test",Rh="email_test_request";function JD(n,e,t){let i;const s=$t(),l="email_test_"+B.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(jr),u=o[0].value,f=!1,c=null;function d(O="",D=""){t(1,a=O||localStorage.getItem(jr)),t(2,u=D||o[0].value),en({}),r==null||r.show()}function m(){return clearTimeout(c),r==null?void 0:r.hide()}async function _(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(jr,a),clearTimeout(c),c=setTimeout(()=>{ce.cancelRequest(Rh),Ds("Test email send timeout.")},3e4);try{await ce.settings.testEmail(a,u,{$cancelKey:Rh}),zt("Successfully sent test email."),s("submit"),t(4,f=!1),await fn(),m()}catch(O){t(4,f=!1),ce.error(O)}clearTimeout(c)}}const h=[[]];function b(){u=this.__value,t(2,u)}function y(){a=this.value,t(1,a)}const S=()=>_(),C=()=>!f;function $(O){ee[O?"unshift":"push"](()=>{r=O,t(3,r)})}function T(O){Ne.call(this,n,O)}function M(O){Ne.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[m,a,u,r,f,i,l,o,_,d,b,h,y,S,C,$,T,M]}class ZD extends ge{constructor(e){super(),_e(this,e,JD,KD,me,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function GD(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L,P;i=new pe({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[QD,({uniqueId:ne})=>({31:ne}),({uniqueId:ne})=>[0,ne?1:0]]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[xD,({uniqueId:ne})=>({31:ne}),({uniqueId:ne})=>[0,ne?1:0]]},$$scope:{ctx:n}}});function N(ne){n[14](ne)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new qr({props:F}),ee.push(()=>de(u,"config",N));function R(ne){n[15](ne)}let q={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(q.config=n[0].meta.resetPasswordTemplate),d=new qr({props:q}),ee.push(()=>de(d,"config",R));function j(ne){n[16](ne)}let W={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(W.config=n[0].meta.confirmEmailChangeTemplate),h=new qr({props:W}),ee.push(()=>de(h,"config",j)),$=new pe({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[eA,({uniqueId:ne})=>({31:ne}),({uniqueId:ne})=>[0,ne?1:0]]},$$scope:{ctx:n}}});let X=n[0].smtp.enabled&&qh(n);function K(ne,ie){return ne[4]?aA:rA}let Z=K(n),le=Z(n);return{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),r=E(),a=v("div"),H(u.$$.fragment),c=E(),H(d.$$.fragment),_=E(),H(h.$$.fragment),y=E(),S=v("hr"),C=E(),H($.$$.fragment),T=E(),X&&X.c(),M=E(),O=v("div"),D=v("div"),L=E(),le.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(D,"class","flex-fill"),p(O,"class","flex")},m(ne,ie){w(ne,e,ie),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),w(ne,r,ie),w(ne,a,ie),V(u,a,null),g(a,c),V(d,a,null),g(a,_),V(h,a,null),w(ne,y,ie),w(ne,S,ie),w(ne,C,ie),V($,ne,ie),w(ne,T,ie),X&&X.m(ne,ie),w(ne,M,ie),w(ne,O,ie),g(O,D),g(O,L),le.m(O,null),P=!0},p(ne,ie){const be={};ie[0]&1|ie[1]&3&&(be.$$scope={dirty:ie,ctx:ne}),i.$set(be);const Se={};ie[0]&1|ie[1]&3&&(Se.$$scope={dirty:ie,ctx:ne}),o.$set(Se);const Ve={};!f&&ie[0]&1&&(f=!0,Ve.config=ne[0].meta.verificationTemplate,he(()=>f=!1)),u.$set(Ve);const Be={};!m&&ie[0]&1&&(m=!0,Be.config=ne[0].meta.resetPasswordTemplate,he(()=>m=!1)),d.$set(Be);const ke={};!b&&ie[0]&1&&(b=!0,ke.config=ne[0].meta.confirmEmailChangeTemplate,he(()=>b=!1)),h.$set(ke);const Te={};ie[0]&1|ie[1]&3&&(Te.$$scope={dirty:ie,ctx:ne}),$.$set(Te),ne[0].smtp.enabled?X?(X.p(ne,ie),ie[0]&1&&A(X,1)):(X=qh(ne),X.c(),A(X,1),X.m(M.parentNode,M)):X&&(ae(),I(X,1,1,()=>{X=null}),ue()),Z===(Z=K(ne))&&le?le.p(ne,ie):(le.d(1),le=Z(ne),le&&(le.c(),le.m(O,null)))},i(ne){P||(A(i.$$.fragment,ne),A(o.$$.fragment,ne),A(u.$$.fragment,ne),A(d.$$.fragment,ne),A(h.$$.fragment,ne),A($.$$.fragment,ne),A(X),P=!0)},o(ne){I(i.$$.fragment,ne),I(o.$$.fragment,ne),I(u.$$.fragment,ne),I(d.$$.fragment,ne),I(h.$$.fragment,ne),I($.$$.fragment,ne),I(X),P=!1},d(ne){ne&&k(e),z(i),z(o),ne&&k(r),ne&&k(a),z(u),z(d),z(h),ne&&k(y),ne&&k(S),ne&&k(C),z($,ne),ne&&k(T),X&&X.d(ne),ne&&k(M),ne&&k(O),le.d()}}}function XD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function QD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Sender name"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].meta.senderName),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&re(l,u[0].meta.senderName)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function xD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Sender address"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","email"),p(l,"id",o=n[31]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].meta.senderAddress),r||(a=J(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&re(l,u[0].meta.senderAddress)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function eA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[31])},m(c,d){w(c,e,d),e.checked=n[0].smtp.enabled,w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=[J(e,"change",n[17]),Me(He.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&1&&t!==(t=c[31])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&1&&a!==(a=c[31])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function qh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M;return i=new pe({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[tA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[nA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[iA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),d=new pe({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[sA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),h=new pe({props:{class:"form-field",name:"smtp.username",$$slots:{default:[lA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),S=new pe({props:{class:"form-field",name:"smtp.password",$$slots:{default:[oA,({uniqueId:O})=>({31:O}),({uniqueId:O})=>[0,O?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),r=E(),a=v("div"),H(u.$$.fragment),f=E(),c=v("div"),H(d.$$.fragment),m=E(),_=v("div"),H(h.$$.fragment),b=E(),y=v("div"),H(S.$$.fragment),C=E(),$=v("div"),p(t,"class","col-lg-4"),p(l,"class","col-lg-2"),p(a,"class","col-lg-3"),p(c,"class","col-lg-3"),p(_,"class","col-lg-6"),p(y,"class","col-lg-6"),p($,"class","col-lg-12"),p(e,"class","grid")},m(O,D){w(O,e,D),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),g(e,r),g(e,a),V(u,a,null),g(e,f),g(e,c),V(d,c,null),g(e,m),g(e,_),V(h,_,null),g(e,b),g(e,y),V(S,y,null),g(e,C),g(e,$),M=!0},p(O,D){const L={};D[0]&1|D[1]&3&&(L.$$scope={dirty:D,ctx:O}),i.$set(L);const P={};D[0]&1|D[1]&3&&(P.$$scope={dirty:D,ctx:O}),o.$set(P);const N={};D[0]&1|D[1]&3&&(N.$$scope={dirty:D,ctx:O}),u.$set(N);const F={};D[0]&1|D[1]&3&&(F.$$scope={dirty:D,ctx:O}),d.$set(F);const R={};D[0]&1|D[1]&3&&(R.$$scope={dirty:D,ctx:O}),h.$set(R);const q={};D[0]&1|D[1]&3&&(q.$$scope={dirty:D,ctx:O}),S.$set(q)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(h.$$.fragment,O),A(S.$$.fragment,O),O&&Qe(()=>{M&&(T||(T=je(e,ot,{duration:150},!0)),T.run(1))}),M=!0)},o(O){I(i.$$.fragment,O),I(o.$$.fragment,O),I(u.$$.fragment,O),I(d.$$.fragment,O),I(h.$$.fragment,O),I(S.$$.fragment,O),O&&(T||(T=je(e,ot,{duration:150},!1)),T.run(0)),M=!1},d(O){O&&k(e),z(i),z(o),z(u),z(d),z(h),z(S),O&&T&&T.end()}}}function tA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("SMTP server host"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].smtp.host),r||(a=J(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&re(l,u[0].smtp.host)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function nA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Port"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].smtp.port),r||(a=J(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&dt(l.value)!==u[0].smtp.port&&re(l,u[0].smtp.port)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function iA(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Hi({props:u}),ee.push(()=>de(l,"keyOfSelected",a)),{c(){e=v("label"),t=U("TLS encryption"),s=E(),H(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function sA(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new Hi({props:u}),ee.push(()=>de(l,"keyOfSelected",a)),{c(){e=v("label"),t=U("AUTH method"),s=E(),H(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function lA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Username"),s=E(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31])},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].smtp.username),r||(a=J(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&re(l,u[0].smtp.username)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function oA(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new mu({props:u}),ee.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Password"),s=E(),H(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function rA(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[26]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function aA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],Q(s,"btn-loading",n[3])},m(u,f){w(u,e,f),g(e,t),w(u,i,f),w(u,s,f),g(s,l),r||(a=[J(e,"click",n[24]),J(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&Q(s,"btn-loading",u[3])},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,Ee(a)}}}function uA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;const y=[XD,GD],S=[];function C($,T){return $[2]?0:1}return d=C(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[5]),r=E(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,T){w($,e,T),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w($,r,T),w($,a,T),g(a,u),g(u,f),g(u,c),S[d].m(u,null),_=!0,h||(b=J(u,"submit",et(n[27])),h=!0)},p($,T){(!_||T[0]&32)&&se(o,$[5]);let M=d;d=C($),d===M?S[d].p($,T):(ae(),I(S[M],1,1,()=>{S[M]=null}),ue(),m=S[d],m?m.p($,T):(m=S[d]=y[d]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){I(m),_=!1},d($){$&&k(e),$&&k(r),$&&k(a),S[d].d(),h=!1,b()}}}function fA(n){let e,t,i,s,l,o;e=new Ci({}),i=new wn({props:{$$slots:{default:[uA]},$$scope:{ctx:n}}});let r={};return l=new ZD({props:r}),n[28](l),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment)},m(a,u){V(e,a,u),w(a,t,u),V(i,a,u),w(a,s,u),V(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){z(e,a),a&&k(t),z(i,a),a&&k(s),n[28](null),z(l,a)}}}function cA(n,e,t){let i,s,l;Je(n,Tt,K=>t(5,l=K));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];sn(Tt,l="Mail settings",l);let a,u={},f={},c=!1,d=!1;m();async function m(){t(2,c=!0);try{const K=await ce.settings.getAll()||{};h(K)}catch(K){ce.error(K)}t(2,c=!1)}async function _(){if(!(d||!s)){t(3,d=!0);try{const K=await ce.settings.update(B.filterRedactedProps(f));h(K),en({}),zt("Successfully saved mail settings.")}catch(K){ce.error(K)}t(3,d=!1)}}function h(K={}){t(0,f={meta:(K==null?void 0:K.meta)||{},smtp:(K==null?void 0:K.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function y(){f.meta.senderName=this.value,t(0,f)}function S(){f.meta.senderAddress=this.value,t(0,f)}function C(K){n.$$.not_equal(f.meta.verificationTemplate,K)&&(f.meta.verificationTemplate=K,t(0,f))}function $(K){n.$$.not_equal(f.meta.resetPasswordTemplate,K)&&(f.meta.resetPasswordTemplate=K,t(0,f))}function T(K){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,K)&&(f.meta.confirmEmailChangeTemplate=K,t(0,f))}function M(){f.smtp.enabled=this.checked,t(0,f)}function O(){f.smtp.host=this.value,t(0,f)}function D(){f.smtp.port=dt(this.value),t(0,f)}function L(K){n.$$.not_equal(f.smtp.tls,K)&&(f.smtp.tls=K,t(0,f))}function P(K){n.$$.not_equal(f.smtp.authMethod,K)&&(f.smtp.authMethod=K,t(0,f))}function N(){f.smtp.username=this.value,t(0,f)}function F(K){n.$$.not_equal(f.smtp.password,K)&&(f.smtp.password=K,t(0,f))}const R=()=>b(),q=()=>_(),j=()=>a==null?void 0:a.show(),W=()=>_();function X(K){ee[K?"unshift":"push"](()=>{a=K,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,c,d,s,l,o,r,_,b,u,i,y,S,C,$,T,M,O,D,L,P,N,F,R,q,j,W,X]}class dA extends ge{constructor(e){super(),_e(this,e,cA,fA,me,{},null,[-1,-1])}}const pA=n=>({isTesting:n&4,testError:n&2,enabled:n&1}),jh=n=>({isTesting:n[2],testError:n[1],enabled:n[0].enabled});function mA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U(n[4]),p(e,"type","checkbox"),p(e,"id",t=n[20]),e.required=!0,p(s,"for",o=n[20])},m(u,f){w(u,e,f),e.checked=n[0].enabled,w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"change",n[8]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&16&&se(l,u[4]),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function Vh(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M;return i=new pe({props:{class:"form-field required",name:n[3]+".endpoint",$$slots:{default:[hA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),o=new pe({props:{class:"form-field required",name:n[3]+".bucket",$$slots:{default:[_A,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field required",name:n[3]+".region",$$slots:{default:[gA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),d=new pe({props:{class:"form-field required",name:n[3]+".accessKey",$$slots:{default:[bA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),h=new pe({props:{class:"form-field required",name:n[3]+".secret",$$slots:{default:[vA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),S=new pe({props:{class:"form-field",name:n[3]+".forcePathStyle",$$slots:{default:[yA,({uniqueId:O})=>({20:O}),({uniqueId:O})=>O?1048576:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),H(i.$$.fragment),s=E(),l=v("div"),H(o.$$.fragment),r=E(),a=v("div"),H(u.$$.fragment),f=E(),c=v("div"),H(d.$$.fragment),m=E(),_=v("div"),H(h.$$.fragment),b=E(),y=v("div"),H(S.$$.fragment),C=E(),$=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(_,"class","col-lg-6"),p(y,"class","col-lg-12"),p($,"class","col-lg-12"),p(e,"class","grid")},m(O,D){w(O,e,D),g(e,t),V(i,t,null),g(e,s),g(e,l),V(o,l,null),g(e,r),g(e,a),V(u,a,null),g(e,f),g(e,c),V(d,c,null),g(e,m),g(e,_),V(h,_,null),g(e,b),g(e,y),V(S,y,null),g(e,C),g(e,$),M=!0},p(O,D){const L={};D&8&&(L.name=O[3]+".endpoint"),D&1081345&&(L.$$scope={dirty:D,ctx:O}),i.$set(L);const P={};D&8&&(P.name=O[3]+".bucket"),D&1081345&&(P.$$scope={dirty:D,ctx:O}),o.$set(P);const N={};D&8&&(N.name=O[3]+".region"),D&1081345&&(N.$$scope={dirty:D,ctx:O}),u.$set(N);const F={};D&8&&(F.name=O[3]+".accessKey"),D&1081345&&(F.$$scope={dirty:D,ctx:O}),d.$set(F);const R={};D&8&&(R.name=O[3]+".secret"),D&1081345&&(R.$$scope={dirty:D,ctx:O}),h.$set(R);const q={};D&8&&(q.name=O[3]+".forcePathStyle"),D&1081345&&(q.$$scope={dirty:D,ctx:O}),S.$set(q)},i(O){M||(A(i.$$.fragment,O),A(o.$$.fragment,O),A(u.$$.fragment,O),A(d.$$.fragment,O),A(h.$$.fragment,O),A(S.$$.fragment,O),O&&Qe(()=>{M&&(T||(T=je(e,ot,{duration:150},!0)),T.run(1))}),M=!0)},o(O){I(i.$$.fragment,O),I(o.$$.fragment,O),I(u.$$.fragment,O),I(d.$$.fragment,O),I(h.$$.fragment,O),I(S.$$.fragment,O),O&&(T||(T=je(e,ot,{duration:150},!1)),T.run(0)),M=!1},d(O){O&&k(e),z(i),z(o),z(u),z(d),z(h),z(S),O&&T&&T.end()}}}function hA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Endpoint"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].endpoint),r||(a=J(l,"input",n[9]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].endpoint&&re(l,u[0].endpoint)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function _A(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Bucket"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].bucket),r||(a=J(l,"input",n[10]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].bucket&&re(l,u[0].bucket)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function gA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Region"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].region),r||(a=J(l,"input",n[11]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].region&&re(l,u[0].region)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function bA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Access key"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[0].accessKey),r||(a=J(l,"input",n[12]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].accessKey&&re(l,u[0].accessKey)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function vA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:!0};return n[0].secret!==void 0&&(u.value=n[0].secret),l=new mu({props:u}),ee.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Secret"),s=E(),H(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].secret,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function yA(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=E(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=E(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[20])},m(c,d){w(c,e,d),e.checked=n[0].forcePathStyle,w(c,i,d),w(c,s,d),g(s,l),g(s,o),g(s,r),u||(f=[J(e,"change",n[14]),Me(He.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&1048576&&t!==(t=c[20])&&p(e,"id",t),d&1&&(e.checked=c[0].forcePathStyle),d&1048576&&a!==(a=c[20])&&p(s,"for",a)},d(c){c&&k(e),c&&k(i),c&&k(s),u=!1,Ee(f)}}}function kA(n){let e,t,i,s,l;e=new pe({props:{class:"form-field form-field-toggle",$$slots:{default:[mA,({uniqueId:u})=>({20:u}),({uniqueId:u})=>u?1048576:0]},$$scope:{ctx:n}}});const o=n[7].default,r=yt(o,n,n[15],jh);let a=n[0].enabled&&Vh(n);return{c(){H(e.$$.fragment),t=E(),r&&r.c(),i=E(),a&&a.c(),s=ye()},m(u,f){V(e,u,f),w(u,t,f),r&&r.m(u,f),w(u,i,f),a&&a.m(u,f),w(u,s,f),l=!0},p(u,[f]){const c={};f&1081361&&(c.$$scope={dirty:f,ctx:u}),e.$set(c),r&&r.p&&(!l||f&32775)&&wt(r,o,u,u[15],l?kt(o,u[15],f,pA):St(u[15]),jh),u[0].enabled?a?(a.p(u,f),f&1&&A(a,1)):(a=Vh(u),a.c(),A(a,1),a.m(s.parentNode,s)):a&&(ae(),I(a,1,1,()=>{a=null}),ue())},i(u){l||(A(e.$$.fragment,u),A(r,u),A(a),l=!0)},o(u){I(e.$$.fragment,u),I(r,u),I(a),l=!1},d(u){z(e,u),u&&k(t),r&&r.d(u),u&&k(i),a&&a.d(u),u&&k(s)}}}const Vr="s3_test_request";function wA(n,e,t){let{$$slots:i={},$$scope:s}=e,{originalConfig:l={}}=e,{config:o={}}=e,{configKey:r="s3"}=e,{toggleLabel:a="Enable S3"}=e,{testFilesystem:u="storage"}=e,{testError:f=null}=e,{isTesting:c=!1}=e,d=null,m=null;function _(O){t(2,c=!0),clearTimeout(m),m=setTimeout(()=>{h()},O)}async function h(){if(t(1,f=null),!o.enabled)return t(2,c=!1),f;ce.cancelRequest(Vr),clearTimeout(d),d=setTimeout(()=>{ce.cancelRequest(Vr),t(1,f=new Error("S3 test connection timeout.")),t(2,c=!1)},3e4),t(2,c=!0);let O;try{await ce.settings.testS3(u,{$cancelKey:Vr})}catch(D){O=D}return O!=null&&O.isAbort||(t(1,f=O),t(2,c=!1),clearTimeout(d)),f}Gt(()=>()=>{clearTimeout(d),clearTimeout(m)});function b(){o.enabled=this.checked,t(0,o)}function y(){o.endpoint=this.value,t(0,o)}function S(){o.bucket=this.value,t(0,o)}function C(){o.region=this.value,t(0,o)}function $(){o.accessKey=this.value,t(0,o)}function T(O){n.$$.not_equal(o.secret,O)&&(o.secret=O,t(0,o))}function M(){o.forcePathStyle=this.checked,t(0,o)}return n.$$set=O=>{"originalConfig"in O&&t(5,l=O.originalConfig),"config"in O&&t(0,o=O.config),"configKey"in O&&t(3,r=O.configKey),"toggleLabel"in O&&t(4,a=O.toggleLabel),"testFilesystem"in O&&t(6,u=O.testFilesystem),"testError"in O&&t(1,f=O.testError),"isTesting"in O&&t(2,c=O.isTesting),"$$scope"in O&&t(15,s=O.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&l!=null&&l.enabled&&_(100),n.$$.dirty&9&&(o.enabled||ai(r))},[o,f,c,r,a,l,u,i,b,y,S,C,$,T,M,s]}class O1 extends ge{constructor(e){super(),_e(this,e,wA,kA,me,{originalConfig:5,config:0,configKey:3,toggleLabel:4,testFilesystem:6,testError:1,isTesting:2})}}function SA(n){var O;let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;function y(D){n[11](D)}function S(D){n[12](D)}function C(D){n[13](D)}let $={toggleLabel:"Use S3 storage",originalConfig:n[0].s3,$$slots:{default:[CA]},$$scope:{ctx:n}};n[1].s3!==void 0&&($.config=n[1].s3),n[4]!==void 0&&($.isTesting=n[4]),n[5]!==void 0&&($.testError=n[5]),e=new O1({props:$}),ee.push(()=>de(e,"config",y)),ee.push(()=>de(e,"isTesting",S)),ee.push(()=>de(e,"testError",C));let T=((O=n[1].s3)==null?void 0:O.enabled)&&!n[6]&&!n[3]&&Hh(n),M=n[6]&&Bh(n);return{c(){H(e.$$.fragment),l=E(),o=v("div"),r=v("div"),a=E(),T&&T.c(),u=E(),M&&M.c(),f=E(),c=v("button"),d=v("span"),d.textContent="Save changes",p(r,"class","flex-fill"),p(d,"class","txt"),p(c,"type","submit"),p(c,"class","btn btn-expanded"),c.disabled=m=!n[6]||n[3],Q(c,"btn-loading",n[3]),p(o,"class","flex")},m(D,L){V(e,D,L),w(D,l,L),w(D,o,L),g(o,r),g(o,a),T&&T.m(o,null),g(o,u),M&&M.m(o,null),g(o,f),g(o,c),g(c,d),_=!0,h||(b=J(c,"click",n[15]),h=!0)},p(D,L){var N;const P={};L&1&&(P.originalConfig=D[0].s3),L&524291&&(P.$$scope={dirty:L,ctx:D}),!t&&L&2&&(t=!0,P.config=D[1].s3,he(()=>t=!1)),!i&&L&16&&(i=!0,P.isTesting=D[4],he(()=>i=!1)),!s&&L&32&&(s=!0,P.testError=D[5],he(()=>s=!1)),e.$set(P),(N=D[1].s3)!=null&&N.enabled&&!D[6]&&!D[3]?T?T.p(D,L):(T=Hh(D),T.c(),T.m(o,u)):T&&(T.d(1),T=null),D[6]?M?M.p(D,L):(M=Bh(D),M.c(),M.m(o,f)):M&&(M.d(1),M=null),(!_||L&72&&m!==(m=!D[6]||D[3]))&&(c.disabled=m),(!_||L&8)&&Q(c,"btn-loading",D[3])},i(D){_||(A(e.$$.fragment,D),_=!0)},o(D){I(e.$$.fragment,D),_=!1},d(D){z(e,D),D&&k(l),D&&k(o),T&&T.d(),M&&M.d(),h=!1,b()}}}function $A(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function zh(n){var L;let e,t,i,s,l,o,r,a=(L=n[0].s3)!=null&&L.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",m,_,h,b,y,S,C,$,T,M,O,D;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=E(),l=v("div"),o=U(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=v("strong"),u=U(a),f=U(` to the @@ -194,33 +194,33 @@ Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c," `),y=v("a"),y.textContent=`rclone `,S=U(`, `),C=v("a"),C.textContent=`s5cmd - `,$=U(", etc."),T=E(),M=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p(C,"href","https://github.com/peak/s5cmd"),p(C,"target","_blank"),p(C,"rel","noopener noreferrer"),p(C,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(M,"class","clearfix m-t-base")},m(P,N){w(P,e,N),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),g(l,r),g(r,u),g(l,f),g(l,c),g(c,m),g(l,_),g(l,h),g(l,b),g(l,y),g(l,S),g(l,C),g(l,$),g(e,T),g(e,M),D=!0},p(P,N){var F;(!D||N&1)&&a!==(a=(F=P[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&se(u,a),(!D||N&2)&&d!==(d=P[1].s3.enabled?"S3 storage":"local file system")&&se(m,d)},i(P){D||(P&&Qe(()=>{D&&(O||(O=je(e,ot,{duration:150},!0)),O.run(1))}),D=!0)},o(P){P&&(O||(O=je(e,ot,{duration:150},!1)),O.run(0)),D=!1},d(P){P&&k(e),P&&O&&O.end()}}}function CA(n){var i;let e,t=((i=n[0].s3)==null?void 0:i.enabled)!=n[1].s3.enabled&&jh(n);return{c(){t&&t.c(),e=ye()},m(s,l){t&&t.m(s,l),w(s,e,l)},p(s,l){var o;((o=s[0].s3)==null?void 0:o.enabled)!=s[1].s3.enabled?t?(t.p(s,l),l&3&&A(t,1)):(t=jh(s),t.c(),A(t,1),t.m(e.parentNode,e)):t&&(ae(),I(t,1,1,()=>{t=null}),ue())},d(s){t&&t.d(s),s&&k(e)}}}function Vh(n){let e;function t(l,o){return l[4]?OA:l[5]?MA:TA}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function TA(n){let e;return{c(){e=v("div"),e.innerHTML=` + `,$=U(", etc."),T=E(),M=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p(C,"href","https://github.com/peak/s5cmd"),p(C,"target","_blank"),p(C,"rel","noopener noreferrer"),p(C,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(M,"class","clearfix m-t-base")},m(P,N){w(P,e,N),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),g(l,r),g(r,u),g(l,f),g(l,c),g(c,m),g(l,_),g(l,h),g(l,b),g(l,y),g(l,S),g(l,C),g(l,$),g(e,T),g(e,M),D=!0},p(P,N){var F;(!D||N&1)&&a!==(a=(F=P[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&se(u,a),(!D||N&2)&&d!==(d=P[1].s3.enabled?"S3 storage":"local file system")&&se(m,d)},i(P){D||(P&&Qe(()=>{D&&(O||(O=je(e,ot,{duration:150},!0)),O.run(1))}),D=!0)},o(P){P&&(O||(O=je(e,ot,{duration:150},!1)),O.run(0)),D=!1},d(P){P&&k(e),P&&O&&O.end()}}}function CA(n){var i;let e,t=((i=n[0].s3)==null?void 0:i.enabled)!=n[1].s3.enabled&&zh(n);return{c(){t&&t.c(),e=ye()},m(s,l){t&&t.m(s,l),w(s,e,l)},p(s,l){var o;((o=s[0].s3)==null?void 0:o.enabled)!=s[1].s3.enabled?t?(t.p(s,l),l&3&&A(t,1)):(t=zh(s),t.c(),A(t,1),t.m(e.parentNode,e)):t&&(ae(),I(t,1,1,()=>{t=null}),ue())},d(s){t&&t.d(s),s&&k(e)}}}function Hh(n){let e;function t(l,o){return l[4]?OA:l[5]?MA:TA}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function TA(n){let e;return{c(){e=v("div"),e.innerHTML=` S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function MA(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` - Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Me(t=He.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&qt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function OA(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function zh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){w(l,e,o),g(e,t),i||(s=K(e,"click",n[14]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&k(e),i=!1,s()}}}function EA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;const y=[$A,SA],S=[];function C($,T){return $[2]?0:1}return d=C(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[7]),r=E(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`

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

    -

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

    `,c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,T){w($,e,T),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w($,r,T),w($,a,T),g(a,u),g(u,f),g(u,c),S[d].m(u,null),_=!0,h||(b=K(u,"submit",et(n[16])),h=!0)},p($,T){(!_||T&128)&&se(o,$[7]);let M=d;d=C($),d===M?S[d].p($,T):(ae(),I(S[M],1,1,()=>{S[M]=null}),ue(),m=S[d],m?m.p($,T):(m=S[d]=y[d]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){I(m),_=!1},d($){$&&k(e),$&&k(r),$&&k(a),S[d].d(),h=!1,b()}}}function DA(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[EA]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&524543&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&k(t),V(i,l)}}}const AA="s3_test_request";function IA(n,e,t){let i,s,l;Je(n,Tt,M=>t(7,l=M)),sn(Tt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null;d();async function d(){t(2,a=!0);try{const M=await ce.settings.getAll()||{};_(M)}catch(M){ce.error(M)}t(2,a=!1)}async function m(){if(!(u||!s)){t(3,u=!0);try{ce.cancelRequest(AA);const M=await ce.settings.update(B.filterRedactedProps(r));en({}),await _(M),Na(),c?Oy("Successfully saved but failed to establish S3 connection."):zt("Successfully saved files storage settings.")}catch(M){ce.error(M)}t(3,u=!1)}}async function _(M={}){t(1,r={s3:(M==null?void 0:M.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r)))}async function h(){t(1,r=JSON.parse(JSON.stringify(o||{})))}function b(M){n.$$.not_equal(r.s3,M)&&(r.s3=M,t(1,r))}function y(M){f=M,t(4,f)}function S(M){c=M,t(5,c)}const C=()=>h(),$=()=>m(),T=()=>m();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,m,h,i,b,y,S,C,$,T]}class LA extends ge{constructor(e){super(),_e(this,e,IA,DA,me,{})}}function PA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){w(u,e,f),e.checked=n[1].enabled,w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"change",n[11]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&2&&(e.checked=u[1].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function NA(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Client ID"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=r=n[1].enabled},m(f,c){w(f,e,c),g(e,t),w(f,s,c),w(f,l,c),re(l,n[1].clientId),a||(u=K(l,"input",n[12]),a=!0)},p(f,c){c&1048576&&i!==(i=f[20])&&p(e,"for",i),c&1048576&&o!==(o=f[20])&&p(l,"id",o),c&2&&r!==(r=f[1].enabled)&&(l.required=r),c&2&&l.value!==f[1].clientId&&re(l,f[1].clientId)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function FA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(u.value=n[1].clientSecret),l=new mu({props:u}),ee.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Client secret"),s=E(),z(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),j(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),c&2&&(d.required=f[1].enabled),!o&&c&2&&(o=!0,d.value=f[1].clientSecret,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),V(l,f)}}}function Hh(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let u={key:a[3].key};return a[1]!==void 0&&(u.config=a[1]),{props:u}}return o&&(t=Ft(o,r(n)),ee.push(()=>de(t,"config",l))),{c(){e=v("div"),t&&z(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){w(a,e,u),t&&j(t,e,null),s=!0},p(a,u){const f={};if(u&8&&(f.key=a[3].key),!i&&u&2&&(i=!0,f.config=a[1],he(()=>i=!1)),u&8&&o!==(o=a[3].optionsComponent)){if(t){ae();const c=t;I(c.$$.fragment,1,0,()=>{V(c,1)}),ue()}o?(t=Ft(o,r(a)),ee.push(()=>de(t,"config",l)),z(t.$$.fragment),A(t.$$.fragment,1),j(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&I(t.$$.fragment,a),s=!1},d(a){a&&k(e),t&&V(t)}}}function RA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new pe({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[PA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[NA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[FA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let _=n[3].optionsComponent&&Hh(n);return{c(){e=v("form"),t=v("div"),z(i.$$.fragment),s=E(),l=v("button"),l.innerHTML='Clear all fields',o=E(),z(r.$$.fragment),a=E(),z(u.$$.fragment),f=E(),_&&_.c(),p(l,"type","button"),p(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),p(t,"class","flex m-b-base"),p(e,"id",n[6]),p(e,"autocomplete","off")},m(h,b){w(h,e,b),g(e,t),j(i,t,null),g(t,s),g(t,l),g(e,o),j(r,e,null),g(e,a),j(u,e,null),g(e,f),_&&_.m(e,null),c=!0,d||(m=[K(l,"click",n[8]),K(e,"submit",et(n[15]))],d=!0)},p(h,b){const y={};b&8&&(y.name=h[3].key+".enabled"),b&3145730&&(y.$$scope={dirty:b,ctx:h}),i.$set(y);const S={};b&2&&(S.class="form-field "+(h[1].enabled?"required":"")),b&8&&(S.name=h[3].key+".clientId"),b&3145730&&(S.$$scope={dirty:b,ctx:h}),r.$set(S);const C={};b&2&&(C.class="form-field "+(h[1].enabled?"required":"")),b&8&&(C.name=h[3].key+".clientSecret"),b&3145730&&(C.$$scope={dirty:b,ctx:h}),u.$set(C),h[3].optionsComponent?_?(_.p(h,b),b&8&&A(_,1)):(_=Hh(h),_.c(),A(_,1),_.m(e,null)):_&&(ae(),I(_,1,1,()=>{_=null}),ue())},i(h){c||(A(i.$$.fragment,h),A(r.$$.fragment,h),A(u.$$.fragment,h),A(_),c=!0)},o(h){I(i.$$.fragment,h),I(r.$$.fragment,h),I(u.$$.fragment,h),I(_),c=!1},d(h){h&&k(e),V(i),V(r),V(u),_&&_.d(),d=!1,Ee(m)}}}function qA(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=v("h4"),i=U(t),s=U(" provider"),p(e,"class","center txt-break")},m(l,o){w(l,e,o),g(e,i),g(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&se(i,t)},d(l){l&&k(e)}}}function jA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Close"),i=E(),s=v("button"),l=v("span"),l.textContent="Save changes",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(u,f){w(u,e,f),g(e,t),w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&Q(s,"btn-loading",u[4])},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function VA(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[jA],header:[qA],default:[RA]},$$scope:{ctx:n}};return e=new ln({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[16](null),V(e,s)}}}function zA(n,e,t){let i;const s=$t(),l="provider_popup_"+B.randomString(5);let o,r={},a={},u=!1,f="";function c(O,D){en({}),t(3,r=Object.assign({},O)),t(1,a=Object.assign({enabled:!0},D)),t(10,f=JSON.stringify(a)),o==null||o.show()}function d(){return o==null?void 0:o.hide()}async function m(){t(4,u=!0);try{const O={};O[r.key]=B.filterRedactedProps(a);const D=await ce.settings.update(O);en({}),zt("Successfully updated provider settings."),s("submit",D),d()}catch(O){ce.error(O)}t(4,u=!1)}function _(){for(let O in a)t(1,a[O]="",a);t(1,a.enabled=!1,a)}function h(){a.enabled=this.checked,t(1,a)}function b(){a.clientId=this.value,t(1,a)}function y(O){n.$$.not_equal(a.clientSecret,O)&&(a.clientSecret=O,t(1,a))}function S(O){a=O,t(1,a)}const C=()=>m();function $(O){ee[O?"unshift":"push"](()=>{o=O,t(2,o)})}function T(O){Ne.call(this,n,O)}function M(O){Ne.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=f)},[d,a,o,r,u,i,l,m,_,c,f,h,b,y,S,C,$,T,M]}class HA extends ge{constructor(e){super(),_e(this,e,zA,VA,me,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Bh(n){let e,t,i;return{c(){e=v("img"),hn(e.src,t="./images/oauth2/"+n[1].logo)||p(e,"src",t),p(e,"alt",i=n[1].title+" logo")},m(s,l){w(s,e,l)},p(s,l){l&2&&!hn(e.src,t="./images/oauth2/"+s[1].logo)&&p(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&p(e,"alt",i)},d(s){s&&k(e)}}}function Uh(n){let e;return{c(){e=v("div"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function BA(n){let e,t,i,s,l=n[1].title+"",o,r,a,u,f=n[1].key.slice(0,-4)+"",c,d,m,_,h,b,y,S,C,$,T=n[1].logo&&Bh(n),M=n[0].enabled&&Uh(),O={};return y=new HA({props:O}),n[4](y),y.$on("submit",n[5]),{c(){e=v("div"),t=v("figure"),T&&T.c(),i=E(),s=v("div"),o=U(l),r=E(),a=v("em"),u=U("("),c=U(f),d=U(")"),m=E(),M&&M.c(),_=E(),h=v("button"),h.innerHTML='',b=E(),z(y.$$.fragment),p(t,"class","provider-logo"),p(s,"class","title"),p(a,"class","txt-hint txt-sm m-r-auto"),p(h,"type","button"),p(h,"class","btn btn-circle btn-hint btn-transparent"),p(h,"aria-label","Provider settings"),p(e,"class","provider-card")},m(D,L){w(D,e,L),g(e,t),T&&T.m(t,null),g(e,i),g(e,s),g(s,o),g(e,r),g(e,a),g(a,u),g(a,c),g(a,d),g(e,m),M&&M.m(e,null),g(e,_),g(e,h),w(D,b,L),j(y,D,L),S=!0,C||($=K(h,"click",n[3]),C=!0)},p(D,[L]){D[1].logo?T?T.p(D,L):(T=Bh(D),T.c(),T.m(t,null)):T&&(T.d(1),T=null),(!S||L&2)&&l!==(l=D[1].title+"")&&se(o,l),(!S||L&2)&&f!==(f=D[1].key.slice(0,-4)+"")&&se(c,f),D[0].enabled?M||(M=Uh(),M.c(),M.m(e,_)):M&&(M.d(1),M=null);const P={};y.$set(P)},i(D){S||(A(y.$$.fragment,D),S=!0)},o(D){I(y.$$.fragment,D),S=!1},d(D){D&&k(e),T&&T.d(),M&&M.d(),D&&k(b),n[4](null),V(y,D),C=!1,$()}}}function UA(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(u){ee[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{u.detail[i.key]&&t(0,s=u.detail[i.key])};return n.$$set=u=>{"provider"in u&&t(1,i=u.provider),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class M1 extends ge{constructor(e){super(),_e(this,e,UA,BA,me,{provider:1,config:0})}}function Wh(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Yh(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function WA(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,u,f=n[3];const c=h=>h[9].key;for(let h=0;h0&&n[2].length>0&&Jh(),m=n[2];const _=h=>h[9].key;for(let h=0;h0&&h[2].length>0?d||(d=Jh(),d.c(),d.m(l.parentNode,l)):d&&(d.d(1),d=null),b&5&&(m=h[2],ae(),r=bt(r,b,_,1,h,m,a,o,Bt,Zh,null,Wh),ue())},i(h){if(!u){for(let b=0;bde(i,"config",r)),{key:n,first:null,c(){t=v("div"),z(i.$$.fragment),l=E(),p(t,"class","col-lg-6"),this.first=t},m(u,f){w(u,t,f),j(i,t,null),g(t,l),o=!0},p(u,f){e=u;const c={};f&8&&(c.provider=e[9]),!s&&f&9&&(s=!0,c.config=e[0][e[9].key],he(()=>s=!1)),i.$set(c)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){I(i.$$.fragment,u),o=!1},d(u){u&&k(t),V(i)}}}function Jh(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Zh(n,e){let t,i,s,l,o;function r(u){e[6](u,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new M1({props:a}),ee.push(()=>de(i,"config",r)),{key:n,first:null,c(){t=v("div"),z(i.$$.fragment),l=E(),p(t,"class","col-lg-6"),this.first=t},m(u,f){w(u,t,f),j(i,t,null),g(t,l),o=!0},p(u,f){e=u;const c={};f&4&&(c.provider=e[9]),!s&&f&5&&(s=!0,c.config=e[0][e[9].key],he(()=>s=!1)),i.$set(c)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){I(i.$$.fragment,u),o=!1},d(u){u&&k(t),V(i)}}}function KA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_;const h=[YA,WA],b=[];function y(S,C){return S[1]?0:1}return d=y(n),m=b[d]=h[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[4]),r=E(),a=v("div"),u=v("div"),f=v("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(a,"class","wrapper")},m(S,C){w(S,e,C),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w(S,r,C),w(S,a,C),g(a,u),g(u,f),g(u,c),b[d].m(u,null),_=!0},p(S,C){(!_||C&16)&&se(o,S[4]);let $=d;d=y(S),d===$?b[d].p(S,C):(ae(),I(b[$],1,1,()=>{b[$]=null}),ue(),m=b[d],m?m.p(S,C):(m=b[d]=h[d](S),m.c()),A(m,1),m.m(u,null))},i(S){_||(A(m),_=!0)},o(S){I(m),_=!1},d(S){S&&k(e),S&&k(r),S&&k(a),b[d].d()}}}function JA(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[KA]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&k(t),V(i,l)}}}function ZA(n,e,t){let i,s,l;Je(n,Tt,d=>t(4,l=d)),sn(Tt,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const d=await ce.settings.getAll()||{};u(d)}catch(d){ce.error(d)}t(1,o=!1)}function u(d){d=d||{},t(0,r={});for(const m of mo)t(0,r[m.key]=Object.assign({enabled:!1},d[m.key]),r)}function f(d,m){n.$$.not_equal(r[m.key],d)&&(r[m.key]=d,t(0,r))}function c(d,m){n.$$.not_equal(r[m.key],d)&&(r[m.key]=d,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=mo.filter(d=>{var m;return(m=r[d.key])==null?void 0:m.enabled})),n.$$.dirty&1&&t(2,s=mo.filter(d=>{var m;return!((m=r[d.key])!=null&&m.enabled)}))},[r,o,s,i,l,f,c]}class GA extends ge{constructor(e){super(),_e(this,e,ZA,JA,me,{})}}function XA(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=U(n[3]),i=U(" duration (in seconds)"),l=E(),o=v("input"),a=E(),u=v("div"),f=v("span"),f.textContent="Invalidate all previously issued tokens",p(e,"for",s=n[6]),p(o,"type","number"),p(o,"id",r=n[6]),o.required=!0,p(f,"class","link-primary"),Q(f,"txt-success",!!n[1]),p(u,"class","help-block")},m(m,_){w(m,e,_),g(e,t),g(e,i),w(m,l,_),w(m,o,_),re(o,n[0]),w(m,a,_),w(m,u,_),g(u,f),c||(d=[K(o,"input",n[4]),K(f,"click",n[5])],c=!0)},p(m,_){_&8&&se(t,m[3]),_&64&&s!==(s=m[6])&&p(e,"for",s),_&64&&r!==(r=m[6])&&p(o,"id",r),_&1&&dt(o.value)!==m[0]&&re(o,m[0]),_&2&&Q(f,"txt-success",!!m[1])},d(m){m&&k(e),m&&k(l),m&&k(o),m&&k(a),m&&k(u),c=!1,Ee(d)}}}function QA(n){let e,t;return e=new pe({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[XA,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function xA(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=dt(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=B.randomString(50))};return n.$$set=u=>{"key"in u&&t(2,i=u.key),"label"in u&&t(3,s=u.label),"duration"in u&&t(0,l=u.duration),"secret"in u&&t(1,o=u.secret)},[l,o,i,s,r,a]}class O1 extends ge{constructor(e){super(),_e(this,e,xA,QA,me,{key:2,label:3,duration:0,secret:1})}}function Gh(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function Xh(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function eI(n){let e,t,i=[],s=new Map,l,o,r,a,u,f=[],c=new Map,d,m,_,h,b,y,S,C,$,T,M,O=n[5];const D=F=>F[19].key;for(let F=0;FF[19].key;for(let F=0;Fde(i,"duration",r)),ee.push(()=>de(i,"secret",a)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(f,c){w(f,t,c),j(i,f,c),o=!0},p(f,c){e=f;const d={};!s&&c&33&&(s=!0,d.duration=e[0][e[19].key].duration,he(()=>s=!1)),!l&&c&33&&(l=!0,d.secret=e[0][e[19].key].secret,he(()=>l=!1)),i.$set(d)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){I(i.$$.fragment,f),o=!1},d(f){f&&k(t),V(i,f)}}}function xh(n,e){let t,i,s,l,o;function r(f){e[13](f,e[19])}function a(f){e[14](f,e[19])}let u={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(u.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(u.secret=e[0][e[19].key].secret),i=new O1({props:u}),ee.push(()=>de(i,"duration",r)),ee.push(()=>de(i,"secret",a)),{key:n,first:null,c(){t=ye(),z(i.$$.fragment),this.first=t},m(f,c){w(f,t,c),j(i,f,c),o=!0},p(f,c){e=f;const d={};!s&&c&65&&(s=!0,d.duration=e[0][e[19].key].duration,he(()=>s=!1)),!l&&c&65&&(l=!0,d.secret=e[0][e[19].key].secret,he(()=>l=!1)),i.$set(d)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){I(i.$$.fragment,f),o=!1},d(f){f&&k(t),V(i,f)}}}function e_(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){w(l,e,o),g(e,t),i||(s=K(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&k(e),i=!1,s()}}}function nI(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;const y=[tI,eI],S=[];function C($,T){return $[1]?0:1}return d=C(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[4]),r=E(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,T){w($,e,T),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w($,r,T),w($,a,T),g(a,u),g(u,f),g(u,c),S[d].m(u,null),_=!0,h||(b=K(u,"submit",et(n[7])),h=!0)},p($,T){(!_||T&16)&&se(o,$[4]);let M=d;d=C($),d===M?S[d].p($,T):(ae(),I(S[M],1,1,()=>{S[M]=null}),ue(),m=S[d],m?m.p($,T):(m=S[d]=y[d]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){I(m),_=!1},d($){$&&k(e),$&&k(r),$&&k(a),S[d].d(),h=!1,b()}}}function iI(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[nI]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&k(t),V(i,l)}}}function sI(n,e,t){let i,s,l;Je(n,Tt,M=>t(4,l=M));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"recordFileToken",label:"Records protected file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins protected file access token"}];sn(Tt,l="Token options",l);let a={},u={},f=!1,c=!1;d();async function d(){t(1,f=!0);try{const M=await ce.settings.getAll()||{};_(M)}catch(M){ce.error(M)}t(1,f=!1)}async function m(){if(!(c||!s)){t(2,c=!0);try{const M=await ce.settings.update(B.filterRedactedProps(u));_(M),zt("Successfully saved tokens options.")}catch(M){ce.error(M)}t(2,c=!1)}}function _(M){var D;M=M||{},t(0,u={});const O=o.concat(r);for(const L of O)t(0,u[L.key]={duration:((D=M[L.key])==null?void 0:D.duration)||0},u);t(9,a=JSON.parse(JSON.stringify(u)))}function h(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function y(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}function S(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function C(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}const $=()=>h(),T=()=>m();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(u))},[u,f,c,s,l,o,r,m,h,a,i,b,y,S,C,$,T]}class lI extends ge{constructor(e){super(),_e(this,e,sI,iI,me,{})}}function oI(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_;return o=new g1({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

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

    `,t=E(),i=v("div"),s=v("button"),s.innerHTML='Copy',l=E(),z(o.$$.fragment),r=E(),a=v("div"),u=v("div"),f=E(),c=v("button"),c.innerHTML=` - Download as JSON`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(h,b){w(h,e,b),w(h,t,b),w(h,i,b),g(i,s),g(i,l),j(o,i,null),n[8](i),w(h,r,b),w(h,a,b),g(a,u),g(a,f),g(a,c),d=!0,m||(_=[K(s,"click",n[7]),K(i,"keydown",n[9]),K(c,"click",n[10])],m=!0)},p(h,b){const y={};b&4&&(y.content=h[2]),o.$set(y)},i(h){d||(A(o.$$.fragment,h),d=!0)},o(h){I(o.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(t),h&&k(i),V(o),n[8](null),h&&k(r),h&&k(a),m=!1,Ee(_)}}}function rI(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function aI(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[rI,oI],_=[];function h(b,y){return b[1]?0:1}return f=h(n),c=_[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[3]),r=E(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,y){w(b,e,y),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w(b,r,y),w(b,a,y),g(a,u),_[f].m(u,null),d=!0},p(b,y){(!d||y&8)&&se(o,b[3]);let S=f;f=h(b),f===S?_[f].p(b,y):(ae(),I(_[S],1,1,()=>{_[S]=null}),ue(),c=_[f],c?c.p(b,y):(c=_[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){I(c),d=!1},d(b){b&&k(e),b&&k(r),b&&k(a),_[f].d()}}}function uI(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[aI]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&k(t),V(i,l)}}}function fI(n,e,t){let i,s;Je(n,Tt,b=>t(3,s=b)),sn(Tt,s="Export collections",s);const l="export_"+B.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await ce.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let b of r)delete b.created,delete b.updated}catch(b){ce.error(b)}t(1,a=!1)}function f(){B.downloadJson(r,"pb_schema")}function c(){B.copyToClipboard(i),yo("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function m(b){ee[b?"unshift":"push"](()=>{o=b,t(0,o)})}const _=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const y=window.getSelection(),S=document.createRange();S.selectNodeContents(o),y.removeAllRanges(),y.addRange(S)}},h=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,m,_,h]}class cI extends ge{constructor(e){super(),_e(this,e,fI,uI,me,{})}}function t_(n,e,t){const i=n.slice();return i[14]=e[t],i}function n_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function i_(n,e,t){const i=n.slice();return i[14]=e[t],i}function s_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function l_(n,e,t){const i=n.slice();return i[14]=e[t],i}function o_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function r_(n,e,t){const i=n.slice();return i[30]=e[t],i}function dI(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&a_(),a=n[0].name!==n[1].name&&u_(n);return{c(){e=v("div"),r&&r.c(),t=E(),a&&a.c(),i=E(),s=v("strong"),o=U(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){w(u,e,f),r&&r.m(e,null),g(e,t),a&&a.m(e,null),g(e,i),g(e,s),g(s,o)},p(u,f){u[9]?r||(r=a_(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=u_(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&se(o,l)},d(u){u&&k(e),r&&r.d(),a&&a.d()}}}function pI(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=E(),i=v("strong"),l=U(s),p(e,"class","label label-danger")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),g(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&se(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function mI(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=E(),i=v("strong"),l=U(s),p(e,"class","label label-success")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),g(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&se(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function a_(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function u_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=U(t),s=E(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){w(o,e,r),g(e,i),w(o,s,r),w(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&se(i,t)},d(o){o&&k(e),o&&k(s),o&&k(l)}}}function f_(n){var b,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,c,d,m,_=n[12]((y=n[1])==null?void 0:y[n[30]])+"",h;return{c(){var S,C,$,T,M,O;e=v("tr"),t=v("td"),i=v("span"),l=U(s),o=E(),r=v("td"),a=v("pre"),f=U(u),c=E(),d=v("td"),m=v("pre"),h=U(_),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),Q(r,"changed-old-col",!n[10]&&gn((S=n[0])==null?void 0:S[n[30]],(C=n[1])==null?void 0:C[n[30]])),Q(r,"changed-none-col",n[10]),p(m,"class","txt"),p(d,"class","svelte-lmkr38"),Q(d,"changed-new-col",!n[5]&&gn(($=n[0])==null?void 0:$[n[30]],(T=n[1])==null?void 0:T[n[30]])),Q(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),Q(e,"txt-primary",gn((M=n[0])==null?void 0:M[n[30]],(O=n[1])==null?void 0:O[n[30]]))},m(S,C){w(S,e,C),g(e,t),g(t,i),g(i,l),g(e,o),g(e,r),g(r,a),g(a,f),g(e,c),g(e,d),g(d,m),g(m,h)},p(S,C){var $,T,M,O,D,L,P,N;C[0]&1&&u!==(u=S[12](($=S[0])==null?void 0:$[S[30]])+"")&&se(f,u),C[0]&3075&&Q(r,"changed-old-col",!S[10]&&gn((T=S[0])==null?void 0:T[S[30]],(M=S[1])==null?void 0:M[S[30]])),C[0]&1024&&Q(r,"changed-none-col",S[10]),C[0]&2&&_!==(_=S[12]((O=S[1])==null?void 0:O[S[30]])+"")&&se(h,_),C[0]&2083&&Q(d,"changed-new-col",!S[5]&&gn((D=S[0])==null?void 0:D[S[30]],(L=S[1])==null?void 0:L[S[30]])),C[0]&32&&Q(d,"changed-none-col",S[5]),C[0]&2051&&Q(e,"txt-primary",gn((P=S[0])==null?void 0:P[S[30]],(N=S[1])==null?void 0:N[S[30]]))},d(S){S&&k(e)}}}function c_(n){let e,t=n[6],i=[];for(let s=0;sProps + Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Me(t=He.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&jt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function OA(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Bh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[3]},m(l,o){w(l,e,o),g(e,t),i||(s=J(e,"click",n[14]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&k(e),i=!1,s()}}}function EA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;const y=[$A,SA],S=[];function C($,T){return $[2]?0:1}return d=C(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[7]),r=E(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`

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

    +

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

    `,c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,T){w($,e,T),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w($,r,T),w($,a,T),g(a,u),g(u,f),g(u,c),S[d].m(u,null),_=!0,h||(b=J(u,"submit",et(n[16])),h=!0)},p($,T){(!_||T&128)&&se(o,$[7]);let M=d;d=C($),d===M?S[d].p($,T):(ae(),I(S[M],1,1,()=>{S[M]=null}),ue(),m=S[d],m?m.p($,T):(m=S[d]=y[d]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){I(m),_=!1},d($){$&&k(e),$&&k(r),$&&k(a),S[d].d(),h=!1,b()}}}function DA(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[EA]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,[o]){const r={};o&524543&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){z(e,l),l&&k(t),z(i,l)}}}const AA="s3_test_request";function IA(n,e,t){let i,s,l;Je(n,Tt,M=>t(7,l=M)),sn(Tt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null;d();async function d(){t(2,a=!0);try{const M=await ce.settings.getAll()||{};_(M)}catch(M){ce.error(M)}t(2,a=!1)}async function m(){if(!(u||!s)){t(3,u=!0);try{ce.cancelRequest(AA);const M=await ce.settings.update(B.filterRedactedProps(r));en({}),await _(M),Na(),c?Dy("Successfully saved but failed to establish S3 connection."):zt("Successfully saved files storage settings.")}catch(M){ce.error(M)}t(3,u=!1)}}async function _(M={}){t(1,r={s3:(M==null?void 0:M.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r)))}async function h(){t(1,r=JSON.parse(JSON.stringify(o||{})))}function b(M){n.$$.not_equal(r.s3,M)&&(r.s3=M,t(1,r))}function y(M){f=M,t(4,f)}function S(M){c=M,t(5,c)}const C=()=>h(),$=()=>m(),T=()=>m();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,m,h,i,b,y,S,C,$,T]}class LA extends ge{constructor(e){super(),_e(this,e,IA,DA,me,{})}}function PA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){w(u,e,f),e.checked=n[1].enabled,w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"change",n[11]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&2&&(e.checked=u[1].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function NA(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=U("Client ID"),s=E(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=r=n[1].enabled},m(f,c){w(f,e,c),g(e,t),w(f,s,c),w(f,l,c),re(l,n[1].clientId),a||(u=J(l,"input",n[12]),a=!0)},p(f,c){c&1048576&&i!==(i=f[20])&&p(e,"for",i),c&1048576&&o!==(o=f[20])&&p(l,"id",o),c&2&&r!==(r=f[1].enabled)&&(l.required=r),c&2&&l.value!==f[1].clientId&&re(l,f[1].clientId)},d(f){f&&k(e),f&&k(s),f&&k(l),a=!1,u()}}}function FA(n){let e,t,i,s,l,o,r;function a(f){n[13](f)}let u={id:n[20],required:n[1].enabled};return n[1].clientSecret!==void 0&&(u.value=n[1].clientSecret),l=new mu({props:u}),ee.push(()=>de(l,"value",a)),{c(){e=v("label"),t=U("Client secret"),s=E(),H(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){w(f,e,c),g(e,t),w(f,s,c),V(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),c&2&&(d.required=f[1].enabled),!o&&c&2&&(o=!0,d.value=f[1].clientSecret,he(()=>o=!1)),l.$set(d)},i(f){r||(A(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&k(e),f&&k(s),z(l,f)}}}function Uh(n){let e,t,i,s;function l(a){n[14](a)}var o=n[3].optionsComponent;function r(a){let u={key:a[3].key};return a[1]!==void 0&&(u.config=a[1]),{props:u}}return o&&(t=Rt(o,r(n)),ee.push(()=>de(t,"config",l))),{c(){e=v("div"),t&&H(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){w(a,e,u),t&&V(t,e,null),s=!0},p(a,u){const f={};if(u&8&&(f.key=a[3].key),!i&&u&2&&(i=!0,f.config=a[1],he(()=>i=!1)),u&8&&o!==(o=a[3].optionsComponent)){if(t){ae();const c=t;I(c.$$.fragment,1,0,()=>{z(c,1)}),ue()}o?(t=Rt(o,r(a)),ee.push(()=>de(t,"config",l)),H(t.$$.fragment),A(t.$$.fragment,1),V(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&A(t.$$.fragment,a),s=!0)},o(a){t&&I(t.$$.fragment,a),s=!1},d(a){a&&k(e),t&&z(t)}}}function RA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m;i=new pe({props:{class:"form-field form-field-toggle m-b-0",name:n[3].key+".enabled",$$slots:{default:[PA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientId",$$slots:{default:[NA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),u=new pe({props:{class:"form-field "+(n[1].enabled?"required":""),name:n[3].key+".clientSecret",$$slots:{default:[FA,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let _=n[3].optionsComponent&&Uh(n);return{c(){e=v("form"),t=v("div"),H(i.$$.fragment),s=E(),l=v("button"),l.innerHTML='Clear all fields',o=E(),H(r.$$.fragment),a=E(),H(u.$$.fragment),f=E(),_&&_.c(),p(l,"type","button"),p(l,"class","btn btn-sm btn-transparent btn-hint m-l-auto"),p(t,"class","flex m-b-base"),p(e,"id",n[6]),p(e,"autocomplete","off")},m(h,b){w(h,e,b),g(e,t),V(i,t,null),g(t,s),g(t,l),g(e,o),V(r,e,null),g(e,a),V(u,e,null),g(e,f),_&&_.m(e,null),c=!0,d||(m=[J(l,"click",n[8]),J(e,"submit",et(n[15]))],d=!0)},p(h,b){const y={};b&8&&(y.name=h[3].key+".enabled"),b&3145730&&(y.$$scope={dirty:b,ctx:h}),i.$set(y);const S={};b&2&&(S.class="form-field "+(h[1].enabled?"required":"")),b&8&&(S.name=h[3].key+".clientId"),b&3145730&&(S.$$scope={dirty:b,ctx:h}),r.$set(S);const C={};b&2&&(C.class="form-field "+(h[1].enabled?"required":"")),b&8&&(C.name=h[3].key+".clientSecret"),b&3145730&&(C.$$scope={dirty:b,ctx:h}),u.$set(C),h[3].optionsComponent?_?(_.p(h,b),b&8&&A(_,1)):(_=Uh(h),_.c(),A(_,1),_.m(e,null)):_&&(ae(),I(_,1,1,()=>{_=null}),ue())},i(h){c||(A(i.$$.fragment,h),A(r.$$.fragment,h),A(u.$$.fragment,h),A(_),c=!0)},o(h){I(i.$$.fragment,h),I(r.$$.fragment,h),I(u.$$.fragment,h),I(_),c=!1},d(h){h&&k(e),z(i),z(r),z(u),_&&_.d(),d=!1,Ee(m)}}}function qA(n){let e,t=(n[3].title||n[3].key)+"",i,s;return{c(){e=v("h4"),i=U(t),s=U(" provider"),p(e,"class","center txt-break")},m(l,o){w(l,e,o),g(e,i),g(e,s)},p(l,o){o&8&&t!==(t=(l[3].title||l[3].key)+"")&&se(i,t)},d(l){l&&k(e)}}}function jA(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Close"),i=E(),s=v("button"),l=v("span"),l.textContent="Save changes",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(u,f){w(u,e,f),g(e,t),w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&Q(s,"btn-loading",u[4])},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function VA(n){let e,t,i={overlayClose:!n[4],escClose:!n[4],$$slots:{footer:[jA],header:[qA],default:[RA]},$$scope:{ctx:n}};return e=new ln({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&2097210&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[16](null),z(e,s)}}}function zA(n,e,t){let i;const s=$t(),l="provider_popup_"+B.randomString(5);let o,r={},a={},u=!1,f="";function c(O,D){en({}),t(3,r=Object.assign({},O)),t(1,a=Object.assign({enabled:!0},D)),t(10,f=JSON.stringify(a)),o==null||o.show()}function d(){return o==null?void 0:o.hide()}async function m(){t(4,u=!0);try{const O={};O[r.key]=B.filterRedactedProps(a);const D=await ce.settings.update(O);en({}),zt("Successfully updated provider settings."),s("submit",D),d()}catch(O){ce.error(O)}t(4,u=!1)}function _(){for(let O in a)t(1,a[O]="",a);t(1,a.enabled=!1,a)}function h(){a.enabled=this.checked,t(1,a)}function b(){a.clientId=this.value,t(1,a)}function y(O){n.$$.not_equal(a.clientSecret,O)&&(a.clientSecret=O,t(1,a))}function S(O){a=O,t(1,a)}const C=()=>m();function $(O){ee[O?"unshift":"push"](()=>{o=O,t(2,o)})}function T(O){Ne.call(this,n,O)}function M(O){Ne.call(this,n,O)}return n.$$.update=()=>{n.$$.dirty&1026&&t(5,i=JSON.stringify(a)!=f)},[d,a,o,r,u,i,l,m,_,c,f,h,b,y,S,C,$,T,M]}class HA extends ge{constructor(e){super(),_e(this,e,zA,VA,me,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function Wh(n){let e,t,i;return{c(){e=v("img"),hn(e.src,t="./images/oauth2/"+n[1].logo)||p(e,"src",t),p(e,"alt",i=n[1].title+" logo")},m(s,l){w(s,e,l)},p(s,l){l&2&&!hn(e.src,t="./images/oauth2/"+s[1].logo)&&p(e,"src",t),l&2&&i!==(i=s[1].title+" logo")&&p(e,"alt",i)},d(s){s&&k(e)}}}function Yh(n){let e;return{c(){e=v("div"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function BA(n){let e,t,i,s,l=n[1].title+"",o,r,a,u,f=n[1].key.slice(0,-4)+"",c,d,m,_,h,b,y,S,C,$,T=n[1].logo&&Wh(n),M=n[0].enabled&&Yh(),O={};return y=new HA({props:O}),n[4](y),y.$on("submit",n[5]),{c(){e=v("div"),t=v("figure"),T&&T.c(),i=E(),s=v("div"),o=U(l),r=E(),a=v("em"),u=U("("),c=U(f),d=U(")"),m=E(),M&&M.c(),_=E(),h=v("button"),h.innerHTML='',b=E(),H(y.$$.fragment),p(t,"class","provider-logo"),p(s,"class","title"),p(a,"class","txt-hint txt-sm m-r-auto"),p(h,"type","button"),p(h,"class","btn btn-circle btn-hint btn-transparent"),p(h,"aria-label","Provider settings"),p(e,"class","provider-card")},m(D,L){w(D,e,L),g(e,t),T&&T.m(t,null),g(e,i),g(e,s),g(s,o),g(e,r),g(e,a),g(a,u),g(a,c),g(a,d),g(e,m),M&&M.m(e,null),g(e,_),g(e,h),w(D,b,L),V(y,D,L),S=!0,C||($=J(h,"click",n[3]),C=!0)},p(D,[L]){D[1].logo?T?T.p(D,L):(T=Wh(D),T.c(),T.m(t,null)):T&&(T.d(1),T=null),(!S||L&2)&&l!==(l=D[1].title+"")&&se(o,l),(!S||L&2)&&f!==(f=D[1].key.slice(0,-4)+"")&&se(c,f),D[0].enabled?M||(M=Yh(),M.c(),M.m(e,_)):M&&(M.d(1),M=null);const P={};y.$set(P)},i(D){S||(A(y.$$.fragment,D),S=!0)},o(D){I(y.$$.fragment,D),S=!1},d(D){D&&k(e),T&&T.d(),M&&M.d(),D&&k(b),n[4](null),z(y,D),C=!1,$()}}}function UA(n,e,t){let{provider:i={}}=e,{config:s={}}=e,l;const o=()=>{l==null||l.show(i,Object.assign({},s,{enabled:s.clientId?s.enabled:!0}))};function r(u){ee[u?"unshift":"push"](()=>{l=u,t(2,l)})}const a=u=>{u.detail[i.key]&&t(0,s=u.detail[i.key])};return n.$$set=u=>{"provider"in u&&t(1,i=u.provider),"config"in u&&t(0,s=u.config)},[s,i,l,o,r,a]}class E1 extends ge{constructor(e){super(),_e(this,e,UA,BA,me,{provider:1,config:0})}}function Kh(n,e,t){const i=n.slice();return i[9]=e[t],i[10]=e,i[11]=t,i}function Jh(n,e,t){const i=n.slice();return i[9]=e[t],i[12]=e,i[13]=t,i}function WA(n){let e,t=[],i=new Map,s,l,o,r=[],a=new Map,u,f=n[3];const c=h=>h[9].key;for(let h=0;h0&&n[2].length>0&&Gh(),m=n[2];const _=h=>h[9].key;for(let h=0;h0&&h[2].length>0?d||(d=Gh(),d.c(),d.m(l.parentNode,l)):d&&(d.d(1),d=null),b&5&&(m=h[2],ae(),r=bt(r,b,_,1,h,m,a,o,Bt,Xh,null,Kh),ue())},i(h){if(!u){for(let b=0;bde(i,"config",r)),{key:n,first:null,c(){t=v("div"),H(i.$$.fragment),l=E(),p(t,"class","col-lg-6"),this.first=t},m(u,f){w(u,t,f),V(i,t,null),g(t,l),o=!0},p(u,f){e=u;const c={};f&8&&(c.provider=e[9]),!s&&f&9&&(s=!0,c.config=e[0][e[9].key],he(()=>s=!1)),i.$set(c)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){I(i.$$.fragment,u),o=!1},d(u){u&&k(t),z(i)}}}function Gh(n){let e;return{c(){e=v("hr")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Xh(n,e){let t,i,s,l,o;function r(u){e[6](u,e[9])}let a={provider:e[9]};return e[0][e[9].key]!==void 0&&(a.config=e[0][e[9].key]),i=new E1({props:a}),ee.push(()=>de(i,"config",r)),{key:n,first:null,c(){t=v("div"),H(i.$$.fragment),l=E(),p(t,"class","col-lg-6"),this.first=t},m(u,f){w(u,t,f),V(i,t,null),g(t,l),o=!0},p(u,f){e=u;const c={};f&4&&(c.provider=e[9]),!s&&f&5&&(s=!0,c.config=e[0][e[9].key],he(()=>s=!1)),i.$set(c)},i(u){o||(A(i.$$.fragment,u),o=!0)},o(u){I(i.$$.fragment,u),o=!1},d(u){u&&k(t),z(i)}}}function KA(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_;const h=[YA,WA],b=[];function y(S,C){return S[1]?0:1}return d=y(n),m=b[d]=h[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[4]),r=E(),a=v("div"),u=v("div"),f=v("h6"),f.textContent="Manage the allowed users OAuth2 sign-in/sign-up methods.",c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(a,"class","wrapper")},m(S,C){w(S,e,C),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w(S,r,C),w(S,a,C),g(a,u),g(u,f),g(u,c),b[d].m(u,null),_=!0},p(S,C){(!_||C&16)&&se(o,S[4]);let $=d;d=y(S),d===$?b[d].p(S,C):(ae(),I(b[$],1,1,()=>{b[$]=null}),ue(),m=b[d],m?m.p(S,C):(m=b[d]=h[d](S),m.c()),A(m,1),m.m(u,null))},i(S){_||(A(m),_=!0)},o(S){I(m),_=!1},d(S){S&&k(e),S&&k(r),S&&k(a),b[d].d()}}}function JA(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[KA]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,[o]){const r={};o&16415&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){z(e,l),l&&k(t),z(i,l)}}}function ZA(n,e,t){let i,s,l;Je(n,Tt,d=>t(4,l=d)),sn(Tt,l="Auth providers",l);let o=!1,r={};a();async function a(){t(1,o=!0);try{const d=await ce.settings.getAll()||{};u(d)}catch(d){ce.error(d)}t(1,o=!1)}function u(d){d=d||{},t(0,r={});for(const m of ho)t(0,r[m.key]=Object.assign({enabled:!1},d[m.key]),r)}function f(d,m){n.$$.not_equal(r[m.key],d)&&(r[m.key]=d,t(0,r))}function c(d,m){n.$$.not_equal(r[m.key],d)&&(r[m.key]=d,t(0,r))}return n.$$.update=()=>{n.$$.dirty&1&&t(3,i=ho.filter(d=>{var m;return(m=r[d.key])==null?void 0:m.enabled})),n.$$.dirty&1&&t(2,s=ho.filter(d=>{var m;return!((m=r[d.key])!=null&&m.enabled)}))},[r,o,s,i,l,f,c]}class GA extends ge{constructor(e){super(),_e(this,e,ZA,JA,me,{})}}function XA(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=U(n[3]),i=U(" duration (in seconds)"),l=E(),o=v("input"),a=E(),u=v("div"),f=v("span"),f.textContent="Invalidate all previously issued tokens",p(e,"for",s=n[6]),p(o,"type","number"),p(o,"id",r=n[6]),o.required=!0,p(f,"class","link-primary"),Q(f,"txt-success",!!n[1]),p(u,"class","help-block")},m(m,_){w(m,e,_),g(e,t),g(e,i),w(m,l,_),w(m,o,_),re(o,n[0]),w(m,a,_),w(m,u,_),g(u,f),c||(d=[J(o,"input",n[4]),J(f,"click",n[5])],c=!0)},p(m,_){_&8&&se(t,m[3]),_&64&&s!==(s=m[6])&&p(e,"for",s),_&64&&r!==(r=m[6])&&p(o,"id",r),_&1&&dt(o.value)!==m[0]&&re(o,m[0]),_&2&&Q(f,"txt-success",!!m[1])},d(m){m&&k(e),m&&k(l),m&&k(o),m&&k(a),m&&k(u),c=!1,Ee(d)}}}function QA(n){let e,t;return e=new pe({props:{class:"form-field required",name:n[2]+".duration",$$slots:{default:[XA,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,[s]){const l={};s&4&&(l.name=i[2]+".duration"),s&203&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function xA(n,e,t){let{key:i}=e,{label:s}=e,{duration:l}=e,{secret:o}=e;function r(){l=dt(this.value),t(0,l)}const a=()=>{o?t(1,o=void 0):t(1,o=B.randomString(50))};return n.$$set=u=>{"key"in u&&t(2,i=u.key),"label"in u&&t(3,s=u.label),"duration"in u&&t(0,l=u.duration),"secret"in u&&t(1,o=u.secret)},[l,o,i,s,r,a]}class D1 extends ge{constructor(e){super(),_e(this,e,xA,QA,me,{key:2,label:3,duration:0,secret:1})}}function Qh(n,e,t){const i=n.slice();return i[19]=e[t],i[20]=e,i[21]=t,i}function xh(n,e,t){const i=n.slice();return i[19]=e[t],i[22]=e,i[23]=t,i}function eI(n){let e,t,i=[],s=new Map,l,o,r,a,u,f=[],c=new Map,d,m,_,h,b,y,S,C,$,T,M,O=n[5];const D=F=>F[19].key;for(let F=0;FF[19].key;for(let F=0;Fde(i,"duration",r)),ee.push(()=>de(i,"secret",a)),{key:n,first:null,c(){t=ye(),H(i.$$.fragment),this.first=t},m(f,c){w(f,t,c),V(i,f,c),o=!0},p(f,c){e=f;const d={};!s&&c&33&&(s=!0,d.duration=e[0][e[19].key].duration,he(()=>s=!1)),!l&&c&33&&(l=!0,d.secret=e[0][e[19].key].secret,he(()=>l=!1)),i.$set(d)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){I(i.$$.fragment,f),o=!1},d(f){f&&k(t),z(i,f)}}}function t_(n,e){let t,i,s,l,o;function r(f){e[13](f,e[19])}function a(f){e[14](f,e[19])}let u={key:e[19].key,label:e[19].label};return e[0][e[19].key].duration!==void 0&&(u.duration=e[0][e[19].key].duration),e[0][e[19].key].secret!==void 0&&(u.secret=e[0][e[19].key].secret),i=new D1({props:u}),ee.push(()=>de(i,"duration",r)),ee.push(()=>de(i,"secret",a)),{key:n,first:null,c(){t=ye(),H(i.$$.fragment),this.first=t},m(f,c){w(f,t,c),V(i,f,c),o=!0},p(f,c){e=f;const d={};!s&&c&65&&(s=!0,d.duration=e[0][e[19].key].duration,he(()=>s=!1)),!l&&c&65&&(l=!0,d.secret=e[0][e[19].key].secret,he(()=>l=!1)),i.$set(d)},i(f){o||(A(i.$$.fragment,f),o=!0)},o(f){I(i.$$.fragment,f),o=!1},d(f){f&&k(t),z(i,f)}}}function n_(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent btn-hint"),e.disabled=n[2]},m(l,o){w(l,e,o),g(e,t),i||(s=J(e,"click",n[15]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&k(e),i=!1,s()}}}function nI(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;const y=[tI,eI],S=[];function C($,T){return $[1]?0:1}return d=C(n),m=S[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[4]),r=E(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=E(),m.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m($,T){w($,e,T),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w($,r,T),w($,a,T),g(a,u),g(u,f),g(u,c),S[d].m(u,null),_=!0,h||(b=J(u,"submit",et(n[7])),h=!0)},p($,T){(!_||T&16)&&se(o,$[4]);let M=d;d=C($),d===M?S[d].p($,T):(ae(),I(S[M],1,1,()=>{S[M]=null}),ue(),m=S[d],m?m.p($,T):(m=S[d]=y[d]($),m.c()),A(m,1),m.m(u,null))},i($){_||(A(m),_=!0)},o($){I(m),_=!1},d($){$&&k(e),$&&k(r),$&&k(a),S[d].d(),h=!1,b()}}}function iI(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[nI]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,[o]){const r={};o&16777247&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){z(e,l),l&&k(t),z(i,l)}}}function sI(n,e,t){let i,s,l;Je(n,Tt,M=>t(4,l=M));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"recordFileToken",label:"Records protected file access token"}],r=[{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"},{key:"adminFileToken",label:"Admins protected file access token"}];sn(Tt,l="Token options",l);let a={},u={},f=!1,c=!1;d();async function d(){t(1,f=!0);try{const M=await ce.settings.getAll()||{};_(M)}catch(M){ce.error(M)}t(1,f=!1)}async function m(){if(!(c||!s)){t(2,c=!0);try{const M=await ce.settings.update(B.filterRedactedProps(u));_(M),zt("Successfully saved tokens options.")}catch(M){ce.error(M)}t(2,c=!1)}}function _(M){var D;M=M||{},t(0,u={});const O=o.concat(r);for(const L of O)t(0,u[L.key]={duration:((D=M[L.key])==null?void 0:D.duration)||0},u);t(9,a=JSON.parse(JSON.stringify(u)))}function h(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function b(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function y(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}function S(M,O){n.$$.not_equal(u[O.key].duration,M)&&(u[O.key].duration=M,t(0,u))}function C(M,O){n.$$.not_equal(u[O.key].secret,M)&&(u[O.key].secret=M,t(0,u))}const $=()=>h(),T=()=>m();return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(3,s=i!=JSON.stringify(u))},[u,f,c,s,l,o,r,m,h,a,i,b,y,S,C,$,T]}class lI extends ge{constructor(e){super(),_e(this,e,sI,iI,me,{})}}function oI(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_;return o=new v1({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

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

    `,t=E(),i=v("div"),s=v("button"),s.innerHTML='Copy',l=E(),H(o.$$.fragment),r=E(),a=v("div"),u=v("div"),f=E(),c=v("button"),c.innerHTML=` + Download as JSON`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-transparent fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(h,b){w(h,e,b),w(h,t,b),w(h,i,b),g(i,s),g(i,l),V(o,i,null),n[8](i),w(h,r,b),w(h,a,b),g(a,u),g(a,f),g(a,c),d=!0,m||(_=[J(s,"click",n[7]),J(i,"keydown",n[9]),J(c,"click",n[10])],m=!0)},p(h,b){const y={};b&4&&(y.content=h[2]),o.$set(y)},i(h){d||(A(o.$$.fragment,h),d=!0)},o(h){I(o.$$.fragment,h),d=!1},d(h){h&&k(e),h&&k(t),h&&k(i),z(o),n[8](null),h&&k(r),h&&k(a),m=!1,Ee(_)}}}function rI(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function aI(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[rI,oI],_=[];function h(b,y){return b[1]?0:1}return f=h(n),c=_[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[3]),r=E(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,y){w(b,e,y),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w(b,r,y),w(b,a,y),g(a,u),_[f].m(u,null),d=!0},p(b,y){(!d||y&8)&&se(o,b[3]);let S=f;f=h(b),f===S?_[f].p(b,y):(ae(),I(_[S],1,1,()=>{_[S]=null}),ue(),c=_[f],c?c.p(b,y):(c=_[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){I(c),d=!1},d(b){b&&k(e),b&&k(r),b&&k(a),_[f].d()}}}function uI(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[aI]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){z(e,l),l&&k(t),z(i,l)}}}function fI(n,e,t){let i,s;Je(n,Tt,b=>t(3,s=b)),sn(Tt,s="Export collections",s);const l="export_"+B.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await ce.collections.getFullList(100,{$cancelKey:l,sort:"updated"}));for(let b of r)delete b.created,delete b.updated}catch(b){ce.error(b)}t(1,a=!1)}function f(){B.downloadJson(r,"pb_schema")}function c(){B.copyToClipboard(i),ko("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function m(b){ee[b?"unshift":"push"](()=>{o=b,t(0,o)})}const _=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const y=window.getSelection(),S=document.createRange();S.selectNodeContents(o),y.removeAllRanges(),y.addRange(S)}},h=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,m,_,h]}class cI extends ge{constructor(e){super(),_e(this,e,fI,uI,me,{})}}function i_(n,e,t){const i=n.slice();return i[14]=e[t],i}function s_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function l_(n,e,t){const i=n.slice();return i[14]=e[t],i}function o_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function r_(n,e,t){const i=n.slice();return i[14]=e[t],i}function a_(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function u_(n,e,t){const i=n.slice();return i[30]=e[t],i}function dI(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&f_(),a=n[0].name!==n[1].name&&c_(n);return{c(){e=v("div"),r&&r.c(),t=E(),a&&a.c(),i=E(),s=v("strong"),o=U(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){w(u,e,f),r&&r.m(e,null),g(e,t),a&&a.m(e,null),g(e,i),g(e,s),g(s,o)},p(u,f){u[9]?r||(r=f_(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=c_(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&se(o,l)},d(u){u&&k(e),r&&r.d(),a&&a.d()}}}function pI(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=E(),i=v("strong"),l=U(s),p(e,"class","label label-danger")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),g(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&se(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function mI(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=E(),i=v("strong"),l=U(s),p(e,"class","label label-success")},m(r,a){w(r,e,a),w(r,t,a),w(r,i,a),g(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&se(l,s)},d(r){r&&k(e),r&&k(t),r&&k(i)}}}function f_(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function c_(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=U(t),s=E(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){w(o,e,r),g(e,i),w(o,s,r),w(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&se(i,t)},d(o){o&&k(e),o&&k(s),o&&k(l)}}}function d_(n){var b,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,c,d,m,_=n[12]((y=n[1])==null?void 0:y[n[30]])+"",h;return{c(){var S,C,$,T,M,O;e=v("tr"),t=v("td"),i=v("span"),l=U(s),o=E(),r=v("td"),a=v("pre"),f=U(u),c=E(),d=v("td"),m=v("pre"),h=U(_),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),Q(r,"changed-old-col",!n[10]&&gn((S=n[0])==null?void 0:S[n[30]],(C=n[1])==null?void 0:C[n[30]])),Q(r,"changed-none-col",n[10]),p(m,"class","txt"),p(d,"class","svelte-lmkr38"),Q(d,"changed-new-col",!n[5]&&gn(($=n[0])==null?void 0:$[n[30]],(T=n[1])==null?void 0:T[n[30]])),Q(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),Q(e,"txt-primary",gn((M=n[0])==null?void 0:M[n[30]],(O=n[1])==null?void 0:O[n[30]]))},m(S,C){w(S,e,C),g(e,t),g(t,i),g(i,l),g(e,o),g(e,r),g(r,a),g(a,f),g(e,c),g(e,d),g(d,m),g(m,h)},p(S,C){var $,T,M,O,D,L,P,N;C[0]&1&&u!==(u=S[12](($=S[0])==null?void 0:$[S[30]])+"")&&se(f,u),C[0]&3075&&Q(r,"changed-old-col",!S[10]&&gn((T=S[0])==null?void 0:T[S[30]],(M=S[1])==null?void 0:M[S[30]])),C[0]&1024&&Q(r,"changed-none-col",S[10]),C[0]&2&&_!==(_=S[12]((O=S[1])==null?void 0:O[S[30]])+"")&&se(h,_),C[0]&2083&&Q(d,"changed-new-col",!S[5]&&gn((D=S[0])==null?void 0:D[S[30]],(L=S[1])==null?void 0:L[S[30]])),C[0]&32&&Q(d,"changed-none-col",S[5]),C[0]&2051&&Q(e,"txt-primary",gn((P=S[0])==null?void 0:P[S[30]],(N=S[1])==null?void 0:N[S[30]]))},d(S){S&&k(e)}}}function p_(n){let e,t=n[6],i=[];for(let s=0;sProps Old - New`,l=E(),o=v("tbody");for(let $=0;$<_.length;$+=1)_[$].c();r=E(),h&&h.c(),a=E();for(let $=0;$!["schema","created","updated"].includes(y));function h(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(S=>y.id==S.id))))}function b(y){return typeof y>"u"?"":B.isObject(y)?JSON.stringify(y,null,4):y}return n.$$set=y=>{"collectionA"in y&&t(0,o=y.collectionA),"collectionB"in y&&t(1,r=y.collectionB),"deleteMissing"in y&&t(2,a=y.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&h(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(S=>y.id==S.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(S=>S.id==y.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(y=>!u.find(S=>S.id==y.id))),n.$$.dirty[0]&7&&t(9,l=B.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,m,l,s,_,b]}class gI extends ge{constructor(e){super(),_e(this,e,_I,hI,me,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function v_(n,e,t){const i=n.slice();return i[17]=e[t],i}function y_(n){let e,t;return e=new gI({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){z(e.$$.fragment)},m(i,s){j(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){V(e,i)}}}function bI(n){let e,t,i=n[2],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oNew`,l=E(),o=v("tbody");for(let $=0;$<_.length;$+=1)_[$].c();r=E(),h&&h.c(),a=E();for(let $=0;$!["schema","created","updated"].includes(y));function h(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(S=>y.id==S.id))))}function b(y){return typeof y>"u"?"":B.isObject(y)?JSON.stringify(y,null,4):y}return n.$$set=y=>{"collectionA"in y&&t(0,o=y.collectionA),"collectionB"in y&&t(1,r=y.collectionB),"deleteMissing"in y&&t(2,a=y.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&h(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(S=>y.id==S.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(S=>S.id==y.id))),n.$$.dirty[0]&24&&t(8,m=f.filter(y=>!u.find(S=>S.id==y.id))),n.$$.dirty[0]&7&&t(9,l=B.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,m,l,s,_,b]}class gI extends ge{constructor(e){super(),_e(this,e,_I,hI,me,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function k_(n,e,t){const i=n.slice();return i[17]=e[t],i}function w_(n){let e,t;return e=new gI({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){H(e.$$.fragment)},m(i,s){V(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(A(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){z(e,i)}}}function bI(n){let e,t,i=n[2],s=[];for(let o=0;oI(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{_()}):_()}async function _(){if(!u){t(4,u=!0);try{await ce.collections.import(o,a),zt("Successfully imported collections configuration."),i("submit")}catch($){ce.error($)}t(4,u=!1),c()}}const h=()=>m(),b=()=>!u;function y($){ee[$?"unshift":"push"](()=>{s=$,t(1,s)})}function S($){Ne.call(this,n,$)}function C($){Ne.call(this,n,$)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,m,f,l,o,h,b,y,S,C]}class SI extends ge{constructor(e){super(),_e(this,e,wI,kI,me,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function k_(n,e,t){const i=n.slice();return i[32]=e[t],i}function w_(n,e,t){const i=n.slice();return i[35]=e[t],i}function S_(n,e,t){const i=n.slice();return i[32]=e[t],i}function $I(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O;a=new pe({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[TI,({uniqueId:R})=>({40:R}),({uniqueId:R})=>[0,R?512:0]]},$$scope:{ctx:n}}});let D=!1,L=n[6]&&n[1].length&&!n[7]&&C_(),P=n[6]&&n[1].length&&n[7]&&T_(n),N=n[13].length&&R_(n),F=!!n[0]&&q_(n);return{c(){e=v("input"),t=E(),i=v("div"),s=v("p"),l=U(`Paste below the collections configuration you want to import or - `),o=v("button"),o.innerHTML='Load from JSON file',r=E(),z(a.$$.fragment),u=E(),f=E(),L&&L.c(),c=E(),P&&P.c(),d=E(),N&&N.c(),m=E(),_=v("div"),F&&F.c(),h=E(),b=v("div"),y=E(),S=v("button"),C=v("span"),C.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),Q(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(b,"class","flex-fill"),p(C,"class","txt"),p(S,"type","button"),p(S,"class","btn btn-expanded btn-warning m-l-auto"),S.disabled=$=!n[14],p(_,"class","flex m-t-base")},m(R,q){w(R,e,q),n[19](e),w(R,t,q),w(R,i,q),g(i,s),g(s,l),g(s,o),w(R,r,q),j(a,R,q),w(R,u,q),w(R,f,q),L&&L.m(R,q),w(R,c,q),P&&P.m(R,q),w(R,d,q),N&&N.m(R,q),w(R,m,q),w(R,_,q),F&&F.m(_,null),g(_,h),g(_,b),g(_,y),g(_,S),g(S,C),T=!0,M||(O=[K(e,"change",n[20]),K(o,"click",n[21]),K(S,"click",n[26])],M=!0)},p(R,q){(!T||q[0]&4096)&&Q(o,"btn-loading",R[12]);const H={};q[0]&64&&(H.class="form-field "+(R[6]?"":"field-error")),q[0]&65|q[1]&1536&&(H.$$scope={dirty:q,ctx:R}),a.$set(H),R[6]&&R[1].length&&!R[7]?L||(L=C_(),L.c(),L.m(c.parentNode,c)):L&&(L.d(1),L=null),R[6]&&R[1].length&&R[7]?P?P.p(R,q):(P=T_(R),P.c(),P.m(d.parentNode,d)):P&&(P.d(1),P=null),R[13].length?N?N.p(R,q):(N=R_(R),N.c(),N.m(m.parentNode,m)):N&&(N.d(1),N=null),R[0]?F?F.p(R,q):(F=q_(R),F.c(),F.m(_,h)):F&&(F.d(1),F=null),(!T||q[0]&16384&&$!==($=!R[14]))&&(S.disabled=$)},i(R){T||(A(a.$$.fragment,R),A(D),T=!0)},o(R){I(a.$$.fragment,R),I(D),T=!1},d(R){R&&k(e),n[19](null),R&&k(t),R&&k(i),R&&k(r),V(a,R),R&&k(u),R&&k(f),L&&L.d(R),R&&k(c),P&&P.d(R),R&&k(d),N&&N.d(R),R&&k(m),R&&k(_),F&&F.d(),M=!1,Ee(O)}}}function CI(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function $_(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function TI(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&$_();return{c(){e=v("label"),t=U("Collections"),s=E(),l=v("textarea"),r=E(),c&&c.c(),a=ye(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0]),w(d,r,m),c&&c.m(d,m),w(d,a,m),u||(f=K(l,"input",n[22]),u=!0)},p(d,m){m[1]&512&&i!==(i=d[40])&&p(e,"for",i),m[1]&512&&o!==(o=d[40])&&p(l,"id",o),m[0]&1&&re(l,d[0]),d[0]&&!d[6]?c||(c=$_(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),c&&c.d(d),d&&k(a),u=!1,f()}}}function C_(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){w(t,e,i)},d(t){t&&k(e)}}}function T_(n){let e,t,i,s,l,o=n[9].length&&M_(n),r=n[4].length&&D_(n),a=n[8].length&&P_(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=E(),i=v("div"),o&&o.c(),s=E(),r&&r.c(),l=E(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),o&&o.m(i,null),g(i,s),r&&r.m(i,null),g(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=M_(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=D_(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=P_(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),u&&k(t),u&&k(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function M_(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=E(),s=v("div"),s.innerHTML=`Some of the imported collections share the same name and/or fields but are +- `)}`,()=>{_()}):_()}async function _(){if(!u){t(4,u=!0);try{await ce.collections.import(o,a),zt("Successfully imported collections configuration."),i("submit")}catch($){ce.error($)}t(4,u=!1),c()}}const h=()=>m(),b=()=>!u;function y($){ee[$?"unshift":"push"](()=>{s=$,t(1,s)})}function S($){Ne.call(this,n,$)}function C($){Ne.call(this,n,$)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,m,f,l,o,h,b,y,S,C]}class SI extends ge{constructor(e){super(),_e(this,e,wI,kI,me,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function S_(n,e,t){const i=n.slice();return i[32]=e[t],i}function $_(n,e,t){const i=n.slice();return i[35]=e[t],i}function C_(n,e,t){const i=n.slice();return i[32]=e[t],i}function $I(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O;a=new pe({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[TI,({uniqueId:R})=>({40:R}),({uniqueId:R})=>[0,R?512:0]]},$$scope:{ctx:n}}});let D=!1,L=n[6]&&n[1].length&&!n[7]&&M_(),P=n[6]&&n[1].length&&n[7]&&O_(n),N=n[13].length&&j_(n),F=!!n[0]&&V_(n);return{c(){e=v("input"),t=E(),i=v("div"),s=v("p"),l=U(`Paste below the collections configuration you want to import or + `),o=v("button"),o.innerHTML='Load from JSON file',r=E(),H(a.$$.fragment),u=E(),f=E(),L&&L.c(),c=E(),P&&P.c(),d=E(),N&&N.c(),m=E(),_=v("div"),F&&F.c(),h=E(),b=v("div"),y=E(),S=v("button"),C=v("span"),C.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),Q(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(b,"class","flex-fill"),p(C,"class","txt"),p(S,"type","button"),p(S,"class","btn btn-expanded btn-warning m-l-auto"),S.disabled=$=!n[14],p(_,"class","flex m-t-base")},m(R,q){w(R,e,q),n[19](e),w(R,t,q),w(R,i,q),g(i,s),g(s,l),g(s,o),w(R,r,q),V(a,R,q),w(R,u,q),w(R,f,q),L&&L.m(R,q),w(R,c,q),P&&P.m(R,q),w(R,d,q),N&&N.m(R,q),w(R,m,q),w(R,_,q),F&&F.m(_,null),g(_,h),g(_,b),g(_,y),g(_,S),g(S,C),T=!0,M||(O=[J(e,"change",n[20]),J(o,"click",n[21]),J(S,"click",n[26])],M=!0)},p(R,q){(!T||q[0]&4096)&&Q(o,"btn-loading",R[12]);const j={};q[0]&64&&(j.class="form-field "+(R[6]?"":"field-error")),q[0]&65|q[1]&1536&&(j.$$scope={dirty:q,ctx:R}),a.$set(j),R[6]&&R[1].length&&!R[7]?L||(L=M_(),L.c(),L.m(c.parentNode,c)):L&&(L.d(1),L=null),R[6]&&R[1].length&&R[7]?P?P.p(R,q):(P=O_(R),P.c(),P.m(d.parentNode,d)):P&&(P.d(1),P=null),R[13].length?N?N.p(R,q):(N=j_(R),N.c(),N.m(m.parentNode,m)):N&&(N.d(1),N=null),R[0]?F?F.p(R,q):(F=V_(R),F.c(),F.m(_,h)):F&&(F.d(1),F=null),(!T||q[0]&16384&&$!==($=!R[14]))&&(S.disabled=$)},i(R){T||(A(a.$$.fragment,R),A(D),T=!0)},o(R){I(a.$$.fragment,R),I(D),T=!1},d(R){R&&k(e),n[19](null),R&&k(t),R&&k(i),R&&k(r),z(a,R),R&&k(u),R&&k(f),L&&L.d(R),R&&k(c),P&&P.d(R),R&&k(d),N&&N.d(R),R&&k(m),R&&k(_),F&&F.d(),M=!1,Ee(O)}}}function CI(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){w(t,e,i)},p:x,i:x,o:x,d(t){t&&k(e)}}}function T_(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function TI(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&T_();return{c(){e=v("label"),t=U("Collections"),s=E(),l=v("textarea"),r=E(),c&&c.c(),a=ye(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,m){w(d,e,m),g(e,t),w(d,s,m),w(d,l,m),re(l,n[0]),w(d,r,m),c&&c.m(d,m),w(d,a,m),u||(f=J(l,"input",n[22]),u=!0)},p(d,m){m[1]&512&&i!==(i=d[40])&&p(e,"for",i),m[1]&512&&o!==(o=d[40])&&p(l,"id",o),m[0]&1&&re(l,d[0]),d[0]&&!d[6]?c||(c=T_(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&k(e),d&&k(s),d&&k(l),d&&k(r),c&&c.d(d),d&&k(a),u=!1,f()}}}function M_(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){w(t,e,i)},d(t){t&&k(e)}}}function O_(n){let e,t,i,s,l,o=n[9].length&&E_(n),r=n[4].length&&I_(n),a=n[8].length&&F_(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=E(),i=v("div"),o&&o.c(),s=E(),r&&r.c(),l=E(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){w(u,e,f),w(u,t,f),w(u,i,f),o&&o.m(i,null),g(i,s),r&&r.m(i,null),g(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=E_(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=I_(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=F_(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&k(e),u&&k(t),u&&k(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function E_(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=E(),s=v("div"),s.innerHTML=`Some of the imported collections share the same name and/or fields but are imported with different IDs. You can replace them in the import if you want - to.`,l=E(),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){w(u,e,f),g(e,t),g(e,i),g(e,s),g(e,l),g(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:x,d(u){u&&k(e),r=!1,a()}}}function q_(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent link-hint")},m(s,l){w(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function MI(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[CI,$I],_=[];function h(b,y){return b[5]?0:1}return f=h(n),c=_[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[15]),r=E(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,y){w(b,e,y),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w(b,r,y),w(b,a,y),g(a,u),_[f].m(u,null),d=!0},p(b,y){(!d||y[0]&32768)&&se(o,b[15]);let S=f;f=h(b),f===S?_[f].p(b,y):(ae(),I(_[S],1,1,()=>{_[S]=null}),ue(),c=_[f],c?c.p(b,y):(c=_[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){I(c),d=!1},d(b){b&&k(e),b&&k(r),b&&k(a),_[f].d()}}}function OI(n){let e,t,i,s,l,o;e=new Ci({}),i=new wn({props:{$$slots:{default:[MI]},$$scope:{ctx:n}}});let r={};return l=new SI({props:r}),n[27](l),l.$on("submit",n[28]),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment),s=E(),z(l.$$.fragment)},m(a,u){j(e,a,u),w(a,t,u),j(i,a,u),w(a,s,u),j(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){V(e,a),a&&k(t),V(i,a),a&&k(s),n[27](null),V(l,a)}}}function EI(n,e,t){let i,s,l,o,r,a,u;Je(n,Tt,Z=>t(15,u=Z)),sn(Tt,u="Import collections",u);let f,c,d="",m=!1,_=[],h=[],b=!0,y=[],S=!1;C();async function C(){t(5,S=!0);try{t(2,h=await ce.collections.getFullList(200));for(let Z of h)delete Z.created,delete Z.updated}catch(Z){ce.error(Z)}t(5,S=!1)}function $(){if(t(4,y=[]),!!i)for(let Z of _){const le=B.findByKey(h,"id",Z.id);!(le!=null&&le.id)||!B.hasCollectionChanges(le,Z,b)||y.push({new:Z,old:le})}}function T(){t(1,_=[]);try{t(1,_=JSON.parse(d))}catch{}Array.isArray(_)?t(1,_=B.filterDuplicatesByKey(_)):t(1,_=[]);for(let Z of _)delete Z.created,delete Z.updated,Z.schema=B.filterDuplicatesByKey(Z.schema)}function M(){var Z,le;for(let ne of _){const ie=B.findByKey(h,"name",ne.name)||B.findByKey(h,"id",ne.id);if(!ie)continue;const be=ne.id,Se=ie.id;ne.id=Se;const Ve=Array.isArray(ie.schema)?ie.schema:[],Be=Array.isArray(ne.schema)?ne.schema:[];for(const ke of Be){const Te=B.findByKey(Ve,"name",ke.name);Te&&Te.id&&(ke.id=Te.id)}for(let ke of _)if(Array.isArray(ke.schema))for(let Te of ke.schema)(Z=Te.options)!=null&&Z.collectionId&&((le=Te.options)==null?void 0:le.collectionId)===be&&(Te.options.collectionId=Se)}t(0,d=JSON.stringify(_,null,4))}function O(Z){t(12,m=!0);const le=new FileReader;le.onload=async ne=>{t(12,m=!1),t(10,f.value="",f),t(0,d=ne.target.result),await fn(),_.length||(Ds("Invalid collections configuration."),D())},le.onerror=ne=>{console.warn(ne),Ds("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},le.readAsText(Z)}function D(){t(0,d=""),t(10,f.value="",f),en({})}function L(Z){ee[Z?"unshift":"push"](()=>{f=Z,t(10,f)})}const P=()=>{f.files.length&&O(f.files[0])},N=()=>{f.click()};function F(){d=this.value,t(0,d)}function R(){b=this.checked,t(3,b)}const q=()=>M(),H=()=>D(),W=()=>c==null?void 0:c.show(h,_,b);function X(Z){ee[Z?"unshift":"push"](()=>{c=Z,t(11,c)})}const J=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&T(),n.$$.dirty[0]&3&&t(6,i=!!d&&_.length&&_.length===_.filter(Z=>!!Z.id&&!!Z.name).length),n.$$.dirty[0]&78&&t(9,s=h.filter(Z=>i&&b&&!B.findByKey(_,"id",Z.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(Z=>i&&!B.findByKey(h,"id",Z.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof b<"u")&&$(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!S&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(Z=>{let le=B.findByKey(h,"name",Z.name)||B.findByKey(h,"id",Z.id);if(!le)return!1;if(le.id!=Z.id)return!0;const ne=Array.isArray(le.schema)?le.schema:[],ie=Array.isArray(Z.schema)?Z.schema:[];for(const be of ie){if(B.findByKey(ne,"id",be.id))continue;const Ve=B.findByKey(ne,"name",be.name);if(Ve&&be.id!=Ve.id)return!0}return!1}))},[d,_,h,b,y,S,i,o,l,s,f,c,m,a,r,u,M,O,D,L,P,N,F,R,q,H,W,X,J]}class DI extends ge{constructor(e){super(),_e(this,e,EI,OI,me,{},null,[-1,-1])}}function AI(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Backup name"),s=E(),l=v("input"),r=E(),a=v("em"),a.textContent="Must be in the format [a-z0-9_-].zip",p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",o=n[15]),p(l,"placeholder","Leave empty to autogenerate"),p(l,"pattern","^[a-z0-9_-]+\\.zip$"),p(a,"class","help-block")},m(c,d){w(c,e,d),g(e,t),w(c,s,d),w(c,l,d),re(l,n[2]),w(c,r,d),w(c,a,d),u||(f=K(l,"input",n[7]),u=!0)},p(c,d){d&32768&&i!==(i=c[15])&&p(e,"for",i),d&32768&&o!==(o=c[15])&&p(l,"id",o),d&4&&l.value!==c[2]&&re(l,c[2])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function II(n){let e,t,i,s,l,o,r;return s=new pe({props:{class:"form-field m-0",name:"name",$$slots:{default:[AI,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`
    + to.
    `,l=E(),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){w(u,e,f),g(e,t),g(e,i),g(e,s),g(e,l),g(e,o),r||(a=J(o,"click",n[24]),r=!0)},p:x,d(u){u&&k(e),r=!1,a()}}}function V_(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-transparent link-hint")},m(s,l){w(s,e,l),t||(i=J(e,"click",n[25]),t=!0)},p:x,d(s){s&&k(e),t=!1,i()}}}function MI(n){let e,t,i,s,l,o,r,a,u,f,c,d;const m=[CI,$I],_=[];function h(b,y){return b[5]?0:1}return f=h(n),c=_[f]=m[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[15]),r=E(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,y){w(b,e,y),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w(b,r,y),w(b,a,y),g(a,u),_[f].m(u,null),d=!0},p(b,y){(!d||y[0]&32768)&&se(o,b[15]);let S=f;f=h(b),f===S?_[f].p(b,y):(ae(),I(_[S],1,1,()=>{_[S]=null}),ue(),c=_[f],c?c.p(b,y):(c=_[f]=m[f](b),c.c()),A(c,1),c.m(u,null))},i(b){d||(A(c),d=!0)},o(b){I(c),d=!1},d(b){b&&k(e),b&&k(r),b&&k(a),_[f].d()}}}function OI(n){let e,t,i,s,l,o;e=new Ci({}),i=new wn({props:{$$slots:{default:[MI]},$$scope:{ctx:n}}});let r={};return l=new SI({props:r}),n[27](l),l.$on("submit",n[28]),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment),s=E(),H(l.$$.fragment)},m(a,u){V(e,a,u),w(a,t,u),V(i,a,u),w(a,s,u),V(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(A(e.$$.fragment,a),A(i.$$.fragment,a),A(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){z(e,a),a&&k(t),z(i,a),a&&k(s),n[27](null),z(l,a)}}}function EI(n,e,t){let i,s,l,o,r,a,u;Je(n,Tt,Z=>t(15,u=Z)),sn(Tt,u="Import collections",u);let f,c,d="",m=!1,_=[],h=[],b=!0,y=[],S=!1;C();async function C(){t(5,S=!0);try{t(2,h=await ce.collections.getFullList(200));for(let Z of h)delete Z.created,delete Z.updated}catch(Z){ce.error(Z)}t(5,S=!1)}function $(){if(t(4,y=[]),!!i)for(let Z of _){const le=B.findByKey(h,"id",Z.id);!(le!=null&&le.id)||!B.hasCollectionChanges(le,Z,b)||y.push({new:Z,old:le})}}function T(){t(1,_=[]);try{t(1,_=JSON.parse(d))}catch{}Array.isArray(_)?t(1,_=B.filterDuplicatesByKey(_)):t(1,_=[]);for(let Z of _)delete Z.created,delete Z.updated,Z.schema=B.filterDuplicatesByKey(Z.schema)}function M(){var Z,le;for(let ne of _){const ie=B.findByKey(h,"name",ne.name)||B.findByKey(h,"id",ne.id);if(!ie)continue;const be=ne.id,Se=ie.id;ne.id=Se;const Ve=Array.isArray(ie.schema)?ie.schema:[],Be=Array.isArray(ne.schema)?ne.schema:[];for(const ke of Be){const Te=B.findByKey(Ve,"name",ke.name);Te&&Te.id&&(ke.id=Te.id)}for(let ke of _)if(Array.isArray(ke.schema))for(let Te of ke.schema)(Z=Te.options)!=null&&Z.collectionId&&((le=Te.options)==null?void 0:le.collectionId)===be&&(Te.options.collectionId=Se)}t(0,d=JSON.stringify(_,null,4))}function O(Z){t(12,m=!0);const le=new FileReader;le.onload=async ne=>{t(12,m=!1),t(10,f.value="",f),t(0,d=ne.target.result),await fn(),_.length||(Ds("Invalid collections configuration."),D())},le.onerror=ne=>{console.warn(ne),Ds("Failed to load the imported JSON."),t(12,m=!1),t(10,f.value="",f)},le.readAsText(Z)}function D(){t(0,d=""),t(10,f.value="",f),en({})}function L(Z){ee[Z?"unshift":"push"](()=>{f=Z,t(10,f)})}const P=()=>{f.files.length&&O(f.files[0])},N=()=>{f.click()};function F(){d=this.value,t(0,d)}function R(){b=this.checked,t(3,b)}const q=()=>M(),j=()=>D(),W=()=>c==null?void 0:c.show(h,_,b);function X(Z){ee[Z?"unshift":"push"](()=>{c=Z,t(11,c)})}const K=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&T(),n.$$.dirty[0]&3&&t(6,i=!!d&&_.length&&_.length===_.filter(Z=>!!Z.id&&!!Z.name).length),n.$$.dirty[0]&78&&t(9,s=h.filter(Z=>i&&b&&!B.findByKey(_,"id",Z.id))),n.$$.dirty[0]&70&&t(8,l=_.filter(Z=>i&&!B.findByKey(h,"id",Z.id))),n.$$.dirty[0]&10&&(typeof _<"u"||typeof b<"u")&&$(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!S&&i&&o),n.$$.dirty[0]&6&&t(13,a=_.filter(Z=>{let le=B.findByKey(h,"name",Z.name)||B.findByKey(h,"id",Z.id);if(!le)return!1;if(le.id!=Z.id)return!0;const ne=Array.isArray(le.schema)?le.schema:[],ie=Array.isArray(Z.schema)?Z.schema:[];for(const be of ie){if(B.findByKey(ne,"id",be.id))continue;const Ve=B.findByKey(ne,"name",be.name);if(Ve&&be.id!=Ve.id)return!0}return!1}))},[d,_,h,b,y,S,i,o,l,s,f,c,m,a,r,u,M,O,D,L,P,N,F,R,q,j,W,X,K]}class DI extends ge{constructor(e){super(),_e(this,e,EI,OI,me,{},null,[-1,-1])}}function AI(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=U("Backup name"),s=E(),l=v("input"),r=E(),a=v("em"),a.textContent="Must be in the format [a-z0-9_-].zip",p(e,"for",i=n[15]),p(l,"type","text"),p(l,"id",o=n[15]),p(l,"placeholder","Leave empty to autogenerate"),p(l,"pattern","^[a-z0-9_-]+\\.zip$"),p(a,"class","help-block")},m(c,d){w(c,e,d),g(e,t),w(c,s,d),w(c,l,d),re(l,n[2]),w(c,r,d),w(c,a,d),u||(f=J(l,"input",n[7]),u=!0)},p(c,d){d&32768&&i!==(i=c[15])&&p(e,"for",i),d&32768&&o!==(o=c[15])&&p(l,"id",o),d&4&&l.value!==c[2]&&re(l,c[2])},d(c){c&&k(e),c&&k(s),c&&k(l),c&&k(r),c&&k(a),u=!1,f()}}}function II(n){let e,t,i,s,l,o,r;return s=new pe({props:{class:"form-field m-0",name:"name",$$slots:{default:[AI,({uniqueId:a})=>({15:a}),({uniqueId:a})=>a?32768:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`

    Please note that during the backup other concurrent write requests may fail since the database will be temporary "locked" (this usually happens only during the ZIP generation).

    If you are using S3 storage for the collections file upload, you'll have to backup them - separately since they are not locally stored and will not be included in the final backup!

    `,t=E(),i=v("form"),z(s.$$.fragment),p(e,"class","alert alert-info"),p(i,"id",n[4]),p(i,"autocomplete","off")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),j(s,i,null),l=!0,o||(r=K(i,"submit",et(n[5])),o=!0)},p(a,u){const f={};u&98308&&(f.$$scope={dirty:u,ctx:a}),s.$set(f)},i(a){l||(A(s.$$.fragment,a),l=!0)},o(a){I(s.$$.fragment,a),l=!1},d(a){a&&k(e),a&&k(t),a&&k(i),V(s),o=!1,r()}}}function LI(n){let e;return{c(){e=v("h4"),e.textContent="Initialize new backup",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function PI(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),l.textContent="Start backup",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[4]),p(s,"class","btn btn-expanded"),s.disabled=n[3],Q(s,"btn-loading",n[3])},m(a,u){w(a,e,u),g(e,t),w(a,i,u),w(a,s,u),g(s,l),o||(r=K(e,"click",n[0]),o=!0)},p(a,u){u&8&&(e.disabled=a[3]),u&8&&(s.disabled=a[3]),u&8&&Q(s,"btn-loading",a[3])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,r()}}}function NI(n){let e,t,i={class:"backup-create-panel",beforeOpen:n[8],beforeHide:n[9],popup:!0,$$slots:{footer:[PI],header:[LI],default:[II]},$$scope:{ctx:n}};return e=new ln({props:i}),n[10](e),e.$on("show",n[11]),e.$on("hide",n[12]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&8&&(o.beforeOpen=s[8]),l&8&&(o.beforeHide=s[9]),l&65548&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[10](null),V(e,s)}}}function FI(n,e,t){const i=$t(),s="backup_create_"+B.randomString(5);let l,o="",r=!1,a;function u(S){en({}),t(3,r=!1),t(2,o=S||""),l==null||l.show()}function f(){return l==null?void 0:l.hide()}async function c(){if(!r){t(3,r=!0),clearTimeout(a),a=setTimeout(()=>{f()},1500);try{await ce.backups.create(o,{$cancelKey:s}),t(3,r=!1),f(),i("submit"),zt("Successfully generated new backup.")}catch(S){S.isAbort||ce.error(S)}clearTimeout(a),t(3,r=!1)}}jo(()=>{clearTimeout(a)});function d(){o=this.value,t(2,o)}const m=()=>r?(yo("A backup has already been started, please wait."),!1):!0,_=()=>(r&&yo("The backup was started but may take a while to complete. You can come back later.",4500),!0);function h(S){ee[S?"unshift":"push"](()=>{l=S,t(1,l)})}function b(S){Ne.call(this,n,S)}function y(S){Ne.call(this,n,S)}return[f,l,o,r,s,c,u,d,m,_,h,b,y]}class RI extends ge{constructor(e){super(),_e(this,e,FI,NI,me,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function qI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Backup name"),s=E(),l=v("input"),p(e,"for",i=n[14]),p(l,"type","text"),p(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[2]),r||(a=K(l,"input",n[9]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&p(e,"for",i),f&16384&&o!==(o=u[14])&&p(l,"id",o),f&4&&l.value!==u[2]&&re(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function jI(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;return u=new Fl({props:{value:n[1]}}),m=new pe({props:{class:"form-field required m-0",name:"name",$$slots:{default:[qI,({uniqueId:y})=>({14:y}),({uniqueId:y})=>y?16384:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`
    + separately since they are not locally stored and will not be included in the final backup!

    `,t=E(),i=v("form"),H(s.$$.fragment),p(e,"class","alert alert-info"),p(i,"id",n[4]),p(i,"autocomplete","off")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),V(s,i,null),l=!0,o||(r=J(i,"submit",et(n[5])),o=!0)},p(a,u){const f={};u&98308&&(f.$$scope={dirty:u,ctx:a}),s.$set(f)},i(a){l||(A(s.$$.fragment,a),l=!0)},o(a){I(s.$$.fragment,a),l=!1},d(a){a&&k(e),a&&k(t),a&&k(i),z(s),o=!1,r()}}}function LI(n){let e;return{c(){e=v("h4"),e.textContent="Initialize new backup",p(e,"class","center txt-break")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function PI(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=E(),s=v("button"),l=v("span"),l.textContent="Start backup",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[4]),p(s,"class","btn btn-expanded"),s.disabled=n[3],Q(s,"btn-loading",n[3])},m(a,u){w(a,e,u),g(e,t),w(a,i,u),w(a,s,u),g(s,l),o||(r=J(e,"click",n[0]),o=!0)},p(a,u){u&8&&(e.disabled=a[3]),u&8&&(s.disabled=a[3]),u&8&&Q(s,"btn-loading",a[3])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,r()}}}function NI(n){let e,t,i={class:"backup-create-panel",beforeOpen:n[8],beforeHide:n[9],popup:!0,$$slots:{footer:[PI],header:[LI],default:[II]},$$scope:{ctx:n}};return e=new ln({props:i}),n[10](e),e.$on("show",n[11]),e.$on("hide",n[12]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&8&&(o.beforeOpen=s[8]),l&8&&(o.beforeHide=s[9]),l&65548&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[10](null),z(e,s)}}}function FI(n,e,t){const i=$t(),s="backup_create_"+B.randomString(5);let l,o="",r=!1,a;function u(S){en({}),t(3,r=!1),t(2,o=S||""),l==null||l.show()}function f(){return l==null?void 0:l.hide()}async function c(){if(!r){t(3,r=!0),clearTimeout(a),a=setTimeout(()=>{f()},1500);try{await ce.backups.create(o,{$cancelKey:s}),t(3,r=!1),f(),i("submit"),zt("Successfully generated new backup.")}catch(S){S.isAbort||ce.error(S)}clearTimeout(a),t(3,r=!1)}}Vo(()=>{clearTimeout(a)});function d(){o=this.value,t(2,o)}const m=()=>r?(ko("A backup has already been started, please wait."),!1):!0,_=()=>(r&&ko("The backup was started but may take a while to complete. You can come back later.",4500),!0);function h(S){ee[S?"unshift":"push"](()=>{l=S,t(1,l)})}function b(S){Ne.call(this,n,S)}function y(S){Ne.call(this,n,S)}return[f,l,o,r,s,c,u,d,m,_,h,b,y]}class RI extends ge{constructor(e){super(),_e(this,e,FI,NI,me,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function qI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Backup name"),s=E(),l=v("input"),p(e,"for",i=n[14]),p(l,"type","text"),p(l,"id",o=n[14]),l.required=!0},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[2]),r||(a=J(l,"input",n[9]),r=!0)},p(u,f){f&16384&&i!==(i=u[14])&&p(e,"for",i),f&16384&&o!==(o=u[14])&&p(l,"id",o),f&4&&l.value!==u[2]&&re(l,u[2])},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function jI(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b;return u=new Fl({props:{value:n[1]}}),m=new pe({props:{class:"form-field required m-0",name:"name",$$slots:{default:[qI,({uniqueId:y})=>({14:y}),({uniqueId:y})=>y?16384:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.innerHTML=`

    Please proceed with caution.

    The restore operation will replace your existing pb_data with the one from the backup and will restart the application process!

    Backup restore is still experimental and currently works only on UNIX based systems.

    `,t=E(),i=v("div"),s=U(`Type the backup name - `),l=v("div"),o=v("span"),r=U(n[1]),a=E(),z(u.$$.fragment),f=U(` - to confirm:`),c=E(),d=v("form"),z(m.$$.fragment),p(e,"class","alert alert-danger"),p(o,"class","txt"),p(l,"class","label"),p(i,"class","content m-b-sm"),p(d,"id",n[6]),p(d,"autocomplete","off")},m(y,S){w(y,e,S),w(y,t,S),w(y,i,S),g(i,s),g(i,l),g(l,o),g(o,r),g(l,a),j(u,l,null),g(i,f),w(y,c,S),w(y,d,S),j(m,d,null),_=!0,h||(b=K(d,"submit",et(n[7])),h=!0)},p(y,S){(!_||S&2)&&se(r,y[1]);const C={};S&2&&(C.value=y[1]),u.$set(C);const $={};S&49156&&($.$$scope={dirty:S,ctx:y}),m.$set($)},i(y){_||(A(u.$$.fragment,y),A(m.$$.fragment,y),_=!0)},o(y){I(u.$$.fragment,y),I(m.$$.fragment,y),_=!1},d(y){y&&k(e),y&&k(t),y&&k(i),V(u),y&&k(c),y&&k(d),V(m),h=!1,b()}}}function VI(n){let e,t,i,s;return{c(){e=v("h4"),t=U("Restore "),i=v("strong"),s=U(n[1]),p(e,"class","center txt-break")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(i,s)},p(l,o){o&2&&se(s,l[1])},d(l){l&&k(e)}}}function zI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Cancel"),i=E(),s=v("button"),l=v("span"),l.textContent="Restore backup",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(u,f){w(u,e,f),g(e,t),w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&Q(s,"btn-loading",u[4])},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function HI(n){let e,t,i={class:"backup-restore-panel",overlayClose:!n[4],escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[zI],header:[VI],default:[jI]},$$scope:{ctx:n}};return e=new ln({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){z(e.$$.fragment)},m(s,l){j(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[10]),l&32822&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[11](null),V(e,s)}}}function BI(n,e,t){let i;const s="backup_restore_"+B.randomString(5);let l,o="",r="",a=!1;function u(y){en({}),t(2,r=""),t(1,o=y),t(4,a=!1),l==null||l.show()}function f(){return l==null?void 0:l.hide()}async function c(){var y;if(!(!i||a)){t(4,a=!0);try{await ce.backups.restore(o),setTimeout(()=>{window.location.reload()},1e3)}catch(S){S!=null&&S.isAbort||(t(4,a=!1),Ds(((y=S.response)==null?void 0:y.message)||S.message))}}}function d(){r=this.value,t(2,r)}const m=()=>!a;function _(y){ee[y?"unshift":"push"](()=>{l=y,t(3,l)})}function h(y){Ne.call(this,n,y)}function b(y){Ne.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=r!=""&&o==r)},[f,o,r,l,a,i,s,c,u,d,m,_,h,b]}class UI extends ge{constructor(e){super(),_e(this,e,BI,HI,me,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function j_(n,e,t){const i=n.slice();return i[22]=e[t],i}function V_(n,e,t){const i=n.slice();return i[19]=e[t],i}function WI(n){let e=[],t=new Map,i,s,l=n[3];const o=a=>a[22].key;for(let a=0;aNo backups yet. - `,p(e,"class","list-item list-item-placeholder svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function H_(n,e){let t,i,s,l,o,r=e[22].key+"",a,u,f,c,d=B.formattedFileSize(e[22].size)+"",m,_,h,b,y,S,C,$,T,M,O,D,L,P,N,F,R,q,H,W;function X(){return e[10](e[22])}function J(){return e[11](e[22])}function Z(){return e[12](e[22])}return{key:n,first:null,c(){t=v("div"),i=v("i"),s=E(),l=v("div"),o=v("span"),a=U(r),u=E(),f=v("span"),c=U("("),m=U(d),_=U(")"),h=E(),b=v("div"),y=v("button"),S=v("i"),$=E(),T=v("button"),M=v("i"),D=E(),L=v("button"),P=v("i"),F=E(),p(i,"class","ri-folder-zip-line"),p(o,"class","name backup-name svelte-1ulbkf5"),p(f,"class","size txt-hint txt-nowrap"),p(l,"class","content"),p(S,"class","ri-download-line"),p(y,"type","button"),p(y,"class","btn btn-sm btn-circle btn-hint btn-transparent"),y.disabled=C=e[6][e[22].key]||e[5][e[22].key],p(y,"aria-label","Download"),Q(y,"btn-loading",e[5][e[22].key]),p(M,"class","ri-restart-line"),p(T,"type","button"),p(T,"class","btn btn-sm btn-circle btn-hint btn-transparent"),T.disabled=O=e[6][e[22].key],p(T,"aria-label","Restore"),p(P,"class","ri-delete-bin-7-line"),p(L,"type","button"),p(L,"class","btn btn-sm btn-circle btn-hint btn-transparent"),L.disabled=N=e[6][e[22].key],p(L,"aria-label","Delete"),Q(L,"btn-loading",e[6][e[22].key]),p(b,"class","actions nonintrusive"),p(t,"class","list-item svelte-1ulbkf5"),this.first=t},m(le,ne){w(le,t,ne),g(t,i),g(t,s),g(t,l),g(l,o),g(o,a),g(l,u),g(l,f),g(f,c),g(f,m),g(f,_),g(t,h),g(t,b),g(b,y),g(y,S),g(b,$),g(b,T),g(T,M),g(b,D),g(b,L),g(L,P),g(t,F),q=!0,H||(W=[Me(He.call(null,y,"Download")),K(y,"click",et(X)),Me(He.call(null,T,"Restore")),K(T,"click",et(J)),Me(He.call(null,L,"Delete")),K(L,"click",et(Z))],H=!0)},p(le,ne){e=le,(!q||ne&8)&&r!==(r=e[22].key+"")&&se(a,r),(!q||ne&8)&&d!==(d=B.formattedFileSize(e[22].size)+"")&&se(m,d),(!q||ne&104&&C!==(C=e[6][e[22].key]||e[5][e[22].key]))&&(y.disabled=C),(!q||ne&40)&&Q(y,"btn-loading",e[5][e[22].key]),(!q||ne&72&&O!==(O=e[6][e[22].key]))&&(T.disabled=O),(!q||ne&72&&N!==(N=e[6][e[22].key]))&&(L.disabled=N),(!q||ne&72)&&Q(L,"btn-loading",e[6][e[22].key])},i(le){q||(le&&Qe(()=>{q&&(R||(R=je(t,ot,{duration:150},!0)),R.run(1))}),q=!0)},o(le){le&&(R||(R=je(t,ot,{duration:150},!1)),R.run(0)),q=!1},d(le){le&&k(t),le&&R&&R.end(),H=!1,Ee(W)}}}function B_(n){let e;return{c(){e=v("div"),e.innerHTML=` - `,p(e,"class","list-item list-item-loader svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function KI(n){let e,t,i;return{c(){e=v("span"),t=E(),i=v("span"),i.textContent="Backup/restore operation is in process",p(e,"class","loader loader-sm"),p(i,"class","txt")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function JI(n){let e,t,i;return{c(){e=v("i"),t=E(),i=v("span"),i.textContent="Initialize new backup",p(e,"class","ri-play-circle-line"),p(i,"class","txt")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function ZI(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h;const b=[YI,WI],y=[];function S(D,L){return D[4]?0:1}i=S(n),s=y[i]=b[i](n);function C(D,L){return D[7]?JI:KI}let $=C(n),T=$(n),M={};f=new RI({props:M}),n[14](f),f.$on("submit",n[15]);let O={};return d=new UI({props:O}),n[16](d),{c(){e=v("div"),t=v("div"),s.c(),l=E(),o=v("div"),r=v("button"),T.c(),u=E(),z(f.$$.fragment),c=E(),z(d.$$.fragment),p(t,"class","list-content svelte-1ulbkf5"),p(r,"type","button"),p(r,"class","btn btn-block btn-transparent"),r.disabled=a=n[4]||!n[7],p(o,"class","list-item list-item-btn"),p(e,"class","list list-compact")},m(D,L){w(D,e,L),g(e,t),y[i].m(t,null),g(e,l),g(e,o),g(o,r),T.m(r,null),w(D,u,L),j(f,D,L),w(D,c,L),j(d,D,L),m=!0,_||(h=K(r,"click",n[13]),_=!0)},p(D,[L]){let P=i;i=S(D),i===P?y[i].p(D,L):(ae(),I(y[P],1,1,()=>{y[P]=null}),ue(),s=y[i],s?s.p(D,L):(s=y[i]=b[i](D),s.c()),A(s,1),s.m(t,null)),$!==($=C(D))&&(T.d(1),T=$(D),T&&(T.c(),T.m(r,null))),(!m||L&144&&a!==(a=D[4]||!D[7]))&&(r.disabled=a);const N={};f.$set(N);const F={};d.$set(F)},i(D){m||(A(s),A(f.$$.fragment,D),A(d.$$.fragment,D),m=!0)},o(D){I(s),I(f.$$.fragment,D),I(d.$$.fragment,D),m=!1},d(D){D&&k(e),y[i].d(),T.d(),D&&k(u),n[14](null),V(f,D),D&&k(c),n[16](null),V(d,D),_=!1,h()}}}function GI(n,e,t){let i,s,l=[],o=!1,r={},a={},u=!0;f(),_();async function f(){t(4,o=!0);try{t(3,l=await ce.backups.getFullList()),l.sort((M,O)=>M.modifiedO.modified?-1:0),t(4,o=!1)}catch(M){M.isAbort||(ce.error(M),t(4,o=!1))}}async function c(M){if(!r[M]){t(5,r[M]=!0,r);try{const O=await ce.getAdminFileToken(),D=ce.backups.getDownloadUrl(O,M);B.download(D)}catch(O){O.isAbort||ce.error(O)}delete r[M],t(5,r)}}function d(M){pn(`Do you really want to delete ${M}?`,()=>m(M))}async function m(M){if(!a[M]){t(6,a[M]=!0,a);try{await ce.backups.delete(M),B.removeByKey(l,"name",M),f(),zt(`Successfully deleted ${M}.`)}catch(O){O.isAbort||ce.error(O)}delete a[M],t(6,a)}}async function _(){var M;try{const O=await ce.health.check({$autoCancel:!1}),D=u;t(7,u=((M=O==null?void 0:O.data)==null?void 0:M.canBackup)||!1),D!=u&&u&&f()}catch{}}Gt(()=>{let M=setInterval(()=>{_()},3e3);return()=>{clearInterval(M)}});const h=M=>c(M.key),b=M=>s.show(M.key),y=M=>d(M.key),S=()=>i==null?void 0:i.show();function C(M){ee[M?"unshift":"push"](()=>{i=M,t(1,i)})}const $=()=>{f()};function T(M){ee[M?"unshift":"push"](()=>{s=M,t(2,s)})}return[f,i,s,l,o,r,a,u,c,d,h,b,y,S,C,$,T]}class XI extends ge{constructor(e){super(),_e(this,e,GI,ZI,me,{loadBackups:0})}get loadBackups(){return this.$$.ctx[0]}}function QI(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xI(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function U_(n){var H,W,X;let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O;t=new pe({props:{class:"form-field form-field-toggle m-t-base m-b-0",$$slots:{default:[e8,({uniqueId:J})=>({32:J}),({uniqueId:J})=>[0,J?2:0]]},$$scope:{ctx:n}}});let D=n[2]&&W_(n);function L(J){n[25](J)}function P(J){n[26](J)}function N(J){n[27](J)}let F={toggleLabel:"Store backups in S3 storage",testFilesystem:"backups",configKey:"backups.s3",originalConfig:(H=n[0].backups)==null?void 0:H.s3};n[1].backups.s3!==void 0&&(F.config=n[1].backups.s3),n[7]!==void 0&&(F.isTesting=n[7]),n[8]!==void 0&&(F.testError=n[8]),r=new T1({props:F}),ee.push(()=>de(r,"config",L)),ee.push(()=>de(r,"isTesting",P)),ee.push(()=>de(r,"testError",N));let R=((X=(W=n[1].backups)==null?void 0:W.s3)==null?void 0:X.enabled)&&!n[9]&&!n[5]&&Y_(n),q=n[9]&&K_(n);return{c(){e=v("form"),z(t.$$.fragment),i=E(),D&&D.c(),s=E(),l=v("div"),o=E(),z(r.$$.fragment),c=E(),d=v("div"),m=v("div"),_=E(),R&&R.c(),h=E(),q&&q.c(),b=E(),y=v("button"),S=v("span"),S.textContent="Save changes",p(l,"class","clearfix m-b-base"),p(m,"class","flex-fill"),p(S,"class","txt"),p(y,"type","submit"),p(y,"class","btn btn-expanded"),y.disabled=C=!n[9]||n[5],Q(y,"btn-loading",n[5]),p(d,"class","flex"),p(e,"class","block"),p(e,"autocomplete","off")},m(J,Z){w(J,e,Z),j(t,e,null),g(e,i),D&&D.m(e,null),g(e,s),g(e,l),g(e,o),j(r,e,null),g(e,c),g(e,d),g(d,m),g(d,_),R&&R.m(d,null),g(d,h),q&&q.m(d,null),g(d,b),g(d,y),g(y,S),T=!0,M||(O=[K(y,"click",n[29]),K(e,"submit",et(n[11]))],M=!0)},p(J,Z){var ie,be,Se;const le={};Z[0]&4|Z[1]&6&&(le.$$scope={dirty:Z,ctx:J}),t.$set(le),J[2]?D?(D.p(J,Z),Z[0]&4&&A(D,1)):(D=W_(J),D.c(),A(D,1),D.m(e,s)):D&&(ae(),I(D,1,1,()=>{D=null}),ue());const ne={};Z[0]&1&&(ne.originalConfig=(ie=J[0].backups)==null?void 0:ie.s3),!a&&Z[0]&2&&(a=!0,ne.config=J[1].backups.s3,he(()=>a=!1)),!u&&Z[0]&128&&(u=!0,ne.isTesting=J[7],he(()=>u=!1)),!f&&Z[0]&256&&(f=!0,ne.testError=J[8],he(()=>f=!1)),r.$set(ne),(Se=(be=J[1].backups)==null?void 0:be.s3)!=null&&Se.enabled&&!J[9]&&!J[5]?R?R.p(J,Z):(R=Y_(J),R.c(),R.m(d,h)):R&&(R.d(1),R=null),J[9]?q?q.p(J,Z):(q=K_(J),q.c(),q.m(d,b)):q&&(q.d(1),q=null),(!T||Z[0]&544&&C!==(C=!J[9]||J[5]))&&(y.disabled=C),(!T||Z[0]&32)&&Q(y,"btn-loading",J[5])},i(J){T||(A(t.$$.fragment,J),A(D),A(r.$$.fragment,J),J&&Qe(()=>{T&&($||($=je(e,ot,{duration:150},!0)),$.run(1))}),T=!0)},o(J){I(t.$$.fragment,J),I(D),I(r.$$.fragment,J),J&&($||($=je(e,ot,{duration:150},!1)),$.run(0)),T=!1},d(J){J&&k(e),V(t),D&&D.d(),V(r),R&&R.d(),q&&q.d(),J&&$&&$.end(),M=!1,Ee(O)}}}function e8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable auto backups"),p(e,"type","checkbox"),p(e,"id",t=n[32]),e.required=!0,p(s,"for",o=n[32])},m(u,f){w(u,e,f),e.checked=n[2],w(u,i,f),w(u,s,f),g(s,l),r||(a=K(e,"change",n[18]),r=!0)},p(u,f){f[1]&2&&t!==(t=u[32])&&p(e,"id",t),f[0]&4&&(e.checked=u[2]),f[1]&2&&o!==(o=u[32])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function W_(n){let e,t,i,s,l,o,r,a,u;return s=new pe({props:{class:"form-field required",name:"backups.cron",$$slots:{default:[n8,({uniqueId:f})=>({32:f}),({uniqueId:f})=>[0,f?2:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"backups.cronMaxKeep",$$slots:{default:[i8,({uniqueId:f})=>({32:f}),({uniqueId:f})=>[0,f?2:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),z(s.$$.fragment),l=E(),o=v("div"),z(r.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(t,"class","grid p-t-base p-b-sm"),p(e,"class","block")},m(f,c){w(f,e,c),g(e,t),g(t,i),j(s,i,null),g(t,l),g(t,o),j(r,o,null),u=!0},p(f,c){const d={};c[0]&3|c[1]&6&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&2|c[1]&6&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&Qe(()=>{u&&(a||(a=je(e,ot,{duration:150},!0)),a.run(1))}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(e,ot,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),V(s),V(r),f&&a&&a.end()}}}function t8(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Every day at 00:00h',t=E(),i=v("button"),i.innerHTML='Every sunday at 00:00h',s=E(),l=v("button"),l.innerHTML='Every Mon and Wed at 00:00h',o=E(),r=v("button"),r.innerHTML='Every first day of the month at 00:00h',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){w(f,e,c),w(f,t,c),w(f,i,c),w(f,s,c),w(f,l,c),w(f,o,c),w(f,r,c),a||(u=[K(e,"click",n[20]),K(i,"click",n[21]),K(l,"click",n[22]),K(r,"click",n[23])],a=!0)},p:x,d(f){f&&k(e),f&&k(t),f&&k(i),f&&k(s),f&&k(l),f&&k(o),f&&k(r),a=!1,Ee(u)}}}function n8(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$;return h=new Kn({props:{class:"dropdown dropdown-nowrap dropdown-right",$$slots:{default:[t8]},$$scope:{ctx:n}}}),{c(){var T,M;e=v("label"),t=U("Cron expression"),s=E(),l=v("input"),a=E(),u=v("div"),f=v("button"),c=v("span"),c.textContent="Presets",d=E(),m=v("i"),_=E(),z(h.$$.fragment),b=E(),y=v("div"),y.textContent="Only numeric list, steps or ranges are supported.",p(e,"for",i=n[32]),l.required=!0,p(l,"type","text"),p(l,"id",o=n[32]),p(l,"class","txt-lg txt-mono"),p(l,"placeholder","* * * * *"),l.autofocus=r=!((M=(T=n[0])==null?void 0:T.backups)!=null&&M.cron),p(c,"class","txt"),p(m,"class","ri-arrow-drop-down-fill"),p(f,"type","button"),p(f,"class","btn btn-sm btn-outline p-r-0"),p(u,"class","form-field-addon"),p(y,"class","help-block")},m(T,M){var O,D;w(T,e,M),g(e,t),w(T,s,M),w(T,l,M),re(l,n[1].backups.cron),w(T,a,M),w(T,u,M),g(u,f),g(f,c),g(f,d),g(f,m),g(f,_),j(h,f,null),w(T,b,M),w(T,y,M),S=!0,(D=(O=n[0])==null?void 0:O.backups)!=null&&D.cron||l.focus(),C||($=K(l,"input",n[19]),C=!0)},p(T,M){var D,L;(!S||M[1]&2&&i!==(i=T[32]))&&p(e,"for",i),(!S||M[1]&2&&o!==(o=T[32]))&&p(l,"id",o),(!S||M[0]&1&&r!==(r=!((L=(D=T[0])==null?void 0:D.backups)!=null&&L.cron)))&&(l.autofocus=r),M[0]&2&&l.value!==T[1].backups.cron&&re(l,T[1].backups.cron);const O={};M[0]&2|M[1]&4&&(O.$$scope={dirty:M,ctx:T}),h.$set(O)},i(T){S||(A(h.$$.fragment,T),S=!0)},o(T){I(h.$$.fragment,T),S=!1},d(T){T&&k(e),T&&k(s),T&&k(l),T&&k(a),T&&k(u),V(h),T&&k(b),T&&k(y),C=!1,$()}}}function i8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max @auto backups to keep"),s=E(),l=v("input"),p(e,"for",i=n[32]),p(l,"type","number"),p(l,"id",o=n[32]),p(l,"min","1")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[1].backups.cronMaxKeep),r||(a=K(l,"input",n[24]),r=!0)},p(u,f){f[1]&2&&i!==(i=u[32])&&p(e,"for",i),f[1]&2&&o!==(o=u[32])&&p(l,"id",o),f[0]&2&&dt(l.value)!==u[1].backups.cronMaxKeep&&re(l,u[1].backups.cronMaxKeep)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function Y_(n){let e;function t(l,o){return l[7]?o8:l[8]?l8:s8}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function s8(n){let e;return{c(){e=v("div"),e.innerHTML=` + `),l=v("div"),o=v("span"),r=U(n[1]),a=E(),H(u.$$.fragment),f=U(` + to confirm:`),c=E(),d=v("form"),H(m.$$.fragment),p(e,"class","alert alert-danger"),p(o,"class","txt"),p(l,"class","label"),p(i,"class","content m-b-sm"),p(d,"id",n[6]),p(d,"autocomplete","off")},m(y,S){w(y,e,S),w(y,t,S),w(y,i,S),g(i,s),g(i,l),g(l,o),g(o,r),g(l,a),V(u,l,null),g(i,f),w(y,c,S),w(y,d,S),V(m,d,null),_=!0,h||(b=J(d,"submit",et(n[7])),h=!0)},p(y,S){(!_||S&2)&&se(r,y[1]);const C={};S&2&&(C.value=y[1]),u.$set(C);const $={};S&49156&&($.$$scope={dirty:S,ctx:y}),m.$set($)},i(y){_||(A(u.$$.fragment,y),A(m.$$.fragment,y),_=!0)},o(y){I(u.$$.fragment,y),I(m.$$.fragment,y),_=!1},d(y){y&&k(e),y&&k(t),y&&k(i),z(u),y&&k(c),y&&k(d),z(m),h=!1,b()}}}function VI(n){let e,t,i,s;return{c(){e=v("h4"),t=U("Restore "),i=v("strong"),s=U(n[1]),p(e,"class","center txt-break")},m(l,o){w(l,e,o),g(e,t),g(e,i),g(i,s)},p(l,o){o&2&&se(s,l[1])},d(l){l&&k(e)}}}function zI(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=U("Cancel"),i=E(),s=v("button"),l=v("span"),l.textContent="Restore backup",p(e,"type","button"),p(e,"class","btn btn-transparent"),e.disabled=n[4],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=o=!n[5]||n[4],Q(s,"btn-loading",n[4])},m(u,f){w(u,e,f),g(e,t),w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"click",n[0]),r=!0)},p(u,f){f&16&&(e.disabled=u[4]),f&48&&o!==(o=!u[5]||u[4])&&(s.disabled=o),f&16&&Q(s,"btn-loading",u[4])},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function HI(n){let e,t,i={class:"backup-restore-panel",overlayClose:!n[4],escClose:!n[4],beforeHide:n[10],popup:!0,$$slots:{footer:[zI],header:[VI],default:[jI]},$$scope:{ctx:n}};return e=new ln({props:i}),n[11](e),e.$on("show",n[12]),e.$on("hide",n[13]),{c(){H(e.$$.fragment)},m(s,l){V(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[10]),l&32822&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[11](null),z(e,s)}}}function BI(n,e,t){let i;const s="backup_restore_"+B.randomString(5);let l,o="",r="",a=!1;function u(y){en({}),t(2,r=""),t(1,o=y),t(4,a=!1),l==null||l.show()}function f(){return l==null?void 0:l.hide()}async function c(){var y;if(!(!i||a)){t(4,a=!0);try{await ce.backups.restore(o),setTimeout(()=>{window.location.reload()},1e3)}catch(S){S!=null&&S.isAbort||(t(4,a=!1),Ds(((y=S.response)==null?void 0:y.message)||S.message))}}}function d(){r=this.value,t(2,r)}const m=()=>!a;function _(y){ee[y?"unshift":"push"](()=>{l=y,t(3,l)})}function h(y){Ne.call(this,n,y)}function b(y){Ne.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=r!=""&&o==r)},[f,o,r,l,a,i,s,c,u,d,m,_,h,b]}class UI extends ge{constructor(e){super(),_e(this,e,BI,HI,me,{show:8,hide:0})}get show(){return this.$$.ctx[8]}get hide(){return this.$$.ctx[0]}}function z_(n,e,t){const i=n.slice();return i[22]=e[t],i}function H_(n,e,t){const i=n.slice();return i[19]=e[t],i}function WI(n){let e=[],t=new Map,i,s,l=n[3];const o=a=>a[22].key;for(let a=0;aNo backups yet. + `,p(e,"class","list-item list-item-placeholder svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function U_(n,e){let t,i,s,l,o,r=e[22].key+"",a,u,f,c,d=B.formattedFileSize(e[22].size)+"",m,_,h,b,y,S,C,$,T,M,O,D,L,P,N,F,R,q,j,W;function X(){return e[10](e[22])}function K(){return e[11](e[22])}function Z(){return e[12](e[22])}return{key:n,first:null,c(){t=v("div"),i=v("i"),s=E(),l=v("div"),o=v("span"),a=U(r),u=E(),f=v("span"),c=U("("),m=U(d),_=U(")"),h=E(),b=v("div"),y=v("button"),S=v("i"),$=E(),T=v("button"),M=v("i"),D=E(),L=v("button"),P=v("i"),F=E(),p(i,"class","ri-folder-zip-line"),p(o,"class","name backup-name svelte-1ulbkf5"),p(f,"class","size txt-hint txt-nowrap"),p(l,"class","content"),p(S,"class","ri-download-line"),p(y,"type","button"),p(y,"class","btn btn-sm btn-circle btn-hint btn-transparent"),y.disabled=C=e[6][e[22].key]||e[5][e[22].key],p(y,"aria-label","Download"),Q(y,"btn-loading",e[5][e[22].key]),p(M,"class","ri-restart-line"),p(T,"type","button"),p(T,"class","btn btn-sm btn-circle btn-hint btn-transparent"),T.disabled=O=e[6][e[22].key],p(T,"aria-label","Restore"),p(P,"class","ri-delete-bin-7-line"),p(L,"type","button"),p(L,"class","btn btn-sm btn-circle btn-hint btn-transparent"),L.disabled=N=e[6][e[22].key],p(L,"aria-label","Delete"),Q(L,"btn-loading",e[6][e[22].key]),p(b,"class","actions nonintrusive"),p(t,"class","list-item svelte-1ulbkf5"),this.first=t},m(le,ne){w(le,t,ne),g(t,i),g(t,s),g(t,l),g(l,o),g(o,a),g(l,u),g(l,f),g(f,c),g(f,m),g(f,_),g(t,h),g(t,b),g(b,y),g(y,S),g(b,$),g(b,T),g(T,M),g(b,D),g(b,L),g(L,P),g(t,F),q=!0,j||(W=[Me(He.call(null,y,"Download")),J(y,"click",et(X)),Me(He.call(null,T,"Restore")),J(T,"click",et(K)),Me(He.call(null,L,"Delete")),J(L,"click",et(Z))],j=!0)},p(le,ne){e=le,(!q||ne&8)&&r!==(r=e[22].key+"")&&se(a,r),(!q||ne&8)&&d!==(d=B.formattedFileSize(e[22].size)+"")&&se(m,d),(!q||ne&104&&C!==(C=e[6][e[22].key]||e[5][e[22].key]))&&(y.disabled=C),(!q||ne&40)&&Q(y,"btn-loading",e[5][e[22].key]),(!q||ne&72&&O!==(O=e[6][e[22].key]))&&(T.disabled=O),(!q||ne&72&&N!==(N=e[6][e[22].key]))&&(L.disabled=N),(!q||ne&72)&&Q(L,"btn-loading",e[6][e[22].key])},i(le){q||(le&&Qe(()=>{q&&(R||(R=je(t,ot,{duration:150},!0)),R.run(1))}),q=!0)},o(le){le&&(R||(R=je(t,ot,{duration:150},!1)),R.run(0)),q=!1},d(le){le&&k(t),le&&R&&R.end(),j=!1,Ee(W)}}}function W_(n){let e;return{c(){e=v("div"),e.innerHTML=` + `,p(e,"class","list-item list-item-loader svelte-1ulbkf5")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function KI(n){let e,t,i;return{c(){e=v("span"),t=E(),i=v("span"),i.textContent="Backup/restore operation is in process",p(e,"class","loader loader-sm"),p(i,"class","txt")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function JI(n){let e,t,i;return{c(){e=v("i"),t=E(),i=v("span"),i.textContent="Initialize new backup",p(e,"class","ri-play-circle-line"),p(i,"class","txt")},m(s,l){w(s,e,l),w(s,t,l),w(s,i,l)},d(s){s&&k(e),s&&k(t),s&&k(i)}}}function ZI(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h;const b=[YI,WI],y=[];function S(D,L){return D[4]?0:1}i=S(n),s=y[i]=b[i](n);function C(D,L){return D[7]?JI:KI}let $=C(n),T=$(n),M={};f=new RI({props:M}),n[14](f),f.$on("submit",n[15]);let O={};return d=new UI({props:O}),n[16](d),{c(){e=v("div"),t=v("div"),s.c(),l=E(),o=v("div"),r=v("button"),T.c(),u=E(),H(f.$$.fragment),c=E(),H(d.$$.fragment),p(t,"class","list-content svelte-1ulbkf5"),p(r,"type","button"),p(r,"class","btn btn-block btn-transparent"),r.disabled=a=n[4]||!n[7],p(o,"class","list-item list-item-btn"),p(e,"class","list list-compact")},m(D,L){w(D,e,L),g(e,t),y[i].m(t,null),g(e,l),g(e,o),g(o,r),T.m(r,null),w(D,u,L),V(f,D,L),w(D,c,L),V(d,D,L),m=!0,_||(h=J(r,"click",n[13]),_=!0)},p(D,[L]){let P=i;i=S(D),i===P?y[i].p(D,L):(ae(),I(y[P],1,1,()=>{y[P]=null}),ue(),s=y[i],s?s.p(D,L):(s=y[i]=b[i](D),s.c()),A(s,1),s.m(t,null)),$!==($=C(D))&&(T.d(1),T=$(D),T&&(T.c(),T.m(r,null))),(!m||L&144&&a!==(a=D[4]||!D[7]))&&(r.disabled=a);const N={};f.$set(N);const F={};d.$set(F)},i(D){m||(A(s),A(f.$$.fragment,D),A(d.$$.fragment,D),m=!0)},o(D){I(s),I(f.$$.fragment,D),I(d.$$.fragment,D),m=!1},d(D){D&&k(e),y[i].d(),T.d(),D&&k(u),n[14](null),z(f,D),D&&k(c),n[16](null),z(d,D),_=!1,h()}}}function GI(n,e,t){let i,s,l=[],o=!1,r={},a={},u=!0;f(),_();async function f(){t(4,o=!0);try{t(3,l=await ce.backups.getFullList()),l.sort((M,O)=>M.modifiedO.modified?-1:0),t(4,o=!1)}catch(M){M.isAbort||(ce.error(M),t(4,o=!1))}}async function c(M){if(!r[M]){t(5,r[M]=!0,r);try{const O=await ce.getAdminFileToken(),D=ce.backups.getDownloadUrl(O,M);B.download(D)}catch(O){O.isAbort||ce.error(O)}delete r[M],t(5,r)}}function d(M){pn(`Do you really want to delete ${M}?`,()=>m(M))}async function m(M){if(!a[M]){t(6,a[M]=!0,a);try{await ce.backups.delete(M),B.removeByKey(l,"name",M),f(),zt(`Successfully deleted ${M}.`)}catch(O){O.isAbort||ce.error(O)}delete a[M],t(6,a)}}async function _(){var M;try{const O=await ce.health.check({$autoCancel:!1}),D=u;t(7,u=((M=O==null?void 0:O.data)==null?void 0:M.canBackup)||!1),D!=u&&u&&f()}catch{}}Gt(()=>{let M=setInterval(()=>{_()},3e3);return()=>{clearInterval(M)}});const h=M=>c(M.key),b=M=>s.show(M.key),y=M=>d(M.key),S=()=>i==null?void 0:i.show();function C(M){ee[M?"unshift":"push"](()=>{i=M,t(1,i)})}const $=()=>{f()};function T(M){ee[M?"unshift":"push"](()=>{s=M,t(2,s)})}return[f,i,s,l,o,r,a,u,c,d,h,b,y,S,C,$,T]}class XI extends ge{constructor(e){super(),_e(this,e,GI,ZI,me,{loadBackups:0})}get loadBackups(){return this.$$.ctx[0]}}function QI(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-down-s-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function xI(n){let e;return{c(){e=v("i"),p(e,"class","ri-arrow-up-s-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Y_(n){var j,W,X;let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O;t=new pe({props:{class:"form-field form-field-toggle m-t-base m-b-0",$$slots:{default:[e8,({uniqueId:K})=>({32:K}),({uniqueId:K})=>[0,K?2:0]]},$$scope:{ctx:n}}});let D=n[2]&&K_(n);function L(K){n[25](K)}function P(K){n[26](K)}function N(K){n[27](K)}let F={toggleLabel:"Store backups in S3 storage",testFilesystem:"backups",configKey:"backups.s3",originalConfig:(j=n[0].backups)==null?void 0:j.s3};n[1].backups.s3!==void 0&&(F.config=n[1].backups.s3),n[7]!==void 0&&(F.isTesting=n[7]),n[8]!==void 0&&(F.testError=n[8]),r=new O1({props:F}),ee.push(()=>de(r,"config",L)),ee.push(()=>de(r,"isTesting",P)),ee.push(()=>de(r,"testError",N));let R=((X=(W=n[1].backups)==null?void 0:W.s3)==null?void 0:X.enabled)&&!n[9]&&!n[5]&&J_(n),q=n[9]&&Z_(n);return{c(){e=v("form"),H(t.$$.fragment),i=E(),D&&D.c(),s=E(),l=v("div"),o=E(),H(r.$$.fragment),c=E(),d=v("div"),m=v("div"),_=E(),R&&R.c(),h=E(),q&&q.c(),b=E(),y=v("button"),S=v("span"),S.textContent="Save changes",p(l,"class","clearfix m-b-base"),p(m,"class","flex-fill"),p(S,"class","txt"),p(y,"type","submit"),p(y,"class","btn btn-expanded"),y.disabled=C=!n[9]||n[5],Q(y,"btn-loading",n[5]),p(d,"class","flex"),p(e,"class","block"),p(e,"autocomplete","off")},m(K,Z){w(K,e,Z),V(t,e,null),g(e,i),D&&D.m(e,null),g(e,s),g(e,l),g(e,o),V(r,e,null),g(e,c),g(e,d),g(d,m),g(d,_),R&&R.m(d,null),g(d,h),q&&q.m(d,null),g(d,b),g(d,y),g(y,S),T=!0,M||(O=[J(y,"click",n[29]),J(e,"submit",et(n[11]))],M=!0)},p(K,Z){var ie,be,Se;const le={};Z[0]&4|Z[1]&6&&(le.$$scope={dirty:Z,ctx:K}),t.$set(le),K[2]?D?(D.p(K,Z),Z[0]&4&&A(D,1)):(D=K_(K),D.c(),A(D,1),D.m(e,s)):D&&(ae(),I(D,1,1,()=>{D=null}),ue());const ne={};Z[0]&1&&(ne.originalConfig=(ie=K[0].backups)==null?void 0:ie.s3),!a&&Z[0]&2&&(a=!0,ne.config=K[1].backups.s3,he(()=>a=!1)),!u&&Z[0]&128&&(u=!0,ne.isTesting=K[7],he(()=>u=!1)),!f&&Z[0]&256&&(f=!0,ne.testError=K[8],he(()=>f=!1)),r.$set(ne),(Se=(be=K[1].backups)==null?void 0:be.s3)!=null&&Se.enabled&&!K[9]&&!K[5]?R?R.p(K,Z):(R=J_(K),R.c(),R.m(d,h)):R&&(R.d(1),R=null),K[9]?q?q.p(K,Z):(q=Z_(K),q.c(),q.m(d,b)):q&&(q.d(1),q=null),(!T||Z[0]&544&&C!==(C=!K[9]||K[5]))&&(y.disabled=C),(!T||Z[0]&32)&&Q(y,"btn-loading",K[5])},i(K){T||(A(t.$$.fragment,K),A(D),A(r.$$.fragment,K),K&&Qe(()=>{T&&($||($=je(e,ot,{duration:150},!0)),$.run(1))}),T=!0)},o(K){I(t.$$.fragment,K),I(D),I(r.$$.fragment,K),K&&($||($=je(e,ot,{duration:150},!1)),$.run(0)),T=!1},d(K){K&&k(e),z(t),D&&D.d(),z(r),R&&R.d(),q&&q.d(),K&&$&&$.end(),M=!1,Ee(O)}}}function e8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=E(),s=v("label"),l=U("Enable auto backups"),p(e,"type","checkbox"),p(e,"id",t=n[32]),e.required=!0,p(s,"for",o=n[32])},m(u,f){w(u,e,f),e.checked=n[2],w(u,i,f),w(u,s,f),g(s,l),r||(a=J(e,"change",n[18]),r=!0)},p(u,f){f[1]&2&&t!==(t=u[32])&&p(e,"id",t),f[0]&4&&(e.checked=u[2]),f[1]&2&&o!==(o=u[32])&&p(s,"for",o)},d(u){u&&k(e),u&&k(i),u&&k(s),r=!1,a()}}}function K_(n){let e,t,i,s,l,o,r,a,u;return s=new pe({props:{class:"form-field required",name:"backups.cron",$$slots:{default:[n8,({uniqueId:f})=>({32:f}),({uniqueId:f})=>[0,f?2:0]]},$$scope:{ctx:n}}}),r=new pe({props:{class:"form-field required",name:"backups.cronMaxKeep",$$slots:{default:[i8,({uniqueId:f})=>({32:f}),({uniqueId:f})=>[0,f?2:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),H(s.$$.fragment),l=E(),o=v("div"),H(r.$$.fragment),p(i,"class","col-lg-6"),p(o,"class","col-lg-6"),p(t,"class","grid p-t-base p-b-sm"),p(e,"class","block")},m(f,c){w(f,e,c),g(e,t),g(t,i),V(s,i,null),g(t,l),g(t,o),V(r,o,null),u=!0},p(f,c){const d={};c[0]&3|c[1]&6&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const m={};c[0]&2|c[1]&6&&(m.$$scope={dirty:c,ctx:f}),r.$set(m)},i(f){u||(A(s.$$.fragment,f),A(r.$$.fragment,f),f&&Qe(()=>{u&&(a||(a=je(e,ot,{duration:150},!0)),a.run(1))}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(e,ot,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&k(e),z(s),z(r),f&&a&&a.end()}}}function t8(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("button"),e.innerHTML='Every day at 00:00h',t=E(),i=v("button"),i.innerHTML='Every sunday at 00:00h',s=E(),l=v("button"),l.innerHTML='Every Mon and Wed at 00:00h',o=E(),r=v("button"),r.innerHTML='Every first day of the month at 00:00h',p(e,"type","button"),p(e,"class","dropdown-item closable"),p(i,"type","button"),p(i,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable"),p(r,"type","button"),p(r,"class","dropdown-item closable")},m(f,c){w(f,e,c),w(f,t,c),w(f,i,c),w(f,s,c),w(f,l,c),w(f,o,c),w(f,r,c),a||(u=[J(e,"click",n[20]),J(i,"click",n[21]),J(l,"click",n[22]),J(r,"click",n[23])],a=!0)},p:x,d(f){f&&k(e),f&&k(t),f&&k(i),f&&k(s),f&&k(l),f&&k(o),f&&k(r),a=!1,Ee(u)}}}function n8(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$;return h=new Kn({props:{class:"dropdown dropdown-nowrap dropdown-right",$$slots:{default:[t8]},$$scope:{ctx:n}}}),{c(){var T,M;e=v("label"),t=U("Cron expression"),s=E(),l=v("input"),a=E(),u=v("div"),f=v("button"),c=v("span"),c.textContent="Presets",d=E(),m=v("i"),_=E(),H(h.$$.fragment),b=E(),y=v("div"),y.textContent="Only numeric list, steps or ranges are supported.",p(e,"for",i=n[32]),l.required=!0,p(l,"type","text"),p(l,"id",o=n[32]),p(l,"class","txt-lg txt-mono"),p(l,"placeholder","* * * * *"),l.autofocus=r=!((M=(T=n[0])==null?void 0:T.backups)!=null&&M.cron),p(c,"class","txt"),p(m,"class","ri-arrow-drop-down-fill"),p(f,"type","button"),p(f,"class","btn btn-sm btn-outline p-r-0"),p(u,"class","form-field-addon"),p(y,"class","help-block")},m(T,M){var O,D;w(T,e,M),g(e,t),w(T,s,M),w(T,l,M),re(l,n[1].backups.cron),w(T,a,M),w(T,u,M),g(u,f),g(f,c),g(f,d),g(f,m),g(f,_),V(h,f,null),w(T,b,M),w(T,y,M),S=!0,(D=(O=n[0])==null?void 0:O.backups)!=null&&D.cron||l.focus(),C||($=J(l,"input",n[19]),C=!0)},p(T,M){var D,L;(!S||M[1]&2&&i!==(i=T[32]))&&p(e,"for",i),(!S||M[1]&2&&o!==(o=T[32]))&&p(l,"id",o),(!S||M[0]&1&&r!==(r=!((L=(D=T[0])==null?void 0:D.backups)!=null&&L.cron)))&&(l.autofocus=r),M[0]&2&&l.value!==T[1].backups.cron&&re(l,T[1].backups.cron);const O={};M[0]&2|M[1]&4&&(O.$$scope={dirty:M,ctx:T}),h.$set(O)},i(T){S||(A(h.$$.fragment,T),S=!0)},o(T){I(h.$$.fragment,T),S=!1},d(T){T&&k(e),T&&k(s),T&&k(l),T&&k(a),T&&k(u),z(h),T&&k(b),T&&k(y),C=!1,$()}}}function i8(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=U("Max @auto backups to keep"),s=E(),l=v("input"),p(e,"for",i=n[32]),p(l,"type","number"),p(l,"id",o=n[32]),p(l,"min","1")},m(u,f){w(u,e,f),g(e,t),w(u,s,f),w(u,l,f),re(l,n[1].backups.cronMaxKeep),r||(a=J(l,"input",n[24]),r=!0)},p(u,f){f[1]&2&&i!==(i=u[32])&&p(e,"for",i),f[1]&2&&o!==(o=u[32])&&p(l,"id",o),f[0]&2&&dt(l.value)!==u[1].backups.cronMaxKeep&&re(l,u[1].backups.cronMaxKeep)},d(u){u&&k(e),u&&k(s),u&&k(l),r=!1,a()}}}function J_(n){let e;function t(l,o){return l[7]?o8:l[8]?l8:s8}let i=t(n),s=i(n);return{c(){s.c(),e=ye()},m(l,o){s.m(l,o),w(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&k(e)}}}function s8(n){let e;return{c(){e=v("div"),e.innerHTML=` S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function l8(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` - Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Me(t=He.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&qt(t.update)&&o[0]&256&&t.update.call(null,(r=l[8].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function o8(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function K_(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","submit"),p(e,"class","btn btn-hint btn-transparent"),e.disabled=i=!n[9]||n[5]},m(o,r){w(o,e,r),g(e,t),s||(l=K(e,"click",n[28]),s=!0)},p(o,r){r[0]&544&&i!==(i=!o[9]||o[5])&&(e.disabled=i)},d(o){o&&k(e),s=!1,l()}}}function r8(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L;m=new Zo({props:{class:"btn-sm",tooltip:"Reload backups list"}}),m.$on("refresh",n[15]);let P={};h=new XI({props:P}),n[16](h);function N(H,W){return H[6]?xI:QI}let F=N(n),R=F(n),q=n[6]&&!n[4]&&U_(n);return{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[10]),r=E(),a=v("div"),u=v("div"),f=v("div"),c=v("span"),c.textContent="Backup and restore your PocketBase data",d=E(),z(m.$$.fragment),_=E(),z(h.$$.fragment),b=E(),y=v("hr"),S=E(),C=v("button"),$=v("span"),$.textContent="Backups options",T=E(),R.c(),M=E(),q&&q.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(c,"class","txt-xl"),p(f,"class","flex m-b-sm flex-gap-5"),p($,"class","txt"),p(C,"type","button"),p(C,"class","btn btn-secondary"),C.disabled=n[4],Q(C,"btn-loading",n[4]),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(H,W){w(H,e,W),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w(H,r,W),w(H,a,W),g(a,u),g(u,f),g(f,c),g(f,d),j(m,f,null),g(u,_),j(h,u,null),g(u,b),g(u,y),g(u,S),g(u,C),g(C,$),g(C,T),R.m(C,null),g(u,M),q&&q.m(u,null),O=!0,D||(L=[K(C,"click",n[17]),K(u,"submit",et(n[11]))],D=!0)},p(H,W){(!O||W[0]&1024)&&se(o,H[10]);const X={};h.$set(X),F!==(F=N(H))&&(R.d(1),R=F(H),R&&(R.c(),R.m(C,null))),(!O||W[0]&16)&&(C.disabled=H[4]),(!O||W[0]&16)&&Q(C,"btn-loading",H[4]),H[6]&&!H[4]?q?(q.p(H,W),W[0]&80&&A(q,1)):(q=U_(H),q.c(),A(q,1),q.m(u,null)):q&&(ae(),I(q,1,1,()=>{q=null}),ue())},i(H){O||(A(m.$$.fragment,H),A(h.$$.fragment,H),A(q),O=!0)},o(H){I(m.$$.fragment,H),I(h.$$.fragment,H),I(q),O=!1},d(H){H&&k(e),H&&k(r),H&&k(a),V(m),n[16](null),V(h),R.d(),q&&q.d(),D=!1,Ee(L)}}}function a8(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[r8]},$$scope:{ctx:n}}}),{c(){z(e.$$.fragment),t=E(),z(i.$$.fragment)},m(l,o){j(e,l,o),w(l,t,o),j(i,l,o),s=!0},p(l,o){const r={};o[0]&2047|o[1]&4&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){V(e,l),l&&k(t),V(i,l)}}}function u8(n,e,t){let i,s;Je(n,Tt,Z=>t(10,s=Z)),sn(Tt,s="Backups",s);let l,o={},r={},a=!1,u=!1,f="",c=!1,d=!1,m=!1,_=null;h();async function h(){t(4,a=!0);try{const Z=await ce.settings.getAll()||{};y(Z)}catch(Z){ce.error(Z)}t(4,a=!1)}async function b(){if(!(u||!i)){t(5,u=!0);try{const Z=await ce.settings.update(B.filterRedactedProps(r));await C(),y(Z),zt("Successfully saved application settings.")}catch(Z){ce.error(Z)}t(5,u=!1)}}function y(Z={}){t(1,r={backups:(Z==null?void 0:Z.backups)||{}}),t(2,c=r.backups.cron!=""),t(0,o=JSON.parse(JSON.stringify(r)))}function S(){t(1,r=JSON.parse(JSON.stringify(o||{backups:{}}))),t(2,c=r.backups.cron!="")}async function C(){await(l==null?void 0:l.loadBackups())}const $=()=>C();function T(Z){ee[Z?"unshift":"push"](()=>{l=Z,t(3,l)})}const M=()=>t(6,d=!d);function O(){c=this.checked,t(2,c)}function D(){r.backups.cron=this.value,t(1,r),t(2,c)}const L=()=>{t(1,r.backups.cron="0 0 * * *",r)},P=()=>{t(1,r.backups.cron="0 0 * * 0",r)},N=()=>{t(1,r.backups.cron="0 0 * * 1,3",r)},F=()=>{t(1,r.backups.cron="0 0 1 * *",r)};function R(){r.backups.cronMaxKeep=dt(this.value),t(1,r),t(2,c)}function q(Z){n.$$.not_equal(r.backups.s3,Z)&&(r.backups.s3=Z,t(1,r),t(2,c))}function H(Z){m=Z,t(7,m)}function W(Z){_=Z,t(8,_)}const X=()=>S(),J=()=>b();return n.$$.update=()=>{var Z;n.$$.dirty[0]&1&&t(14,f=JSON.stringify(o)),n.$$.dirty[0]&6&&!c&&(Z=r==null?void 0:r.backups)!=null&&Z.cron&&(ai("backups.cron"),t(1,r.backups.cron="",r)),n.$$.dirty[0]&16386&&t(9,i=f!=JSON.stringify(r))},[o,r,c,l,a,u,d,m,_,i,s,b,S,C,f,$,T,M,O,D,L,P,N,F,R,q,H,W,X,J]}class f8 extends ge{constructor(e){super(),_e(this,e,u8,a8,me,{},null,[-1,-1])}}const Vt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ji("/"):!0}],c8={"/login":It({component:bD,conditions:Vt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":It({asyncComponent:()=>at(()=>import("./PageAdminRequestPasswordReset-39ec325e.js"),[],import.meta.url),conditions:Vt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":It({asyncComponent:()=>at(()=>import("./PageAdminConfirmPasswordReset-2ddacfe8.js"),[],import.meta.url),conditions:Vt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":It({component:HE,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":It({component:L$,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":It({component:OD,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":It({component:dD,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":It({component:dA,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":It({component:LA,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":It({component:GA,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":It({component:lI,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":It({component:cI,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":It({component:DI,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/backups":It({component:f8,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":It({asyncComponent:()=>at(()=>import("./PageRecordConfirmPasswordReset-c9a66dba.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":It({asyncComponent:()=>at(()=>import("./PageRecordConfirmPasswordReset-c9a66dba.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":It({asyncComponent:()=>at(()=>import("./PageRecordConfirmVerification-96a0e95d.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":It({asyncComponent:()=>at(()=>import("./PageRecordConfirmVerification-96a0e95d.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":It({asyncComponent:()=>at(()=>import("./PageRecordConfirmEmailChange-5990e635.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":It({asyncComponent:()=>at(()=>import("./PageRecordConfirmEmailChange-5990e635.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":It({asyncComponent:()=>at(()=>import("./PageOAuth2Redirect-88044748.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"*":It({component:ek,userData:{showAppSidebar:!1}})};function d8(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=m=>Math.sqrt(m)*120,easing:d=Ko}=i;return{delay:f,duration:qt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(m,_)=>{const h=_*a,b=_*u,y=m+_*e.width/t.width,S=m+_*e.height/t.height;return`transform: ${l} translate(${h}px, ${b}px) scale(${y}, ${S});`}}}function J_(n,e,t){const i=n.slice();return i[2]=e[t],i}function p8(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function m8(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function h8(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function _8(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function Z_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,m,_=x,h,b,y;function S(M,O){return M[2].type==="info"?_8:M[2].type==="success"?h8:M[2].type==="warning"?m8:p8}let C=S(e),$=C(e);function T(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),$.c(),s=E(),l=v("div"),r=U(o),a=E(),u=v("button"),u.innerHTML='',f=E(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,O){w(M,t,O),g(t,i),$.m(i,null),g(t,s),g(t,l),g(l,r),g(t,a),g(t,u),g(t,f),h=!0,b||(y=K(u,"click",et(T)),b=!0)},p(M,O){e=M,C!==(C=S(e))&&($.d(1),$=C(e),$&&($.c(),$.m(i,null))),(!h||O&1)&&o!==(o=e[2].message+"")&&se(r,o),(!h||O&1)&&Q(t,"alert-info",e[2].type=="info"),(!h||O&1)&&Q(t,"alert-success",e[2].type=="success"),(!h||O&1)&&Q(t,"alert-danger",e[2].type=="error"),(!h||O&1)&&Q(t,"alert-warning",e[2].type=="warning")},r(){m=t.getBoundingClientRect()},f(){G1(t),_(),sg(t,m)},a(){_(),_=Z1(t,m,d8,{duration:150})},i(M){h||(Qe(()=>{h&&(d&&d.end(1),c=rg(t,ot,{duration:150}),c.start())}),h=!0)},o(M){c&&c.invalidate(),d=$a(t,ta,{duration:150}),h=!1},d(M){M&&k(t),$.d(),M&&d&&d.end(),b=!1,y()}}}function g8(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=>hb(l)]}class v8 extends ge{constructor(e){super(),_e(this,e,b8,g8,me,{})}}function y8(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=U(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){w(l,e,o),g(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&se(i,t)},d(l){l&&k(e)}}}function k8(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=E(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],Q(s,"btn-loading",n[2])},m(a,u){w(a,e,u),g(e,t),w(a,i,u),w(a,s,u),g(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&&Q(s,"btn-loading",a[2])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,Ee(r)}}}function w8(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:[k8],header:[y8]},$$scope:{ctx:n}};return e=new ln({props:i}),n[6](e),e.$on("hide",n[7]),{c(){z(e.$$.fragment)},m(s,l){j(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[6](null),V(e,s)}}}function S8(n,e,t){let i;Je(n,au,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){ee[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await fn(),t(3,o=!1),v1()};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 $8 extends ge{constructor(e){super(),_e(this,e,S8,w8,me,{})}}function G_(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S;return h=new Kn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[C8]},$$scope:{ctx:n}}}),{c(){var C;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=E(),s=v("nav"),l=v("a"),l.innerHTML='',o=E(),r=v("a"),r.innerHTML='',a=E(),u=v("a"),u.innerHTML='',f=E(),c=v("figure"),d=v("img"),_=E(),z(h.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),hn(d.src,m="./images/avatars/avatar"+(((C=n[0])==null?void 0:C.avatar)||0)+".svg")||p(d,"src",m),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(C,$){w(C,e,$),g(e,t),g(e,i),g(e,s),g(s,l),g(s,o),g(s,r),g(s,a),g(s,u),g(e,f),g(e,c),g(c,d),g(c,_),j(h,c,null),b=!0,y||(S=[Me(on.call(null,t)),Me(on.call(null,l)),Me(Vn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Me(He.call(null,l,{text:"Collections",position:"right"})),Me(on.call(null,r)),Me(Vn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Me(He.call(null,r,{text:"Logs",position:"right"})),Me(on.call(null,u)),Me(Vn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Me(He.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p(C,$){var M;(!b||$&1&&!hn(d.src,m="./images/avatars/avatar"+(((M=C[0])==null?void 0:M.avatar)||0)+".svg"))&&p(d,"src",m);const T={};$&4096&&(T.$$scope={dirty:$,ctx:C}),h.$set(T)},i(C){b||(A(h.$$.fragment,C),b=!0)},o(C){I(h.$$.fragment,C),b=!1},d(C){C&&k(e),V(h),y=!1,Ee(S)}}}function C8(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` + Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;w(l,e,o),i||(s=Me(t=He.call(null,e,(r=n[8].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&jt(t.update)&&o[0]&256&&t.update.call(null,(r=l[8].data)==null?void 0:r.message)},d(l){l&&k(e),i=!1,s()}}}function o8(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){w(t,e,i)},p:x,d(t){t&&k(e)}}}function Z_(n){let e,t,i,s,l;return{c(){e=v("button"),t=v("span"),t.textContent="Reset",p(t,"class","txt"),p(e,"type","submit"),p(e,"class","btn btn-hint btn-transparent"),e.disabled=i=!n[9]||n[5]},m(o,r){w(o,e,r),g(e,t),s||(l=J(e,"click",n[28]),s=!0)},p(o,r){r[0]&544&&i!==(i=!o[9]||o[5])&&(e.disabled=i)},d(o){o&&k(e),s=!1,l()}}}function r8(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S,C,$,T,M,O,D,L;m=new Go({props:{class:"btn-sm",tooltip:"Reload backups list"}}),m.$on("refresh",n[15]);let P={};h=new XI({props:P}),n[16](h);function N(j,W){return j[6]?xI:QI}let F=N(n),R=F(n),q=n[6]&&!n[4]&&Y_(n);return{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=E(),l=v("div"),o=U(n[10]),r=E(),a=v("div"),u=v("div"),f=v("div"),c=v("span"),c.textContent="Backup and restore your PocketBase data",d=E(),H(m.$$.fragment),_=E(),H(h.$$.fragment),b=E(),y=v("hr"),S=E(),C=v("button"),$=v("span"),$.textContent="Backups options",T=E(),R.c(),M=E(),q&&q.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(c,"class","txt-xl"),p(f,"class","flex m-b-sm flex-gap-5"),p($,"class","txt"),p(C,"type","button"),p(C,"class","btn btn-secondary"),C.disabled=n[4],Q(C,"btn-loading",n[4]),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(j,W){w(j,e,W),g(e,t),g(t,i),g(t,s),g(t,l),g(l,o),w(j,r,W),w(j,a,W),g(a,u),g(u,f),g(f,c),g(f,d),V(m,f,null),g(u,_),V(h,u,null),g(u,b),g(u,y),g(u,S),g(u,C),g(C,$),g(C,T),R.m(C,null),g(u,M),q&&q.m(u,null),O=!0,D||(L=[J(C,"click",n[17]),J(u,"submit",et(n[11]))],D=!0)},p(j,W){(!O||W[0]&1024)&&se(o,j[10]);const X={};h.$set(X),F!==(F=N(j))&&(R.d(1),R=F(j),R&&(R.c(),R.m(C,null))),(!O||W[0]&16)&&(C.disabled=j[4]),(!O||W[0]&16)&&Q(C,"btn-loading",j[4]),j[6]&&!j[4]?q?(q.p(j,W),W[0]&80&&A(q,1)):(q=Y_(j),q.c(),A(q,1),q.m(u,null)):q&&(ae(),I(q,1,1,()=>{q=null}),ue())},i(j){O||(A(m.$$.fragment,j),A(h.$$.fragment,j),A(q),O=!0)},o(j){I(m.$$.fragment,j),I(h.$$.fragment,j),I(q),O=!1},d(j){j&&k(e),j&&k(r),j&&k(a),z(m),n[16](null),z(h),R.d(),q&&q.d(),D=!1,Ee(L)}}}function a8(n){let e,t,i,s;return e=new Ci({}),i=new wn({props:{$$slots:{default:[r8]},$$scope:{ctx:n}}}),{c(){H(e.$$.fragment),t=E(),H(i.$$.fragment)},m(l,o){V(e,l,o),w(l,t,o),V(i,l,o),s=!0},p(l,o){const r={};o[0]&2047|o[1]&4&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(A(e.$$.fragment,l),A(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){z(e,l),l&&k(t),z(i,l)}}}function u8(n,e,t){let i,s;Je(n,Tt,Z=>t(10,s=Z)),sn(Tt,s="Backups",s);let l,o={},r={},a=!1,u=!1,f="",c=!1,d=!1,m=!1,_=null;h();async function h(){t(4,a=!0);try{const Z=await ce.settings.getAll()||{};y(Z)}catch(Z){ce.error(Z)}t(4,a=!1)}async function b(){if(!(u||!i)){t(5,u=!0);try{const Z=await ce.settings.update(B.filterRedactedProps(r));await C(),y(Z),zt("Successfully saved application settings.")}catch(Z){ce.error(Z)}t(5,u=!1)}}function y(Z={}){t(1,r={backups:(Z==null?void 0:Z.backups)||{}}),t(2,c=r.backups.cron!=""),t(0,o=JSON.parse(JSON.stringify(r)))}function S(){t(1,r=JSON.parse(JSON.stringify(o||{backups:{}}))),t(2,c=r.backups.cron!="")}async function C(){await(l==null?void 0:l.loadBackups())}const $=()=>C();function T(Z){ee[Z?"unshift":"push"](()=>{l=Z,t(3,l)})}const M=()=>t(6,d=!d);function O(){c=this.checked,t(2,c)}function D(){r.backups.cron=this.value,t(1,r),t(2,c)}const L=()=>{t(1,r.backups.cron="0 0 * * *",r)},P=()=>{t(1,r.backups.cron="0 0 * * 0",r)},N=()=>{t(1,r.backups.cron="0 0 * * 1,3",r)},F=()=>{t(1,r.backups.cron="0 0 1 * *",r)};function R(){r.backups.cronMaxKeep=dt(this.value),t(1,r),t(2,c)}function q(Z){n.$$.not_equal(r.backups.s3,Z)&&(r.backups.s3=Z,t(1,r),t(2,c))}function j(Z){m=Z,t(7,m)}function W(Z){_=Z,t(8,_)}const X=()=>S(),K=()=>b();return n.$$.update=()=>{var Z;n.$$.dirty[0]&1&&t(14,f=JSON.stringify(o)),n.$$.dirty[0]&6&&!c&&(Z=r==null?void 0:r.backups)!=null&&Z.cron&&(ai("backups.cron"),t(1,r.backups.cron="",r)),n.$$.dirty[0]&16386&&t(9,i=f!=JSON.stringify(r))},[o,r,c,l,a,u,d,m,_,i,s,b,S,C,f,$,T,M,O,D,L,P,N,F,R,q,j,W,X,K]}class f8 extends ge{constructor(e){super(),_e(this,e,u8,a8,me,{},null,[-1,-1])}}const Vt=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ji("/"):!0}],c8={"/login":Lt({component:bD,conditions:Vt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":Lt({asyncComponent:()=>at(()=>import("./PageAdminRequestPasswordReset-de9101ef.js"),[],import.meta.url),conditions:Vt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":Lt({asyncComponent:()=>at(()=>import("./PageAdminConfirmPasswordReset-1f7edcea.js"),[],import.meta.url),conditions:Vt.concat([n=>!ce.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":Lt({component:HE,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":Lt({component:N$,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":Lt({component:OD,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":Lt({component:dD,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":Lt({component:dA,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":Lt({component:LA,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":Lt({component:GA,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":Lt({component:lI,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":Lt({component:cI,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":Lt({component:DI,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/backups":Lt({component:f8,conditions:Vt.concat([n=>ce.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":Lt({asyncComponent:()=>at(()=>import("./PageRecordConfirmPasswordReset-40637d9b.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":Lt({asyncComponent:()=>at(()=>import("./PageRecordConfirmPasswordReset-40637d9b.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":Lt({asyncComponent:()=>at(()=>import("./PageRecordConfirmVerification-e5397224.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":Lt({asyncComponent:()=>at(()=>import("./PageRecordConfirmVerification-e5397224.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":Lt({asyncComponent:()=>at(()=>import("./PageRecordConfirmEmailChange-87912255.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":Lt({asyncComponent:()=>at(()=>import("./PageRecordConfirmEmailChange-87912255.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"/auth/oauth2-redirect":Lt({asyncComponent:()=>at(()=>import("./PageOAuth2Redirect-b6ce072a.js"),[],import.meta.url),conditions:Vt,userData:{showAppSidebar:!1}}),"*":Lt({component:nk,userData:{showAppSidebar:!1}})};function d8(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=m=>Math.sqrt(m)*120,easing:d=Jo}=i;return{delay:f,duration:jt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(m,_)=>{const h=_*a,b=_*u,y=m+_*e.width/t.width,S=m+_*e.height/t.height;return`transform: ${l} translate(${h}px, ${b}px) scale(${y}, ${S});`}}}function G_(n,e,t){const i=n.slice();return i[2]=e[t],i}function p8(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function m8(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function h8(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function _8(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){w(t,e,i)},d(t){t&&k(e)}}}function X_(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,m,_=x,h,b,y;function S(M,O){return M[2].type==="info"?_8:M[2].type==="success"?h8:M[2].type==="warning"?m8:p8}let C=S(e),$=C(e);function T(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),$.c(),s=E(),l=v("div"),r=U(o),a=E(),u=v("button"),u.innerHTML='',f=E(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),Q(t,"alert-info",e[2].type=="info"),Q(t,"alert-success",e[2].type=="success"),Q(t,"alert-danger",e[2].type=="error"),Q(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,O){w(M,t,O),g(t,i),$.m(i,null),g(t,s),g(t,l),g(l,r),g(t,a),g(t,u),g(t,f),h=!0,b||(y=J(u,"click",et(T)),b=!0)},p(M,O){e=M,C!==(C=S(e))&&($.d(1),$=C(e),$&&($.c(),$.m(i,null))),(!h||O&1)&&o!==(o=e[2].message+"")&&se(r,o),(!h||O&1)&&Q(t,"alert-info",e[2].type=="info"),(!h||O&1)&&Q(t,"alert-success",e[2].type=="success"),(!h||O&1)&&Q(t,"alert-danger",e[2].type=="error"),(!h||O&1)&&Q(t,"alert-warning",e[2].type=="warning")},r(){m=t.getBoundingClientRect()},f(){Q1(t),_(),og(t,m)},a(){_(),_=X1(t,m,d8,{duration:150})},i(M){h||(Qe(()=>{h&&(d&&d.end(1),c=ug(t,ot,{duration:150}),c.start())}),h=!0)},o(M){c&&c.invalidate(),d=$a(t,ta,{duration:150}),h=!1},d(M){M&&k(t),$.d(),M&&d&&d.end(),b=!1,y()}}}function g8(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=>gb(l)]}class v8 extends ge{constructor(e){super(),_e(this,e,b8,g8,me,{})}}function y8(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=U(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){w(l,e,o),g(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&se(i,t)},d(l){l&&k(e)}}}function k8(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=E(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-transparent btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],Q(s,"btn-loading",n[2])},m(a,u){w(a,e,u),g(e,t),w(a,i,u),w(a,s,u),g(s,l),e.focus(),o||(r=[J(e,"click",n[4]),J(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&Q(s,"btn-loading",a[2])},d(a){a&&k(e),a&&k(i),a&&k(s),o=!1,Ee(r)}}}function w8(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:[k8],header:[y8]},$$scope:{ctx:n}};return e=new ln({props:i}),n[6](e),e.$on("hide",n[7]),{c(){H(e.$$.fragment)},m(s,l){V(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(A(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[6](null),z(e,s)}}}function S8(n,e,t){let i;Je(n,au,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){ee[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i!=null&&i.noCallback)&&i.noCallback(),await fn(),t(3,o=!1),k1()};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 $8 extends ge{constructor(e){super(),_e(this,e,S8,w8,me,{})}}function Q_(n){let e,t,i,s,l,o,r,a,u,f,c,d,m,_,h,b,y,S;return h=new Kn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[C8]},$$scope:{ctx:n}}}),{c(){var C;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=E(),s=v("nav"),l=v("a"),l.innerHTML='',o=E(),r=v("a"),r.innerHTML='',a=E(),u=v("a"),u.innerHTML='',f=E(),c=v("figure"),d=v("img"),_=E(),H(h.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),hn(d.src,m="./images/avatars/avatar"+(((C=n[0])==null?void 0:C.avatar)||0)+".svg")||p(d,"src",m),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(C,$){w(C,e,$),g(e,t),g(e,i),g(e,s),g(s,l),g(s,o),g(s,r),g(s,a),g(s,u),g(e,f),g(e,c),g(c,d),g(c,_),V(h,c,null),b=!0,y||(S=[Me(on.call(null,t)),Me(on.call(null,l)),Me(Vn.call(null,l,{path:"/collections/?.*",className:"current-route"})),Me(He.call(null,l,{text:"Collections",position:"right"})),Me(on.call(null,r)),Me(Vn.call(null,r,{path:"/logs/?.*",className:"current-route"})),Me(He.call(null,r,{text:"Logs",position:"right"})),Me(on.call(null,u)),Me(Vn.call(null,u,{path:"/settings/?.*",className:"current-route"})),Me(He.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p(C,$){var M;(!b||$&1&&!hn(d.src,m="./images/avatars/avatar"+(((M=C[0])==null?void 0:M.avatar)||0)+".svg"))&&p(d,"src",m);const T={};$&4096&&(T.$$scope={dirty:$,ctx:C}),h.$set(T)},i(C){b||(A(h.$$.fragment,C),b=!0)},o(C){I(h.$$.fragment,C),b=!1},d(C){C&&k(e),z(h),y=!1,Ee(S)}}}function C8(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` Manage admins`,t=E(),i=v("hr"),s=E(),l=v("button"),l.innerHTML=` - Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),o||(r=[Me(on.call(null,e)),K(l,"click",n[7])],o=!0)},p:x,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,Ee(r)}}}function X_(n){let e,t,i;return t=new pu({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:B.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=v("div"),z(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(s,l){w(s,e,l),j(t,e,null),i=!0},p:x,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),V(t)}}}function T8(n){var b;let e,t,i,s,l,o,r,a,u,f,c,d,m;document.title=e=B.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let _=((b=n[0])==null?void 0:b.id)&&n[1]&&G_(n);o=new u0({props:{routes:c8}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new v8({}),f=new $8({});let h=n[1]&&!n[2]&&X_(n);return{c(){t=E(),i=v("div"),_&&_.c(),s=E(),l=v("div"),z(o.$$.fragment),r=E(),z(a.$$.fragment),u=E(),z(f.$$.fragment),c=E(),h&&h.c(),d=ye(),p(l,"class","app-body"),p(i,"class","app-layout")},m(y,S){w(y,t,S),w(y,i,S),_&&_.m(i,null),g(i,s),g(i,l),j(o,l,null),g(l,r),j(a,l,null),w(y,u,S),j(f,y,S),w(y,c,S),h&&h.m(y,S),w(y,d,S),m=!0},p(y,[S]){var C;(!m||S&24)&&e!==(e=B.joinNonEmpty([y[4],y[3],"PocketBase"]," - "))&&(document.title=e),(C=y[0])!=null&&C.id&&y[1]?_?(_.p(y,S),S&3&&A(_,1)):(_=G_(y),_.c(),A(_,1),_.m(i,s)):_&&(ae(),I(_,1,1,()=>{_=null}),ue()),y[1]&&!y[2]?h?(h.p(y,S),S&6&&A(h,1)):(h=X_(y),h.c(),A(h,1),h.m(d.parentNode,d)):h&&(ae(),I(h,1,1,()=>{h=null}),ue())},i(y){m||(A(_),A(o.$$.fragment,y),A(a.$$.fragment,y),A(f.$$.fragment,y),A(h),m=!0)},o(y){I(_),I(o.$$.fragment,y),I(a.$$.fragment,y),I(f.$$.fragment,y),I(h),m=!1},d(y){y&&k(t),y&&k(i),_&&_.d(),V(o),V(a),y&&k(u),V(f,y),y&&k(c),h&&h.d(y),y&&k(d)}}}function M8(n,e,t){let i,s,l,o;Je(n,As,h=>t(10,i=h)),Je(n,So,h=>t(3,s=h)),Je(n,Ra,h=>t(0,l=h)),Je(n,Tt,h=>t(4,o=h));let r,a=!1,u=!1;function f(h){var b,y,S,C;((b=h==null?void 0:h.detail)==null?void 0:b.location)!==r&&(t(1,a=!!((S=(y=h==null?void 0:h.detail)==null?void 0:y.userData)!=null&&S.showAppSidebar)),r=(C=h==null?void 0:h.detail)==null?void 0:C.location,sn(Tt,o="",o),en({}),v1())}function c(){ji("/")}async function d(){var h,b;if(l!=null&&l.id)try{const y=await ce.settings.getAll({$cancelKey:"initialAppSettings"});sn(So,s=((h=y==null?void 0:y.meta)==null?void 0:h.appName)||"",s),sn(As,i=!!((b=y==null?void 0:y.meta)!=null&&b.hideControls),i)}catch(y){y!=null&&y.isAbort||console.warn("Failed to load app settings.",y)}}function m(){ce.logout()}const _=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&d()},[l,a,u,s,o,f,c,m,_]}class O8 extends ge{constructor(e){super(),_e(this,e,M8,T8,me,{})}}new O8({target:document.getElementById("app")});export{Ee as A,zt as B,B as C,ji as D,ye as E,gb as F,mg as G,Gt as H,Je as I,ci as J,$t as K,ee as L,g1 as M,bt as N,zo as O,as as P,Bt as Q,mt as R,ge as S,yn as T,zr as U,I as a,E as b,z as c,V as d,v as e,p as f,w as g,g as h,_e as i,Me as j,ae as k,on as l,j as m,ue as n,k as o,ce as p,pe as q,Q as r,me as s,A as t,K as u,et as v,U as w,se as x,x as y,re 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){w(a,e,u),w(a,t,u),w(a,i,u),w(a,s,u),w(a,l,u),o||(r=[Me(on.call(null,e)),J(l,"click",n[7])],o=!0)},p:x,d(a){a&&k(e),a&&k(t),a&&k(i),a&&k(s),a&&k(l),o=!1,Ee(r)}}}function x_(n){let e,t,i;return t=new pu({props:{scriptSrc:"./libs/tinymce/tinymce.min.js",conf:B.defaultEditorOptions()}}),t.$on("init",n[8]),{c(){e=v("div"),H(t.$$.fragment),p(e,"class","tinymce-preloader hidden")},m(s,l){w(s,e,l),V(t,e,null),i=!0},p:x,i(s){i||(A(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&k(e),z(t)}}}function T8(n){var b;let e,t,i,s,l,o,r,a,u,f,c,d,m;document.title=e=B.joinNonEmpty([n[4],n[3],"PocketBase"]," - ");let _=((b=n[0])==null?void 0:b.id)&&n[1]&&Q_(n);o=new c0({props:{routes:c8}}),o.$on("routeLoading",n[5]),o.$on("conditionsFailed",n[6]),a=new v8({}),f=new $8({});let h=n[1]&&!n[2]&&x_(n);return{c(){t=E(),i=v("div"),_&&_.c(),s=E(),l=v("div"),H(o.$$.fragment),r=E(),H(a.$$.fragment),u=E(),H(f.$$.fragment),c=E(),h&&h.c(),d=ye(),p(l,"class","app-body"),p(i,"class","app-layout")},m(y,S){w(y,t,S),w(y,i,S),_&&_.m(i,null),g(i,s),g(i,l),V(o,l,null),g(l,r),V(a,l,null),w(y,u,S),V(f,y,S),w(y,c,S),h&&h.m(y,S),w(y,d,S),m=!0},p(y,[S]){var C;(!m||S&24)&&e!==(e=B.joinNonEmpty([y[4],y[3],"PocketBase"]," - "))&&(document.title=e),(C=y[0])!=null&&C.id&&y[1]?_?(_.p(y,S),S&3&&A(_,1)):(_=Q_(y),_.c(),A(_,1),_.m(i,s)):_&&(ae(),I(_,1,1,()=>{_=null}),ue()),y[1]&&!y[2]?h?(h.p(y,S),S&6&&A(h,1)):(h=x_(y),h.c(),A(h,1),h.m(d.parentNode,d)):h&&(ae(),I(h,1,1,()=>{h=null}),ue())},i(y){m||(A(_),A(o.$$.fragment,y),A(a.$$.fragment,y),A(f.$$.fragment,y),A(h),m=!0)},o(y){I(_),I(o.$$.fragment,y),I(a.$$.fragment,y),I(f.$$.fragment,y),I(h),m=!1},d(y){y&&k(t),y&&k(i),_&&_.d(),z(o),z(a),y&&k(u),z(f,y),y&&k(c),h&&h.d(y),y&&k(d)}}}function M8(n,e,t){let i,s,l,o;Je(n,As,h=>t(10,i=h)),Je(n,$o,h=>t(3,s=h)),Je(n,Ra,h=>t(0,l=h)),Je(n,Tt,h=>t(4,o=h));let r,a=!1,u=!1;function f(h){var b,y,S,C;((b=h==null?void 0:h.detail)==null?void 0:b.location)!==r&&(t(1,a=!!((S=(y=h==null?void 0:h.detail)==null?void 0:y.userData)!=null&&S.showAppSidebar)),r=(C=h==null?void 0:h.detail)==null?void 0:C.location,sn(Tt,o="",o),en({}),k1())}function c(){ji("/")}async function d(){var h,b;if(l!=null&&l.id)try{const y=await ce.settings.getAll({$cancelKey:"initialAppSettings"});sn($o,s=((h=y==null?void 0:y.meta)==null?void 0:h.appName)||"",s),sn(As,i=!!((b=y==null?void 0:y.meta)!=null&&b.hideControls),i)}catch(y){y!=null&&y.isAbort||console.warn("Failed to load app settings.",y)}}function m(){ce.logout()}const _=()=>{t(2,u=!0)};return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&d()},[l,a,u,s,o,f,c,m,_]}class O8 extends ge{constructor(e){super(),_e(this,e,M8,T8,me,{})}}new O8({target:document.getElementById("app")});export{Ee as A,zt as B,B as C,ji as D,ye as E,vb as F,_g as G,Gt as H,Je as I,ci as J,$t as K,ee as L,v1 as M,bt as N,Ho as O,as as P,Bt as Q,mt as R,ge as S,yn as T,zr as U,I as a,E as b,H as c,z as d,v as e,p as f,w as g,g as h,_e as i,Me as j,ae as k,on as l,V as m,ue as n,k as o,ce as p,pe as q,Q as r,me as s,A as t,J as u,et as v,U as w,se as x,x as y,re as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index f50bf82c..27306453 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -45,7 +45,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/package-lock.json b/ui/package-lock.json index 4f572998..313a7433 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -21,7 +21,7 @@ "chart.js": "^3.7.1", "chartjs-adapter-luxon": "^1.2.0", "luxon": "^2.3.2", - "pocketbase": "^0.15.0", + "pocketbase": "^0.16.0-rc1", "prismjs": "^1.28.0", "sass": "^1.45.0", "svelte": "^3.44.0", @@ -961,9 +961,9 @@ } }, "node_modules/pocketbase": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.15.3.tgz", - "integrity": "sha512-sjM0XO4wHUlVZs94VhRJi4FeYtbLqvxFbRDJlfjFb/4FkxypbGwxLM4HDAEr8q6jdreuxAM1/n/b5HB1GjQ1Vg==", + "version": "0.16.0-rc1", + "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.16.0-rc1.tgz", + "integrity": "sha512-eahSVSkq9iUInAEVQRcwAKwVavn4LI5TNBc+JEyN/LJsPUzro2ZYz2KTixQYb3CQZHw3JSctHE0ksQiKH0Hkyw==", "dev": true }, "node_modules/postcss": { @@ -1828,9 +1828,9 @@ "dev": true }, "pocketbase": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.15.3.tgz", - "integrity": "sha512-sjM0XO4wHUlVZs94VhRJi4FeYtbLqvxFbRDJlfjFb/4FkxypbGwxLM4HDAEr8q6jdreuxAM1/n/b5HB1GjQ1Vg==", + "version": "0.16.0-rc1", + "resolved": "https://registry.npmjs.org/pocketbase/-/pocketbase-0.16.0-rc1.tgz", + "integrity": "sha512-eahSVSkq9iUInAEVQRcwAKwVavn4LI5TNBc+JEyN/LJsPUzro2ZYz2KTixQYb3CQZHw3JSctHE0ksQiKH0Hkyw==", "dev": true }, "postcss": { diff --git a/ui/package.json b/ui/package.json index 3de6a3a6..8d2496d1 100644 --- a/ui/package.json +++ b/ui/package.json @@ -28,7 +28,7 @@ "chart.js": "^3.7.1", "chartjs-adapter-luxon": "^1.2.0", "luxon": "^2.3.2", - "pocketbase": "^0.15.0", + "pocketbase": "^0.16.0-rc1", "prismjs": "^1.28.0", "sass": "^1.45.0", "svelte": "^3.44.0", diff --git a/ui/src/components/records/RecordsPicker.svelte b/ui/src/components/records/RecordsPicker.svelte index f2a0f103..6a557025 100644 --- a/ui/src/components/records/RecordsPicker.svelte +++ b/ui/src/components/records/RecordsPicker.svelte @@ -13,7 +13,7 @@ const dispatch = createEventDispatcher(); const uniqueId = "picker_" + CommonHelper.randomString(5); - const batchSize = 100; + const batchSize = 50; export let value; export let field; @@ -24,7 +24,7 @@ let list = []; let selected = []; let currentPage = 1; - let totalItems = 0; + let lastItemsCount = 0; let isLoadingList = false; let isLoadingSelected = false; @@ -36,13 +36,13 @@ $: collection = $collections.find((c) => c.id == collectionId) || null; - $: if (typeof filter !== "undefined" && !isLoadingSelected && pickerPanel?.isActive()) { - loadList(true); // reset list on filter or list change + $: if (typeof filter !== "undefined" && pickerPanel?.isActive()) { + loadList(true); // reset list on filter change } $: isLoading = isLoadingList || isLoadingSelected; - $: canLoadMore = totalItems > list.length; + $: canLoadMore = lastItemsCount == batchSize; $: canSelectMore = maxSelect === null || maxSelect > selected.length; @@ -106,11 +106,14 @@ // add the selected models to the list (if not already) list = CommonHelper.filterDuplicatesByKey(selected.concat(list)); } - } catch (err) { - ApiClient.error(err); - } - isLoadingSelected = false; + isLoadingSelected = false; + } catch (err) { + if (!err.isAbort) { + ApiClient.error(err); + isLoadingSelected = false; + } + } } async function loadList(reset = false) { @@ -137,17 +140,21 @@ const result = await ApiClient.collection(collectionId).getList(page, batchSize, { filter: CommonHelper.normalizeSearchFilter(filter, fallbackSearchFields), sort: !collection?.$isView ? "-created" : "", + skipTotal: 1, $cancelKey: uniqueId + "loadList", }); list = CommonHelper.filterDuplicatesByKey(list.concat(result.items)); currentPage = result.page; - totalItems = result.totalItems; - } catch (err) { - ApiClient.error(err); - } + lastItemsCount = result.items.length; - isLoadingList = false; + isLoadingList = false; + } catch (err) { + if (!err.isAbort) { + ApiClient.error(err); + isLoadingList = false; + } + } } $: isSelected = function (record) { @@ -260,21 +267,25 @@ {/if} {:else} -
    - {#if isLoading} -
    - -
    - {:else} + {#if !isLoading} +
    No records found. {#if filter?.length} {/if} - {/if} -
    +
    + {/if} {/each} + + {#if isLoading} +
    +
    + +
    +
    + {/if}