diff --git a/ui/dist/assets/AuthMethodsDocs.c1281d2c.js b/ui/dist/assets/AuthMethodsDocs.6fc389af.js similarity index 98% rename from ui/dist/assets/AuthMethodsDocs.c1281d2c.js rename to ui/dist/assets/AuthMethodsDocs.6fc389af.js index 5d284d07..1fd71d58 100644 --- a/ui/dist/assets/AuthMethodsDocs.c1281d2c.js +++ b/ui/dist/assets/AuthMethodsDocs.6fc389af.js @@ -1,4 +1,4 @@ -import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n,m as me,x as G,P as re,Q as we,k as ve,R as Ce,n as Pe,t as J,a as Y,o as _,d as pe,L as Me,C as Se,p as $e,r as H,u as je,O as Ae}from"./index.be8ffbe5.js";import{S as Be}from"./SdkTabs.8f55857f.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(m,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(J(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,K=a[0].name+"",U,R,q,P,D,j,W,M,N,X,Q,A,Z,V,y=a[0].name+"",I,x,L,B,E,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` +import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n,m as me,x as G,P as re,Q as we,k as ve,R as Ce,n as Pe,t as J,a as Y,o as _,d as pe,L as Me,C as Se,p as $e,r as H,u as je,O as Ae}from"./index.86238c7e.js";import{S as Be}from"./SdkTabs.c9d3b27f.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(m,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(J(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,K=a[0].name+"",U,R,q,P,D,j,W,M,N,X,Q,A,Z,V,y=a[0].name+"",I,x,L,B,E,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/AuthRefreshDocs.9e6993e7.js b/ui/dist/assets/AuthRefreshDocs.c793266d.js similarity index 98% rename from ui/dist/assets/AuthRefreshDocs.9e6993e7.js rename to ui/dist/assets/AuthRefreshDocs.c793266d.js index 4393fd7a..b106dc77 100644 --- a/ui/dist/assets/AuthRefreshDocs.9e6993e7.js +++ b/ui/dist/assets/AuthRefreshDocs.c793266d.js @@ -1,4 +1,4 @@ -import{S as Ne,i as Ue,s as je,O as ze,e as s,w as k,b as p,c as se,f as b,g as c,h as o,m as ne,x as re,P as Oe,Q as Ie,k as Je,R as Ke,n as Qe,t as U,a as j,o as d,d as ie,L as xe,C as Fe,p as We,r as I,u as Ge}from"./index.be8ffbe5.js";import{S as Xe}from"./SdkTabs.8f55857f.js";function He(r,l,a){const n=r.slice();return n[5]=l[a],n}function Le(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ee(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"),I(a,"active",l[1]===l[5].code),this.first=a},m(g,w){c(g,a,w),o(a,m),o(a,_),i||(f=Ge(a,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&I(a,"active",l[1]===l[5].code)},d(g){g&&d(a),i=!1,f()}}}function Ve(r,l){let a,n,m,_;return n=new ze({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),se(n.$$.fragment),m=p(),b(a,"class","tab-item"),I(a,"active",l[1]===l[5].code),this.first=a},m(i,f){c(i,a,f),ne(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)&&I(a,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(a),ie(n)}}}function Ye(r){var Be,Me;let l,a,n=r[0].name+"",m,_,i,f,v,g,w,B,J,S,L,ce,E,M,de,K,V=r[0].name+"",Q,ue,pe,z,x,q,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,D,ae,R,O,$=[],Te=new Map,Ce,F,y=[],Re=new Map,A;g=new Xe({props:{js:` +import{S as Ne,i as Ue,s as je,O as ze,e as s,w as k,b as p,c as se,f as b,g as c,h as o,m as ne,x as re,P as Oe,Q as Ie,k as Je,R as Ke,n as Qe,t as U,a as j,o as d,d as ie,L as xe,C as Fe,p as We,r as I,u as Ge}from"./index.86238c7e.js";import{S as Xe}from"./SdkTabs.c9d3b27f.js";function He(r,l,a){const n=r.slice();return n[5]=l[a],n}function Le(r,l,a){const n=r.slice();return n[5]=l[a],n}function Ee(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"),I(a,"active",l[1]===l[5].code),this.first=a},m(g,w){c(g,a,w),o(a,m),o(a,_),i||(f=Ge(a,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&I(a,"active",l[1]===l[5].code)},d(g){g&&d(a),i=!1,f()}}}function Ve(r,l){let a,n,m,_;return n=new ze({props:{content:l[5].body}}),{key:r,first:null,c(){a=s("div"),se(n.$$.fragment),m=p(),b(a,"class","tab-item"),I(a,"active",l[1]===l[5].code),this.first=a},m(i,f){c(i,a,f),ne(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)&&I(a,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(a),ie(n)}}}function Ye(r){var Be,Me;let l,a,n=r[0].name+"",m,_,i,f,v,g,w,B,J,S,L,ce,E,M,de,K,V=r[0].name+"",Q,ue,pe,z,x,q,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,D,ae,R,O,$=[],Te=new Map,Ce,F,y=[],Re=new Map,A;g=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs.9d132f74.js b/ui/dist/assets/AuthWithOAuth2Docs.198dc925.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs.9d132f74.js rename to ui/dist/assets/AuthWithOAuth2Docs.198dc925.js index d6756901..9b4e9744 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs.9d132f74.js +++ b/ui/dist/assets/AuthWithOAuth2Docs.198dc925.js @@ -1,4 +1,4 @@ -import{S as je,i as He,s as Je,O as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,P as Ue,Q as Ne,k as Qe,R as ze,n as Ke,t as j,a as H,o as c,d as ue,L as Ye,C as Ve,p as Ge,r as J,u as Xe}from"./index.be8ffbe5.js";import{S as Ze}from"./SdkTabs.8f55857f.js";function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var Ie,qe;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,F,pe,x,D,he,Q,M=i[0].name+"",z,be,K,I,Y,q,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,L,ie,A,U,S=[],Ae=new Map,Ee,V,w=[],Te=new Map,T;k=new Ze({props:{js:` +import{S as je,i as He,s as Je,O as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,P as Ue,Q as Ne,k as Qe,R as ze,n as Ke,t as j,a as H,o as c,d as ue,L as Ye,C as Ve,p as Ge,r as J,u as Xe}from"./index.86238c7e.js";import{S as Ze}from"./SdkTabs.c9d3b27f.js";function Be(i,l,o){const n=i.slice();return n[5]=l[o],n}function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var Ie,qe;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,F,pe,x,D,he,Q,M=i[0].name+"",z,be,K,I,Y,q,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,L,ie,A,U,S=[],Ae=new Map,Ee,V,w=[],Te=new Map,T;k=new Ze({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/AuthWithPasswordDocs.8731404d.js b/ui/dist/assets/AuthWithPasswordDocs.c60c1c6d.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs.8731404d.js rename to ui/dist/assets/AuthWithPasswordDocs.c60c1c6d.js index 21b5e693..5a1d36e5 100644 --- a/ui/dist/assets/AuthWithPasswordDocs.8731404d.js +++ b/ui/dist/assets/AuthWithPasswordDocs.c60c1c6d.js @@ -1,4 +1,4 @@ -import{S as Se,i as ve,s as we,O as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,P as ce,Q as ye,k as ge,R as Pe,n as Re,t as tt,a as et,o as c,d as Ut,L as $e,C as de,p as Ce,r as lt,u as Oe}from"./index.be8ffbe5.js";import{S as Ae}from"./SdkTabs.8f55857f.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,I,Et,nt,Z=n[0].name+"",it,Lt,rt,N,ct,M,dt,Wt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,L,wt,It,yt,Nt,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,W,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` +import{S as Se,i as ve,s as we,O as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,P as ce,Q as ye,k as ge,R as Pe,n as Re,t as tt,a as et,o as c,d as Ut,L as $e,C as de,p as Ce,r as lt,u as Oe}from"./index.86238c7e.js";import{S as Ae}from"./SdkTabs.c9d3b27f.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,I,Et,nt,Z=n[0].name+"",it,Lt,rt,N,ct,M,dt,Wt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,L,wt,It,yt,Nt,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,W,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); diff --git a/ui/dist/assets/CodeEditor.244d40d4.js b/ui/dist/assets/CodeEditor.4d167f17.js similarity index 99% rename from ui/dist/assets/CodeEditor.244d40d4.js rename to ui/dist/assets/CodeEditor.4d167f17.js index 75e58d3f..877419af 100644 --- a/ui/dist/assets/CodeEditor.244d40d4.js +++ b/ui/dist/assets/CodeEditor.4d167f17.js @@ -1,4 +1,4 @@ -import{S as me,i as Te,s as Se,e as be,f as Pe,T as SO,g as Re,y as bO,o as ke,K as xe,M as Xe,N as ye}from"./index.be8ffbe5.js";import{P as Ze,N as We,u as je,D as we,v as lO,T as Y,I as KO,w as QO,x as o,y as _e,L as cO,z as uO,A as V,B as dO,F as HO,G as hO,H as z,J as ve,K as qe,E as X,M as q,O as ze,Q as Ge,R as T,U as Ce,a as w,h as Ue,b as Ye,c as Ve,d as Ee,e as Ie,s as Ae,f as Ne,g as De,i as Le,r as Fe,j as Je,k as Me,l as Be,m as Ke,n as He,o as Ot,p as et,q as tt,t as PO,C as G}from"./index.9c8b95cd.js";class N{constructor(O,e,a,i,r,s,n,Q,c,u=0,l){this.p=O,this.stack=e,this.state=a,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=Q,this.curContext=c,this.lookAhead=u,this.parent=l}toString(){return`[${this.stack.filter((O,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,e,a=0){let i=O.parser.context;return new N(O,[],e,a,a,0,[],0,i?new RO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let e=O>>19,a=O&65535,{parser:i}=this.p,r=i.dynamicPrecedence(a);if(r&&(this.score+=r),e==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),as;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,e,a,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(e==a)return;if(s.buffer[n-2]>=e){s.buffer[n-2]=a;return}}}if(!r||this.pos==a)this.buffer.push(O,e,a,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>a;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=e,this.buffer[s+2]=a,this.buffer[s+3]=i}}shift(O,e,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if((O&262144)==0){let r=O,{parser:s}=this.p;(a>this.pos||e<=s.maxNode)&&(this.pos=a,s.stateFlag(r,1)||(this.reducePos=a)),this.pushState(r,i),this.shiftContext(e,i),e<=s.maxNode&&this.buffer.push(e,i,a,4)}else this.pos=a,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,a,4)}apply(O,e,a){O&65536?this.reduce(O):this.shift(O,e,a)}useNode(O,e){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(e,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,e=O.buffer.length;for(;e>0&&O.buffer[e-2]>O.reducePos;)e-=4;let a=O.buffer.slice(e),i=O.bufferBase+e;for(;O&&i==O.bufferBase;)O=O.parent;return new N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,e){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,e,4),this.storeNode(0,this.pos,e,a?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(O){for(let e=new at(this);;){let a=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,O);if((a&65536)==0)return!0;if(a==0)return!1;e.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;rQ&1&&n==s)||i.push(e[r],s)}e=i}let a=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-a*3;if(r<0||e.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RO{constructor(O,e){this.tracker=O,this.context=e,this.hash=O.strict?O.hash(e):0}}var kO;(function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"})(kO||(kO={}));class at{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let e=O&65535,a=O>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class D{constructor(O,e,a){this.stack=O,this.pos=e,this.index=a,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,e=O.bufferBase+O.buffer.length){return new D(O,e,e-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new D(this.stack,this.pos,this.index)}}class E{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const xO=new E;class it{constructor(O,e){this.input=O,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=xO,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(O,e){let a=this.range,i=this.rangeIndex,r=this.pos+O;for(;ra.to:r>=a.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-a.to,a=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,e.from);return this.end}peek(O){let e=this.chunkOff+O,a,i;if(e>=0&&e=this.chunk2Pos&&an.to&&(this.chunk2=this.chunk2.slice(0,n.to-a)),i=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),i}acceptToken(O,e=0){let a=e?this.resolveOffset(e,-1):this.pos;if(a==null||a=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,e){if(e?(this.token=e,e.start=O,e.lookAhead=O+1,e.value=e.extended=-1):this.token=xO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,e-this.chunkPos);if(O>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,e-this.chunk2Pos);if(O>=this.range.from&&e<=this.range.to)return this.input.read(O,e);let a="";for(let i of this.ranges){if(i.from>=e)break;i.to>O&&(a+=this.input.read(Math.max(i.from,O),Math.min(i.to,e)))}return a}}class I{constructor(O,e){this.data=O,this.id=e}token(O,e){rt(this.data,O,e,this.id)}}I.prototype.contextual=I.prototype.fallback=I.prototype.extend=!1;class b{constructor(O,e={}){this.token=O,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function rt(t,O,e,a){let i=0,r=1<0){let $=t[h];if(n.allows($)&&(O.token.value==-1||O.token.value==$||s.overrides($,O.token.value))){O.acceptToken($);break}}let c=O.next,u=0,l=t[i+2];if(O.next<0&&l>u&&t[Q+l*3-3]==65535){i=t[Q+l*3-1];continue O}for(;u>1,$=Q+h+(h<<1),p=t[$],P=t[$+1];if(c=P)u=h+1;else{i=t[$+2],O.advance();continue O}}break}}function C(t,O=Uint16Array){if(typeof t!="string")return t;let e=null;for(let a=0,i=0;a=92&&s--,s>=34&&s--;let Q=s-32;if(Q>=46&&(Q-=46,n=!0),r+=Q,n)break;r*=46}e?e[i++]=r:e=new O(r)}return e}const S=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let B=null;var XO;(function(t){t[t.Margin=25]="Margin"})(XO||(XO={}));function yO(t,O,e){let a=t.cursor(KO.IncludeAnonymous);for(a.moveTo(O);;)if(!(e<0?a.childBefore(O):a.childAfter(O)))for(;;){if((e<0?a.toO)&&!a.type.isError)return e<0?Math.max(0,Math.min(a.to-1,O-25)):Math.min(t.length,Math.max(a.from+1,O+25));if(e<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return e<0?0:t.length}}class st{constructor(O,e){this.fragments=O,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?yO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?yO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=s,null;if(r instanceof Y){if(s==O){if(s=Math.max(this.safeFrom,O)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+r.length}}}class nt{constructor(O,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(a=>new E)}getActions(O){let e=0,a=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,Q=0;for(let c=0;cl.end+25&&(Q=Math.max(l.lookAhead,Q)),l.value!=0)){let h=e;if(l.extended>-1&&(e=this.addActions(O,l.extended,l.end,e)),e=this.addActions(O,l.value,l.end,e),!u.extend&&(a=l,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return Q&&O.setLookAhead(Q),!a&&O.pos==this.stream.end&&(a=new E,a.value=O.p.parser.eofTerm,a.start=a.end=O.pos,e=this.addActions(O,a.value,a.end,e)),this.mainToken=a,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let e=new E,{pos:a,p:i}=O;return e.start=a,e.end=Math.min(a+1,i.stream.end),e.value=a==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(O,e,a){let i=this.stream.clipPos(a.pos);if(e.token(this.stream.reset(i,O),a),O.value>-1){let{parser:r}=a.p;for(let s=0;s=0&&a.p.parser.dialect.allows(n>>1)){(n&1)==0?O.value=n>>1:O.extended=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,e,a,i){for(let r=0;rO.bufferLength*4?new st(a,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,e=this.minStackPos,a=this.stacks=[],i,r;for(let s=0;se)a.push(n);else{if(this.advanceStack(n,a,O))continue;{i||(i=[],r=[]),i.push(n);let Q=this.tokens.getMainToken(n);r.push(Q.value,Q.end)}}break}}if(!a.length){let s=i&&Qt(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw S&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,a);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(a.length>s)for(a.sort((n,Q)=>Q.score-n.score);a.length>s;)a.pop();a.some(n=>n.reducePos>e)&&this.recovering--}else if(a.length>1){O:for(let s=0;s500&&c.buffer.length>500)if((n.score-c.score||n.buffer.length-c.buffer.length)>0)a.splice(Q--,1);else{a.splice(s--,1);continue O}}}}this.minStackPos=a[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let c=O.curContext&&O.curContext.tracker.strict,u=c?O.curContext.hash:0;for(let l=this.fragments.nodeAt(i);l;){let h=this.parser.nodeSet.types[l.type.id]==l.type?r.getGoto(O.state,l.type.id):-1;if(h>-1&&l.length&&(!c||(l.prop(lO.contextHash)||0)==u))return O.useNode(l,h),S&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(l.type.id)})`),!0;if(!(l instanceof Y)||l.children.length==0||l.positions[0]>0)break;let $=l.children[0];if($ instanceof Y&&l.positions[0]==0)l=$;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),S&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let Q=this.tokens.getActions(O);for(let c=0;ci?e.push(p):a.push(p)}return!1}advanceFully(O,e){let a=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>a)return WO(O,e),!0}}runRecovery(O,e,a){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),S&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,a))))continue;let l=n.split(),h=u;for(let $=0;l.forceReduce()&&$<10&&(S&&console.log(h+this.stackID(l)+" (via force-reduce)"),!this.advanceFully(l,a));$++)S&&(h=this.stackID(l)+" -> ");for(let $ of n.recoverByInsert(Q))S&&console.log(u+this.stackID($)+" (via recover-insert)"),this.advanceFully($,a);this.stream.end>n.pos?(c==n.pos&&(c++,Q=0),n.recoverByDelete(Q,c),S&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(Q)})`),WO(n,a)):(!i||i.scoret;class Oe{constructor(O){this.start=O.start,this.shift=O.shift||K,this.reduce=O.reduce||K,this.reuse=O.reuse||K,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class y extends Ze{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let e=O.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(u,Q,n[c++]);else{let l=n[c+-u];for(let h=-u;h>0;h--)r(n[c++],Q,l);c++}}}this.nodeSet=new We(e.map((n,Q)=>je.define({name:Q>=this.minRepeatTerm?void 0:n,id:Q,props:i[Q],top:a.indexOf(Q)>-1,error:Q==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(Q)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=we;let s=C(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new I(s,n):n),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,e,a){let i=new ot(this,O,e,a);for(let r of this.wrappers)i=r(i,O,e,a);return i}getGoto(O,e,a=!1){let i=this.goto;if(e>=i[0])return-1;for(let r=i[e+1];;){let s=i[r++],n=s&1,Q=i[r++];if(n&&a)return Q;for(let c=r+(s>>1);r0}validAction(O,e){if(e==this.stateSlot(O,4))return!0;for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=R(this.data,a+2);else return!1;if(e==R(this.data,a+1))return!0}}nextStates(O){let e=[];for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=R(this.data,a+2);else break;if((this.data[a+2]&1)==0){let i=this.data[a+1];e.some((r,s)=>s&1&&r==i)||e.push(this.data[a],i)}}return e}overrides(O,e){let a=jO(this.data,this.tokenPrecTable,e);return a<0||jO(this.data,this.tokenPrecTable,O){let i=O.tokenizers.find(r=>r.from==a);return i?i.to:a})),O.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((a,i)=>{let r=O.specializers.find(n=>n.from==a.external);if(!r)return a;let s=Object.assign(Object.assign({},a),{external:r.to});return e.specializers[i]=wO(s),s})),O.contextTracker&&(e.context=O.contextTracker),O.dialect&&(e.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(e.strict=O.strict),O.wrap&&(e.wrappers=e.wrappers.concat(O.wrap)),O.bufferLength!=null&&(e.bufferLength=O.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let e=this.dynamicPrecedences;return e==null?0:e[O]||0}parseDialect(O){let e=Object.keys(this.dialects),a=e.map(()=>!1);if(O)for(let r of O.split(" ")){let s=e.indexOf(r);s>=0&&(a[s]=!0)}let i=null;for(let r=0;ra)&&e.p.parser.stateFlag(e.state,2)&&(!O||O.scoret.external(e,a)<<1|O}return t.get}const ct=53,ut=1,dt=54,ht=2,$t=55,pt=3,L=4,ee=5,te=6,ae=7,ie=8,ft=9,gt=10,mt=11,H=56,Tt=12,_O=57,St=18,bt=27,Pt=30,Rt=33,kt=35,xt=0,Xt={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},yt={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},vO={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 Zt(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function re(t){return t==9||t==10||t==13||t==32}let qO=null,zO=null,GO=0;function sO(t,O){let e=t.pos+O;if(GO==e&&zO==t)return qO;let a=t.peek(O);for(;re(a);)a=t.peek(++O);let i="";for(;Zt(a);)i+=String.fromCharCode(a),a=t.peek(++O);return zO=t,GO=e,qO=i?i.toLowerCase():a==Wt||a==jt?void 0:null}const se=60,ne=62,oe=47,Wt=63,jt=33,wt=45;function CO(t,O){this.name=t,this.parent=O,this.hash=O?O.hash:0;for(let e=0;e-1?new CO(sO(a,1)||"",t):t},reduce(t,O){return O==St&&t?t.parent:t},reuse(t,O,e,a){let i=O.type.id;return i==L||i==kt?new CO(sO(a,1)||"",t):t},hash(t){return t?t.hash:0},strict:!1}),qt=new b((t,O)=>{if(t.next!=se){t.next<0&&O.context&&t.acceptToken(H);return}t.advance();let e=t.next==oe;e&&t.advance();let a=sO(t,0);if(a===void 0)return;if(!a)return t.acceptToken(e?Tt:L);let i=O.context?O.context.name:null;if(e){if(a==i)return t.acceptToken(ft);if(i&&yt[i])return t.acceptToken(H,-2);if(O.dialectEnabled(xt))return t.acceptToken(gt);for(let r=O.context;r;r=r.parent)if(r.name==a)return;t.acceptToken(mt)}else{if(a=="script")return t.acceptToken(ee);if(a=="style")return t.acceptToken(te);if(a=="textarea")return t.acceptToken(ae);if(Xt.hasOwnProperty(a))return t.acceptToken(ie);i&&vO[i]&&vO[i][a]?t.acceptToken(H,-1):t.acceptToken(L)}},{contextual:!0}),zt=new b(t=>{for(let O=0,e=0;;e++){if(t.next<0){e&&t.acceptToken(_O);break}if(t.next==wt)O++;else if(t.next==ne&&O>=2){e>3&&t.acceptToken(_O,-2);break}else O=0;t.advance()}});function $O(t,O,e){let a=2+t.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==se||r==1&&i.next==oe||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(e,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Gt=$O("script",ct,ut),Ct=$O("style",dt,ht),Ut=$O("textarea",$t,pt),Yt=QO({"Text RawText":o.content,"StartTag StartCloseTag SelfCloserEndTag EndTag SelfCloseEndTag":o.angleBracket,TagName:o.tagName,"MismatchedCloseTag/TagName":[o.tagName,o.invalid],AttributeName:o.attributeName,"AttributeValue UnquotedAttributeValue":o.attributeValue,Is:o.definitionOperator,"EntityReference CharacterReference":o.character,Comment:o.blockComment,ProcessingInst:o.processingInstruction,DoctypeDecl:o.documentMeta}),Vt=y.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DSO$tQ!bO'#DUO$yQ!bO'#DVOOOW'#Dj'#DjOOOW'#DX'#DXQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%pQ#tO,59mOOOX'#D]'#D]O%xOXO'#CwO&TOXO,59YOOOY'#D^'#D^O&]OYO'#CzO&hOYO,59YOOO['#D_'#D_O&pO[O'#C}O&{O[O,59YOOOW'#D`'#D`O'TOxO,59YO'[Q!bO'#DQOOOW,59Y,59YOOO`'#Da'#DaO'aO!rO,59nOOOW,59n,59nO'iQ!bO,59pO'nQ!bO,59qOOOW-E7V-E7VO'sQ#tO'#CqOOQO'#DY'#DYO(OQ#tO1G.uOOOX1G.u1G.uO(WQ#tO1G/POOOY1G/P1G/PO(`Q#tO1G/SOOO[1G/S1G/SO(hQ#tO1G/VOOOW1G/V1G/VO(pQ#tO1G/XOOOW1G/X1G/XOOOX-E7Z-E7ZO(xQ!bO'#CxOOOW1G.t1G.tOOOY-E7[-E7[O(}Q!bO'#C{OOO[-E7]-E7]O)SQ!bO'#DOOOOW-E7^-E7^O)XQ!bO,59lOOO`-E7_-E7_OOOW1G/Y1G/YOOOW1G/[1G/[OOOW1G/]1G/]O)^Q&jO,59]OOQO-E7W-E7WOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$qOOOW7+$s7+$sO)iQ!bO,59dO)nQ!bO,59gO)sQ!bO,59jOOOW1G/W1G/WO)xO,UO'#CtO*ZO7[O'#CtOOQO1G.w1G.wOOOW1G/O1G/OOOOW1G/R1G/ROOOW1G/U1G/UOOOO'#DZ'#DZO*lO,UO,59`OOQO,59`,59`OOOO'#D['#D[O*}O7[O,59`OOOO-E7X-E7XOOQO1G.z1G.zOOOO-E7Y-E7Y",stateData:"+h~O!]OS~OSSOTPOUQOVROWTOY]OZ[O[^O^^O_^O`^Oa^Ow^Oz_O!cZO~OdaO~OdbO~OdcO~OddO~OdeO~O!VfOPkP!YkP~O!WiOQnP!YnP~O!XlORqP!YqP~OSSOTPOUQOVROWTOXqOY]OZ[O[^O^^O_^O`^Oa^Ow^O!cZO~O!YrO~P#dO!ZsO!duO~OdvO~OdwO~OfyOj|O~OfyOj!OO~OfyOj!QO~OfyOj!SO~OfyOj!UO~O!VfOPkX!YkX~OP!WO!Y!XO~O!WiOQnX!YnX~OQ!ZO!Y!XO~O!XlORqX!YqX~OR!]O!Y!XO~O!Y!XO~P#dOd!_O~O!ZsO!d!aO~Oj!bO~Oj!cO~Og!dOfeXjeX~OfyOj!fO~OfyOj!gO~OfyOj!hO~OfyOj!iO~OfyOj!jO~Od!kO~Od!lO~Od!mO~Oj!nO~Oi!qO!_!oO!a!pO~Oj!rO~Oj!sO~Oj!tO~O_!uO`!uOa!uO!_!wO!`!uO~O_!xO`!xOa!xO!a!wO!b!xO~O_!uO`!uOa!uO!_!{O!`!uO~O_!xO`!xOa!xO!a!{O!b!xO~O`_a!cwz!c~",goto:"%o!_PPPPPPPPPPPPPPPPPP!`!fP!lPP!xPP!{#O#R#X#[#_#e#h#k#q#w!`P!`!`P#}$T$k$q$w$}%T%Z%aPPPPPPPP%gX^OX`pXUOX`pezabcde{}!P!R!TR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!TeZ!e{}!P!R!TQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:66,context:vt,nodeProps:[["closedBy",-11,1,2,3,4,5,6,7,8,9,10,11,"EndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,38,39,40,41,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag"]],propSources:[Yt],skippedNodes:[0],repeatNodeCount:9,tokenData:"!#b!aR!WOX$kXY)sYZ)sZ]$k]^)s^p$kpq)sqr$krs*zsv$kvw+dwx2yx}$k}!O3f!O!P$k!P!Q7_!Q![$k![!]8u!]!^$k!^!_>b!_!`!!p!`!a8T!a!c$k!c!}8u!}#R$k#R#S8u#S#T$k#T#o8u#o$f$k$f$g&R$g%W$k%W%o8u%o%p$k%p&a8u&a&b$k&b1p8u1p4U$k4U4d8u4d4e$k4e$IS8u$IS$I`$k$I`$Ib8u$Ib$Kh$k$Kh%#t8u%#t&/x$k&/x&Et8u&Et&FV$k&FV;'S8u;'S;:jiW!``!bpOq(kqr?Rrs'gsv(kwx(]x!a(k!a!bKj!b~(k!R?YZ!``!bpOr(krs'gsv(kwx(]x}(k}!O?{!O!f(k!f!gAR!g#W(k#W#XGz#X~(k!R@SV!``!bpOr(krs'gsv(kwx(]x}(k}!O@i!O~(k!R@rT!``!bp!cPOr(krs'gsv(kwx(]x~(k!RAYV!``!bpOr(krs'gsv(kwx(]x!q(k!q!rAo!r~(k!RAvV!``!bpOr(krs'gsv(kwx(]x!e(k!e!fB]!f~(k!RBdV!``!bpOr(krs'gsv(kwx(]x!v(k!v!wBy!w~(k!RCQV!``!bpOr(krs'gsv(kwx(]x!{(k!{!|Cg!|~(k!RCnV!``!bpOr(krs'gsv(kwx(]x!r(k!r!sDT!s~(k!RD[V!``!bpOr(krs'gsv(kwx(]x!g(k!g!hDq!h~(k!RDxW!``!bpOrDqrsEbsvDqvwEvwxFfx!`Dq!`!aGb!a~DqqEgT!bpOvEbvxEvx!`Eb!`!aFX!a~EbPEyRO!`Ev!`!aFS!a~EvPFXOzPqF`Q!bpzPOv'gx~'gaFkV!``OrFfrsEvsvFfvwEvw!`Ff!`!aGQ!a~FfaGXR!``zPOr(]sv(]w~(]!RGkT!``!bpzPOr(krs'gsv(kwx(]x~(k!RHRV!``!bpOr(krs'gsv(kwx(]x#c(k#c#dHh#d~(k!RHoV!``!bpOr(krs'gsv(kwx(]x#V(k#V#WIU#W~(k!RI]V!``!bpOr(krs'gsv(kwx(]x#h(k#h#iIr#i~(k!RIyV!``!bpOr(krs'gsv(kwx(]x#m(k#m#nJ`#n~(k!RJgV!``!bpOr(krs'gsv(kwx(]x#d(k#d#eJ|#e~(k!RKTV!``!bpOr(krs'gsv(kwx(]x#X(k#X#YDq#Y~(k!RKqW!``!bpOrKjrsLZsvKjvwLowxNPx!aKj!a!b! g!b~KjqL`T!bpOvLZvxLox!aLZ!a!bM^!b~LZPLrRO!aLo!a!bL{!b~LoPMORO!`Lo!`!aMX!a~LoPM^OwPqMcT!bpOvLZvxLox!`LZ!`!aMr!a~LZqMyQ!bpwPOv'gx~'gaNUV!``OrNPrsLosvNPvwLow!aNP!a!bNk!b~NPaNpV!``OrNPrsLosvNPvwLow!`NP!`!a! V!a~NPa! ^R!``wPOr(]sv(]w~(]!R! nW!``!bpOrKjrsLZsvKjvwLowxNPx!`Kj!`!a!!W!a~Kj!R!!aT!``!bpwPOr(krs'gsv(kwx(]x~(k!V!!{VgS^P!``!bpOr&Rrs&qsv&Rwx'rx!^&R!^!_(k!_~&R",tokenizers:[Gt,Ct,Ut,qt,zt,0,1,2,3,4,5],topRules:{Document:[0,13]},dialects:{noMatch:0},tokenPrec:476});function Et(t,O){let e=Object.create(null);for(let a of t.firstChild.getChildren("Attribute")){let i=a.getChild("AttributeName"),r=a.getChild("AttributeValue")||a.getChild("UnquotedAttributeValue");i&&(e[O.read(i.from,i.to)]=r?r.name=="AttributeValue"?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return e}function OO(t,O,e){let a;for(let i of e)if(!i.attrs||i.attrs(a||(a=Et(t.node.parent,O))))return{parser:i.parser};return null}function It(t){let O=[],e=[],a=[];for(let i of t){let r=i.tag=="script"?O:i.tag=="style"?e:i.tag=="textarea"?a:null;if(!r)throw new RangeError("Only script, style, and textarea tags can host nested parsers");r.push(i)}return _e((i,r)=>{let s=i.type.id;return s==bt?OO(i,r,O):s==Pt?OO(i,r,e):s==Rt?OO(i,r,a):null})}const At=93,UO=1,Nt=94,Dt=95,YO=2,le=[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],Lt=58,Ft=40,Qe=95,Jt=91,A=45,Mt=46,Bt=35,Kt=37;function F(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Ht(t){return t>=48&&t<=57}const Oa=new b((t,O)=>{for(let e=!1,a=0,i=0;;i++){let{next:r}=t;if(F(r)||r==A||r==Qe||e&&Ht(r))!e&&(r!=A||i>0)&&(e=!0),a===i&&r==A&&a++,t.advance();else{e&&t.acceptToken(r==Ft?Nt:a==2&&O.canShift(YO)?YO:Dt);break}}}),ea=new b(t=>{if(le.includes(t.peek(-1))){let{next:O}=t;(F(O)||O==Qe||O==Bt||O==Mt||O==Jt||O==Lt||O==A)&&t.acceptToken(At)}}),ta=new b(t=>{if(!le.includes(t.peek(-1))){let{next:O}=t;if(O==Kt&&(t.advance(),t.acceptToken(UO)),F(O)){do t.advance();while(F(t.next));t.acceptToken(UO)}}}),aa=QO({"AtKeyword import charset namespace keyframes media supports":o.definitionKeyword,"from to selector":o.keyword,NamespaceName:o.namespace,KeyframeName:o.labelName,TagName:o.tagName,ClassName:o.className,PseudoClassName:o.constant(o.className),IdName:o.labelName,"FeatureName PropertyName":o.propertyName,AttributeName:o.attributeName,NumberLiteral:o.number,KeywordQuery:o.keyword,UnaryQueryOp:o.operatorKeyword,"CallTag ValueName":o.atom,VariableName:o.variableName,Callee:o.operatorKeyword,Unit:o.unit,"UniversalSelector NestingSelector":o.definitionOperator,MatchOp:o.compareOperator,"ChildOp SiblingOp, LogicOp":o.logicOperator,BinOp:o.arithmeticOperator,Important:o.modifier,Comment:o.blockComment,ParenthesizedContent:o.special(o.name),ColorLiteral:o.color,StringLiteral:o.string,":":o.punctuation,"PseudoOp #":o.derefOperator,"; ,":o.separator,"( )":o.paren,"[ ]":o.squareBracket,"{ }":o.brace}),ia={__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},ra={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},sa={__proto__:null,not:128,only:128,from:158,to:160},na=y.deserialize({version:14,states:"7WOYQ[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO!ZQ[O'#CfO!}QXO'#CaO#UQ[O'#ChO#aQ[O'#DPO#fQ[O'#DTOOQP'#Ec'#EcO#kQdO'#DeO$VQ[O'#DrO#kQdO'#DtO$hQ[O'#DvO$sQ[O'#DyO$xQ[O'#EPO%WQ[O'#EROOQS'#Eb'#EbOOQS'#ES'#ESQYQ[OOOOQP'#Cg'#CgOOQP,59Q,59QO!ZQ[O,59QO%_Q[O'#EVO%yQWO,58{O&RQ[O,59SO#aQ[O,59kO#fQ[O,59oO%_Q[O,59sO%_Q[O,59uO%_Q[O,59vO'bQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO'iQWO,59SO'nQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO'sQ`O,59oOOQS'#Cp'#CpO#kQdO'#CqO'{QvO'#CsO)VQtO,5:POOQO'#Cx'#CxO'nQWO'#CwO)kQWO'#CyOOQS'#Ef'#EfOOQO'#Dh'#DhO)pQ[O'#DoO*OQWO'#EiO$xQ[O'#DmO*^QWO'#DpOOQO'#Ej'#EjO%|QWO,5:^O*cQpO,5:`OOQS'#Dx'#DxO*kQWO,5:bO*pQ[O,5:bOOQO'#D{'#D{O*xQWO,5:eO*}QWO,5:kO+VQWO,5:mOOQS-E8Q-E8QOOQP1G.l1G.lO+yQXO,5:qOOQO-E8T-E8TOOQS1G.g1G.gOOQP1G.n1G.nO'iQWO1G.nO'nQWO1G.nOOQP1G/V1G/VO,WQ`O1G/ZO,qQXO1G/_O-XQXO1G/aO-oQXO1G/bO.VQXO'#CdO.zQWO'#DaOOQS,59z,59zO/PQWO,59zO/XQ[O,59zO/`Q[O'#DOO/gQdO'#CoOOQP1G/Z1G/ZO#kQdO1G/ZO/nQpO,59]OOQS,59_,59_O#kQdO,59aO/vQWO1G/kOOQS,59c,59cO/{Q!bO,59eO0TQWO'#DhO0`QWO,5:TO0eQWO,5:ZO$xQ[O,5:VO$xQ[O'#EYO0mQWO,5;TO0xQWO,5:XO%_Q[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O1ZQWO1G/|O1`QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XOOQP7+$Y7+$YOOQP7+$u7+$uO#kQdO7+$uO#kQdO,59{O1nQ[O'#EXO1xQWO1G/fOOQS1G/f1G/fO1xQWO1G/fO2QQXO'#EhO2XQWO,59jO2^QtO'#ETO3RQdO'#EeO3]QWO,59ZO3bQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO3jQWO1G/PO#kQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO3oQWO,5:tOOQO-E8W-E8WO3}QXO1G/vOOQS7+%h7+%hO4UQYO'#CsO%|QWO'#EZO4^QdO,5:hOOQS,5:h,5:hO4lQpO<O!c!}$w!}#O?[#O#P$w#P#Q?g#Q#R2U#R#T$w#T#U?r#U#c$w#c#d@q#d#o$w#o#pAQ#p#q2U#q#rA]#r#sAh#s#y$w#y#z%]#z$f$w$f$g%]$g#BY$w#BY#BZ%]#BZ$IS$w$IS$I_%]$I_$I|$w$I|$JO%]$JO$JT$w$JT$JU%]$JU$KV$w$KV$KW%]$KW&FU$w&FU&FV%]&FV~$wW$zQOy%Qz~%QW%VQoWOy%Qz~%Q~%bf#T~OX%QX^&v^p%Qpq&vqy%Qz#y%Q#y#z&v#z$f%Q$f$g&v$g#BY%Q#BY#BZ&v#BZ$IS%Q$IS$I_&v$I_$I|%Q$I|$JO&v$JO$JT%Q$JT$JU&v$JU$KV%Q$KV$KW&v$KW&FU%Q&FU&FV&v&FV~%Q~&}f#T~oWOX%QX^&v^p%Qpq&vqy%Qz#y%Q#y#z&v#z$f%Q$f$g&v$g#BY%Q#BY#BZ&v#BZ$IS%Q$IS$I_&v$I_$I|%Q$I|$JO&v$JO$JT%Q$JT$JU&v$JU$KV%Q$KV$KW&v$KW&FU%Q&FU&FV&v&FV~%Q^(fSOy%Qz#]%Q#]#^(r#^~%Q^(wSoWOy%Qz#a%Q#a#b)T#b~%Q^)YSoWOy%Qz#d%Q#d#e)f#e~%Q^)kSoWOy%Qz#c%Q#c#d)w#d~%Q^)|SoWOy%Qz#f%Q#f#g*Y#g~%Q^*_SoWOy%Qz#h%Q#h#i*k#i~%Q^*pSoWOy%Qz#T%Q#T#U*|#U~%Q^+RSoWOy%Qz#b%Q#b#c+_#c~%Q^+dSoWOy%Qz#h%Q#h#i+p#i~%Q^+wQ!VUoWOy%Qz~%Q~,QUOY+}Zr+}rs,ds#O+}#O#P,i#P~+}~,iOh~~,lPO~+}_,tWtPOy%Qz!Q%Q!Q![-^![!c%Q!c!i-^!i#T%Q#T#Z-^#Z~%Q^-cWoWOy%Qz!Q%Q!Q![-{![!c%Q!c!i-{!i#T%Q#T#Z-{#Z~%Q^.QWoWOy%Qz!Q%Q!Q![.j![!c%Q!c!i.j!i#T%Q#T#Z.j#Z~%Q^.qWfUoWOy%Qz!Q%Q!Q![/Z![!c%Q!c!i/Z!i#T%Q#T#Z/Z#Z~%Q^/bWfUoWOy%Qz!Q%Q!Q![/z![!c%Q!c!i/z!i#T%Q#T#Z/z#Z~%Q^0PWoWOy%Qz!Q%Q!Q![0i![!c%Q!c!i0i!i#T%Q#T#Z0i#Z~%Q^0pWfUoWOy%Qz!Q%Q!Q![1Y![!c%Q!c!i1Y!i#T%Q#T#Z1Y#Z~%Q^1_WoWOy%Qz!Q%Q!Q![1w![!c%Q!c!i1w!i#T%Q#T#Z1w#Z~%Q^2OQfUoWOy%Qz~%QY2XSOy%Qz!_%Q!_!`2e!`~%QY2lQzQoWOy%Qz~%QX2wQXPOy%Qz~%Q~3QUOY2}Zw2}wx,dx#O2}#O#P3d#P~2}~3gPO~2}_3oQbVOy%Qz~%Q~3zOa~_4RSUPjSOy%Qz!_%Q!_!`2e!`~%Q_4fUjS!PPOy%Qz!O%Q!O!P4x!P!Q%Q!Q![7_![~%Q^4}SoWOy%Qz!Q%Q!Q![5Z![~%Q^5bWoW#ZUOy%Qz!Q%Q!Q![5Z![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%Q^6PWoWOy%Qz{%Q{|6i|}%Q}!O6i!O!Q%Q!Q![6z![~%Q^6nSoWOy%Qz!Q%Q!Q![6z![~%Q^7RSoW#ZUOy%Qz!Q%Q!Q![6z![~%Q^7fYoW#ZUOy%Qz!O%Q!O!P5Z!P!Q%Q!Q![7_![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%Q_8ZQpVOy%Qz~%Q^8fUjSOy%Qz!O%Q!O!P4x!P!Q%Q!Q![7_![~%Q_8}S#WPOy%Qz!Q%Q!Q![5Z![~%Q~9`RjSOy%Qz{9i{~%Q~9nSoWOy9iyz9zz{:o{~9i~9}ROz9zz{:W{~9z~:ZTOz9zz{:W{!P9z!P!Q:j!Q~9z~:oOR~~:tUoWOy9iyz9zz{:o{!P9i!P!Q;W!Q~9i~;_QoWR~Oy%Qz~%Q^;jY#ZUOy%Qz!O%Q!O!P5Z!P!Q%Q!Q![7_![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%QX<_S]POy%Qz![%Q![!]RUOy%Qz!c%Q!c!}>e!}#T%Q#T#o>e#o~%QX>lY!YPoWOy%Qz}%Q}!O>e!O!Q%Q!Q![>e![!c%Q!c!}>e!}#T%Q#T#o>e#o~%QX?aQxPOy%Qz~%Q^?lQvUOy%Qz~%QX?uSOy%Qz#b%Q#b#c@R#c~%QX@WSoWOy%Qz#W%Q#W#X@d#X~%QX@kQ!`PoWOy%Qz~%QX@tSOy%Qz#f%Q#f#g@d#g~%QXAVQ!RPOy%Qz~%Q_AbQ!QVOy%Qz~%QZAmS!PPOy%Qz!_%Q!_!`2e!`~%Q",tokenizers:[ea,ta,Oa,0,1,2,3],topRules:{StyleSheet:[0,4]},specialized:[{term:94,get:t=>ia[t]||-1},{term:56,get:t=>ra[t]||-1},{term:95,get:t=>sa[t]||-1}],tokenPrec:1078});let eO=null;function tO(){if(!eO&&typeof document=="object"&&document.body){let t=[];for(let O in document.body.style)/[A-Z]|^-|^(item|length)$/.test(O)||t.push(O);eO=t.sort().map(O=>({type:"property",label:O}))}return eO||[]}const VO=["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(t=>({type:"class",label:t})),EO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).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(t=>({type:"constant",label:t}))),oa=["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(t=>({type:"type",label:t})),k=/^[\w-]*/,la=t=>{let{state:O,pos:e}=t,a=z(O).resolveInner(e,-1);if(a.name=="PropertyName")return{from:a.from,options:tO(),validFor:k};if(a.name=="ValueName")return{from:a.from,options:EO,validFor:k};if(a.name=="PseudoClassName")return{from:a.from,options:VO,validFor:k};if(a.name=="TagName"){for(let{parent:s}=a;s;s=s.parent)if(s.name=="Block")return{from:a.from,options:tO(),validFor:k};return{from:a.from,options:oa,validFor:k}}if(!t.explicit)return null;let i=a.resolve(e),r=i.childBefore(e);return r&&r.name==":"&&i.name=="PseudoClassSelector"?{from:e,options:VO,validFor:k}:r&&r.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:e,options:EO,validFor:k}:i.name=="Block"?{from:e,options:tO(),validFor:k}:null},nO=cO.define({name:"css",parser:na.configure({props:[uO.add({Declaration:V()}),dO.add({Block:HO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Qa(){return new hO(nO,nO.data.of({autocomplete:la}))}const ca=1,IO=281,AO=2,ua=3,U=282,da=4,ha=283,NO=284,$a=286,pa=287,fa=5,ga=6,ma=1,Ta=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],ce=125,Sa=123,ba=59,DO=47,Pa=42,Ra=43,ka=45,xa=36,Xa=96,ya=92,Za=new Oe({start:!1,shift(t,O){return O==fa||O==ga||O==$a?t:O==pa},strict:!1}),Wa=new b((t,O)=>{let{next:e}=t;(e==ce||e==-1||O.context)&&O.canShift(NO)&&t.acceptToken(NO)},{contextual:!0,fallback:!0}),ja=new b((t,O)=>{let{next:e}=t,a;Ta.indexOf(e)>-1||e==DO&&((a=t.peek(1))==DO||a==Pa)||e!=ce&&e!=ba&&e!=-1&&!O.context&&O.canShift(IO)&&t.acceptToken(IO)},{contextual:!0}),wa=new b((t,O)=>{let{next:e}=t;if((e==Ra||e==ka)&&(t.advance(),e==t.next)){t.advance();let a=!O.context&&O.canShift(AO);t.acceptToken(a?AO:ua)}},{contextual:!0}),_a=new b(t=>{for(let O=!1,e=0;;e++){let{next:a}=t;if(a<0){e&&t.acceptToken(U);break}else if(a==Xa){e?t.acceptToken(U):t.acceptToken(ha,1);break}else if(a==Sa&&O){e==1?t.acceptToken(da,1):t.acceptToken(U,-1);break}else if(a==10&&e){t.advance(),t.acceptToken(U);break}else a==ya&&t.advance();O=a==xa,t.advance()}}),va=new b((t,O)=>{if(!(t.next!=101||!O.dialectEnabled(ma))){t.advance();for(let e=0;e<6;e++){if(t.next!="xtends".charCodeAt(e))return;t.advance()}t.next>=57&&t.next<=65||t.next>=48&&t.next<=90||t.next==95||t.next>=97&&t.next<=122||t.next>160||t.acceptToken(ca)}}),qa=QO({"get set async static":o.modifier,"for while do if else switch try catch finally return throw break continue default case":o.controlKeyword,"in of await yield void typeof delete instanceof":o.operatorKeyword,"let var const function class extends":o.definitionKeyword,"import export from":o.moduleKeyword,"with debugger as new":o.keyword,TemplateString:o.special(o.string),super:o.atom,BooleanLiteral:o.bool,this:o.self,null:o.null,Star:o.modifier,VariableName:o.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":o.function(o.variableName),VariableDefinition:o.definition(o.variableName),Label:o.labelName,PropertyName:o.propertyName,PrivatePropertyName:o.special(o.propertyName),"CallExpression/MemberExpression/PropertyName":o.function(o.propertyName),"FunctionDeclaration/VariableDefinition":o.function(o.definition(o.variableName)),"ClassDeclaration/VariableDefinition":o.definition(o.className),PropertyDefinition:o.definition(o.propertyName),PrivatePropertyDefinition:o.definition(o.special(o.propertyName)),UpdateOp:o.updateOperator,LineComment:o.lineComment,BlockComment:o.blockComment,Number:o.number,String:o.string,ArithOp:o.arithmeticOperator,LogicOp:o.logicOperator,BitOp:o.bitwiseOperator,CompareOp:o.compareOperator,RegExp:o.regexp,Equals:o.definitionOperator,Arrow:o.function(o.punctuation),": Spread":o.punctuation,"( )":o.paren,"[ ]":o.squareBracket,"{ }":o.brace,"InterpolationStart InterpolationEnd":o.special(o.brace),".":o.derefOperator,", ;":o.separator,TypeName:o.typeName,TypeDefinition:o.definition(o.typeName),"type enum interface implements namespace module declare":o.definitionKeyword,"abstract global Privacy readonly override":o.modifier,"is keyof unique infer":o.operatorKeyword,JSXAttributeValue:o.attributeValue,JSXText:o.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":o.angleBracket,"JSXIdentifier JSXNameSpacedName":o.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":o.attributeName}),za={__proto__:null,export:18,as:23,from:29,default:32,async:37,function:38,this:48,true:56,false:56,void:66,typeof:70,null:86,super:88,new:122,await:139,yield:141,delete:142,class:152,extends:154,public:197,private:197,protected:197,readonly:199,instanceof:220,in:222,const:224,import:256,keyof:307,unique:311,infer:317,is:351,abstract:371,implements:373,type:375,let:378,var:380,interface:387,enum:391,namespace:397,module:399,declare:403,global:407,for:428,of:437,while:440,with:444,do:448,if:452,else:454,switch:458,case:464,try:470,catch:474,finally:478,return:482,throw:486,break:490,continue:494,debugger:498},Ga={__proto__:null,async:109,get:111,set:113,public:161,private:161,protected:161,static:163,abstract:165,override:167,readonly:173,new:355},Ca={__proto__:null,"<":129},Ua=y.deserialize({version:14,states:"$8SO`QdOOO'QQ(C|O'#ChO'XOWO'#DVO)dQdO'#D]O)tQdO'#DhO){QdO'#DrO-xQdO'#DxOOQO'#E]'#E]O.]Q`O'#E[O.bQ`O'#E[OOQ(C['#Ef'#EfO0aQ(C|O'#ItO2wQ(C|O'#IuO3eQ`O'#EzO3jQ!bO'#FaOOQ(C['#FS'#FSO3rO#tO'#FSO4QQ&jO'#FhO5bQ`O'#FgOOQ(C['#Iu'#IuOOQ(CW'#It'#ItOOQS'#J^'#J^O5gQ`O'#HpO5lQ(ChO'#HqOOQS'#Ih'#IhOOQS'#Hr'#HrQ`QdOOO){QdO'#DjO5tQ`O'#G[O5yQ&jO'#CmO6XQ`O'#EZO6dQ`O'#EgO6iQ,UO'#FRO7TQ`O'#G[O7YQ`O'#G`O7eQ`O'#G`O7sQ`O'#GcO7sQ`O'#GdO7sQ`O'#GfO5tQ`O'#GiO8dQ`O'#GlO9rQ`O'#CdO:SQ`O'#GyO:[Q`O'#HPO:[Q`O'#HRO`QdO'#HTO:[Q`O'#HVO:[Q`O'#HYO:aQ`O'#H`O:fQ(CjO'#HfO){QdO'#HhO:qQ(CjO'#HjO:|Q(CjO'#HlO5lQ(ChO'#HnO){QdO'#DWOOOW'#Ht'#HtO;XOWO,59qOOQ(C[,59q,59qO=jQtO'#ChO=tQdO'#HuO>XQ`O'#IvO@WQtO'#IvO'dQdO'#IvO@_Q`O,59wO@uQ7[O'#DbOAnQ`O'#E]OA{Q`O'#JROBWQ`O'#JQOBWQ`O'#JQOB`Q`O,5:yOBeQ`O'#JPOBlQaO'#DyO5yQ&jO'#EZOBzQ`O'#EZOCVQpO'#FROOQ(C[,5:S,5:SOC_QdO,5:SOE]Q(C|O,5:^OEyQ`O,5:dOFdQ(ChO'#JOO7YQ`O'#I}OFkQ`O'#I}OFsQ`O,5:xOFxQ`O'#I}OGWQdO,5:vOIWQ&jO'#EWOJeQ`O,5:vOKwQ&jO'#DlOLOQdO'#DqOLYQ7[O,5;PO){QdO,5;POOQS'#Er'#ErOOQS'#Et'#EtO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;ROOQS'#Ex'#ExOLbQdO,5;cOOQ(C[,5;h,5;hOOQ(C[,5;i,5;iONbQ`O,5;iOOQ(C[,5;j,5;jO){QdO'#IPONgQ(ChO,5[OOQS'#Ik'#IkOOQS,5>],5>]OOQS-E;p-E;pO!+kQ(C|O,5:UOOQ(CX'#Cp'#CpO!,[Q&kO,5Q,5>QO){QdO,5>QO5lQ(ChO,5>SOOQS,5>U,5>UO!8cQ`O,5>UOOQS,5>W,5>WO!8cQ`O,5>WOOQS,5>Y,5>YO!8hQpO,59rOOOW-E;r-E;rOOQ(C[1G/]1G/]O!8mQtO,5>aO'dQdO,5>aOOQO,5>f,5>fO!8wQdO'#HuOOQO-E;s-E;sO!9UQ`O,5?bO!9^QtO,5?bO!9eQ`O,5?lOOQ(C[1G/c1G/cO!9mQ!bO'#DTOOQO'#Ix'#IxO){QdO'#IxO!:[Q!bO'#IxO!:yQ!bO'#DcO!;[Q7[O'#DcO!=gQdO'#DcO!=nQ`O'#IwO!=vQ`O,59|O!={Q`O'#EaO!>ZQ`O'#JSO!>cQ`O,5:zO!>yQ7[O'#DcO){QdO,5?mO!?TQ`O'#HzOOQO-E;x-E;xO!9eQ`O,5?lOOQ(CW1G0e1G0eO!@aQ7[O'#D|OOQ(C[,5:e,5:eO){QdO,5:eOIWQ&jO,5:eO!@hQaO,5:eO:aQ`O,5:uO!-OQ!bO,5:uO!-WQ&jO,5:uO5yQ&jO,5:uOOQ(C[1G/n1G/nOOQ(C[1G0O1G0OOOQ(CW'#EV'#EVO){QdO,5?jO!@sQ(ChO,5?jO!AUQ(ChO,5?jO!A]Q`O,5?iO!AeQ`O'#H|O!A]Q`O,5?iOOQ(CW1G0d1G0dO7YQ`O,5?iOOQ(C[1G0b1G0bO!BPQ(C|O1G0bO!CRQ(CyO,5:rOOQ(C]'#Fq'#FqO!CoQ(C}O'#IqOGWQdO1G0bO!EqQ,VO'#IyO!E{Q`O,5:WO!FQQtO'#IzO){QdO'#IzO!F[Q`O,5:]OOQ(C]'#DT'#DTOOQ(C[1G0k1G0kO!FaQ`O1G0kO!HrQ(C|O1G0mO!HyQ(C|O1G0mO!K^Q(C|O1G0mO!KeQ(C|O1G0mO!MlQ(C|O1G0mO!NPQ(C|O1G0mO#!pQ(C|O1G0mO#!wQ(C|O1G0mO#%[Q(C|O1G0mO#%cQ(C|O1G0mO#'WQ(C|O1G0mO#*QQMlO'#ChO#+{QMlO1G0}O#-vQMlO'#IuOOQ(C[1G1T1G1TO#.ZQ(C|O,5>kOOQ(CW-E;}-E;}O#.zQ(C}O1G0mOOQ(C[1G0m1G0mO#1PQ(C|O1G1QO#1pQ!bO,5;sO#1uQ!bO,5;tO#1zQ!bO'#F[O#2`Q`O'#FZOOQO'#JW'#JWOOQO'#H}'#H}O#2eQ!bO1G1]OOQ(C[1G1]1G1]OOOO1G1f1G1fO#2sQMlO'#ItO#2}Q`O,5;}OLbQdO,5;}OOOO-E;|-E;|OOQ(C[1G1Y1G1YOOQ(C[,5PQtO1G1VOOQ(C[1G1X1G1XO5tQ`O1G2}O#>WQ`O1G2}O#>]Q`O1G2}O#>bQ`O1G2}OOQS1G2}1G2}O#>gQ&kO1G2bO7YQ`O'#JQO7YQ`O'#EaO7YQ`O'#IWO#>xQ(ChO,5?yOOQS1G2f1G2fO!0VQ`O1G2lOIWQ&jO1G2iO#?TQ`O1G2iOOQS1G2j1G2jOIWQ&jO1G2jO#?YQaO1G2jO#?bQ7[O'#GhOOQS1G2l1G2lO!'VQ7[O'#IYO!0[QpO1G2oOOQS1G2o1G2oOOQS,5=Y,5=YO#?jQ&kO,5=[O5tQ`O,5=[O#6SQ`O,5=_O5bQ`O,5=_O!-OQ!bO,5=_O!-WQ&jO,5=_O5yQ&jO,5=_O#?{Q`O'#JaO#@WQ`O,5=`OOQS1G.j1G.jO#@]Q(ChO1G.jO#@hQ`O1G.jO#@mQ`O1G.jO5lQ(ChO1G.jO#@uQtO,5@OO#APQ`O,5@OO#A[QdO,5=gO#AcQ`O,5=gO7YQ`O,5@OOOQS1G3P1G3PO`QdO1G3POOQS1G3V1G3VOOQS1G3X1G3XO:[Q`O1G3ZO#AhQdO1G3]O#EcQdO'#H[OOQS1G3`1G3`O#EpQ`O'#HbO:aQ`O'#HdOOQS1G3f1G3fO#ExQdO1G3fO5lQ(ChO1G3lOOQS1G3n1G3nOOQ(CW'#Fx'#FxO5lQ(ChO1G3pO5lQ(ChO1G3rOOOW1G/^1G/^O#IvQpO,5aO#JYQ`O1G4|O#JbQ`O1G5WO#JjQ`O,5?dOLbQdO,5:{O7YQ`O,5:{O:aQ`O,59}OLbQdO,59}O!-OQ!bO,59}O#JoQMlO,59}OOQO,5:{,5:{O#JyQ7[O'#HvO#KaQ`O,5?cOOQ(C[1G/h1G/hO#KiQ7[O'#H{O#K}Q`O,5?nOOQ(CW1G0f1G0fO!;[Q7[O,59}O#LVQtO1G5XO7YQ`O,5>fOOQ(CW'#ES'#ESO#LaQ(DjO'#ETO!@XQ7[O'#D}OOQO'#Hy'#HyO#L{Q7[O,5:hOOQ(C[,5:h,5:hO#MSQ7[O'#D}O#MeQ7[O'#D}O#MlQ7[O'#EYO#MoQ7[O'#ETO#M|Q7[O'#ETO!@XQ7[O'#ETO#NaQ`O1G0PO#NfQqO1G0POOQ(C[1G0P1G0PO){QdO1G0POIWQ&jO1G0POOQ(C[1G0a1G0aO:aQ`O1G0aO!-OQ!bO1G0aO!-WQ&jO1G0aO#NmQ(C|O1G5UO){QdO1G5UO#N}Q(ChO1G5UO$ `Q`O1G5TO7YQ`O,5>hOOQO,5>h,5>hO$ hQ`O,5>hOOQO-E;z-E;zO$ `Q`O1G5TO$ vQ(C}O,59jO$#xQ(C}O,5m,5>mO$-rQ`O,5>mOOQ(C]1G2P1G2PP$-wQ`O'#IRPOQ(C]-Eo,5>oOOQO-Ep,5>pOOQO-Ex,5>xOOQO-E<[-E<[OOQ(C[7+&q7+&qO$6OQ`O7+(iO5lQ(ChO7+(iO5tQ`O7+(iO$6TQ`O7+(iO$6YQaO7+'|OOQ(CW,5>r,5>rOOQ(CW-Et,5>tOOQO-EO,5>OOOQS7+)Q7+)QOOQS7+)W7+)WOOQS7+)[7+)[OOQS7+)^7+)^OOQO1G5O1G5OO$:nQMlO1G0gO$:xQ`O1G0gOOQO1G/i1G/iO$;TQMlO1G/iO:aQ`O1G/iOLbQdO'#DcOOQO,5>b,5>bOOQO-E;t-E;tOOQO,5>g,5>gOOQO-E;y-E;yO!-OQ!bO1G/iO:aQ`O,5:iOOQO,5:o,5:oO){QdO,5:oO$;_Q(ChO,5:oO$;jQ(ChO,5:oO!-OQ!bO,5:iOOQO-E;w-E;wOOQ(C[1G0S1G0SO!@XQ7[O,5:iO$;xQ7[O,5:iO$PQ`O7+*oO$>XQ(C}O1G2[O$@^Q(C}O1G2^O$BcQ(C}O1G1yO$DnQ,VO,5>cOOQO-E;u-E;uO$DxQtO,5>dO){QdO,5>dOOQO-E;v-E;vO$ESQ`O1G5QO$E[QMlO1G0bO$GcQMlO1G0mO$GjQMlO1G0mO$IkQMlO1G0mO$IrQMlO1G0mO$KgQMlO1G0mO$KzQMlO1G0mO$NXQMlO1G0mO$N`QMlO1G0mO%!aQMlO1G0mO%!hQMlO1G0mO%$]QMlO1G0mO%$pQ(C|O<kOOOO7+'T7+'TOOOW1G/R1G/ROOQ(C]1G4X1G4XOJjQ&jO7+'zO%*VQ`O,5>lO5tQ`O,5>lOOQO-EnO%+dQ`O,5>nOIWQ&jO,5>nOOQO-Ew,5>wO%.vQ`O,5>wO%.{Q`O,5>wOOQO-EvOOQO-EqOOQO-EsOOQO-E{AN>{OOQOAN>uAN>uO%3rQ(C|OAN>{O:aQ`OAN>uO){QdOAN>{O!-OQ!bOAN>uO&)wQ(ChOAN>{O&*SQ(C}OG26lOOQ(CWG26bG26bOOQS!$( t!$( tOOQO<QQ`O'#E[O&>YQ`O'#EzO&>_Q`O'#EgO&>dQ`O'#JRO&>oQ`O'#JPO&>zQ`O,5:vO&?PQ,VO,5aO!O&PO~Ox&SO!W&^O!X&VO!Y&VO'^$dO~O]&TOk&TO!Q&WO'g&QO!S'kP!S'vP~P@dO!O'sX!R'sX!]'sX!c'sX'p'sX~O!{'sX#W#PX!S'sX~PA]O!{&_O!O'uX!R'uX~O!R&`O!O'tX~O!O&cO~O!{#eO~PA]OP&gO!T&dO!o&fO']$bO~Oc&lO!d$ZO']$bO~Ou$oO!d$nO~O!S&mO~P`Ou!{Ov!{Ox!|O!b!yO!d!zO'fQOQ!faZ!faj!fa!R!fa!a!fa!j!fa#[!fa#]!fa#^!fa#_!fa#`!fa#a!fa#b!fa#c!fa#e!fa#g!fa#i!fa#j!fa'p!fa'w!fa'x!fa~O_!fa'W!fa!O!fa!c!fan!fa!T!fa%Q!fa!]!fa~PCfO!c&nO~O!]!wO!{&pO'p&oO!R'rX_'rX'W'rX~O!c'rX~PFOO!R&tO!c'qX~O!c&vO~Ox$uO!T$vO#V&wO']$bO~OQTORTO]cOb!kOc!jOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!TSO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!n!iO#t!lO#x^O']9aO'fQO'oYO'|aO~O]#qOh$QOj#rOk#qOl#qOq$ROs9tOx#yO!T#zO!_;eO!d#vO#V9}O#t$VO$_9wO$a9zO$d$WO']&{O'b$PO'f#sO~O#W&}O~O]#qOh$QOj#rOk#qOl#qOq$ROs$SOx#yO!T#zO!_$XO!d#vO#V$YO#t$VO$_$TO$a$UO$d$WO']&{O'b$PO'f#sO~O'a'mP~PJjO!Q'RO!c'nP~P){O'g'TO'oYO~OQ9^OR9^O]cOb;`Oc!jOhcOj9^OkcOlcOq9^Os9^OxRO{cO|cO}cO!T!bO!_9`O!dUO!g9^O!h9^O!i9^O!j9^O!k9^O!n!iO#t!lO#x^O']'cO'fQO'oYO'|;^O~O!d!zO~O!R#bO_$]a'W$]a!c$]a!O$]a!T$]a%Q$]a!]$]a~O#d'jO~PIWO!]'lO!T'yX#w'yX#z'yX$R'yX~Ou'mO~P! YOu'mO!T'yX#w'yX#z'yX$R'yX~O!T'oO#w'sO#z'nO$R'tO~O!Q'wO~PLbO#z#fO$R'zO~OP$eXu$eXx$eX!b$eX'w$eX'x$eX~OPfX!RfX!{fX'afX'a$eX~P!!rOk'|O~OS'}O'U(OO'V(QO~OP(ZOu(SOx(TO'w(VO'x(XO~O'a(RO~P!#{O'a([O~O]#qOh$QOj#rOk#qOl#qOq$ROs9tOx#yO!T#zO!_;eO!d#vO#V9}O#t$VO$_9wO$a9zO$d$WO'b$PO'f#sO~O!Q(`O'](]O!c'}P~P!$jO#W(bO~O!d(cO~O!Q(hO'](eO!O(OP~P!$jOj(uOx(mO!W(sO!X(lO!Y(lO!d(cO!x(tO$w(oO'^$dO'g(jO~O!S(rO~P!&jO!b!yOP'eXu'eXx'eX'w'eX'x'eX!R'eX!{'eX~O'a'eX#m'eX~P!'cOP(xO!{(wO!R'dX'a'dX~O!R(yO'a'cX~O']${O'a'cP~O'](|O~O!d)RO~O']&{O~Ox$uO!Q!rO!T$vO#U!uO#V!rO']$bO!c'qP~O!]!wO#W)VO~OQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO#i#YO#j#ZO'fQO'p#[O'w!}O'x#OO~O_!^a!R!^a'W!^a!O!^a!c!^an!^a!T!^a%Q!^a!]!^a~P!)wOP)_O!T&dO!o)^O%Q)]O'b$PO~O!])aO!T'`X_'`X!R'`X'W'`X~O!d$ZO'b$PO~O!d$ZO']$bO'b$PO~O!]!wO#W&}O~O])lO%R)mO'])iO!S(VP~O!R)nO^(UX~O'g'TO~OZ)rO~O^)sO~O!T$lO']$bO'^$dO^(UP~Ox$uO!Q)xO!R&`O!T$vO']$bO!O'tP~O]&ZOk&ZO!Q)yO'g'TO!S'vP~O!R)zO_(RX'W(RX~O!{*OO'b$PO~OP*RO!T#zO'b$PO~O!T*TO~Ou*VO!TSO~O!n*[O~Oc*aO~O'](|O!S(TP~Oc$jO~O%RtO']${O~P8wOZ*gO^*fO~OQTORTO]cObnOcmOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!nlO#x^O%PqO'fQO'oYO'|aO~O!T!bO#t!lO']9aO~P!1_O^*fO_$^O'W$^O~O_*kO#d*mO%T*mO%U*mO~P){O!d%`O~O%t*rO~O!T*tO~O&V*vO&X*wOQ&SaR&SaX&Sa]&Sa_&Sab&Sac&Sah&Saj&Sak&Sal&Saq&Sas&Sax&Sa{&Sa|&Sa}&Sa!T&Sa!_&Sa!d&Sa!g&Sa!h&Sa!i&Sa!j&Sa!k&Sa!n&Sa#d&Sa#t&Sa#x&Sa%P&Sa%R&Sa%T&Sa%U&Sa%X&Sa%Z&Sa%^&Sa%_&Sa%a&Sa%n&Sa%t&Sa%v&Sa%x&Sa%z&Sa%}&Sa&T&Sa&Z&Sa&]&Sa&_&Sa&a&Sa&c&Sa'S&Sa']&Sa'f&Sa'o&Sa'|&Sa!S&Sa%{&Sa`&Sa&Q&Sa~O']*|O~On+PO~O!O&ia!R&ia~P!)wO!Q+TO!O&iX!R&iX~P){O!R%zO!O'ja~O!O'ja~P>aO!R&`O!O'ta~O!RwX!R!ZX!SwX!S!ZX!]wX!]!ZX!d!ZX!{wX'b!ZX~O!]+YO!{+XO!R#TX!R'lX!S#TX!S'lX!]'lX!d'lX'b'lX~O!]+[O!d$ZO'b$PO!R!VX!S!VX~O]&ROk&ROx&SO'g(jO~OQ9^OR9^O]cOb;`Oc!jOhcOj9^OkcOlcOq9^Os9^OxRO{cO|cO}cO!T!bO!_9`O!dUO!g9^O!h9^O!i9^O!j9^O!k9^O!n!iO#t!lO#x^O'fQO'oYO'|;^O~O']:SO~P!;jO!R+`O!S'kX~O!S+bO~O!]+YO!{+XO!R#TX!S#TX~O!R+cO!S'vX~O!S+eO~O]&ROk&ROx&SO'^$dO'g(jO~O!X+fO!Y+fO~P!>hOx$uO!Q+hO!T$vO']$bO!O&nX!R&nX~O_+lO!W+oO!X+kO!Y+kO!r+sO!s+qO!t+rO!u+pO!x+tO'^$dO'g(jO'o+iO~O!S+nO~P!?iOP+yO!T&dO!o+xO~O!{,PO!R'ra!c'ra_'ra'W'ra~O!]!wO~P!@sO!R&tO!c'qa~Ox$uO!Q,SO!T$vO#U,UO#V,SO']$bO!R&pX!c&pX~O_#Oi!R#Oi'W#Oi!O#Oi!c#Oin#Oi!T#Oi%Q#Oi!]#Oi~P!)wOP;tOu(SOx(TO'w(VO'x(XO~O#W!za!R!za!c!za!{!za!T!za_!za'W!za!O!za~P!BpO#W'eXQ'eXZ'eX_'eXj'eXv'eX!a'eX!d'eX!j'eX#['eX#]'eX#^'eX#_'eX#`'eX#a'eX#b'eX#c'eX#e'eX#g'eX#i'eX#j'eX'W'eX'f'eX'p'eX!c'eX!O'eX!T'eXn'eX%Q'eX!]'eX~P!'cO!R,_O'a'mX~P!#{O'a,aO~O!R,bO!c'nX~P!)wO!c,eO~O!O,fO~OQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O'fQOZ#Zi_#Zij#Zi!R#Zi!a#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'w#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~O#[#Zi~P!FfO#[#PO~P!FfOQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO'fQOZ#Zi_#Zi!R#Zi!a#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'w#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~Oj#Zi~P!IQOj#RO~P!IQOQ#^Oj#ROu!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO'fQO_#Zi!R#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'w#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~OZ#Zi!a#Zi#a#Zi#b#Zi#c#Zi~P!KlOZ#dO!a#TO#a#TO#b#TO#c#TO~P!KlOQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO'fQO_#Zi!R#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~O'w#Zi~P!NdO'w!}O~P!NdOQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO'fQO'w!}O_#Zi!R#Zi#i#Zi#j#Zi'W#Zi'p#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~O'x#Zi~P##OO'x#OO~P##OOQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO#i#YO'fQO'w!}O'x#OO~O_#Zi!R#Zi#j#Zi'W#Zi'p#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~P#%jOQ[XZ[Xj[Xu[Xv[Xx[X!a[X!b[X!d[X!j[X!{[X#WdX#[[X#][X#^[X#_[X#`[X#a[X#b[X#c[X#e[X#g[X#i[X#j[X#o[X'f[X'p[X'w[X'x[X!R[X!S[X~O#m[X~P#'}OQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO#g9lO#i9nO#j9oO'fQO'p#[O'w!}O'x#OO~O#m,hO~P#*XOQ'iXZ'iXj'iXu'iXv'iXx'iX!a'iX!b'iX!d'iX!j'iX#['iX#]'iX#^'iX#_'iX#`'iX#a'iX#b'iX#e'iX#g'iX#i'iX#j'iX'f'iX'p'iX'w'iX'x'iX!R'iX~O!{9sO#o9sO#c'iX#m'iX!S'iX~P#,SO_&sa!R&sa'W&sa!c&san&sa!O&sa!T&sa%Q&sa!]&sa~P!)wOQ#ZiZ#Zi_#Zij#Ziv#Zi!R#Zi!a#Zi!b#Zi!d#Zi!j#Zi#[#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'f#Zi'p#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~P!BpO_#ni!R#ni'W#ni!O#ni!c#nin#ni!T#ni%Q#ni!]#ni~P!)wO#z,jO~O#z,kO~O!]'lO!{,lO!T$OX#w$OX#z$OX$R$OX~O!Q,mO~O!T'oO#w,oO#z'nO$R,pO~O!R9pO!S'hX~P#*XO!S,qO~O$R,sO~OS'}O'U(OO'V,vO~O],yOk,yO!O,zO~O!RdX!]dX!cdX!c$eX'pdX~P!!rO!c-QO~P!BpO!R-RO!]!wO'p&oO!c'}X~O!c-WO~O!Q(`O']$bO!c'}P~O#W-YO~O!O$eX!R$eX!]$lX~P!!rO!R-ZO!O(OX~P!BpO!]-]O~O!O-_O~Oj-cO!]!wO!d$ZO'b$PO'p&oO~O!])aO~O_$^O!R-hO'W$^O~O!S-jO~P!&jO!X-kO!Y-kO'^$dO'g(jO~Ox-mO'g(jO~O!x-nO~O']${O!R&xX'a&xX~O!R(yO'a'ca~O'a-sO~Ou-tOv-tOx-uOPra'wra'xra!Rra!{ra~O'ara#mra~P#7pOu(SOx(TOP$^a'w$^a'x$^a!R$^a!{$^a~O'a$^a#m$^a~P#8fOu(SOx(TOP$`a'w$`a'x$`a!R$`a!{$`a~O'a$`a#m$`a~P#9XO]-vO~O#W-wO~O'a$na!R$na!{$na#m$na~P!#{O#W-zO~OP.TO!T&dO!o.SO%Q.RO~O]#qOj#rOk#qOl#qOq$ROs9tOx#yO!T#zO!_;eO!d#vO#V9}O#t$VO$_9wO$a9zO$d$WO'b$PO'f#sO~Oh.VO'].UO~P#:yO!])aO!T'`a_'`a!R'`a'W'`a~O#W.]O~OZ[X!RdX!SdX~O!R.^O!S(VX~O!S.`O~OZ.aO~O].cO'])iO~O!T$lO']$bO^'QX!R'QX~O!R)nO^(Ua~O!c.fO~P!)wO].hO~OZ.iO~O^.jO~OP.TO!T&dO!o.SO%Q.RO'b$PO~O!R)zO_(Ra'W(Ra~O!{.pO~OP.sO!T#zO~O'g'TO!S(SP~OP.}O!T.yO!o.|O%Q.{O'b$PO~OZ/XO!R/VO!S(TX~O!S/YO~O^/[O_$^O'W$^O~O]/]O~O]/^O'](|O~O#c/_O%r/`O~P0zO!{#eO#c/_O%r/`O~O_/aO~P){O_/cO~O%{/gOQ%yiR%yiX%yi]%yi_%yib%yic%yih%yij%yik%yil%yiq%yis%yix%yi{%yi|%yi}%yi!T%yi!_%yi!d%yi!g%yi!h%yi!i%yi!j%yi!k%yi!n%yi#d%yi#t%yi#x%yi%P%yi%R%yi%T%yi%U%yi%X%yi%Z%yi%^%yi%_%yi%a%yi%n%yi%t%yi%v%yi%x%yi%z%yi%}%yi&T%yi&Z%yi&]%yi&_%yi&a%yi&c%yi'S%yi']%yi'f%yi'o%yi'|%yi!S%yi`%yi&Q%yi~O`/mO!S/kO&Q/lO~P`O!TSO!d/oO~O&X*wOQ&SiR&SiX&Si]&Si_&Sib&Sic&Sih&Sij&Sik&Sil&Siq&Sis&Six&Si{&Si|&Si}&Si!T&Si!_&Si!d&Si!g&Si!h&Si!i&Si!j&Si!k&Si!n&Si#d&Si#t&Si#x&Si%P&Si%R&Si%T&Si%U&Si%X&Si%Z&Si%^&Si%_&Si%a&Si%n&Si%t&Si%v&Si%x&Si%z&Si%}&Si&T&Si&Z&Si&]&Si&_&Si&a&Si&c&Si'S&Si']&Si'f&Si'o&Si'|&Si!S&Si%{&Si`&Si&Q&Si~O!R#bOn$]a~O!O&ii!R&ii~P!)wO!R%zO!O'ji~O!R&`O!O'ti~O!O/uO~O!R!Va!S!Va~P#*XO]&ROk&RO!Q/{O'g(jO!R&jX!S&jX~P@dO!R+`O!S'ka~O]&ZOk&ZO!Q)yO'g'TO!R&oX!S&oX~O!R+cO!S'va~O!O'ui!R'ui~P!)wO_$^O!]!wO!d$ZO!j0VO!{0TO'W$^O'b$PO'p&oO~O!S0YO~P!?iO!X0ZO!Y0ZO'^$dO'g(jO'o+iO~O!W0[O~P#MSO!TSO!W0[O!u0^O!x0_O~P#MSO!W0[O!s0aO!t0aO!u0^O!x0_O~P#MSO!T&dO~O!T&dO~P!BpO!R'ri!c'ri_'ri'W'ri~P!)wO!{0jO!R'ri!c'ri_'ri'W'ri~O!R&tO!c'qi~Ox$uO!T$vO#V0lO']$bO~O#WraQraZra_rajra!ara!bra!dra!jra#[ra#]ra#^ra#_ra#`ra#ara#bra#cra#era#gra#ira#jra'Wra'fra'pra!cra!Ora!Tranra%Qra!]ra~P#7pO#W$^aQ$^aZ$^a_$^aj$^av$^a!a$^a!b$^a!d$^a!j$^a#[$^a#]$^a#^$^a#_$^a#`$^a#a$^a#b$^a#c$^a#e$^a#g$^a#i$^a#j$^a'W$^a'f$^a'p$^a!c$^a!O$^a!T$^an$^a%Q$^a!]$^a~P#8fO#W$`aQ$`aZ$`a_$`aj$`av$`a!a$`a!b$`a!d$`a!j$`a#[$`a#]$`a#^$`a#_$`a#`$`a#a$`a#b$`a#c$`a#e$`a#g$`a#i$`a#j$`a'W$`a'f$`a'p$`a!c$`a!O$`a!T$`an$`a%Q$`a!]$`a~P#9XO#W$naQ$naZ$na_$naj$nav$na!R$na!a$na!b$na!d$na!j$na#[$na#]$na#^$na#_$na#`$na#a$na#b$na#c$na#e$na#g$na#i$na#j$na'W$na'f$na'p$na!c$na!O$na!T$na!{$nan$na%Q$na!]$na~P!BpO_#Oq!R#Oq'W#Oq!O#Oq!c#Oqn#Oq!T#Oq%Q#Oq!]#Oq~P!)wO!R&kX'a&kX~PJjO!R,_O'a'ma~O!Q0tO!R&lX!c&lX~P){O!R,bO!c'na~O!R,bO!c'na~P!)wO#m!fa!S!fa~PCfO#m!^a!R!^a!S!^a~P#*XO!T1XO#x^O$P1YO~O!S1^O~On1_O~P!BpO_$Yq!R$Yq'W$Yq!O$Yq!c$Yqn$Yq!T$Yq%Q$Yq!]$Yq~P!)wO!O1`O~O],yOk,yO~Ou(SOx(TO'x(XOP$xi'w$xi!R$xi!{$xi~O'a$xi#m$xi~P$.POu(SOx(TOP$zi'w$zi'x$zi!R$zi!{$zi~O'a$zi#m$zi~P$.rO'p#[O~P!BpO!Q1cO']$bO!R&tX!c&tX~O!R-RO!c'}a~O!R-RO!]!wO!c'}a~O!R-RO!]!wO'p&oO!c'}a~O'a$gi!R$gi!{$gi#m$gi~P!#{O!Q1kO'](eO!O&vX!R&vX~P!$jO!R-ZO!O(Oa~O!R-ZO!O(Oa~P!BpO!]!wO~O!]!wO#c1sO~Oj1vO!]!wO'p&oO~O!R'di'a'di~P!#{O!{1yO!R'di'a'di~P!#{O!c1|O~O_$Zq!R$Zq'W$Zq!O$Zq!c$Zqn$Zq!T$Zq%Q$Zq!]$Zq~P!)wO!R2QO!T(PX~P!BpO!T&dO%Q2TO~O!T&dO%Q2TO~P!BpO!T$eX$u[X_$eX!R$eX'W$eX~P!!rO$u2XOPgXugXxgX!TgX'wgX'xgX_gX!RgX'WgX~O$u2XO~O]2_O%R2`O'])iO!R'PX!S'PX~O!R.^O!S(Va~OZ2dO~O^2eO~O]2hO~OP2jO!T&dO!o2iO%Q2TO~O_$^O'W$^O~P!BpO!T#zO~P!BpO!R2oO!{2qO!S(SX~O!S2rO~Ox;oO!W2{O!X2tO!Y2tO!r2zO!s2yO!t2yO!x2xO'^$dO'g(jO'o+iO~O!S2wO~P$7ZOP3SO!T.yO!o3RO%Q3QO~OP3SO!T.yO!o3RO%Q3QO'b$PO~O'](|O!R'OX!S'OX~O!R/VO!S(Ta~O]3^O'g3]O~O]3_O~O^3aO~O!c3dO~P){O_3fO~O_3fO~P){O#c3hO%r3iO~PFOO`/mO!S3mO&Q/lO~P`O!]3oO~O!R#Ti!S#Ti~P#*XO!{3qO!R#Ti!S#Ti~O!R!Vi!S!Vi~P#*XO_$^O!{3xO'W$^O~O_$^O!]!wO!{3xO'W$^O~O!X3|O!Y3|O'^$dO'g(jO'o+iO~O_$^O!]!wO!d$ZO!j3}O!{3xO'W$^O'b$PO'p&oO~O!W4OO~P$;xO!W4OO!u4RO!x4SO~P$;xO_$^O!]!wO!j3}O!{3xO'W$^O'p&oO~O!R'rq!c'rq_'rq'W'rq~P!)wO!R&tO!c'qq~O#W$xiQ$xiZ$xi_$xij$xiv$xi!a$xi!b$xi!d$xi!j$xi#[$xi#]$xi#^$xi#_$xi#`$xi#a$xi#b$xi#c$xi#e$xi#g$xi#i$xi#j$xi'W$xi'f$xi'p$xi!c$xi!O$xi!T$xin$xi%Q$xi!]$xi~P$.PO#W$ziQ$ziZ$zi_$zij$ziv$zi!a$zi!b$zi!d$zi!j$zi#[$zi#]$zi#^$zi#_$zi#`$zi#a$zi#b$zi#c$zi#e$zi#g$zi#i$zi#j$zi'W$zi'f$zi'p$zi!c$zi!O$zi!T$zin$zi%Q$zi!]$zi~P$.rO#W$giQ$giZ$gi_$gij$giv$gi!R$gi!a$gi!b$gi!d$gi!j$gi#[$gi#]$gi#^$gi#_$gi#`$gi#a$gi#b$gi#c$gi#e$gi#g$gi#i$gi#j$gi'W$gi'f$gi'p$gi!c$gi!O$gi!T$gi!{$gin$gi%Q$gi!]$gi~P!BpO!R&ka'a&ka~P!#{O!R&la!c&la~P!)wO!R,bO!c'ni~O#m#Oi!R#Oi!S#Oi~P#*XOQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O'fQOZ#Zij#Zi!a#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'w#Zi'x#Zi!R#Zi!S#Zi~O#[#Zi~P$EiO#[9eO~P$EiOQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO'fQOZ#Zi!a#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'w#Zi'x#Zi!R#Zi!S#Zi~Oj#Zi~P$GqOj9gO~P$GqOQ#^Oj9gOu!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO'fQO#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'w#Zi'x#Zi!R#Zi!S#Zi~OZ#Zi!a#Zi#a#Zi#b#Zi#c#Zi~P$IyOZ9rO!a9iO#a9iO#b9iO#c9iO~P$IyOQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO'fQO#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'x#Zi!R#Zi!S#Zi~O'w#Zi~P$L_O'w!}O~P$L_OQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO#g9lO'fQO'w!}O#i#Zi#j#Zi#m#Zi'p#Zi!R#Zi!S#Zi~O'x#Zi~P$NgO'x#OO~P$NgOQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO#g9lO#i9nO'fQO'w!}O'x#OO~O#j#Zi#m#Zi'p#Zi!R#Zi!S#Zi~P%!oO_#ky!R#ky'W#ky!O#ky!c#kyn#ky!T#ky%Q#ky!]#ky~P!)wOP;vOu(SOx(TO'w(VO'x(XO~OQ#ZiZ#Zij#Ziv#Zi!a#Zi!b#Zi!d#Zi!j#Zi#[#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'f#Zi'p#Zi!R#Zi!S#Zi~P%%aO!b!yOP'eXu'eXx'eX'w'eX'x'eX!S'eX~OQ'eXZ'eXj'eXv'eX!a'eX!d'eX!j'eX#['eX#]'eX#^'eX#_'eX#`'eX#a'eX#b'eX#c'eX#e'eX#g'eX#i'eX#j'eX#m'eX'f'eX'p'eX!R'eX~P%'eO#m#ni!R#ni!S#ni~P#*XO!S4eO~O!R&sa!S&sa~P#*XO!]!wO'p&oO!R&ta!c&ta~O!R-RO!c'}i~O!R-RO!]!wO!c'}i~O'a$gq!R$gq!{$gq#m$gq~P!#{O!O&va!R&va~P!BpO!]4lO~O!R-ZO!O(Oi~P!BpO!R-ZO!O(Oi~O!O4pO~O!]!wO#c4uO~Oj4vO!]!wO'p&oO~O!O4xO~O'a$iq!R$iq!{$iq#m$iq~P!#{O_$Zy!R$Zy'W$Zy!O$Zy!c$Zyn$Zy!T$Zy%Q$Zy!]$Zy~P!)wO!R2QO!T(Pa~O!T&dO%Q4}O~O!T&dO%Q4}O~P!BpO_#Oy!R#Oy'W#Oy!O#Oy!c#Oyn#Oy!T#Oy%Q#Oy!]#Oy~P!)wOZ5QO~O]5SO'])iO~O!R.^O!S(Vi~O]5VO~O^5WO~O'g'TO!R&{X!S&{X~O!R2oO!S(Sa~O!S5eO~P$7ZOx;sO'g(jO'o+iO~O!W5hO!X5gO!Y5gO!x0_O'^$dO'g(jO'o+iO~O!s5iO!t5iO~P%0^O!X5gO!Y5gO'^$dO'g(jO'o+iO~O!T.yO~O!T.yO%Q5kO~O!T.yO%Q5kO~P!BpOP5pO!T.yO!o5oO%Q5kO~OZ5uO!R'Oa!S'Oa~O!R/VO!S(Ti~O]5xO~O!c5yO~O!c5zO~O!c5{O~O!c5{O~P){O_5}O~O!]6QO~O!c6RO~O!R'ui!S'ui~P#*XO_$^O'W$^O~P!)wO_$^O!{6WO'W$^O~O_$^O!]!wO!{6WO'W$^O~O!X6]O!Y6]O'^$dO'g(jO'o+iO~O_$^O!]!wO!j6^O!{6WO'W$^O'p&oO~O!d$ZO'b$PO~P%4xO!W6_O~P%4gO!R'ry!c'ry_'ry'W'ry~P!)wO#W$gqQ$gqZ$gq_$gqj$gqv$gq!R$gq!a$gq!b$gq!d$gq!j$gq#[$gq#]$gq#^$gq#_$gq#`$gq#a$gq#b$gq#c$gq#e$gq#g$gq#i$gq#j$gq'W$gq'f$gq'p$gq!c$gq!O$gq!T$gq!{$gqn$gq%Q$gq!]$gq~P!BpO#W$iqQ$iqZ$iq_$iqj$iqv$iq!R$iq!a$iq!b$iq!d$iq!j$iq#[$iq#]$iq#^$iq#_$iq#`$iq#a$iq#b$iq#c$iq#e$iq#g$iq#i$iq#j$iq'W$iq'f$iq'p$iq!c$iq!O$iq!T$iq!{$iqn$iq%Q$iq!]$iq~P!BpO!R&li!c&li~P!)wO#m#Oq!R#Oq!S#Oq~P#*XOu-tOv-tOx-uOPra'wra'xra!Sra~OQraZrajra!ara!bra!dra!jra#[ra#]ra#^ra#_ra#`ra#ara#bra#cra#era#gra#ira#jra#mra'fra'pra!Rra~P%;OOu(SOx(TOP$^a'w$^a'x$^a!S$^a~OQ$^aZ$^aj$^av$^a!a$^a!b$^a!d$^a!j$^a#[$^a#]$^a#^$^a#_$^a#`$^a#a$^a#b$^a#c$^a#e$^a#g$^a#i$^a#j$^a#m$^a'f$^a'p$^a!R$^a~P%=SOu(SOx(TOP$`a'w$`a'x$`a!S$`a~OQ$`aZ$`aj$`av$`a!a$`a!b$`a!d$`a!j$`a#[$`a#]$`a#^$`a#_$`a#`$`a#a$`a#b$`a#c$`a#e$`a#g$`a#i$`a#j$`a#m$`a'f$`a'p$`a!R$`a~P%?WOQ$naZ$naj$nav$na!a$na!b$na!d$na!j$na#[$na#]$na#^$na#_$na#`$na#a$na#b$na#c$na#e$na#g$na#i$na#j$na#m$na'f$na'p$na!R$na!S$na~P%%aO#m$Yq!R$Yq!S$Yq~P#*XO#m$Zq!R$Zq!S$Zq~P#*XO!S6hO~O#m6iO~P!#{O!]!wO!R&ti!c&ti~O!]!wO'p&oO!R&ti!c&ti~O!R-RO!c'}q~O!O&vi!R&vi~P!BpO!R-ZO!O(Oq~O!O6oO~P!BpO!O6oO~O!R'dy'a'dy~P!#{O!R&ya!T&ya~P!BpO!T$tq_$tq!R$tq'W$tq~P!BpOZ6vO~O!R.^O!S(Vq~O]6yO~O!T&dO%Q6zO~O!T&dO%Q6zO~P!BpO!{6{O!R&{a!S&{a~O!R2oO!S(Si~P#*XO!X7RO!Y7RO'^$dO'g(jO'o+iO~O!W7TO!x4SO~P%GXO!T.yO%Q7WO~O!T.yO%Q7WO~P!BpO]7_O'g7^O~O!R/VO!S(Tq~O!c7aO~O!c7aO~P){O!c7cO~O!c7dO~O!R#Ty!S#Ty~P#*XO_$^O!{7jO'W$^O~O_$^O!]!wO!{7jO'W$^O~O!X7mO!Y7mO'^$dO'g(jO'o+iO~O_$^O!]!wO!j7nO!{7jO'W$^O'p&oO~O#m#ky!R#ky!S#ky~P#*XOQ$giZ$gij$giv$gi!a$gi!b$gi!d$gi!j$gi#[$gi#]$gi#^$gi#_$gi#`$gi#a$gi#b$gi#c$gi#e$gi#g$gi#i$gi#j$gi#m$gi'f$gi'p$gi!R$gi!S$gi~P%%aOu(SOx(TO'x(XOP$xi'w$xi!S$xi~OQ$xiZ$xij$xiv$xi!a$xi!b$xi!d$xi!j$xi#[$xi#]$xi#^$xi#_$xi#`$xi#a$xi#b$xi#c$xi#e$xi#g$xi#i$xi#j$xi#m$xi'f$xi'p$xi!R$xi~P%LjOu(SOx(TOP$zi'w$zi'x$zi!S$zi~OQ$ziZ$zij$ziv$zi!a$zi!b$zi!d$zi!j$zi#[$zi#]$zi#^$zi#_$zi#`$zi#a$zi#b$zi#c$zi#e$zi#g$zi#i$zi#j$zi#m$zi'f$zi'p$zi!R$zi~P%NnO#m$Zy!R$Zy!S$Zy~P#*XO#m#Oy!R#Oy!S#Oy~P#*XO!]!wO!R&tq!c&tq~O!R-RO!c'}y~O!O&vq!R&vq~P!BpO!O7tO~P!BpO!R.^O!S(Vy~O!R2oO!S(Sq~O!X8QO!Y8QO'^$dO'g(jO'o+iO~O!T.yO%Q8TO~O!T.yO%Q8TO~P!BpO!c8WO~O_$^O!{8]O'W$^O~O_$^O!]!wO!{8]O'W$^O~OQ$gqZ$gqj$gqv$gq!a$gq!b$gq!d$gq!j$gq#[$gq#]$gq#^$gq#_$gq#`$gq#a$gq#b$gq#c$gq#e$gq#g$gq#i$gq#j$gq#m$gq'f$gq'p$gq!R$gq!S$gq~P%%aOQ$iqZ$iqj$iqv$iq!a$iq!b$iq!d$iq!j$iq#[$iq#]$iq#^$iq#_$iq#`$iq#a$iq#b$iq#c$iq#e$iq#g$iq#i$iq#j$iq#m$iq'f$iq'p$iq!R$iq!S$iq~P%%aO'a$|!Z!R$|!Z!{$|!Z#m$|!Z~P!#{O!R&{q!S&{q~P#*XO_$^O!{8oO'W$^O~O#W$|!ZQ$|!ZZ$|!Z_$|!Zj$|!Zv$|!Z!R$|!Z!a$|!Z!b$|!Z!d$|!Z!j$|!Z#[$|!Z#]$|!Z#^$|!Z#_$|!Z#`$|!Z#a$|!Z#b$|!Z#c$|!Z#e$|!Z#g$|!Z#i$|!Z#j$|!Z'W$|!Z'f$|!Z'p$|!Z!c$|!Z!O$|!Z!T$|!Z!{$|!Zn$|!Z%Q$|!Z!]$|!Z~P!BpOP;uOu(SOx(TO'w(VO'x(XO~O!S!za!W!za!X!za!Y!za!r!za!s!za!t!za!x!za'^!za'g!za'o!za~P&,_O!W'eX!X'eX!Y'eX!r'eX!s'eX!t'eX!x'eX'^'eX'g'eX'o'eX~P%'eOQ$|!ZZ$|!Zj$|!Zv$|!Z!a$|!Z!b$|!Z!d$|!Z!j$|!Z#[$|!Z#]$|!Z#^$|!Z#_$|!Z#`$|!Z#a$|!Z#b$|!Z#c$|!Z#e$|!Z#g$|!Z#i$|!Z#j$|!Z#m$|!Z'f$|!Z'p$|!Z!R$|!Z!S$|!Z~P%%aO!Wra!Xra!Yra!rra!sra!tra!xra'^ra'gra'ora~P%;OO!W$^a!X$^a!Y$^a!r$^a!s$^a!t$^a!x$^a'^$^a'g$^a'o$^a~P%=SO!W$`a!X$`a!Y$`a!r$`a!s$`a!t$`a!x$`a'^$`a'g$`a'o$`a~P%?WO!S$na!W$na!X$na!Y$na!r$na!s$na!t$na!x$na'^$na'g$na'o$na~P&,_O!W$xi!X$xi!Y$xi!r$xi!s$xi!t$xi!x$xi'^$xi'g$xi'o$xi~P%LjO!W$zi!X$zi!Y$zi!r$zi!s$zi!t$zi!x$zi'^$zi'g$zi'o$zi~P%NnO!S$gi!W$gi!X$gi!Y$gi!r$gi!s$gi!t$gi!x$gi'^$gi'g$gi'o$gi~P&,_O!S$gq!W$gq!X$gq!Y$gq!r$gq!s$gq!t$gq!x$gq'^$gq'g$gq'o$gq~P&,_O!S$iq!W$iq!X$iq!Y$iq!r$iq!s$iq!t$iq!x$iq'^$iq'g$iq'o$iq~P&,_O!S$|!Z!W$|!Z!X$|!Z!Y$|!Z!r$|!Z!s$|!Z!t$|!Z!x$|!Z'^$|!Z'g$|!Z'o$|!Z~P&,_On'hX~P.jOn[X!O[X!c[X%r[X!T[X%Q[X!][X~P$zO!]dX!c[X!cdX'pdX~P;dOQ9^OR9^O]cOb;`Oc!jOhcOj9^OkcOlcOq9^Os9^OxRO{cO|cO}cO!TSO!_9`O!dUO!g9^O!h9^O!i9^O!j9^O!k9^O!n!iO#t!lO#x^O']'cO'fQO'oYO'|;^O~O]#qOh$QOj#rOk#qOl#qOq$ROs9uOx#yO!T#zO!_;fO!d#vO#V:OO#t$VO$_9xO$a9{O$d$WO']&{O'b$PO'f#sO~O!R9pO!S$]a~O]#qOh$QOj#rOk#qOl#qOq$ROs9vOx#yO!T#zO!_;gO!d#vO#V:PO#t$VO$_9yO$a9|O$d$WO']&{O'b$PO'f#sO~O#d'jO~P&]P!AQ!AY!A^!A^P!>YP!Ab!AbP!DVP!DZ?Z?Z!Da!GT8SP8SP8S8SP!HW8S8S!Jf8S!M_8S# g8S8S#!T#$c#$c#$g#$c#$oP#$cP8S#%k8S#'X8S8S-zPPP#(yPP#)c#)cP#)cP#)x#)cPP#*OP#)uP#)u#*b!!X#)u#+P#+V#+Y([#+]([P#+d#+d#+dP([P([P([P([PP([P#+j#+mP#+m([P#+qP#+tP([P([P([P([P([P([([#+z#,U#,[#,b#,p#,v#,|#-W#-^#-m#-s#.R#.X#._#.m#/S#0z#1Y#1`#1f#1l#1r#1|#2S#2Y#2d#2v#2|PPPPPPPP#3SPP#3v#7OPP#8f#8m#8uPP#>a#@t#Fp#Fs#Fv#GR#GUPP#GX#G]#Gz#Hq#Hu#IZPP#I_#Ie#IiP#Il#Ip#Is#Jc#Jy#KO#KR#KU#K[#K_#Kc#KgmhOSj}!n$]%c%f%g%i*o*t/g/jQ$imQ$ppQ%ZyS&V!b+`Q&k!jS(l#z(qQ)g$jQ)t$rQ*`%TQ+f&^S+k&d+mQ+}&lQ-k(sQ/U*aY0Z+o+p+q+r+sS2t.y2vU3|0[0^0aU5g2y2z2{S6]4O4RS7R5h5iQ7m6_R8Q7T$p[ORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8o!j'e#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ(}$SQ)l$lQ*b%WQ*i%`Q,X9tQ.W)aQ.c)mQ/^*gQ2_.^Q3Z/VQ4^9vQ5S2`R8{9upeOSjy}!n$]%Y%c%f%g%i*o*t/g/jR*d%[&WVOSTjkn}!S!W!k!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%z&S&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;`;a[!cRU!]!`%x&WQ$clQ$hmS$mp$rv$wrs!r!u$Z$u&`&t&w)x)y)z*m+Y+h,S,U/o0lQ%PwQ&h!iQ&j!jS(_#v(cS)f$i$jQ)j$lQ)w$tQ*Z%RQ*_%TS+|&k&lQ-V(`Q.[)gQ.b)mQ.d)nQ.g)rQ/P*[S/T*`*aQ0h+}Q1b-RQ2^.^Q2b.aQ2g.iQ3Y/UQ4i1cQ5R2`Q5U2dQ6u5QR7w6vx#xa!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;k!Y$fm!j$h$i$j&U&j&k&l(k)f)g+]+j+|+}-d.[0Q0W0]0h1u3{4Q6Z7k8^Q)`$cQ*P$|Q*S$}Q*^%TQ.k)wQ/O*ZU/S*_*`*aQ3T/PS3X/T/UQ5b2sQ5t3YS7P5c5fS8O7Q7SQ8f8PQ8u8g#[;b!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vd;c9d9x9{:O:V:Y:]:b:e:ke;d9r9y9|:P:W:Z:^:c:f:lW#}a$P(y;^S$|t%YQ$}uQ%OvR)}$z%P#|a!w!y#d#v#y$T$U$Y&g'}(W(Y(Z(b(h(w(x)])_)a*O*R+y,_-Y-Z-]-w.R.T.p.s.{.}1a1k1s1y2Q2T2X2j3Q3S4l4u4}5k5p6i6z7W8T9d9r9w9x9y9z9{9|9}:O:P:U:V:W:X:Y:Z:[:]:^:a:b:c:d:e:f:j:k:l;^;i;j;k;l;n;t;u;vT(O#s(PX)O$S9t9u9vU&Z!b$v+cQ'U!{Q)q$oQ.t*TQ1z-tR5^2o&^cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;a$]#aZ!_!o$a%w%}&y'Q'W'X'Y'Z'[']'^'_'`'a'b'd'g'k'u)p+R+^+g,O,^,d,g,i,w-x/v/y0i0s0w0x0y0z0{0|0}1O1P1Q1R1S1T1W1]2O2[3s3v4W4[4]4b4c5`6S6V6b6f6g7g7z8Z8m8y9_:|T!XQ!Y&_cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ&X!bR/|+`Y&R!b&V&^+`+fS(k#z(qS+j&d+mS-d(l(sQ-e(mQ-l(tQ.v*VU0W+k+o+pU0]+q+r+sS0b+t2xQ1u-kQ1w-mQ1x-nS2s.y2vU3{0Z0[0^Q4P0_Q4Q0aS5c2t2{S5f2y2zU6Z3|4O4RQ6`4SS7Q5g5hQ7S5iS7k6]6_S8P7R7TQ8^7mQ8g8QQ;h;oR;m;slhOSj}!n$]%c%f%g%i*o*t/g/jQ%k!QS&x!v9cQ)d$gQ*X%PQ*Y%QQ+z&iS,]&}:RS-y)V:_Q.Y)eQ.x*WQ/n*vQ/p*wQ/x+ZQ0`+qQ0f+{S2P-z:gQ2Y.ZS2].]:hQ3r/zQ3u0RQ4U0gQ5P2ZQ6T3tQ6X3zQ6a4VQ7e6RQ7h6YQ8Y7iQ8l8[R8x8n$W#`Z!_!o%w%}&y'Q'W'X'Y'Z'[']'^'_'`'a'b'd'g'k'u)p+R+^+g,O,^,d,g,w-x/v/y0i0s0w0x0y0z0{0|0}1O1P1Q1R1S1T1W1]2O2[3s3v4W4[4]4b4c5`6S6V6b6f6g7g7z8Z8m8y9_:|W(v#{&|1V8qT)Z$a,i$W#_Z!_!o%w%}&y'Q'W'X'Y'Z'[']'^'_'`'a'b'd'g'k'u)p+R+^+g,O,^,d,g,w-x/v/y0i0s0w0x0y0z0{0|0}1O1P1Q1R1S1T1W1]2O2[3s3v4W4[4]4b4c5`6S6V6b6f6g7g7z8Z8m8y9_:|Q'f#`S)Y$a,iR-{)Z&^cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ%f{Q%g|Q%i!OQ%j!PR/f*rQ&e!iQ)[$cQ+w&hS.Q)`)wS0c+u+vW2S-}.O.P.kS4T0d0eU4|2U2V2WU6s4{5Y5ZQ7v6tR8b7yT+l&d+mS+j&d+mU0W+k+o+pU0]+q+r+sS0b+t2xS2s.y2vU3{0Z0[0^Q4P0_Q4Q0aS5c2t2{S5f2y2zU6Z3|4O4RQ6`4SS7Q5g5hQ7S5iS7k6]6_S8P7R7TQ8^7mR8g8QS+l&d+mT2u.y2vS&r!q/dQ-U(_Q-b(kS0V+j2sQ1g-VS1p-c-lU3}0]0b5fQ4h1bS4s1v1xU6^4P4Q7SQ6k4iQ6r4vR7n6`Q!xXS&q!q/dQ)W$[Q)b$eQ)h$kQ,Q&rQ-T(_Q-a(kQ-f(nQ.X)cQ/Q*]S0U+j2sS1f-U-VS1o-b-lQ1r-eQ1t-gQ3V/RW3y0V0]0b5fQ4g1bQ4k1gS4o1p1xQ4t1wQ5r3WW6[3}4P4Q7SS6j4h4iS6n4p:iQ6p4sQ6}5aQ7[5sS7l6^6`Q7r6kS7s6o:mQ7u6rQ7|7OQ8V7]Q8_7nS8a7t:nQ8d7}Q8s8eQ9Q8tQ9X9RQ:u:pQ;T:zQ;U:{Q;V;hR;[;m$rWORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oS!xn!k!j:o#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aR:u;`$rXORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oQ$[b!Y$em!j$h$i$j&U&j&k&l(k)f)g+]+j+|+}-d.[0Q0W0]0h1u3{4Q6Z7k8^S$kn!kQ)c$fQ*]%TW/R*^*_*`*aU3W/S/T/UQ5a2sS5s3X3YU7O5b5c5fQ7]5tU7}7P7Q7SS8e8O8PS8t8f8gQ9R8u!j:p#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ:z;_R:{;`$f]OSTjk}!S!W!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%c%e%f%g%i%m%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oY!hRU!]!`%xv$wrs!r!u$Z$u&`&t&w)x)y)z*m+Y+h,S,U/o0lQ*j%`!h:q#]#k'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aR:t&WS&[!b$vR0O+c$p[ORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8o!j'e#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aR*i%`$roORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oQ'U!{!k:r#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;a!h#VZ!_$a%w%}&y'Q'_'`'a'b'g'k)p+R+g,O,^,d,w-x0i0s1T2O2[3v4W4[6V7g8Z8m8y9_!R9k'd'u+^,i/v/y0w1P1Q1R1S1W1]3s4]4b4c5`6S6b6f6g7z:|!d#XZ!_$a%w%}&y'Q'a'b'g'k)p+R+g,O,^,d,w-x0i0s1T2O2[3v4W4[6V7g8Z8m8y9_}9m'd'u+^,i/v/y0w1R1S1W1]3s4]4b4c5`6S6b6f6g7z:|!`#]Z!_$a%w%}&y'Q'g'k)p+R+g,O,^,d,w-x0i0s1T2O2[3v4W4[6V7g8Z8m8y9_Q1a-Px;a'd'u+^,i/v/y0w1W1]3s4]4b4c5`6S6b6f6g7z:|Q;i;pQ;j;qR;k;r&^cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aS#l`#mR1Y,l&e_ORSTU`jk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k#m$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,l,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aS#g^#nT'n#i'rT#h^#nT'p#i'r&e`ORSTU`jk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k#m$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,l,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aT#l`#mQ#o`R'y#m$rbORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8o!k;_#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;a#RdOSUj}!S!W!n!|#k$]%[%_%`%c%e%f%g%i%m&S&f'w)^*k*o*t+x,m-u.S.|/_/`/a/c/g/j/l1X2i3R3f3h3i5o5}x#{a!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;k#[&|!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vQ)S$WQ,x(Sd1V9r9y9|:P:W:Z:^:c:f:le8q9d9x9{:O:V:Y:]:b:e:kx#wa!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;kQ(d#xS(n#z(qQ)T$XQ-g(o#[:w!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vd:x9d9x9{:O:V:Y:]:b:e:kd:y9r9y9|:P:W:Z:^:c:f:lQ:};bQ;O;cQ;P;dQ;Q;eQ;R;fR;S;gx#{a!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;k#[&|!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vd1V9r9y9|:P:W:Z:^:c:f:le8q9d9x9{:O:V:Y:]:b:e:klfOSj}!n$]%c%f%g%i*o*t/g/jQ(g#yQ*}%pQ+O%rR1j-Z%O#|a!w!y#d#v#y$T$U$Y&g'}(W(Y(Z(b(h(w(x)])_)a*O*R+y,_-Y-Z-]-w.R.T.p.s.{.}1a1k1s1y2Q2T2X2j3Q3S4l4u4}5k5p6i6z7W8T9d9r9w9x9y9z9{9|9}:O:P:U:V:W:X:Y:Z:[:]:^:a:b:c:d:e:f:j:k:l;^;i;j;k;l;n;t;u;vQ*Q$}Q.r*SQ2m.qR5]2nT(p#z(qS(p#z(qT2u.y2vQ)b$eQ-f(nQ.X)cQ/Q*]Q3V/RQ5r3WQ6}5aQ7[5sQ7|7OQ8V7]Q8d7}Q8s8eQ9Q8tR9X9Rp(W#t'O)U-X-o-p0q1h1}4f4w7q:v;W;X;Y!n:U&z'i(^(f+v,[,t-P-^-|.P.o.q0e0p1i1m2W2l2n3O4Y4Z4m4q4y5O5Z5n6m6q7Y8`;Z;];p;q;r[:V8p9O9V9Y9Z9]]:W1U4a6c7o7p8zr(Y#t'O)U,}-X-o-p0q1h1}4f4w7q:v;W;X;Y!p:X&z'i(^(f+v,[,t-P-^-|.P.o.q0e0n0p1i1m2W2l2n3O4Y4Z4m4q4y5O5Z5n6m6q7Y8`;Z;];p;q;r^:Y8p9O9T9V9Y9Z9]_:Z1U4a6c6d7o7p8zpeOSjy}!n$]%Y%c%f%g%i*o*t/g/jQ%VxR*k%`peOSjy}!n$]%Y%c%f%g%i*o*t/g/jR%VxQ*U%OR.n)}qeOSjy}!n$]%Y%c%f%g%i*o*t/g/jQ.z*ZS3P/O/PW5j2|2}3O3TU7V5l5m5nU8R7U7X7YQ8h8SR8v8iQ%^yR*e%YR3^/XR7_5uS$mp$rR.d)nQ%czR*o%dR*u%jT/h*t/jR*y%kQ*x%kR/q*yQjOQ!nST$`j!nQ(P#sR,u(PQ!YQR%u!YQ!^RU%{!^%|+UQ%|!_R+U%}Q+a&XR/}+aQ,`'OR0r,`Q,c'QS0u,c0vR0v,dQ+m&dR0X+mS!eR$uU&a!e&b+VQ&b!fR+V&OQ+d&[R0P+dQ&u!sQ,R&sU,V&u,R0mR0m,WQ'r#iR,n'rQ#m`R'x#mQ#cZU'h#c+Q9qQ+Q9_R9q'uQ-S(_W1d-S1e4j6lU1e-T-U-VS4j1f1gR6l4k$k(U#t&z'O'i(^(f)P)Q)U+v,Y,Z,[,t,}-O-P-X-^-o-p-|.P.o.q0e0n0o0p0q1U1h1i1m1}2W2l2n3O4Y4Z4_4`4a4f4m4q4w4y5O5Z5n6c6d6e6m6q7Y7o7p7q8`8p8z8|8}9O9T9U9V9Y9Z9]:v;W;X;Y;Z;];p;q;rQ-[(fU1l-[1n4nQ1n-^R4n1mQ(q#zR-i(qQ(z$OR-r(zQ2R-|R4z2RQ){$xR.m){Q2p.tS5_2p6|R6|5`Q*W%PR.w*WQ2v.yR5d2vQ/W*bS3[/W5vR5v3^Q._)jW2a._2c5T6wQ2c.bQ5T2bR6w5UQ)o$mR.e)oQ/j*tR3l/jWiOSj!nQ%h}Q)X$]Q*n%cQ*p%fQ*q%gQ*s%iQ/e*oS/h*t/jR3k/gQ$_gQ%l!RQ%o!TQ%q!UQ%s!VQ)v$sQ)|$yQ*d%^Q*{%nQ-h(pS/Z*e*hQ/r*zQ/s*}Q/t+OS0S+j2sQ2f.hQ2k.oQ3U/QQ3`/]Q3j/fY3w0U0V0]0b5fQ5X2hQ5[2lQ5q3VQ5w3_[6U3v3y3}4P4Q7SQ6x5VQ7Z5rQ7`5xW7f6V6[6^6`Q7x6yQ7{6}Q8U7[U8X7g7l7nQ8c7|Q8j8VS8k8Z8_Q8r8dQ8w8mQ9P8sQ9S8yQ9W9QR9[9XQ$gmQ&i!jU)e$h$i$jQ+Z&UU+{&j&k&lQ-`(kS.Z)f)gQ/z+]Q0R+jS0g+|+}Q1q-dQ2Z.[Q3t0QS3z0W0]Q4V0hQ4r1uS6Y3{4QQ7i6ZQ8[7kR8n8^S#ua;^R({$PU$Oa$P;^R-q(yQ#taS&z!w)aQ'O!yQ'i#dQ(^#vQ(f#yQ)P$TQ)Q$UQ)U$YQ+v&gQ,Y9wQ,Z9zQ,[9}Q,t'}Q,}(WQ-O(YQ-P(ZQ-X(bQ-^(hQ-o(wQ-p(xd-|)].R.{2T3Q4}5k6z7W8TQ.P)_Q.o*OQ.q*RQ0e+yQ0n:UQ0o:XQ0p:[Q0q,_Q1U9rQ1h-YQ1i-ZQ1m-]Q1}-wQ2W.TQ2l.pQ2n.sQ3O.}Q4Y:aQ4Z:dQ4_9yQ4`9|Q4a:PQ4f1aQ4m1kQ4q1sQ4w1yQ4y2QQ5O2XQ5Z2jQ5n3SQ6c:^Q6d:WQ6e:ZQ6m4lQ6q4uQ7Y5pQ7o:cQ7p:fQ7q6iQ8`:jQ8p9dQ8z:lQ8|9xQ8}9{Q9O:OQ9T:VQ9U:YQ9V:]Q9Y:bQ9Z:eQ9]:kQ:v;^Q;W;iQ;X;jQ;Y;kQ;Z;lQ;];nQ;p;tQ;q;uR;r;vlgOSj}!n$]%c%f%g%i*o*t/g/jS!pU%eQ%n!SQ%t!WQ'V!|Q'v#kS*h%[%_Q*l%`Q*z%mQ+W&SQ+u&fQ,r'wQ.O)^Q/b*kQ0d+xQ1[,mQ1{-uQ2V.SQ2}.|Q3b/_Q3c/`Q3e/aQ3g/cQ3n/lQ4d1XQ5Y2iQ5m3RQ5|3fQ6O3hQ6P3iQ7X5oR7b5}!vZOSUj}!S!n!|$]%[%_%`%c%e%f%g%i%m&S&f)^*k*o*t+x-u.S.|/_/`/a/c/g/j/l2i3R3f3h3i5o5}Q!_RQ!oTQ$akS%w!]%zQ%}!`Q&y!vQ'Q!zQ'W#PQ'X#QQ'Y#RQ'Z#SQ'[#TQ']#UQ'^#VQ'_#WQ'`#XQ'a#YQ'b#ZQ'd#]Q'g#bQ'k#eW'u#k'w,m1XQ)p$nS+R%x+TS+^&W/{Q+g&_Q,O&pQ,^&}Q,d'RQ,g9^Q,i9`Q,w(RQ-x)VQ/v+XQ/y+[Q0i,PQ0s,bQ0w9cQ0x9eQ0y9fQ0z9gQ0{9hQ0|9iQ0}9jQ1O9kQ1P9lQ1Q9mQ1R9nQ1S9oQ1T,hQ1W9sQ1]9pQ2O-zQ2[.]Q3s:QQ3v0TQ4W0jQ4[0tQ4]:RQ4b:TQ4c:_Q5`2qQ6S3qQ6V3xQ6b:`Q6f:gQ6g:hQ7g6WQ7z6{Q8Z7jQ8m8]Q8y8oQ9_!WR:|;aR!aRR&Y!bS&U!b+`S+]&V&^R0Q+fR'P!yR'S!zT!tU$ZS!sU$ZU$xrs*mS&s!r!uQ,T&tQ,W&wQ.l)zS0k,S,UR4X0l`!dR!]!`$u%x&`)x+hh!qUrs!r!u$Z&t&w)z,S,U0lQ/d*mQ/w+YQ3p/oT:s&W)yT!gR$uS!fR$uS%y!]&`S&O!`)xS+S%x+hT+_&W)yT&]!b$vQ#i^R'{#nT'q#i'rR1Z,lT(a#v(cR(i#yQ-})]Q2U.RQ2|.{Q4{2TQ5l3QQ6t4}Q7U5kQ7y6zQ8S7WR8i8TlhOSj}!n$]%c%f%g%i*o*t/g/jQ%]yR*d%YV$yrs*mR.u*TR*c%WQ$qpR)u$rR)k$lT%az%dT%bz%dT/i*t/j",nodeNames:"\u26A0 extends ArithOp ArithOp InterpolationStart LineComment BlockComment Script ExportDeclaration export Star as VariableName String from ; default FunctionDeclaration async function VariableDefinition TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Interpolation null super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression PrivatePropertyName BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement",maxTerm:332,context:Za,nodeProps:[["closedBy",4,"InterpolationEnd",40,"]",51,"}",66,")",132,"JSXSelfCloseEndTag JSXEndTag",146,"JSXEndTag"],["group",-26,8,15,17,58,184,188,191,192,194,197,200,211,213,219,221,223,225,228,234,240,242,244,246,248,250,251,"Statement",-30,12,13,24,27,28,41,43,44,45,47,52,60,68,74,75,91,92,101,103,119,122,124,125,126,127,129,130,148,149,151,"Expression",-22,23,25,29,32,34,152,154,156,157,159,160,161,163,164,165,167,168,169,178,180,182,183,"Type",-3,79,85,90,"ClassItem"],["openedBy",30,"InterpolationStart",46,"[",50,"{",65,"(",131,"JSXStartTag",141,"JSXStartTag JSXStartCloseTag"]],propSources:[qa],skippedNodes:[0,5,6],repeatNodeCount:28,tokenData:"!C}~R!`OX%TXY%cYZ'RZ[%c[]%T]^'R^p%Tpq%cqr'crs(kst0htu2`uv4pvw5ewx6cxyk|}?O}!O>k!O!P?`!P!QCl!Q!R!0[!R![!1q![!]!7s!]!^!8V!^!_!8g!_!`!9d!`!a!:[!a!b!U#R#S2`#S#T!>i#T#o2`#o#p!>y#p#q!?O#q#r!?f#r#s!?x#s$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$I|2`$I|$I}!Bq$I}$JO!Bq$JO$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`W%YR$UWO!^%T!_#o%T#p~%T7Z%jg$UW'Y7ROX%TXY%cYZ%TZ[%c[p%Tpq%cq!^%T!_#o%T#p$f%T$f$g%c$g#BY%T#BY#BZ%c#BZ$IS%T$IS$I_%c$I_$JT%T$JT$JU%c$JU$KV%T$KV$KW%c$KW&FU%T&FU&FV%c&FV?HT%T?HT?HU%c?HU~%T7Z'YR$UW'Z7RO!^%T!_#o%T#p~%T$T'jS$UW!j#{O!^%T!_!`'v!`#o%T#p~%T$O'}S#e#v$UWO!^%T!_!`(Z!`#o%T#p~%T$O(bR#e#v$UWO!^%T!_#o%T#p~%T)X(rZ$UW]#eOY(kYZ)eZr(krs*rs!^(k!^!_+U!_#O(k#O#P-b#P#o(k#o#p+U#p~(k&r)jV$UWOr)ers*Ps!^)e!^!_*a!_#o)e#o#p*a#p~)e&r*WR$P&j$UWO!^%T!_#o%T#p~%T&j*dROr*ars*ms~*a&j*rO$P&j)X*{R$P&j$UW]#eO!^%T!_#o%T#p~%T)P+ZV]#eOY+UYZ*aZr+Urs+ps#O+U#O#P+w#P~+U)P+wO$P&j]#e)P+zROr+Urs,Ts~+U)P,[U$P&j]#eOY,nZr,nrs-Vs#O,n#O#P-[#P~,n#e,sU]#eOY,nZr,nrs-Vs#O,n#O#P-[#P~,n#e-[O]#e#e-_PO~,n)X-gV$UWOr(krs-|s!^(k!^!_+U!_#o(k#o#p+U#p~(k)X.VZ$P&j$UW]#eOY.xYZ%TZr.xrs/rs!^.x!^!_,n!_#O.x#O#P0S#P#o.x#o#p,n#p~.x#m/PZ$UW]#eOY.xYZ%TZr.xrs/rs!^.x!^!_,n!_#O.x#O#P0S#P#o.x#o#p,n#p~.x#m/yR$UW]#eO!^%T!_#o%T#p~%T#m0XT$UWO!^.x!^!_,n!_#o.x#o#p,n#p~.x3]0mZ$UWOt%Ttu1`u!^%T!_!c%T!c!}1`!}#R%T#R#S1`#S#T%T#T#o1`#p$g%T$g~1`3]1g]$UW'o3TOt%Ttu1`u!Q%T!Q![1`![!^%T!_!c%T!c!}1`!}#R%T#R#S1`#S#T%T#T#o1`#p$g%T$g~1`7Z2k_$UW#zS']$y'g3SOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`[3q_$UW#zSOt%Ttu3ju}%T}!O3j!O!Q%T!Q![3j![!^%T!_!c%T!c!}3j!}#R%T#R#S3j#S#T%T#T#o3j#p$g%T$g~3j$O4wS#^#v$UWO!^%T!_!`5T!`#o%T#p~%T$O5[R$UW#o#vO!^%T!_#o%T#p~%T5b5lU'x5Y$UWOv%Tvw6Ow!^%T!_!`5T!`#o%T#p~%T$O6VS$UW#i#vO!^%T!_!`5T!`#o%T#p~%T)X6jZ$UW]#eOY6cYZ7]Zw6cwx*rx!^6c!^!_8T!_#O6c#O#P:T#P#o6c#o#p8T#p~6c&r7bV$UWOw7]wx*Px!^7]!^!_7w!_#o7]#o#p7w#p~7]&j7zROw7wwx*mx~7w)P8YV]#eOY8TYZ7wZw8Twx+px#O8T#O#P8o#P~8T)P8rROw8Twx8{x~8T)P9SU$P&j]#eOY9fZw9fwx-Vx#O9f#O#P9}#P~9f#e9kU]#eOY9fZw9fwx-Vx#O9f#O#P9}#P~9f#e:QPO~9f)X:YV$UWOw6cwx:ox!^6c!^!_8T!_#o6c#o#p8T#p~6c)X:xZ$P&j$UW]#eOY;kYZ%TZw;kwx/rx!^;k!^!_9f!_#O;k#O#PW{!^%T!_!`5T!`#o%T#p~%T$O>_S#[#v$UWO!^%T!_!`5T!`#o%T#p~%T%w>rSj%o$UWO!^%T!_!`5T!`#o%T#p~%T&i?VR!R&a$UWO!^%T!_#o%T#p~%T7Z?gVu5^$UWO!O%T!O!P?|!P!Q%T!Q![@r![!^%T!_#o%T#p~%T!{@RT$UWO!O%T!O!P@b!P!^%T!_#o%T#p~%T!{@iR!Q!s$UWO!^%T!_#o%T#p~%T!{@yZ$UWk!sO!Q%T!Q![@r![!^%T!_!g%T!g!hAl!h#R%T#R#S@r#S#X%T#X#YAl#Y#o%T#p~%T!{AqZ$UWO{%T{|Bd|}%T}!OBd!O!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T!{BiV$UWO!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T!{CVV$UWk!sO!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T7ZCs`$UW#]#vOYDuYZ%TZzDuz{Jl{!PDu!P!Q!-e!Q!^Du!^!_Fx!_!`!.^!`!a!/]!a!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~DuXD|[$UW}POYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~DuXEy_$UW}PO!^%T!_#Z%T#Z#[Er#[#]%T#]#^Er#^#a%T#a#bEr#b#g%T#g#hEr#h#i%T#i#jEr#j#m%T#m#nEr#n#o%T#p~%TPF}V}POYFxZ!PFx!P!QGd!Q!}Fx!}#OG{#O#PHh#P~FxPGiU}P#Z#[Gd#]#^Gd#a#bGd#g#hGd#i#jGd#m#nGdPHOTOYG{Z#OG{#O#PH_#P#QFx#Q~G{PHbQOYG{Z~G{PHkQOYFxZ~FxXHvY$UWOYHqYZ%TZ!^Hq!^!_G{!_#OHq#O#PIf#P#QDu#Q#oHq#o#pG{#p~HqXIkV$UWOYHqYZ%TZ!^Hq!^!_G{!_#oHq#o#pG{#p~HqXJVV$UWOYDuYZ%TZ!^Du!^!_Fx!_#oDu#o#pFx#p~Du7ZJs^$UW}POYJlYZKoZzJlz{NQ{!PJl!P!Q!,R!Q!^Jl!^!_!!]!_!}Jl!}#O!'|#O#P!+a#P#oJl#o#p!!]#p~Jl7ZKtV$UWOzKoz{LZ{!^Ko!^!_M]!_#oKo#o#pM]#p~Ko7ZL`X$UWOzKoz{LZ{!PKo!P!QL{!Q!^Ko!^!_M]!_#oKo#o#pM]#p~Ko7ZMSR$UWU7RO!^%T!_#o%T#p~%T7RM`ROzM]z{Mi{~M]7RMlTOzM]z{Mi{!PM]!P!QM{!Q~M]7RNQOU7R7ZNX^$UW}POYJlYZKoZzJlz{NQ{!PJl!P!Q! T!Q!^Jl!^!_!!]!_!}Jl!}#O!'|#O#P!+a#P#oJl#o#p!!]#p~Jl7Z! ^_$UWU7R}PO!^%T!_#Z%T#Z#[Er#[#]%T#]#^Er#^#a%T#a#bEr#b#g%T#g#hEr#h#i%T#i#jEr#j#m%T#m#nEr#n#o%T#p~%T7R!!bY}POY!!]YZM]Zz!!]z{!#Q{!P!!]!P!Q!&x!Q!}!!]!}#O!$`#O#P!&f#P~!!]7R!#VY}POY!!]YZM]Zz!!]z{!#Q{!P!!]!P!Q!#u!Q!}!!]!}#O!$`#O#P!&f#P~!!]7R!#|UU7R}P#Z#[Gd#]#^Gd#a#bGd#g#hGd#i#jGd#m#nGd7R!$cWOY!$`YZM]Zz!$`z{!${{#O!$`#O#P!&S#P#Q!!]#Q~!$`7R!%OYOY!$`YZM]Zz!$`z{!${{!P!$`!P!Q!%n!Q#O!$`#O#P!&S#P#Q!!]#Q~!$`7R!%sTU7ROYG{Z#OG{#O#PH_#P#QFx#Q~G{7R!&VTOY!$`YZM]Zz!$`z{!${{~!$`7R!&iTOY!!]YZM]Zz!!]z{!#Q{~!!]7R!&}_}POzM]z{Mi{#ZM]#Z#[!&x#[#]M]#]#^!&x#^#aM]#a#b!&x#b#gM]#g#h!&x#h#iM]#i#j!&x#j#mM]#m#n!&x#n~M]7Z!(R[$UWOY!'|YZKoZz!'|z{!(w{!^!'|!^!_!$`!_#O!'|#O#P!*o#P#QJl#Q#o!'|#o#p!$`#p~!'|7Z!(|^$UWOY!'|YZKoZz!'|z{!(w{!P!'|!P!Q!)x!Q!^!'|!^!_!$`!_#O!'|#O#P!*o#P#QJl#Q#o!'|#o#p!$`#p~!'|7Z!*PY$UWU7ROYHqYZ%TZ!^Hq!^!_G{!_#OHq#O#PIf#P#QDu#Q#oHq#o#pG{#p~Hq7Z!*tX$UWOY!'|YZKoZz!'|z{!(w{!^!'|!^!_!$`!_#o!'|#o#p!$`#p~!'|7Z!+fX$UWOYJlYZKoZzJlz{NQ{!^Jl!^!_!!]!_#oJl#o#p!!]#p~Jl7Z!,Yc$UW}POzKoz{LZ{!^Ko!^!_M]!_#ZKo#Z#[!,R#[#]Ko#]#^!,R#^#aKo#a#b!,R#b#gKo#g#h!,R#h#iKo#i#j!,R#j#mKo#m#n!,R#n#oKo#o#pM]#p~Ko7Z!-lV$UWT7ROY!-eYZ%TZ!^!-e!^!_!.R!_#o!-e#o#p!.R#p~!-e7R!.WQT7ROY!.RZ~!.R$P!.g[$UW#o#v}POYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~Du]!/f[#wS$UW}POYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~Du!{!0cd$UWk!sO!O%T!O!P@r!P!Q%T!Q![!1q![!^%T!_!g%T!g!hAl!h#R%T#R#S!1q#S#U%T#U#V!3X#V#X%T#X#YAl#Y#b%T#b#c!2w#c#d!4m#d#l%T#l#m!5{#m#o%T#p~%T!{!1x_$UWk!sO!O%T!O!P@r!P!Q%T!Q![!1q![!^%T!_!g%T!g!hAl!h#R%T#R#S!1q#S#X%T#X#YAl#Y#b%T#b#c!2w#c#o%T#p~%T!{!3OR$UWk!sO!^%T!_#o%T#p~%T!{!3^W$UWO!Q%T!Q!R!3v!R!S!3v!S!^%T!_#R%T#R#S!3v#S#o%T#p~%T!{!3}Y$UWk!sO!Q%T!Q!R!3v!R!S!3v!S!^%T!_#R%T#R#S!3v#S#b%T#b#c!2w#c#o%T#p~%T!{!4rV$UWO!Q%T!Q!Y!5X!Y!^%T!_#R%T#R#S!5X#S#o%T#p~%T!{!5`X$UWk!sO!Q%T!Q!Y!5X!Y!^%T!_#R%T#R#S!5X#S#b%T#b#c!2w#c#o%T#p~%T!{!6QZ$UWO!Q%T!Q![!6s![!^%T!_!c%T!c!i!6s!i#R%T#R#S!6s#S#T%T#T#Z!6s#Z#o%T#p~%T!{!6z]$UWk!sO!Q%T!Q![!6s![!^%T!_!c%T!c!i!6s!i#R%T#R#S!6s#S#T%T#T#Z!6s#Z#b%T#b#c!2w#c#o%T#p~%T$u!7|R!]V$UW#m$fO!^%T!_#o%T#p~%T!q!8^R_!i$UWO!^%T!_#o%T#p~%T5w!8rR'bd!a/n#x&s'|P!P!Q!8{!^!_!9Q!_!`!9_W!9QO$WW#v!9VP#`#v!_!`!9Y#v!9_O#o#v#v!9dO#a#v$u!9kT!{$m$UWO!^%T!_!`'v!`!a!9z!a#o%T#p~%T$P!:RR#W#w$UWO!^%T!_#o%T#p~%T%V!:gT'a!R#a#v$RS$UWO!^%T!_!`!:v!`!a!;W!a#o%T#p~%T$O!:}R#a#v$UWO!^%T!_#o%T#p~%T$O!;_T#`#v$UWO!^%T!_!`5T!`!a!;n!a#o%T#p~%T$O!;uS#`#v$UWO!^%T!_!`5T!`#o%T#p~%T*a!]S#g#v$UWO!^%T!_!`5T!`#o%T#p~%T$a!>pR$UW'f$XO!^%T!_#o%T#p~%T~!?OO!T~5b!?VT'w5Y$UWO!^%T!_!`5T!`#o%T#p#q!=P#q~%T6X!?oR!S5}nQ$UWO!^%T!_#o%T#p~%TX!@PR!kP$UWO!^%T!_#o%T#p~%T7Z!@gr$UW'Y7R#zS']$y'g3SOX%TXY%cYZ%TZ[%c[p%Tpq%cqt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`7Z!CO_$UW'Z7R#zS']$y'g3SOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`",tokenizers:[va,ja,wa,_a,0,1,2,3,4,5,6,7,8,9,Wa],topRules:{Script:[0,7]},dialects:{jsx:12107,ts:12109},dynamicPrecedences:{149:1,176:1},specialized:[{term:289,get:t=>za[t]||-1},{term:299,get:t=>Ga[t]||-1},{term:63,get:t=>Ca[t]||-1}],tokenPrec:12130}),Ya=[T("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),T("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),T("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),T("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),T("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),T(`try { +import{S as me,i as Te,s as Se,e as be,f as Pe,T as SO,g as Re,y as bO,o as ke,K as xe,M as Xe,N as ye}from"./index.86238c7e.js";import{P as Ze,N as We,u as je,D as we,v as lO,T as Y,I as KO,w as QO,x as o,y as _e,L as cO,z as uO,A as V,B as dO,F as HO,G as hO,H as z,J as ve,K as qe,E as X,M as q,O as ze,Q as Ge,R as T,U as Ce,a as w,h as Ue,b as Ye,c as Ve,d as Ee,e as Ie,s as Ae,f as Ne,g as De,i as Le,r as Fe,j as Je,k as Me,l as Be,m as Ke,n as He,o as Ot,p as et,q as tt,t as PO,C as G}from"./index.9c8b95cd.js";class N{constructor(O,e,a,i,r,s,n,Q,c,u=0,l){this.p=O,this.stack=e,this.state=a,this.reducePos=i,this.pos=r,this.score=s,this.buffer=n,this.bufferBase=Q,this.curContext=c,this.lookAhead=u,this.parent=l}toString(){return`[${this.stack.filter((O,e)=>e%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,e,a=0){let i=O.parser.context;return new N(O,[],e,a,a,0,[],0,i?new RO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let e=O>>19,a=O&65535,{parser:i}=this.p,r=i.dynamicPrecedence(a);if(r&&(this.score+=r),e==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),as;)this.stack.pop();this.reduceContext(a,n)}storeNode(O,e,a,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[n-4]==0&&s.buffer[n-1]>-1){if(e==a)return;if(s.buffer[n-2]>=e){s.buffer[n-2]=a;return}}}if(!r||this.pos==a)this.buffer.push(O,e,a,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>a;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=e,this.buffer[s+2]=a,this.buffer[s+3]=i}}shift(O,e,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if((O&262144)==0){let r=O,{parser:s}=this.p;(a>this.pos||e<=s.maxNode)&&(this.pos=a,s.stateFlag(r,1)||(this.reducePos=a)),this.pushState(r,i),this.shiftContext(e,i),e<=s.maxNode&&this.buffer.push(e,i,a,4)}else this.pos=a,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,a,4)}apply(O,e,a){O&65536?this.reduce(O):this.shift(O,e,a)}useNode(O,e){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(e,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,e=O.buffer.length;for(;e>0&&O.buffer[e-2]>O.reducePos;)e-=4;let a=O.buffer.slice(e),i=O.bufferBase+e;for(;O&&i==O.bufferBase;)O=O.parent;return new N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,e){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,e,4),this.storeNode(0,this.pos,e,a?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(O){for(let e=new at(this);;){let a=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,O);if((a&65536)==0)return!0;if(a==0)return!1;e.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;rQ&1&&n==s)||i.push(e[r],s)}e=i}let a=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-a*3;if(r<0||e.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class RO{constructor(O,e){this.tracker=O,this.context=e,this.hash=O.strict?O.hash(e):0}}var kO;(function(t){t[t.Insert=200]="Insert",t[t.Delete=190]="Delete",t[t.Reduce=100]="Reduce",t[t.MaxNext=4]="MaxNext",t[t.MaxInsertStackDepth=300]="MaxInsertStackDepth",t[t.DampenInsertStackDepth=120]="DampenInsertStackDepth"})(kO||(kO={}));class at{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let e=O&65535,a=O>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=i}}class D{constructor(O,e,a){this.stack=O,this.pos=e,this.index=a,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,e=O.bufferBase+O.buffer.length){return new D(O,e,e-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new D(this.stack,this.pos,this.index)}}class E{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const xO=new E;class it{constructor(O,e){this.input=O,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=xO,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(O,e){let a=this.range,i=this.rangeIndex,r=this.pos+O;for(;ra.to:r>=a.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-a.to,a=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,e.from);return this.end}peek(O){let e=this.chunkOff+O,a,i;if(e>=0&&e=this.chunk2Pos&&an.to&&(this.chunk2=this.chunk2.slice(0,n.to-a)),i=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),i}acceptToken(O,e=0){let a=e?this.resolveOffset(e,-1):this.pos;if(a==null||a=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,e){if(e?(this.token=e,e.start=O,e.lookAhead=O+1,e.value=e.extended=-1):this.token=xO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,e-this.chunkPos);if(O>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,e-this.chunk2Pos);if(O>=this.range.from&&e<=this.range.to)return this.input.read(O,e);let a="";for(let i of this.ranges){if(i.from>=e)break;i.to>O&&(a+=this.input.read(Math.max(i.from,O),Math.min(i.to,e)))}return a}}class I{constructor(O,e){this.data=O,this.id=e}token(O,e){rt(this.data,O,e,this.id)}}I.prototype.contextual=I.prototype.fallback=I.prototype.extend=!1;class b{constructor(O,e={}){this.token=O,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function rt(t,O,e,a){let i=0,r=1<0){let $=t[h];if(n.allows($)&&(O.token.value==-1||O.token.value==$||s.overrides($,O.token.value))){O.acceptToken($);break}}let c=O.next,u=0,l=t[i+2];if(O.next<0&&l>u&&t[Q+l*3-3]==65535){i=t[Q+l*3-1];continue O}for(;u>1,$=Q+h+(h<<1),p=t[$],P=t[$+1];if(c=P)u=h+1;else{i=t[$+2],O.advance();continue O}}break}}function C(t,O=Uint16Array){if(typeof t!="string")return t;let e=null;for(let a=0,i=0;a=92&&s--,s>=34&&s--;let Q=s-32;if(Q>=46&&(Q-=46,n=!0),r+=Q,n)break;r*=46}e?e[i++]=r:e=new O(r)}return e}const S=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let B=null;var XO;(function(t){t[t.Margin=25]="Margin"})(XO||(XO={}));function yO(t,O,e){let a=t.cursor(KO.IncludeAnonymous);for(a.moveTo(O);;)if(!(e<0?a.childBefore(O):a.childAfter(O)))for(;;){if((e<0?a.toO)&&!a.type.isError)return e<0?Math.max(0,Math.min(a.to-1,O-25)):Math.min(t.length,Math.max(a.from+1,O+25));if(e<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return e<0?0:t.length}}class st{constructor(O,e){this.fragments=O,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?yO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?yO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=s,null;if(r instanceof Y){if(s==O){if(s=Math.max(this.safeFrom,O)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[e]++,this.nextStart=s+r.length}}}class nt{constructor(O,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(a=>new E)}getActions(O){let e=0,a=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),n=O.curContext?O.curContext.hash:0,Q=0;for(let c=0;cl.end+25&&(Q=Math.max(l.lookAhead,Q)),l.value!=0)){let h=e;if(l.extended>-1&&(e=this.addActions(O,l.extended,l.end,e)),e=this.addActions(O,l.value,l.end,e),!u.extend&&(a=l,e>h))break}}for(;this.actions.length>e;)this.actions.pop();return Q&&O.setLookAhead(Q),!a&&O.pos==this.stream.end&&(a=new E,a.value=O.p.parser.eofTerm,a.start=a.end=O.pos,e=this.addActions(O,a.value,a.end,e)),this.mainToken=a,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let e=new E,{pos:a,p:i}=O;return e.start=a,e.end=Math.min(a+1,i.stream.end),e.value=a==i.stream.end?i.parser.eofTerm:0,e}updateCachedToken(O,e,a){let i=this.stream.clipPos(a.pos);if(e.token(this.stream.reset(i,O),a),O.value>-1){let{parser:r}=a.p;for(let s=0;s=0&&a.p.parser.dialect.allows(n>>1)){(n&1)==0?O.value=n>>1:O.extended=n>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,e,a,i){for(let r=0;rO.bufferLength*4?new st(a,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,e=this.minStackPos,a=this.stacks=[],i,r;for(let s=0;se)a.push(n);else{if(this.advanceStack(n,a,O))continue;{i||(i=[],r=[]),i.push(n);let Q=this.tokens.getMainToken(n);r.push(Q.value,Q.end)}}break}}if(!a.length){let s=i&&Qt(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw S&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+e);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,a);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(a.length>s)for(a.sort((n,Q)=>Q.score-n.score);a.length>s;)a.pop();a.some(n=>n.reducePos>e)&&this.recovering--}else if(a.length>1){O:for(let s=0;s500&&c.buffer.length>500)if((n.score-c.score||n.buffer.length-c.buffer.length)>0)a.splice(Q--,1);else{a.splice(s--,1);continue O}}}}this.minStackPos=a[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let c=O.curContext&&O.curContext.tracker.strict,u=c?O.curContext.hash:0;for(let l=this.fragments.nodeAt(i);l;){let h=this.parser.nodeSet.types[l.type.id]==l.type?r.getGoto(O.state,l.type.id):-1;if(h>-1&&l.length&&(!c||(l.prop(lO.contextHash)||0)==u))return O.useNode(l,h),S&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(l.type.id)})`),!0;if(!(l instanceof Y)||l.children.length==0||l.positions[0]>0)break;let $=l.children[0];if($ instanceof Y&&l.positions[0]==0)l=$;else break}}let n=r.stateSlot(O.state,4);if(n>0)return O.reduce(n),S&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(n&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let Q=this.tokens.getActions(O);for(let c=0;ci?e.push(p):a.push(p)}return!1}advanceFully(O,e){let a=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>a)return WO(O,e),!0}}runRecovery(O,e,a){let i=null,r=!1;for(let s=0;s ":"";if(n.deadEnd&&(r||(r=!0,n.restart(),S&&console.log(u+this.stackID(n)+" (restarted)"),this.advanceFully(n,a))))continue;let l=n.split(),h=u;for(let $=0;l.forceReduce()&&$<10&&(S&&console.log(h+this.stackID(l)+" (via force-reduce)"),!this.advanceFully(l,a));$++)S&&(h=this.stackID(l)+" -> ");for(let $ of n.recoverByInsert(Q))S&&console.log(u+this.stackID($)+" (via recover-insert)"),this.advanceFully($,a);this.stream.end>n.pos?(c==n.pos&&(c++,Q=0),n.recoverByDelete(Q,c),S&&console.log(u+this.stackID(n)+` (via recover-delete ${this.parser.getName(Q)})`),WO(n,a)):(!i||i.scoret;class Oe{constructor(O){this.start=O.start,this.shift=O.shift||K,this.reduce=O.reduce||K,this.reuse=O.reuse||K,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class y extends Ze{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let e=O.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;nO.topRules[n][1]),i=[];for(let n=0;n=0)r(u,Q,n[c++]);else{let l=n[c+-u];for(let h=-u;h>0;h--)r(n[c++],Q,l);c++}}}this.nodeSet=new We(e.map((n,Q)=>je.define({name:Q>=this.minRepeatTerm?void 0:n,id:Q,props:i[Q],top:a.indexOf(Q)>-1,error:Q==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(Q)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=we;let s=C(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let n=0;ntypeof n=="number"?new I(s,n):n),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,e,a){let i=new ot(this,O,e,a);for(let r of this.wrappers)i=r(i,O,e,a);return i}getGoto(O,e,a=!1){let i=this.goto;if(e>=i[0])return-1;for(let r=i[e+1];;){let s=i[r++],n=s&1,Q=i[r++];if(n&&a)return Q;for(let c=r+(s>>1);r0}validAction(O,e){if(e==this.stateSlot(O,4))return!0;for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=R(this.data,a+2);else return!1;if(e==R(this.data,a+1))return!0}}nextStates(O){let e=[];for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=R(this.data,a+2);else break;if((this.data[a+2]&1)==0){let i=this.data[a+1];e.some((r,s)=>s&1&&r==i)||e.push(this.data[a],i)}}return e}overrides(O,e){let a=jO(this.data,this.tokenPrecTable,e);return a<0||jO(this.data,this.tokenPrecTable,O){let i=O.tokenizers.find(r=>r.from==a);return i?i.to:a})),O.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map((a,i)=>{let r=O.specializers.find(n=>n.from==a.external);if(!r)return a;let s=Object.assign(Object.assign({},a),{external:r.to});return e.specializers[i]=wO(s),s})),O.contextTracker&&(e.context=O.contextTracker),O.dialect&&(e.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(e.strict=O.strict),O.wrap&&(e.wrappers=e.wrappers.concat(O.wrap)),O.bufferLength!=null&&(e.bufferLength=O.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let e=this.dynamicPrecedences;return e==null?0:e[O]||0}parseDialect(O){let e=Object.keys(this.dialects),a=e.map(()=>!1);if(O)for(let r of O.split(" ")){let s=e.indexOf(r);s>=0&&(a[s]=!0)}let i=null;for(let r=0;ra)&&e.p.parser.stateFlag(e.state,2)&&(!O||O.scoret.external(e,a)<<1|O}return t.get}const ct=53,ut=1,dt=54,ht=2,$t=55,pt=3,L=4,ee=5,te=6,ae=7,ie=8,ft=9,gt=10,mt=11,H=56,Tt=12,_O=57,St=18,bt=27,Pt=30,Rt=33,kt=35,xt=0,Xt={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},yt={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},vO={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 Zt(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}function re(t){return t==9||t==10||t==13||t==32}let qO=null,zO=null,GO=0;function sO(t,O){let e=t.pos+O;if(GO==e&&zO==t)return qO;let a=t.peek(O);for(;re(a);)a=t.peek(++O);let i="";for(;Zt(a);)i+=String.fromCharCode(a),a=t.peek(++O);return zO=t,GO=e,qO=i?i.toLowerCase():a==Wt||a==jt?void 0:null}const se=60,ne=62,oe=47,Wt=63,jt=33,wt=45;function CO(t,O){this.name=t,this.parent=O,this.hash=O?O.hash:0;for(let e=0;e-1?new CO(sO(a,1)||"",t):t},reduce(t,O){return O==St&&t?t.parent:t},reuse(t,O,e,a){let i=O.type.id;return i==L||i==kt?new CO(sO(a,1)||"",t):t},hash(t){return t?t.hash:0},strict:!1}),qt=new b((t,O)=>{if(t.next!=se){t.next<0&&O.context&&t.acceptToken(H);return}t.advance();let e=t.next==oe;e&&t.advance();let a=sO(t,0);if(a===void 0)return;if(!a)return t.acceptToken(e?Tt:L);let i=O.context?O.context.name:null;if(e){if(a==i)return t.acceptToken(ft);if(i&&yt[i])return t.acceptToken(H,-2);if(O.dialectEnabled(xt))return t.acceptToken(gt);for(let r=O.context;r;r=r.parent)if(r.name==a)return;t.acceptToken(mt)}else{if(a=="script")return t.acceptToken(ee);if(a=="style")return t.acceptToken(te);if(a=="textarea")return t.acceptToken(ae);if(Xt.hasOwnProperty(a))return t.acceptToken(ie);i&&vO[i]&&vO[i][a]?t.acceptToken(H,-1):t.acceptToken(L)}},{contextual:!0}),zt=new b(t=>{for(let O=0,e=0;;e++){if(t.next<0){e&&t.acceptToken(_O);break}if(t.next==wt)O++;else if(t.next==ne&&O>=2){e>3&&t.acceptToken(_O,-2);break}else O=0;t.advance()}});function $O(t,O,e){let a=2+t.length;return new b(i=>{for(let r=0,s=0,n=0;;n++){if(i.next<0){n&&i.acceptToken(O);break}if(r==0&&i.next==se||r==1&&i.next==oe||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(e,-(s-2));break}else if((i.next==10||i.next==13)&&n){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Gt=$O("script",ct,ut),Ct=$O("style",dt,ht),Ut=$O("textarea",$t,pt),Yt=QO({"Text RawText":o.content,"StartTag StartCloseTag SelfCloserEndTag EndTag SelfCloseEndTag":o.angleBracket,TagName:o.tagName,"MismatchedCloseTag/TagName":[o.tagName,o.invalid],AttributeName:o.attributeName,"AttributeValue UnquotedAttributeValue":o.attributeValue,Is:o.definitionOperator,"EntityReference CharacterReference":o.character,Comment:o.blockComment,ProcessingInst:o.processingInstruction,DoctypeDecl:o.documentMeta}),Vt=y.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DSO$tQ!bO'#DUO$yQ!bO'#DVOOOW'#Dj'#DjOOOW'#DX'#DXQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%pQ#tO,59mOOOX'#D]'#D]O%xOXO'#CwO&TOXO,59YOOOY'#D^'#D^O&]OYO'#CzO&hOYO,59YOOO['#D_'#D_O&pO[O'#C}O&{O[O,59YOOOW'#D`'#D`O'TOxO,59YO'[Q!bO'#DQOOOW,59Y,59YOOO`'#Da'#DaO'aO!rO,59nOOOW,59n,59nO'iQ!bO,59pO'nQ!bO,59qOOOW-E7V-E7VO'sQ#tO'#CqOOQO'#DY'#DYO(OQ#tO1G.uOOOX1G.u1G.uO(WQ#tO1G/POOOY1G/P1G/PO(`Q#tO1G/SOOO[1G/S1G/SO(hQ#tO1G/VOOOW1G/V1G/VO(pQ#tO1G/XOOOW1G/X1G/XOOOX-E7Z-E7ZO(xQ!bO'#CxOOOW1G.t1G.tOOOY-E7[-E7[O(}Q!bO'#C{OOO[-E7]-E7]O)SQ!bO'#DOOOOW-E7^-E7^O)XQ!bO,59lOOO`-E7_-E7_OOOW1G/Y1G/YOOOW1G/[1G/[OOOW1G/]1G/]O)^Q&jO,59]OOQO-E7W-E7WOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$qOOOW7+$s7+$sO)iQ!bO,59dO)nQ!bO,59gO)sQ!bO,59jOOOW1G/W1G/WO)xO,UO'#CtO*ZO7[O'#CtOOQO1G.w1G.wOOOW1G/O1G/OOOOW1G/R1G/ROOOW1G/U1G/UOOOO'#DZ'#DZO*lO,UO,59`OOQO,59`,59`OOOO'#D['#D[O*}O7[O,59`OOOO-E7X-E7XOOQO1G.z1G.zOOOO-E7Y-E7Y",stateData:"+h~O!]OS~OSSOTPOUQOVROWTOY]OZ[O[^O^^O_^O`^Oa^Ow^Oz_O!cZO~OdaO~OdbO~OdcO~OddO~OdeO~O!VfOPkP!YkP~O!WiOQnP!YnP~O!XlORqP!YqP~OSSOTPOUQOVROWTOXqOY]OZ[O[^O^^O_^O`^Oa^Ow^O!cZO~O!YrO~P#dO!ZsO!duO~OdvO~OdwO~OfyOj|O~OfyOj!OO~OfyOj!QO~OfyOj!SO~OfyOj!UO~O!VfOPkX!YkX~OP!WO!Y!XO~O!WiOQnX!YnX~OQ!ZO!Y!XO~O!XlORqX!YqX~OR!]O!Y!XO~O!Y!XO~P#dOd!_O~O!ZsO!d!aO~Oj!bO~Oj!cO~Og!dOfeXjeX~OfyOj!fO~OfyOj!gO~OfyOj!hO~OfyOj!iO~OfyOj!jO~Od!kO~Od!lO~Od!mO~Oj!nO~Oi!qO!_!oO!a!pO~Oj!rO~Oj!sO~Oj!tO~O_!uO`!uOa!uO!_!wO!`!uO~O_!xO`!xOa!xO!a!wO!b!xO~O_!uO`!uOa!uO!_!{O!`!uO~O_!xO`!xOa!xO!a!{O!b!xO~O`_a!cwz!c~",goto:"%o!_PPPPPPPPPPPPPPPPPP!`!fP!lPP!xPP!{#O#R#X#[#_#e#h#k#q#w!`P!`!`P#}$T$k$q$w$}%T%Z%aPPPPPPPP%gX^OX`pXUOX`pezabcde{}!P!R!TR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!TeZ!e{}!P!R!TQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:66,context:vt,nodeProps:[["closedBy",-11,1,2,3,4,5,6,7,8,9,10,11,"EndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,38,39,40,41,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag"]],propSources:[Yt],skippedNodes:[0],repeatNodeCount:9,tokenData:"!#b!aR!WOX$kXY)sYZ)sZ]$k]^)s^p$kpq)sqr$krs*zsv$kvw+dwx2yx}$k}!O3f!O!P$k!P!Q7_!Q![$k![!]8u!]!^$k!^!_>b!_!`!!p!`!a8T!a!c$k!c!}8u!}#R$k#R#S8u#S#T$k#T#o8u#o$f$k$f$g&R$g%W$k%W%o8u%o%p$k%p&a8u&a&b$k&b1p8u1p4U$k4U4d8u4d4e$k4e$IS8u$IS$I`$k$I`$Ib8u$Ib$Kh$k$Kh%#t8u%#t&/x$k&/x&Et8u&Et&FV$k&FV;'S8u;'S;:jiW!``!bpOq(kqr?Rrs'gsv(kwx(]x!a(k!a!bKj!b~(k!R?YZ!``!bpOr(krs'gsv(kwx(]x}(k}!O?{!O!f(k!f!gAR!g#W(k#W#XGz#X~(k!R@SV!``!bpOr(krs'gsv(kwx(]x}(k}!O@i!O~(k!R@rT!``!bp!cPOr(krs'gsv(kwx(]x~(k!RAYV!``!bpOr(krs'gsv(kwx(]x!q(k!q!rAo!r~(k!RAvV!``!bpOr(krs'gsv(kwx(]x!e(k!e!fB]!f~(k!RBdV!``!bpOr(krs'gsv(kwx(]x!v(k!v!wBy!w~(k!RCQV!``!bpOr(krs'gsv(kwx(]x!{(k!{!|Cg!|~(k!RCnV!``!bpOr(krs'gsv(kwx(]x!r(k!r!sDT!s~(k!RD[V!``!bpOr(krs'gsv(kwx(]x!g(k!g!hDq!h~(k!RDxW!``!bpOrDqrsEbsvDqvwEvwxFfx!`Dq!`!aGb!a~DqqEgT!bpOvEbvxEvx!`Eb!`!aFX!a~EbPEyRO!`Ev!`!aFS!a~EvPFXOzPqF`Q!bpzPOv'gx~'gaFkV!``OrFfrsEvsvFfvwEvw!`Ff!`!aGQ!a~FfaGXR!``zPOr(]sv(]w~(]!RGkT!``!bpzPOr(krs'gsv(kwx(]x~(k!RHRV!``!bpOr(krs'gsv(kwx(]x#c(k#c#dHh#d~(k!RHoV!``!bpOr(krs'gsv(kwx(]x#V(k#V#WIU#W~(k!RI]V!``!bpOr(krs'gsv(kwx(]x#h(k#h#iIr#i~(k!RIyV!``!bpOr(krs'gsv(kwx(]x#m(k#m#nJ`#n~(k!RJgV!``!bpOr(krs'gsv(kwx(]x#d(k#d#eJ|#e~(k!RKTV!``!bpOr(krs'gsv(kwx(]x#X(k#X#YDq#Y~(k!RKqW!``!bpOrKjrsLZsvKjvwLowxNPx!aKj!a!b! g!b~KjqL`T!bpOvLZvxLox!aLZ!a!bM^!b~LZPLrRO!aLo!a!bL{!b~LoPMORO!`Lo!`!aMX!a~LoPM^OwPqMcT!bpOvLZvxLox!`LZ!`!aMr!a~LZqMyQ!bpwPOv'gx~'gaNUV!``OrNPrsLosvNPvwLow!aNP!a!bNk!b~NPaNpV!``OrNPrsLosvNPvwLow!`NP!`!a! V!a~NPa! ^R!``wPOr(]sv(]w~(]!R! nW!``!bpOrKjrsLZsvKjvwLowxNPx!`Kj!`!a!!W!a~Kj!R!!aT!``!bpwPOr(krs'gsv(kwx(]x~(k!V!!{VgS^P!``!bpOr&Rrs&qsv&Rwx'rx!^&R!^!_(k!_~&R",tokenizers:[Gt,Ct,Ut,qt,zt,0,1,2,3,4,5],topRules:{Document:[0,13]},dialects:{noMatch:0},tokenPrec:476});function Et(t,O){let e=Object.create(null);for(let a of t.firstChild.getChildren("Attribute")){let i=a.getChild("AttributeName"),r=a.getChild("AttributeValue")||a.getChild("UnquotedAttributeValue");i&&(e[O.read(i.from,i.to)]=r?r.name=="AttributeValue"?O.read(r.from+1,r.to-1):O.read(r.from,r.to):"")}return e}function OO(t,O,e){let a;for(let i of e)if(!i.attrs||i.attrs(a||(a=Et(t.node.parent,O))))return{parser:i.parser};return null}function It(t){let O=[],e=[],a=[];for(let i of t){let r=i.tag=="script"?O:i.tag=="style"?e:i.tag=="textarea"?a:null;if(!r)throw new RangeError("Only script, style, and textarea tags can host nested parsers");r.push(i)}return _e((i,r)=>{let s=i.type.id;return s==bt?OO(i,r,O):s==Pt?OO(i,r,e):s==Rt?OO(i,r,a):null})}const At=93,UO=1,Nt=94,Dt=95,YO=2,le=[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],Lt=58,Ft=40,Qe=95,Jt=91,A=45,Mt=46,Bt=35,Kt=37;function F(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function Ht(t){return t>=48&&t<=57}const Oa=new b((t,O)=>{for(let e=!1,a=0,i=0;;i++){let{next:r}=t;if(F(r)||r==A||r==Qe||e&&Ht(r))!e&&(r!=A||i>0)&&(e=!0),a===i&&r==A&&a++,t.advance();else{e&&t.acceptToken(r==Ft?Nt:a==2&&O.canShift(YO)?YO:Dt);break}}}),ea=new b(t=>{if(le.includes(t.peek(-1))){let{next:O}=t;(F(O)||O==Qe||O==Bt||O==Mt||O==Jt||O==Lt||O==A)&&t.acceptToken(At)}}),ta=new b(t=>{if(!le.includes(t.peek(-1))){let{next:O}=t;if(O==Kt&&(t.advance(),t.acceptToken(UO)),F(O)){do t.advance();while(F(t.next));t.acceptToken(UO)}}}),aa=QO({"AtKeyword import charset namespace keyframes media supports":o.definitionKeyword,"from to selector":o.keyword,NamespaceName:o.namespace,KeyframeName:o.labelName,TagName:o.tagName,ClassName:o.className,PseudoClassName:o.constant(o.className),IdName:o.labelName,"FeatureName PropertyName":o.propertyName,AttributeName:o.attributeName,NumberLiteral:o.number,KeywordQuery:o.keyword,UnaryQueryOp:o.operatorKeyword,"CallTag ValueName":o.atom,VariableName:o.variableName,Callee:o.operatorKeyword,Unit:o.unit,"UniversalSelector NestingSelector":o.definitionOperator,MatchOp:o.compareOperator,"ChildOp SiblingOp, LogicOp":o.logicOperator,BinOp:o.arithmeticOperator,Important:o.modifier,Comment:o.blockComment,ParenthesizedContent:o.special(o.name),ColorLiteral:o.color,StringLiteral:o.string,":":o.punctuation,"PseudoOp #":o.derefOperator,"; ,":o.separator,"( )":o.paren,"[ ]":o.squareBracket,"{ }":o.brace}),ia={__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},ra={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},sa={__proto__:null,not:128,only:128,from:158,to:160},na=y.deserialize({version:14,states:"7WOYQ[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO!ZQ[O'#CfO!}QXO'#CaO#UQ[O'#ChO#aQ[O'#DPO#fQ[O'#DTOOQP'#Ec'#EcO#kQdO'#DeO$VQ[O'#DrO#kQdO'#DtO$hQ[O'#DvO$sQ[O'#DyO$xQ[O'#EPO%WQ[O'#EROOQS'#Eb'#EbOOQS'#ES'#ESQYQ[OOOOQP'#Cg'#CgOOQP,59Q,59QO!ZQ[O,59QO%_Q[O'#EVO%yQWO,58{O&RQ[O,59SO#aQ[O,59kO#fQ[O,59oO%_Q[O,59sO%_Q[O,59uO%_Q[O,59vO'bQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO'iQWO,59SO'nQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO'sQ`O,59oOOQS'#Cp'#CpO#kQdO'#CqO'{QvO'#CsO)VQtO,5:POOQO'#Cx'#CxO'nQWO'#CwO)kQWO'#CyOOQS'#Ef'#EfOOQO'#Dh'#DhO)pQ[O'#DoO*OQWO'#EiO$xQ[O'#DmO*^QWO'#DpOOQO'#Ej'#EjO%|QWO,5:^O*cQpO,5:`OOQS'#Dx'#DxO*kQWO,5:bO*pQ[O,5:bOOQO'#D{'#D{O*xQWO,5:eO*}QWO,5:kO+VQWO,5:mOOQS-E8Q-E8QOOQP1G.l1G.lO+yQXO,5:qOOQO-E8T-E8TOOQS1G.g1G.gOOQP1G.n1G.nO'iQWO1G.nO'nQWO1G.nOOQP1G/V1G/VO,WQ`O1G/ZO,qQXO1G/_O-XQXO1G/aO-oQXO1G/bO.VQXO'#CdO.zQWO'#DaOOQS,59z,59zO/PQWO,59zO/XQ[O,59zO/`Q[O'#DOO/gQdO'#CoOOQP1G/Z1G/ZO#kQdO1G/ZO/nQpO,59]OOQS,59_,59_O#kQdO,59aO/vQWO1G/kOOQS,59c,59cO/{Q!bO,59eO0TQWO'#DhO0`QWO,5:TO0eQWO,5:ZO$xQ[O,5:VO$xQ[O'#EYO0mQWO,5;TO0xQWO,5:XO%_Q[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O1ZQWO1G/|O1`QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XOOQP7+$Y7+$YOOQP7+$u7+$uO#kQdO7+$uO#kQdO,59{O1nQ[O'#EXO1xQWO1G/fOOQS1G/f1G/fO1xQWO1G/fO2QQXO'#EhO2XQWO,59jO2^QtO'#ETO3RQdO'#EeO3]QWO,59ZO3bQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO3jQWO1G/PO#kQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO3oQWO,5:tOOQO-E8W-E8WO3}QXO1G/vOOQS7+%h7+%hO4UQYO'#CsO%|QWO'#EZO4^QdO,5:hOOQS,5:h,5:hO4lQpO<O!c!}$w!}#O?[#O#P$w#P#Q?g#Q#R2U#R#T$w#T#U?r#U#c$w#c#d@q#d#o$w#o#pAQ#p#q2U#q#rA]#r#sAh#s#y$w#y#z%]#z$f$w$f$g%]$g#BY$w#BY#BZ%]#BZ$IS$w$IS$I_%]$I_$I|$w$I|$JO%]$JO$JT$w$JT$JU%]$JU$KV$w$KV$KW%]$KW&FU$w&FU&FV%]&FV~$wW$zQOy%Qz~%QW%VQoWOy%Qz~%Q~%bf#T~OX%QX^&v^p%Qpq&vqy%Qz#y%Q#y#z&v#z$f%Q$f$g&v$g#BY%Q#BY#BZ&v#BZ$IS%Q$IS$I_&v$I_$I|%Q$I|$JO&v$JO$JT%Q$JT$JU&v$JU$KV%Q$KV$KW&v$KW&FU%Q&FU&FV&v&FV~%Q~&}f#T~oWOX%QX^&v^p%Qpq&vqy%Qz#y%Q#y#z&v#z$f%Q$f$g&v$g#BY%Q#BY#BZ&v#BZ$IS%Q$IS$I_&v$I_$I|%Q$I|$JO&v$JO$JT%Q$JT$JU&v$JU$KV%Q$KV$KW&v$KW&FU%Q&FU&FV&v&FV~%Q^(fSOy%Qz#]%Q#]#^(r#^~%Q^(wSoWOy%Qz#a%Q#a#b)T#b~%Q^)YSoWOy%Qz#d%Q#d#e)f#e~%Q^)kSoWOy%Qz#c%Q#c#d)w#d~%Q^)|SoWOy%Qz#f%Q#f#g*Y#g~%Q^*_SoWOy%Qz#h%Q#h#i*k#i~%Q^*pSoWOy%Qz#T%Q#T#U*|#U~%Q^+RSoWOy%Qz#b%Q#b#c+_#c~%Q^+dSoWOy%Qz#h%Q#h#i+p#i~%Q^+wQ!VUoWOy%Qz~%Q~,QUOY+}Zr+}rs,ds#O+}#O#P,i#P~+}~,iOh~~,lPO~+}_,tWtPOy%Qz!Q%Q!Q![-^![!c%Q!c!i-^!i#T%Q#T#Z-^#Z~%Q^-cWoWOy%Qz!Q%Q!Q![-{![!c%Q!c!i-{!i#T%Q#T#Z-{#Z~%Q^.QWoWOy%Qz!Q%Q!Q![.j![!c%Q!c!i.j!i#T%Q#T#Z.j#Z~%Q^.qWfUoWOy%Qz!Q%Q!Q![/Z![!c%Q!c!i/Z!i#T%Q#T#Z/Z#Z~%Q^/bWfUoWOy%Qz!Q%Q!Q![/z![!c%Q!c!i/z!i#T%Q#T#Z/z#Z~%Q^0PWoWOy%Qz!Q%Q!Q![0i![!c%Q!c!i0i!i#T%Q#T#Z0i#Z~%Q^0pWfUoWOy%Qz!Q%Q!Q![1Y![!c%Q!c!i1Y!i#T%Q#T#Z1Y#Z~%Q^1_WoWOy%Qz!Q%Q!Q![1w![!c%Q!c!i1w!i#T%Q#T#Z1w#Z~%Q^2OQfUoWOy%Qz~%QY2XSOy%Qz!_%Q!_!`2e!`~%QY2lQzQoWOy%Qz~%QX2wQXPOy%Qz~%Q~3QUOY2}Zw2}wx,dx#O2}#O#P3d#P~2}~3gPO~2}_3oQbVOy%Qz~%Q~3zOa~_4RSUPjSOy%Qz!_%Q!_!`2e!`~%Q_4fUjS!PPOy%Qz!O%Q!O!P4x!P!Q%Q!Q![7_![~%Q^4}SoWOy%Qz!Q%Q!Q![5Z![~%Q^5bWoW#ZUOy%Qz!Q%Q!Q![5Z![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%Q^6PWoWOy%Qz{%Q{|6i|}%Q}!O6i!O!Q%Q!Q![6z![~%Q^6nSoWOy%Qz!Q%Q!Q![6z![~%Q^7RSoW#ZUOy%Qz!Q%Q!Q![6z![~%Q^7fYoW#ZUOy%Qz!O%Q!O!P5Z!P!Q%Q!Q![7_![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%Q_8ZQpVOy%Qz~%Q^8fUjSOy%Qz!O%Q!O!P4x!P!Q%Q!Q![7_![~%Q_8}S#WPOy%Qz!Q%Q!Q![5Z![~%Q~9`RjSOy%Qz{9i{~%Q~9nSoWOy9iyz9zz{:o{~9i~9}ROz9zz{:W{~9z~:ZTOz9zz{:W{!P9z!P!Q:j!Q~9z~:oOR~~:tUoWOy9iyz9zz{:o{!P9i!P!Q;W!Q~9i~;_QoWR~Oy%Qz~%Q^;jY#ZUOy%Qz!O%Q!O!P5Z!P!Q%Q!Q![7_![!g%Q!g!h5z!h#X%Q#X#Y5z#Y~%QX<_S]POy%Qz![%Q![!]RUOy%Qz!c%Q!c!}>e!}#T%Q#T#o>e#o~%QX>lY!YPoWOy%Qz}%Q}!O>e!O!Q%Q!Q![>e![!c%Q!c!}>e!}#T%Q#T#o>e#o~%QX?aQxPOy%Qz~%Q^?lQvUOy%Qz~%QX?uSOy%Qz#b%Q#b#c@R#c~%QX@WSoWOy%Qz#W%Q#W#X@d#X~%QX@kQ!`PoWOy%Qz~%QX@tSOy%Qz#f%Q#f#g@d#g~%QXAVQ!RPOy%Qz~%Q_AbQ!QVOy%Qz~%QZAmS!PPOy%Qz!_%Q!_!`2e!`~%Q",tokenizers:[ea,ta,Oa,0,1,2,3],topRules:{StyleSheet:[0,4]},specialized:[{term:94,get:t=>ia[t]||-1},{term:56,get:t=>ra[t]||-1},{term:95,get:t=>sa[t]||-1}],tokenPrec:1078});let eO=null;function tO(){if(!eO&&typeof document=="object"&&document.body){let t=[];for(let O in document.body.style)/[A-Z]|^-|^(item|length)$/.test(O)||t.push(O);eO=t.sort().map(O=>({type:"property",label:O}))}return eO||[]}const VO=["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(t=>({type:"class",label:t})),EO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).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(t=>({type:"constant",label:t}))),oa=["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(t=>({type:"type",label:t})),k=/^[\w-]*/,la=t=>{let{state:O,pos:e}=t,a=z(O).resolveInner(e,-1);if(a.name=="PropertyName")return{from:a.from,options:tO(),validFor:k};if(a.name=="ValueName")return{from:a.from,options:EO,validFor:k};if(a.name=="PseudoClassName")return{from:a.from,options:VO,validFor:k};if(a.name=="TagName"){for(let{parent:s}=a;s;s=s.parent)if(s.name=="Block")return{from:a.from,options:tO(),validFor:k};return{from:a.from,options:oa,validFor:k}}if(!t.explicit)return null;let i=a.resolve(e),r=i.childBefore(e);return r&&r.name==":"&&i.name=="PseudoClassSelector"?{from:e,options:VO,validFor:k}:r&&r.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:e,options:EO,validFor:k}:i.name=="Block"?{from:e,options:tO(),validFor:k}:null},nO=cO.define({name:"css",parser:na.configure({props:[uO.add({Declaration:V()}),dO.add({Block:HO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Qa(){return new hO(nO,nO.data.of({autocomplete:la}))}const ca=1,IO=281,AO=2,ua=3,U=282,da=4,ha=283,NO=284,$a=286,pa=287,fa=5,ga=6,ma=1,Ta=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],ce=125,Sa=123,ba=59,DO=47,Pa=42,Ra=43,ka=45,xa=36,Xa=96,ya=92,Za=new Oe({start:!1,shift(t,O){return O==fa||O==ga||O==$a?t:O==pa},strict:!1}),Wa=new b((t,O)=>{let{next:e}=t;(e==ce||e==-1||O.context)&&O.canShift(NO)&&t.acceptToken(NO)},{contextual:!0,fallback:!0}),ja=new b((t,O)=>{let{next:e}=t,a;Ta.indexOf(e)>-1||e==DO&&((a=t.peek(1))==DO||a==Pa)||e!=ce&&e!=ba&&e!=-1&&!O.context&&O.canShift(IO)&&t.acceptToken(IO)},{contextual:!0}),wa=new b((t,O)=>{let{next:e}=t;if((e==Ra||e==ka)&&(t.advance(),e==t.next)){t.advance();let a=!O.context&&O.canShift(AO);t.acceptToken(a?AO:ua)}},{contextual:!0}),_a=new b(t=>{for(let O=!1,e=0;;e++){let{next:a}=t;if(a<0){e&&t.acceptToken(U);break}else if(a==Xa){e?t.acceptToken(U):t.acceptToken(ha,1);break}else if(a==Sa&&O){e==1?t.acceptToken(da,1):t.acceptToken(U,-1);break}else if(a==10&&e){t.advance(),t.acceptToken(U);break}else a==ya&&t.advance();O=a==xa,t.advance()}}),va=new b((t,O)=>{if(!(t.next!=101||!O.dialectEnabled(ma))){t.advance();for(let e=0;e<6;e++){if(t.next!="xtends".charCodeAt(e))return;t.advance()}t.next>=57&&t.next<=65||t.next>=48&&t.next<=90||t.next==95||t.next>=97&&t.next<=122||t.next>160||t.acceptToken(ca)}}),qa=QO({"get set async static":o.modifier,"for while do if else switch try catch finally return throw break continue default case":o.controlKeyword,"in of await yield void typeof delete instanceof":o.operatorKeyword,"let var const function class extends":o.definitionKeyword,"import export from":o.moduleKeyword,"with debugger as new":o.keyword,TemplateString:o.special(o.string),super:o.atom,BooleanLiteral:o.bool,this:o.self,null:o.null,Star:o.modifier,VariableName:o.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":o.function(o.variableName),VariableDefinition:o.definition(o.variableName),Label:o.labelName,PropertyName:o.propertyName,PrivatePropertyName:o.special(o.propertyName),"CallExpression/MemberExpression/PropertyName":o.function(o.propertyName),"FunctionDeclaration/VariableDefinition":o.function(o.definition(o.variableName)),"ClassDeclaration/VariableDefinition":o.definition(o.className),PropertyDefinition:o.definition(o.propertyName),PrivatePropertyDefinition:o.definition(o.special(o.propertyName)),UpdateOp:o.updateOperator,LineComment:o.lineComment,BlockComment:o.blockComment,Number:o.number,String:o.string,ArithOp:o.arithmeticOperator,LogicOp:o.logicOperator,BitOp:o.bitwiseOperator,CompareOp:o.compareOperator,RegExp:o.regexp,Equals:o.definitionOperator,Arrow:o.function(o.punctuation),": Spread":o.punctuation,"( )":o.paren,"[ ]":o.squareBracket,"{ }":o.brace,"InterpolationStart InterpolationEnd":o.special(o.brace),".":o.derefOperator,", ;":o.separator,TypeName:o.typeName,TypeDefinition:o.definition(o.typeName),"type enum interface implements namespace module declare":o.definitionKeyword,"abstract global Privacy readonly override":o.modifier,"is keyof unique infer":o.operatorKeyword,JSXAttributeValue:o.attributeValue,JSXText:o.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":o.angleBracket,"JSXIdentifier JSXNameSpacedName":o.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":o.attributeName}),za={__proto__:null,export:18,as:23,from:29,default:32,async:37,function:38,this:48,true:56,false:56,void:66,typeof:70,null:86,super:88,new:122,await:139,yield:141,delete:142,class:152,extends:154,public:197,private:197,protected:197,readonly:199,instanceof:220,in:222,const:224,import:256,keyof:307,unique:311,infer:317,is:351,abstract:371,implements:373,type:375,let:378,var:380,interface:387,enum:391,namespace:397,module:399,declare:403,global:407,for:428,of:437,while:440,with:444,do:448,if:452,else:454,switch:458,case:464,try:470,catch:474,finally:478,return:482,throw:486,break:490,continue:494,debugger:498},Ga={__proto__:null,async:109,get:111,set:113,public:161,private:161,protected:161,static:163,abstract:165,override:167,readonly:173,new:355},Ca={__proto__:null,"<":129},Ua=y.deserialize({version:14,states:"$8SO`QdOOO'QQ(C|O'#ChO'XOWO'#DVO)dQdO'#D]O)tQdO'#DhO){QdO'#DrO-xQdO'#DxOOQO'#E]'#E]O.]Q`O'#E[O.bQ`O'#E[OOQ(C['#Ef'#EfO0aQ(C|O'#ItO2wQ(C|O'#IuO3eQ`O'#EzO3jQ!bO'#FaOOQ(C['#FS'#FSO3rO#tO'#FSO4QQ&jO'#FhO5bQ`O'#FgOOQ(C['#Iu'#IuOOQ(CW'#It'#ItOOQS'#J^'#J^O5gQ`O'#HpO5lQ(ChO'#HqOOQS'#Ih'#IhOOQS'#Hr'#HrQ`QdOOO){QdO'#DjO5tQ`O'#G[O5yQ&jO'#CmO6XQ`O'#EZO6dQ`O'#EgO6iQ,UO'#FRO7TQ`O'#G[O7YQ`O'#G`O7eQ`O'#G`O7sQ`O'#GcO7sQ`O'#GdO7sQ`O'#GfO5tQ`O'#GiO8dQ`O'#GlO9rQ`O'#CdO:SQ`O'#GyO:[Q`O'#HPO:[Q`O'#HRO`QdO'#HTO:[Q`O'#HVO:[Q`O'#HYO:aQ`O'#H`O:fQ(CjO'#HfO){QdO'#HhO:qQ(CjO'#HjO:|Q(CjO'#HlO5lQ(ChO'#HnO){QdO'#DWOOOW'#Ht'#HtO;XOWO,59qOOQ(C[,59q,59qO=jQtO'#ChO=tQdO'#HuO>XQ`O'#IvO@WQtO'#IvO'dQdO'#IvO@_Q`O,59wO@uQ7[O'#DbOAnQ`O'#E]OA{Q`O'#JROBWQ`O'#JQOBWQ`O'#JQOB`Q`O,5:yOBeQ`O'#JPOBlQaO'#DyO5yQ&jO'#EZOBzQ`O'#EZOCVQpO'#FROOQ(C[,5:S,5:SOC_QdO,5:SOE]Q(C|O,5:^OEyQ`O,5:dOFdQ(ChO'#JOO7YQ`O'#I}OFkQ`O'#I}OFsQ`O,5:xOFxQ`O'#I}OGWQdO,5:vOIWQ&jO'#EWOJeQ`O,5:vOKwQ&jO'#DlOLOQdO'#DqOLYQ7[O,5;PO){QdO,5;POOQS'#Er'#ErOOQS'#Et'#EtO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;RO){QdO,5;ROOQS'#Ex'#ExOLbQdO,5;cOOQ(C[,5;h,5;hOOQ(C[,5;i,5;iONbQ`O,5;iOOQ(C[,5;j,5;jO){QdO'#IPONgQ(ChO,5[OOQS'#Ik'#IkOOQS,5>],5>]OOQS-E;p-E;pO!+kQ(C|O,5:UOOQ(CX'#Cp'#CpO!,[Q&kO,5Q,5>QO){QdO,5>QO5lQ(ChO,5>SOOQS,5>U,5>UO!8cQ`O,5>UOOQS,5>W,5>WO!8cQ`O,5>WOOQS,5>Y,5>YO!8hQpO,59rOOOW-E;r-E;rOOQ(C[1G/]1G/]O!8mQtO,5>aO'dQdO,5>aOOQO,5>f,5>fO!8wQdO'#HuOOQO-E;s-E;sO!9UQ`O,5?bO!9^QtO,5?bO!9eQ`O,5?lOOQ(C[1G/c1G/cO!9mQ!bO'#DTOOQO'#Ix'#IxO){QdO'#IxO!:[Q!bO'#IxO!:yQ!bO'#DcO!;[Q7[O'#DcO!=gQdO'#DcO!=nQ`O'#IwO!=vQ`O,59|O!={Q`O'#EaO!>ZQ`O'#JSO!>cQ`O,5:zO!>yQ7[O'#DcO){QdO,5?mO!?TQ`O'#HzOOQO-E;x-E;xO!9eQ`O,5?lOOQ(CW1G0e1G0eO!@aQ7[O'#D|OOQ(C[,5:e,5:eO){QdO,5:eOIWQ&jO,5:eO!@hQaO,5:eO:aQ`O,5:uO!-OQ!bO,5:uO!-WQ&jO,5:uO5yQ&jO,5:uOOQ(C[1G/n1G/nOOQ(C[1G0O1G0OOOQ(CW'#EV'#EVO){QdO,5?jO!@sQ(ChO,5?jO!AUQ(ChO,5?jO!A]Q`O,5?iO!AeQ`O'#H|O!A]Q`O,5?iOOQ(CW1G0d1G0dO7YQ`O,5?iOOQ(C[1G0b1G0bO!BPQ(C|O1G0bO!CRQ(CyO,5:rOOQ(C]'#Fq'#FqO!CoQ(C}O'#IqOGWQdO1G0bO!EqQ,VO'#IyO!E{Q`O,5:WO!FQQtO'#IzO){QdO'#IzO!F[Q`O,5:]OOQ(C]'#DT'#DTOOQ(C[1G0k1G0kO!FaQ`O1G0kO!HrQ(C|O1G0mO!HyQ(C|O1G0mO!K^Q(C|O1G0mO!KeQ(C|O1G0mO!MlQ(C|O1G0mO!NPQ(C|O1G0mO#!pQ(C|O1G0mO#!wQ(C|O1G0mO#%[Q(C|O1G0mO#%cQ(C|O1G0mO#'WQ(C|O1G0mO#*QQMlO'#ChO#+{QMlO1G0}O#-vQMlO'#IuOOQ(C[1G1T1G1TO#.ZQ(C|O,5>kOOQ(CW-E;}-E;}O#.zQ(C}O1G0mOOQ(C[1G0m1G0mO#1PQ(C|O1G1QO#1pQ!bO,5;sO#1uQ!bO,5;tO#1zQ!bO'#F[O#2`Q`O'#FZOOQO'#JW'#JWOOQO'#H}'#H}O#2eQ!bO1G1]OOQ(C[1G1]1G1]OOOO1G1f1G1fO#2sQMlO'#ItO#2}Q`O,5;}OLbQdO,5;}OOOO-E;|-E;|OOQ(C[1G1Y1G1YOOQ(C[,5PQtO1G1VOOQ(C[1G1X1G1XO5tQ`O1G2}O#>WQ`O1G2}O#>]Q`O1G2}O#>bQ`O1G2}OOQS1G2}1G2}O#>gQ&kO1G2bO7YQ`O'#JQO7YQ`O'#EaO7YQ`O'#IWO#>xQ(ChO,5?yOOQS1G2f1G2fO!0VQ`O1G2lOIWQ&jO1G2iO#?TQ`O1G2iOOQS1G2j1G2jOIWQ&jO1G2jO#?YQaO1G2jO#?bQ7[O'#GhOOQS1G2l1G2lO!'VQ7[O'#IYO!0[QpO1G2oOOQS1G2o1G2oOOQS,5=Y,5=YO#?jQ&kO,5=[O5tQ`O,5=[O#6SQ`O,5=_O5bQ`O,5=_O!-OQ!bO,5=_O!-WQ&jO,5=_O5yQ&jO,5=_O#?{Q`O'#JaO#@WQ`O,5=`OOQS1G.j1G.jO#@]Q(ChO1G.jO#@hQ`O1G.jO#@mQ`O1G.jO5lQ(ChO1G.jO#@uQtO,5@OO#APQ`O,5@OO#A[QdO,5=gO#AcQ`O,5=gO7YQ`O,5@OOOQS1G3P1G3PO`QdO1G3POOQS1G3V1G3VOOQS1G3X1G3XO:[Q`O1G3ZO#AhQdO1G3]O#EcQdO'#H[OOQS1G3`1G3`O#EpQ`O'#HbO:aQ`O'#HdOOQS1G3f1G3fO#ExQdO1G3fO5lQ(ChO1G3lOOQS1G3n1G3nOOQ(CW'#Fx'#FxO5lQ(ChO1G3pO5lQ(ChO1G3rOOOW1G/^1G/^O#IvQpO,5aO#JYQ`O1G4|O#JbQ`O1G5WO#JjQ`O,5?dOLbQdO,5:{O7YQ`O,5:{O:aQ`O,59}OLbQdO,59}O!-OQ!bO,59}O#JoQMlO,59}OOQO,5:{,5:{O#JyQ7[O'#HvO#KaQ`O,5?cOOQ(C[1G/h1G/hO#KiQ7[O'#H{O#K}Q`O,5?nOOQ(CW1G0f1G0fO!;[Q7[O,59}O#LVQtO1G5XO7YQ`O,5>fOOQ(CW'#ES'#ESO#LaQ(DjO'#ETO!@XQ7[O'#D}OOQO'#Hy'#HyO#L{Q7[O,5:hOOQ(C[,5:h,5:hO#MSQ7[O'#D}O#MeQ7[O'#D}O#MlQ7[O'#EYO#MoQ7[O'#ETO#M|Q7[O'#ETO!@XQ7[O'#ETO#NaQ`O1G0PO#NfQqO1G0POOQ(C[1G0P1G0PO){QdO1G0POIWQ&jO1G0POOQ(C[1G0a1G0aO:aQ`O1G0aO!-OQ!bO1G0aO!-WQ&jO1G0aO#NmQ(C|O1G5UO){QdO1G5UO#N}Q(ChO1G5UO$ `Q`O1G5TO7YQ`O,5>hOOQO,5>h,5>hO$ hQ`O,5>hOOQO-E;z-E;zO$ `Q`O1G5TO$ vQ(C}O,59jO$#xQ(C}O,5m,5>mO$-rQ`O,5>mOOQ(C]1G2P1G2PP$-wQ`O'#IRPOQ(C]-Eo,5>oOOQO-Ep,5>pOOQO-Ex,5>xOOQO-E<[-E<[OOQ(C[7+&q7+&qO$6OQ`O7+(iO5lQ(ChO7+(iO5tQ`O7+(iO$6TQ`O7+(iO$6YQaO7+'|OOQ(CW,5>r,5>rOOQ(CW-Et,5>tOOQO-EO,5>OOOQS7+)Q7+)QOOQS7+)W7+)WOOQS7+)[7+)[OOQS7+)^7+)^OOQO1G5O1G5OO$:nQMlO1G0gO$:xQ`O1G0gOOQO1G/i1G/iO$;TQMlO1G/iO:aQ`O1G/iOLbQdO'#DcOOQO,5>b,5>bOOQO-E;t-E;tOOQO,5>g,5>gOOQO-E;y-E;yO!-OQ!bO1G/iO:aQ`O,5:iOOQO,5:o,5:oO){QdO,5:oO$;_Q(ChO,5:oO$;jQ(ChO,5:oO!-OQ!bO,5:iOOQO-E;w-E;wOOQ(C[1G0S1G0SO!@XQ7[O,5:iO$;xQ7[O,5:iO$PQ`O7+*oO$>XQ(C}O1G2[O$@^Q(C}O1G2^O$BcQ(C}O1G1yO$DnQ,VO,5>cOOQO-E;u-E;uO$DxQtO,5>dO){QdO,5>dOOQO-E;v-E;vO$ESQ`O1G5QO$E[QMlO1G0bO$GcQMlO1G0mO$GjQMlO1G0mO$IkQMlO1G0mO$IrQMlO1G0mO$KgQMlO1G0mO$KzQMlO1G0mO$NXQMlO1G0mO$N`QMlO1G0mO%!aQMlO1G0mO%!hQMlO1G0mO%$]QMlO1G0mO%$pQ(C|O<kOOOO7+'T7+'TOOOW1G/R1G/ROOQ(C]1G4X1G4XOJjQ&jO7+'zO%*VQ`O,5>lO5tQ`O,5>lOOQO-EnO%+dQ`O,5>nOIWQ&jO,5>nOOQO-Ew,5>wO%.vQ`O,5>wO%.{Q`O,5>wOOQO-EvOOQO-EqOOQO-EsOOQO-E{AN>{OOQOAN>uAN>uO%3rQ(C|OAN>{O:aQ`OAN>uO){QdOAN>{O!-OQ!bOAN>uO&)wQ(ChOAN>{O&*SQ(C}OG26lOOQ(CWG26bG26bOOQS!$( t!$( tOOQO<QQ`O'#E[O&>YQ`O'#EzO&>_Q`O'#EgO&>dQ`O'#JRO&>oQ`O'#JPO&>zQ`O,5:vO&?PQ,VO,5aO!O&PO~Ox&SO!W&^O!X&VO!Y&VO'^$dO~O]&TOk&TO!Q&WO'g&QO!S'kP!S'vP~P@dO!O'sX!R'sX!]'sX!c'sX'p'sX~O!{'sX#W#PX!S'sX~PA]O!{&_O!O'uX!R'uX~O!R&`O!O'tX~O!O&cO~O!{#eO~PA]OP&gO!T&dO!o&fO']$bO~Oc&lO!d$ZO']$bO~Ou$oO!d$nO~O!S&mO~P`Ou!{Ov!{Ox!|O!b!yO!d!zO'fQOQ!faZ!faj!fa!R!fa!a!fa!j!fa#[!fa#]!fa#^!fa#_!fa#`!fa#a!fa#b!fa#c!fa#e!fa#g!fa#i!fa#j!fa'p!fa'w!fa'x!fa~O_!fa'W!fa!O!fa!c!fan!fa!T!fa%Q!fa!]!fa~PCfO!c&nO~O!]!wO!{&pO'p&oO!R'rX_'rX'W'rX~O!c'rX~PFOO!R&tO!c'qX~O!c&vO~Ox$uO!T$vO#V&wO']$bO~OQTORTO]cOb!kOc!jOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!TSO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!n!iO#t!lO#x^O']9aO'fQO'oYO'|aO~O]#qOh$QOj#rOk#qOl#qOq$ROs9tOx#yO!T#zO!_;eO!d#vO#V9}O#t$VO$_9wO$a9zO$d$WO']&{O'b$PO'f#sO~O#W&}O~O]#qOh$QOj#rOk#qOl#qOq$ROs$SOx#yO!T#zO!_$XO!d#vO#V$YO#t$VO$_$TO$a$UO$d$WO']&{O'b$PO'f#sO~O'a'mP~PJjO!Q'RO!c'nP~P){O'g'TO'oYO~OQ9^OR9^O]cOb;`Oc!jOhcOj9^OkcOlcOq9^Os9^OxRO{cO|cO}cO!T!bO!_9`O!dUO!g9^O!h9^O!i9^O!j9^O!k9^O!n!iO#t!lO#x^O']'cO'fQO'oYO'|;^O~O!d!zO~O!R#bO_$]a'W$]a!c$]a!O$]a!T$]a%Q$]a!]$]a~O#d'jO~PIWO!]'lO!T'yX#w'yX#z'yX$R'yX~Ou'mO~P! YOu'mO!T'yX#w'yX#z'yX$R'yX~O!T'oO#w'sO#z'nO$R'tO~O!Q'wO~PLbO#z#fO$R'zO~OP$eXu$eXx$eX!b$eX'w$eX'x$eX~OPfX!RfX!{fX'afX'a$eX~P!!rOk'|O~OS'}O'U(OO'V(QO~OP(ZOu(SOx(TO'w(VO'x(XO~O'a(RO~P!#{O'a([O~O]#qOh$QOj#rOk#qOl#qOq$ROs9tOx#yO!T#zO!_;eO!d#vO#V9}O#t$VO$_9wO$a9zO$d$WO'b$PO'f#sO~O!Q(`O'](]O!c'}P~P!$jO#W(bO~O!d(cO~O!Q(hO'](eO!O(OP~P!$jOj(uOx(mO!W(sO!X(lO!Y(lO!d(cO!x(tO$w(oO'^$dO'g(jO~O!S(rO~P!&jO!b!yOP'eXu'eXx'eX'w'eX'x'eX!R'eX!{'eX~O'a'eX#m'eX~P!'cOP(xO!{(wO!R'dX'a'dX~O!R(yO'a'cX~O']${O'a'cP~O'](|O~O!d)RO~O']&{O~Ox$uO!Q!rO!T$vO#U!uO#V!rO']$bO!c'qP~O!]!wO#W)VO~OQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO#i#YO#j#ZO'fQO'p#[O'w!}O'x#OO~O_!^a!R!^a'W!^a!O!^a!c!^an!^a!T!^a%Q!^a!]!^a~P!)wOP)_O!T&dO!o)^O%Q)]O'b$PO~O!])aO!T'`X_'`X!R'`X'W'`X~O!d$ZO'b$PO~O!d$ZO']$bO'b$PO~O!]!wO#W&}O~O])lO%R)mO'])iO!S(VP~O!R)nO^(UX~O'g'TO~OZ)rO~O^)sO~O!T$lO']$bO'^$dO^(UP~Ox$uO!Q)xO!R&`O!T$vO']$bO!O'tP~O]&ZOk&ZO!Q)yO'g'TO!S'vP~O!R)zO_(RX'W(RX~O!{*OO'b$PO~OP*RO!T#zO'b$PO~O!T*TO~Ou*VO!TSO~O!n*[O~Oc*aO~O'](|O!S(TP~Oc$jO~O%RtO']${O~P8wOZ*gO^*fO~OQTORTO]cObnOcmOhcOjTOkcOlcOqTOsTOxRO{cO|cO}cO!_kO!dUO!gTO!hTO!iTO!jTO!kTO!nlO#x^O%PqO'fQO'oYO'|aO~O!T!bO#t!lO']9aO~P!1_O^*fO_$^O'W$^O~O_*kO#d*mO%T*mO%U*mO~P){O!d%`O~O%t*rO~O!T*tO~O&V*vO&X*wOQ&SaR&SaX&Sa]&Sa_&Sab&Sac&Sah&Saj&Sak&Sal&Saq&Sas&Sax&Sa{&Sa|&Sa}&Sa!T&Sa!_&Sa!d&Sa!g&Sa!h&Sa!i&Sa!j&Sa!k&Sa!n&Sa#d&Sa#t&Sa#x&Sa%P&Sa%R&Sa%T&Sa%U&Sa%X&Sa%Z&Sa%^&Sa%_&Sa%a&Sa%n&Sa%t&Sa%v&Sa%x&Sa%z&Sa%}&Sa&T&Sa&Z&Sa&]&Sa&_&Sa&a&Sa&c&Sa'S&Sa']&Sa'f&Sa'o&Sa'|&Sa!S&Sa%{&Sa`&Sa&Q&Sa~O']*|O~On+PO~O!O&ia!R&ia~P!)wO!Q+TO!O&iX!R&iX~P){O!R%zO!O'ja~O!O'ja~P>aO!R&`O!O'ta~O!RwX!R!ZX!SwX!S!ZX!]wX!]!ZX!d!ZX!{wX'b!ZX~O!]+YO!{+XO!R#TX!R'lX!S#TX!S'lX!]'lX!d'lX'b'lX~O!]+[O!d$ZO'b$PO!R!VX!S!VX~O]&ROk&ROx&SO'g(jO~OQ9^OR9^O]cOb;`Oc!jOhcOj9^OkcOlcOq9^Os9^OxRO{cO|cO}cO!T!bO!_9`O!dUO!g9^O!h9^O!i9^O!j9^O!k9^O!n!iO#t!lO#x^O'fQO'oYO'|;^O~O']:SO~P!;jO!R+`O!S'kX~O!S+bO~O!]+YO!{+XO!R#TX!S#TX~O!R+cO!S'vX~O!S+eO~O]&ROk&ROx&SO'^$dO'g(jO~O!X+fO!Y+fO~P!>hOx$uO!Q+hO!T$vO']$bO!O&nX!R&nX~O_+lO!W+oO!X+kO!Y+kO!r+sO!s+qO!t+rO!u+pO!x+tO'^$dO'g(jO'o+iO~O!S+nO~P!?iOP+yO!T&dO!o+xO~O!{,PO!R'ra!c'ra_'ra'W'ra~O!]!wO~P!@sO!R&tO!c'qa~Ox$uO!Q,SO!T$vO#U,UO#V,SO']$bO!R&pX!c&pX~O_#Oi!R#Oi'W#Oi!O#Oi!c#Oin#Oi!T#Oi%Q#Oi!]#Oi~P!)wOP;tOu(SOx(TO'w(VO'x(XO~O#W!za!R!za!c!za!{!za!T!za_!za'W!za!O!za~P!BpO#W'eXQ'eXZ'eX_'eXj'eXv'eX!a'eX!d'eX!j'eX#['eX#]'eX#^'eX#_'eX#`'eX#a'eX#b'eX#c'eX#e'eX#g'eX#i'eX#j'eX'W'eX'f'eX'p'eX!c'eX!O'eX!T'eXn'eX%Q'eX!]'eX~P!'cO!R,_O'a'mX~P!#{O'a,aO~O!R,bO!c'nX~P!)wO!c,eO~O!O,fO~OQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O'fQOZ#Zi_#Zij#Zi!R#Zi!a#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'w#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~O#[#Zi~P!FfO#[#PO~P!FfOQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO'fQOZ#Zi_#Zi!R#Zi!a#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'w#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~Oj#Zi~P!IQOj#RO~P!IQOQ#^Oj#ROu!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO'fQO_#Zi!R#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'w#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~OZ#Zi!a#Zi#a#Zi#b#Zi#c#Zi~P!KlOZ#dO!a#TO#a#TO#b#TO#c#TO~P!KlOQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO'fQO_#Zi!R#Zi#g#Zi#i#Zi#j#Zi'W#Zi'p#Zi'x#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~O'w#Zi~P!NdO'w!}O~P!NdOQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO'fQO'w!}O_#Zi!R#Zi#i#Zi#j#Zi'W#Zi'p#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~O'x#Zi~P##OO'x#OO~P##OOQ#^OZ#dOj#ROu!{Ov!{Ox!|O!a#TO!b!yO!d!zO!j#^O#[#PO#]#QO#^#QO#_#QO#`#SO#a#TO#b#TO#c#TO#e#UO#g#WO#i#YO'fQO'w!}O'x#OO~O_#Zi!R#Zi#j#Zi'W#Zi'p#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~P#%jOQ[XZ[Xj[Xu[Xv[Xx[X!a[X!b[X!d[X!j[X!{[X#WdX#[[X#][X#^[X#_[X#`[X#a[X#b[X#c[X#e[X#g[X#i[X#j[X#o[X'f[X'p[X'w[X'x[X!R[X!S[X~O#m[X~P#'}OQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO#g9lO#i9nO#j9oO'fQO'p#[O'w!}O'x#OO~O#m,hO~P#*XOQ'iXZ'iXj'iXu'iXv'iXx'iX!a'iX!b'iX!d'iX!j'iX#['iX#]'iX#^'iX#_'iX#`'iX#a'iX#b'iX#e'iX#g'iX#i'iX#j'iX'f'iX'p'iX'w'iX'x'iX!R'iX~O!{9sO#o9sO#c'iX#m'iX!S'iX~P#,SO_&sa!R&sa'W&sa!c&san&sa!O&sa!T&sa%Q&sa!]&sa~P!)wOQ#ZiZ#Zi_#Zij#Ziv#Zi!R#Zi!a#Zi!b#Zi!d#Zi!j#Zi#[#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi'W#Zi'f#Zi'p#Zi!O#Zi!c#Zin#Zi!T#Zi%Q#Zi!]#Zi~P!BpO_#ni!R#ni'W#ni!O#ni!c#nin#ni!T#ni%Q#ni!]#ni~P!)wO#z,jO~O#z,kO~O!]'lO!{,lO!T$OX#w$OX#z$OX$R$OX~O!Q,mO~O!T'oO#w,oO#z'nO$R,pO~O!R9pO!S'hX~P#*XO!S,qO~O$R,sO~OS'}O'U(OO'V,vO~O],yOk,yO!O,zO~O!RdX!]dX!cdX!c$eX'pdX~P!!rO!c-QO~P!BpO!R-RO!]!wO'p&oO!c'}X~O!c-WO~O!Q(`O']$bO!c'}P~O#W-YO~O!O$eX!R$eX!]$lX~P!!rO!R-ZO!O(OX~P!BpO!]-]O~O!O-_O~Oj-cO!]!wO!d$ZO'b$PO'p&oO~O!])aO~O_$^O!R-hO'W$^O~O!S-jO~P!&jO!X-kO!Y-kO'^$dO'g(jO~Ox-mO'g(jO~O!x-nO~O']${O!R&xX'a&xX~O!R(yO'a'ca~O'a-sO~Ou-tOv-tOx-uOPra'wra'xra!Rra!{ra~O'ara#mra~P#7pOu(SOx(TOP$^a'w$^a'x$^a!R$^a!{$^a~O'a$^a#m$^a~P#8fOu(SOx(TOP$`a'w$`a'x$`a!R$`a!{$`a~O'a$`a#m$`a~P#9XO]-vO~O#W-wO~O'a$na!R$na!{$na#m$na~P!#{O#W-zO~OP.TO!T&dO!o.SO%Q.RO~O]#qOj#rOk#qOl#qOq$ROs9tOx#yO!T#zO!_;eO!d#vO#V9}O#t$VO$_9wO$a9zO$d$WO'b$PO'f#sO~Oh.VO'].UO~P#:yO!])aO!T'`a_'`a!R'`a'W'`a~O#W.]O~OZ[X!RdX!SdX~O!R.^O!S(VX~O!S.`O~OZ.aO~O].cO'])iO~O!T$lO']$bO^'QX!R'QX~O!R)nO^(Ua~O!c.fO~P!)wO].hO~OZ.iO~O^.jO~OP.TO!T&dO!o.SO%Q.RO'b$PO~O!R)zO_(Ra'W(Ra~O!{.pO~OP.sO!T#zO~O'g'TO!S(SP~OP.}O!T.yO!o.|O%Q.{O'b$PO~OZ/XO!R/VO!S(TX~O!S/YO~O^/[O_$^O'W$^O~O]/]O~O]/^O'](|O~O#c/_O%r/`O~P0zO!{#eO#c/_O%r/`O~O_/aO~P){O_/cO~O%{/gOQ%yiR%yiX%yi]%yi_%yib%yic%yih%yij%yik%yil%yiq%yis%yix%yi{%yi|%yi}%yi!T%yi!_%yi!d%yi!g%yi!h%yi!i%yi!j%yi!k%yi!n%yi#d%yi#t%yi#x%yi%P%yi%R%yi%T%yi%U%yi%X%yi%Z%yi%^%yi%_%yi%a%yi%n%yi%t%yi%v%yi%x%yi%z%yi%}%yi&T%yi&Z%yi&]%yi&_%yi&a%yi&c%yi'S%yi']%yi'f%yi'o%yi'|%yi!S%yi`%yi&Q%yi~O`/mO!S/kO&Q/lO~P`O!TSO!d/oO~O&X*wOQ&SiR&SiX&Si]&Si_&Sib&Sic&Sih&Sij&Sik&Sil&Siq&Sis&Six&Si{&Si|&Si}&Si!T&Si!_&Si!d&Si!g&Si!h&Si!i&Si!j&Si!k&Si!n&Si#d&Si#t&Si#x&Si%P&Si%R&Si%T&Si%U&Si%X&Si%Z&Si%^&Si%_&Si%a&Si%n&Si%t&Si%v&Si%x&Si%z&Si%}&Si&T&Si&Z&Si&]&Si&_&Si&a&Si&c&Si'S&Si']&Si'f&Si'o&Si'|&Si!S&Si%{&Si`&Si&Q&Si~O!R#bOn$]a~O!O&ii!R&ii~P!)wO!R%zO!O'ji~O!R&`O!O'ti~O!O/uO~O!R!Va!S!Va~P#*XO]&ROk&RO!Q/{O'g(jO!R&jX!S&jX~P@dO!R+`O!S'ka~O]&ZOk&ZO!Q)yO'g'TO!R&oX!S&oX~O!R+cO!S'va~O!O'ui!R'ui~P!)wO_$^O!]!wO!d$ZO!j0VO!{0TO'W$^O'b$PO'p&oO~O!S0YO~P!?iO!X0ZO!Y0ZO'^$dO'g(jO'o+iO~O!W0[O~P#MSO!TSO!W0[O!u0^O!x0_O~P#MSO!W0[O!s0aO!t0aO!u0^O!x0_O~P#MSO!T&dO~O!T&dO~P!BpO!R'ri!c'ri_'ri'W'ri~P!)wO!{0jO!R'ri!c'ri_'ri'W'ri~O!R&tO!c'qi~Ox$uO!T$vO#V0lO']$bO~O#WraQraZra_rajra!ara!bra!dra!jra#[ra#]ra#^ra#_ra#`ra#ara#bra#cra#era#gra#ira#jra'Wra'fra'pra!cra!Ora!Tranra%Qra!]ra~P#7pO#W$^aQ$^aZ$^a_$^aj$^av$^a!a$^a!b$^a!d$^a!j$^a#[$^a#]$^a#^$^a#_$^a#`$^a#a$^a#b$^a#c$^a#e$^a#g$^a#i$^a#j$^a'W$^a'f$^a'p$^a!c$^a!O$^a!T$^an$^a%Q$^a!]$^a~P#8fO#W$`aQ$`aZ$`a_$`aj$`av$`a!a$`a!b$`a!d$`a!j$`a#[$`a#]$`a#^$`a#_$`a#`$`a#a$`a#b$`a#c$`a#e$`a#g$`a#i$`a#j$`a'W$`a'f$`a'p$`a!c$`a!O$`a!T$`an$`a%Q$`a!]$`a~P#9XO#W$naQ$naZ$na_$naj$nav$na!R$na!a$na!b$na!d$na!j$na#[$na#]$na#^$na#_$na#`$na#a$na#b$na#c$na#e$na#g$na#i$na#j$na'W$na'f$na'p$na!c$na!O$na!T$na!{$nan$na%Q$na!]$na~P!BpO_#Oq!R#Oq'W#Oq!O#Oq!c#Oqn#Oq!T#Oq%Q#Oq!]#Oq~P!)wO!R&kX'a&kX~PJjO!R,_O'a'ma~O!Q0tO!R&lX!c&lX~P){O!R,bO!c'na~O!R,bO!c'na~P!)wO#m!fa!S!fa~PCfO#m!^a!R!^a!S!^a~P#*XO!T1XO#x^O$P1YO~O!S1^O~On1_O~P!BpO_$Yq!R$Yq'W$Yq!O$Yq!c$Yqn$Yq!T$Yq%Q$Yq!]$Yq~P!)wO!O1`O~O],yOk,yO~Ou(SOx(TO'x(XOP$xi'w$xi!R$xi!{$xi~O'a$xi#m$xi~P$.POu(SOx(TOP$zi'w$zi'x$zi!R$zi!{$zi~O'a$zi#m$zi~P$.rO'p#[O~P!BpO!Q1cO']$bO!R&tX!c&tX~O!R-RO!c'}a~O!R-RO!]!wO!c'}a~O!R-RO!]!wO'p&oO!c'}a~O'a$gi!R$gi!{$gi#m$gi~P!#{O!Q1kO'](eO!O&vX!R&vX~P!$jO!R-ZO!O(Oa~O!R-ZO!O(Oa~P!BpO!]!wO~O!]!wO#c1sO~Oj1vO!]!wO'p&oO~O!R'di'a'di~P!#{O!{1yO!R'di'a'di~P!#{O!c1|O~O_$Zq!R$Zq'W$Zq!O$Zq!c$Zqn$Zq!T$Zq%Q$Zq!]$Zq~P!)wO!R2QO!T(PX~P!BpO!T&dO%Q2TO~O!T&dO%Q2TO~P!BpO!T$eX$u[X_$eX!R$eX'W$eX~P!!rO$u2XOPgXugXxgX!TgX'wgX'xgX_gX!RgX'WgX~O$u2XO~O]2_O%R2`O'])iO!R'PX!S'PX~O!R.^O!S(Va~OZ2dO~O^2eO~O]2hO~OP2jO!T&dO!o2iO%Q2TO~O_$^O'W$^O~P!BpO!T#zO~P!BpO!R2oO!{2qO!S(SX~O!S2rO~Ox;oO!W2{O!X2tO!Y2tO!r2zO!s2yO!t2yO!x2xO'^$dO'g(jO'o+iO~O!S2wO~P$7ZOP3SO!T.yO!o3RO%Q3QO~OP3SO!T.yO!o3RO%Q3QO'b$PO~O'](|O!R'OX!S'OX~O!R/VO!S(Ta~O]3^O'g3]O~O]3_O~O^3aO~O!c3dO~P){O_3fO~O_3fO~P){O#c3hO%r3iO~PFOO`/mO!S3mO&Q/lO~P`O!]3oO~O!R#Ti!S#Ti~P#*XO!{3qO!R#Ti!S#Ti~O!R!Vi!S!Vi~P#*XO_$^O!{3xO'W$^O~O_$^O!]!wO!{3xO'W$^O~O!X3|O!Y3|O'^$dO'g(jO'o+iO~O_$^O!]!wO!d$ZO!j3}O!{3xO'W$^O'b$PO'p&oO~O!W4OO~P$;xO!W4OO!u4RO!x4SO~P$;xO_$^O!]!wO!j3}O!{3xO'W$^O'p&oO~O!R'rq!c'rq_'rq'W'rq~P!)wO!R&tO!c'qq~O#W$xiQ$xiZ$xi_$xij$xiv$xi!a$xi!b$xi!d$xi!j$xi#[$xi#]$xi#^$xi#_$xi#`$xi#a$xi#b$xi#c$xi#e$xi#g$xi#i$xi#j$xi'W$xi'f$xi'p$xi!c$xi!O$xi!T$xin$xi%Q$xi!]$xi~P$.PO#W$ziQ$ziZ$zi_$zij$ziv$zi!a$zi!b$zi!d$zi!j$zi#[$zi#]$zi#^$zi#_$zi#`$zi#a$zi#b$zi#c$zi#e$zi#g$zi#i$zi#j$zi'W$zi'f$zi'p$zi!c$zi!O$zi!T$zin$zi%Q$zi!]$zi~P$.rO#W$giQ$giZ$gi_$gij$giv$gi!R$gi!a$gi!b$gi!d$gi!j$gi#[$gi#]$gi#^$gi#_$gi#`$gi#a$gi#b$gi#c$gi#e$gi#g$gi#i$gi#j$gi'W$gi'f$gi'p$gi!c$gi!O$gi!T$gi!{$gin$gi%Q$gi!]$gi~P!BpO!R&ka'a&ka~P!#{O!R&la!c&la~P!)wO!R,bO!c'ni~O#m#Oi!R#Oi!S#Oi~P#*XOQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O'fQOZ#Zij#Zi!a#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'w#Zi'x#Zi!R#Zi!S#Zi~O#[#Zi~P$EiO#[9eO~P$EiOQ#^Ou!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO'fQOZ#Zi!a#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'w#Zi'x#Zi!R#Zi!S#Zi~Oj#Zi~P$GqOj9gO~P$GqOQ#^Oj9gOu!{Ov!{Ox!|O!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO'fQO#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'w#Zi'x#Zi!R#Zi!S#Zi~OZ#Zi!a#Zi#a#Zi#b#Zi#c#Zi~P$IyOZ9rO!a9iO#a9iO#b9iO#c9iO~P$IyOQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO'fQO#g#Zi#i#Zi#j#Zi#m#Zi'p#Zi'x#Zi!R#Zi!S#Zi~O'w#Zi~P$L_O'w!}O~P$L_OQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO#g9lO'fQO'w!}O#i#Zi#j#Zi#m#Zi'p#Zi!R#Zi!S#Zi~O'x#Zi~P$NgO'x#OO~P$NgOQ#^OZ9rOj9gOu!{Ov!{Ox!|O!a9iO!b!yO!d!zO!j#^O#[9eO#]9fO#^9fO#_9fO#`9hO#a9iO#b9iO#c9iO#e9jO#g9lO#i9nO'fQO'w!}O'x#OO~O#j#Zi#m#Zi'p#Zi!R#Zi!S#Zi~P%!oO_#ky!R#ky'W#ky!O#ky!c#kyn#ky!T#ky%Q#ky!]#ky~P!)wOP;vOu(SOx(TO'w(VO'x(XO~OQ#ZiZ#Zij#Ziv#Zi!a#Zi!b#Zi!d#Zi!j#Zi#[#Zi#]#Zi#^#Zi#_#Zi#`#Zi#a#Zi#b#Zi#c#Zi#e#Zi#g#Zi#i#Zi#j#Zi#m#Zi'f#Zi'p#Zi!R#Zi!S#Zi~P%%aO!b!yOP'eXu'eXx'eX'w'eX'x'eX!S'eX~OQ'eXZ'eXj'eXv'eX!a'eX!d'eX!j'eX#['eX#]'eX#^'eX#_'eX#`'eX#a'eX#b'eX#c'eX#e'eX#g'eX#i'eX#j'eX#m'eX'f'eX'p'eX!R'eX~P%'eO#m#ni!R#ni!S#ni~P#*XO!S4eO~O!R&sa!S&sa~P#*XO!]!wO'p&oO!R&ta!c&ta~O!R-RO!c'}i~O!R-RO!]!wO!c'}i~O'a$gq!R$gq!{$gq#m$gq~P!#{O!O&va!R&va~P!BpO!]4lO~O!R-ZO!O(Oi~P!BpO!R-ZO!O(Oi~O!O4pO~O!]!wO#c4uO~Oj4vO!]!wO'p&oO~O!O4xO~O'a$iq!R$iq!{$iq#m$iq~P!#{O_$Zy!R$Zy'W$Zy!O$Zy!c$Zyn$Zy!T$Zy%Q$Zy!]$Zy~P!)wO!R2QO!T(Pa~O!T&dO%Q4}O~O!T&dO%Q4}O~P!BpO_#Oy!R#Oy'W#Oy!O#Oy!c#Oyn#Oy!T#Oy%Q#Oy!]#Oy~P!)wOZ5QO~O]5SO'])iO~O!R.^O!S(Vi~O]5VO~O^5WO~O'g'TO!R&{X!S&{X~O!R2oO!S(Sa~O!S5eO~P$7ZOx;sO'g(jO'o+iO~O!W5hO!X5gO!Y5gO!x0_O'^$dO'g(jO'o+iO~O!s5iO!t5iO~P%0^O!X5gO!Y5gO'^$dO'g(jO'o+iO~O!T.yO~O!T.yO%Q5kO~O!T.yO%Q5kO~P!BpOP5pO!T.yO!o5oO%Q5kO~OZ5uO!R'Oa!S'Oa~O!R/VO!S(Ti~O]5xO~O!c5yO~O!c5zO~O!c5{O~O!c5{O~P){O_5}O~O!]6QO~O!c6RO~O!R'ui!S'ui~P#*XO_$^O'W$^O~P!)wO_$^O!{6WO'W$^O~O_$^O!]!wO!{6WO'W$^O~O!X6]O!Y6]O'^$dO'g(jO'o+iO~O_$^O!]!wO!j6^O!{6WO'W$^O'p&oO~O!d$ZO'b$PO~P%4xO!W6_O~P%4gO!R'ry!c'ry_'ry'W'ry~P!)wO#W$gqQ$gqZ$gq_$gqj$gqv$gq!R$gq!a$gq!b$gq!d$gq!j$gq#[$gq#]$gq#^$gq#_$gq#`$gq#a$gq#b$gq#c$gq#e$gq#g$gq#i$gq#j$gq'W$gq'f$gq'p$gq!c$gq!O$gq!T$gq!{$gqn$gq%Q$gq!]$gq~P!BpO#W$iqQ$iqZ$iq_$iqj$iqv$iq!R$iq!a$iq!b$iq!d$iq!j$iq#[$iq#]$iq#^$iq#_$iq#`$iq#a$iq#b$iq#c$iq#e$iq#g$iq#i$iq#j$iq'W$iq'f$iq'p$iq!c$iq!O$iq!T$iq!{$iqn$iq%Q$iq!]$iq~P!BpO!R&li!c&li~P!)wO#m#Oq!R#Oq!S#Oq~P#*XOu-tOv-tOx-uOPra'wra'xra!Sra~OQraZrajra!ara!bra!dra!jra#[ra#]ra#^ra#_ra#`ra#ara#bra#cra#era#gra#ira#jra#mra'fra'pra!Rra~P%;OOu(SOx(TOP$^a'w$^a'x$^a!S$^a~OQ$^aZ$^aj$^av$^a!a$^a!b$^a!d$^a!j$^a#[$^a#]$^a#^$^a#_$^a#`$^a#a$^a#b$^a#c$^a#e$^a#g$^a#i$^a#j$^a#m$^a'f$^a'p$^a!R$^a~P%=SOu(SOx(TOP$`a'w$`a'x$`a!S$`a~OQ$`aZ$`aj$`av$`a!a$`a!b$`a!d$`a!j$`a#[$`a#]$`a#^$`a#_$`a#`$`a#a$`a#b$`a#c$`a#e$`a#g$`a#i$`a#j$`a#m$`a'f$`a'p$`a!R$`a~P%?WOQ$naZ$naj$nav$na!a$na!b$na!d$na!j$na#[$na#]$na#^$na#_$na#`$na#a$na#b$na#c$na#e$na#g$na#i$na#j$na#m$na'f$na'p$na!R$na!S$na~P%%aO#m$Yq!R$Yq!S$Yq~P#*XO#m$Zq!R$Zq!S$Zq~P#*XO!S6hO~O#m6iO~P!#{O!]!wO!R&ti!c&ti~O!]!wO'p&oO!R&ti!c&ti~O!R-RO!c'}q~O!O&vi!R&vi~P!BpO!R-ZO!O(Oq~O!O6oO~P!BpO!O6oO~O!R'dy'a'dy~P!#{O!R&ya!T&ya~P!BpO!T$tq_$tq!R$tq'W$tq~P!BpOZ6vO~O!R.^O!S(Vq~O]6yO~O!T&dO%Q6zO~O!T&dO%Q6zO~P!BpO!{6{O!R&{a!S&{a~O!R2oO!S(Si~P#*XO!X7RO!Y7RO'^$dO'g(jO'o+iO~O!W7TO!x4SO~P%GXO!T.yO%Q7WO~O!T.yO%Q7WO~P!BpO]7_O'g7^O~O!R/VO!S(Tq~O!c7aO~O!c7aO~P){O!c7cO~O!c7dO~O!R#Ty!S#Ty~P#*XO_$^O!{7jO'W$^O~O_$^O!]!wO!{7jO'W$^O~O!X7mO!Y7mO'^$dO'g(jO'o+iO~O_$^O!]!wO!j7nO!{7jO'W$^O'p&oO~O#m#ky!R#ky!S#ky~P#*XOQ$giZ$gij$giv$gi!a$gi!b$gi!d$gi!j$gi#[$gi#]$gi#^$gi#_$gi#`$gi#a$gi#b$gi#c$gi#e$gi#g$gi#i$gi#j$gi#m$gi'f$gi'p$gi!R$gi!S$gi~P%%aOu(SOx(TO'x(XOP$xi'w$xi!S$xi~OQ$xiZ$xij$xiv$xi!a$xi!b$xi!d$xi!j$xi#[$xi#]$xi#^$xi#_$xi#`$xi#a$xi#b$xi#c$xi#e$xi#g$xi#i$xi#j$xi#m$xi'f$xi'p$xi!R$xi~P%LjOu(SOx(TOP$zi'w$zi'x$zi!S$zi~OQ$ziZ$zij$ziv$zi!a$zi!b$zi!d$zi!j$zi#[$zi#]$zi#^$zi#_$zi#`$zi#a$zi#b$zi#c$zi#e$zi#g$zi#i$zi#j$zi#m$zi'f$zi'p$zi!R$zi~P%NnO#m$Zy!R$Zy!S$Zy~P#*XO#m#Oy!R#Oy!S#Oy~P#*XO!]!wO!R&tq!c&tq~O!R-RO!c'}y~O!O&vq!R&vq~P!BpO!O7tO~P!BpO!R.^O!S(Vy~O!R2oO!S(Sq~O!X8QO!Y8QO'^$dO'g(jO'o+iO~O!T.yO%Q8TO~O!T.yO%Q8TO~P!BpO!c8WO~O_$^O!{8]O'W$^O~O_$^O!]!wO!{8]O'W$^O~OQ$gqZ$gqj$gqv$gq!a$gq!b$gq!d$gq!j$gq#[$gq#]$gq#^$gq#_$gq#`$gq#a$gq#b$gq#c$gq#e$gq#g$gq#i$gq#j$gq#m$gq'f$gq'p$gq!R$gq!S$gq~P%%aOQ$iqZ$iqj$iqv$iq!a$iq!b$iq!d$iq!j$iq#[$iq#]$iq#^$iq#_$iq#`$iq#a$iq#b$iq#c$iq#e$iq#g$iq#i$iq#j$iq#m$iq'f$iq'p$iq!R$iq!S$iq~P%%aO'a$|!Z!R$|!Z!{$|!Z#m$|!Z~P!#{O!R&{q!S&{q~P#*XO_$^O!{8oO'W$^O~O#W$|!ZQ$|!ZZ$|!Z_$|!Zj$|!Zv$|!Z!R$|!Z!a$|!Z!b$|!Z!d$|!Z!j$|!Z#[$|!Z#]$|!Z#^$|!Z#_$|!Z#`$|!Z#a$|!Z#b$|!Z#c$|!Z#e$|!Z#g$|!Z#i$|!Z#j$|!Z'W$|!Z'f$|!Z'p$|!Z!c$|!Z!O$|!Z!T$|!Z!{$|!Zn$|!Z%Q$|!Z!]$|!Z~P!BpOP;uOu(SOx(TO'w(VO'x(XO~O!S!za!W!za!X!za!Y!za!r!za!s!za!t!za!x!za'^!za'g!za'o!za~P&,_O!W'eX!X'eX!Y'eX!r'eX!s'eX!t'eX!x'eX'^'eX'g'eX'o'eX~P%'eOQ$|!ZZ$|!Zj$|!Zv$|!Z!a$|!Z!b$|!Z!d$|!Z!j$|!Z#[$|!Z#]$|!Z#^$|!Z#_$|!Z#`$|!Z#a$|!Z#b$|!Z#c$|!Z#e$|!Z#g$|!Z#i$|!Z#j$|!Z#m$|!Z'f$|!Z'p$|!Z!R$|!Z!S$|!Z~P%%aO!Wra!Xra!Yra!rra!sra!tra!xra'^ra'gra'ora~P%;OO!W$^a!X$^a!Y$^a!r$^a!s$^a!t$^a!x$^a'^$^a'g$^a'o$^a~P%=SO!W$`a!X$`a!Y$`a!r$`a!s$`a!t$`a!x$`a'^$`a'g$`a'o$`a~P%?WO!S$na!W$na!X$na!Y$na!r$na!s$na!t$na!x$na'^$na'g$na'o$na~P&,_O!W$xi!X$xi!Y$xi!r$xi!s$xi!t$xi!x$xi'^$xi'g$xi'o$xi~P%LjO!W$zi!X$zi!Y$zi!r$zi!s$zi!t$zi!x$zi'^$zi'g$zi'o$zi~P%NnO!S$gi!W$gi!X$gi!Y$gi!r$gi!s$gi!t$gi!x$gi'^$gi'g$gi'o$gi~P&,_O!S$gq!W$gq!X$gq!Y$gq!r$gq!s$gq!t$gq!x$gq'^$gq'g$gq'o$gq~P&,_O!S$iq!W$iq!X$iq!Y$iq!r$iq!s$iq!t$iq!x$iq'^$iq'g$iq'o$iq~P&,_O!S$|!Z!W$|!Z!X$|!Z!Y$|!Z!r$|!Z!s$|!Z!t$|!Z!x$|!Z'^$|!Z'g$|!Z'o$|!Z~P&,_On'hX~P.jOn[X!O[X!c[X%r[X!T[X%Q[X!][X~P$zO!]dX!c[X!cdX'pdX~P;dOQ9^OR9^O]cOb;`Oc!jOhcOj9^OkcOlcOq9^Os9^OxRO{cO|cO}cO!TSO!_9`O!dUO!g9^O!h9^O!i9^O!j9^O!k9^O!n!iO#t!lO#x^O']'cO'fQO'oYO'|;^O~O]#qOh$QOj#rOk#qOl#qOq$ROs9uOx#yO!T#zO!_;fO!d#vO#V:OO#t$VO$_9xO$a9{O$d$WO']&{O'b$PO'f#sO~O!R9pO!S$]a~O]#qOh$QOj#rOk#qOl#qOq$ROs9vOx#yO!T#zO!_;gO!d#vO#V:PO#t$VO$_9yO$a9|O$d$WO']&{O'b$PO'f#sO~O#d'jO~P&]P!AQ!AY!A^!A^P!>YP!Ab!AbP!DVP!DZ?Z?Z!Da!GT8SP8SP8S8SP!HW8S8S!Jf8S!M_8S# g8S8S#!T#$c#$c#$g#$c#$oP#$cP8S#%k8S#'X8S8S-zPPP#(yPP#)c#)cP#)cP#)x#)cPP#*OP#)uP#)u#*b!!X#)u#+P#+V#+Y([#+]([P#+d#+d#+dP([P([P([P([PP([P#+j#+mP#+m([P#+qP#+tP([P([P([P([P([P([([#+z#,U#,[#,b#,p#,v#,|#-W#-^#-m#-s#.R#.X#._#.m#/S#0z#1Y#1`#1f#1l#1r#1|#2S#2Y#2d#2v#2|PPPPPPPP#3SPP#3v#7OPP#8f#8m#8uPP#>a#@t#Fp#Fs#Fv#GR#GUPP#GX#G]#Gz#Hq#Hu#IZPP#I_#Ie#IiP#Il#Ip#Is#Jc#Jy#KO#KR#KU#K[#K_#Kc#KgmhOSj}!n$]%c%f%g%i*o*t/g/jQ$imQ$ppQ%ZyS&V!b+`Q&k!jS(l#z(qQ)g$jQ)t$rQ*`%TQ+f&^S+k&d+mQ+}&lQ-k(sQ/U*aY0Z+o+p+q+r+sS2t.y2vU3|0[0^0aU5g2y2z2{S6]4O4RS7R5h5iQ7m6_R8Q7T$p[ORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8o!j'e#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ(}$SQ)l$lQ*b%WQ*i%`Q,X9tQ.W)aQ.c)mQ/^*gQ2_.^Q3Z/VQ4^9vQ5S2`R8{9upeOSjy}!n$]%Y%c%f%g%i*o*t/g/jR*d%[&WVOSTjkn}!S!W!k!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%z&S&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;`;a[!cRU!]!`%x&WQ$clQ$hmS$mp$rv$wrs!r!u$Z$u&`&t&w)x)y)z*m+Y+h,S,U/o0lQ%PwQ&h!iQ&j!jS(_#v(cS)f$i$jQ)j$lQ)w$tQ*Z%RQ*_%TS+|&k&lQ-V(`Q.[)gQ.b)mQ.d)nQ.g)rQ/P*[S/T*`*aQ0h+}Q1b-RQ2^.^Q2b.aQ2g.iQ3Y/UQ4i1cQ5R2`Q5U2dQ6u5QR7w6vx#xa!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;k!Y$fm!j$h$i$j&U&j&k&l(k)f)g+]+j+|+}-d.[0Q0W0]0h1u3{4Q6Z7k8^Q)`$cQ*P$|Q*S$}Q*^%TQ.k)wQ/O*ZU/S*_*`*aQ3T/PS3X/T/UQ5b2sQ5t3YS7P5c5fS8O7Q7SQ8f8PQ8u8g#[;b!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vd;c9d9x9{:O:V:Y:]:b:e:ke;d9r9y9|:P:W:Z:^:c:f:lW#}a$P(y;^S$|t%YQ$}uQ%OvR)}$z%P#|a!w!y#d#v#y$T$U$Y&g'}(W(Y(Z(b(h(w(x)])_)a*O*R+y,_-Y-Z-]-w.R.T.p.s.{.}1a1k1s1y2Q2T2X2j3Q3S4l4u4}5k5p6i6z7W8T9d9r9w9x9y9z9{9|9}:O:P:U:V:W:X:Y:Z:[:]:^:a:b:c:d:e:f:j:k:l;^;i;j;k;l;n;t;u;vT(O#s(PX)O$S9t9u9vU&Z!b$v+cQ'U!{Q)q$oQ.t*TQ1z-tR5^2o&^cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;a$]#aZ!_!o$a%w%}&y'Q'W'X'Y'Z'[']'^'_'`'a'b'd'g'k'u)p+R+^+g,O,^,d,g,i,w-x/v/y0i0s0w0x0y0z0{0|0}1O1P1Q1R1S1T1W1]2O2[3s3v4W4[4]4b4c5`6S6V6b6f6g7g7z8Z8m8y9_:|T!XQ!Y&_cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ&X!bR/|+`Y&R!b&V&^+`+fS(k#z(qS+j&d+mS-d(l(sQ-e(mQ-l(tQ.v*VU0W+k+o+pU0]+q+r+sS0b+t2xQ1u-kQ1w-mQ1x-nS2s.y2vU3{0Z0[0^Q4P0_Q4Q0aS5c2t2{S5f2y2zU6Z3|4O4RQ6`4SS7Q5g5hQ7S5iS7k6]6_S8P7R7TQ8^7mQ8g8QQ;h;oR;m;slhOSj}!n$]%c%f%g%i*o*t/g/jQ%k!QS&x!v9cQ)d$gQ*X%PQ*Y%QQ+z&iS,]&}:RS-y)V:_Q.Y)eQ.x*WQ/n*vQ/p*wQ/x+ZQ0`+qQ0f+{S2P-z:gQ2Y.ZS2].]:hQ3r/zQ3u0RQ4U0gQ5P2ZQ6T3tQ6X3zQ6a4VQ7e6RQ7h6YQ8Y7iQ8l8[R8x8n$W#`Z!_!o%w%}&y'Q'W'X'Y'Z'[']'^'_'`'a'b'd'g'k'u)p+R+^+g,O,^,d,g,w-x/v/y0i0s0w0x0y0z0{0|0}1O1P1Q1R1S1T1W1]2O2[3s3v4W4[4]4b4c5`6S6V6b6f6g7g7z8Z8m8y9_:|W(v#{&|1V8qT)Z$a,i$W#_Z!_!o%w%}&y'Q'W'X'Y'Z'[']'^'_'`'a'b'd'g'k'u)p+R+^+g,O,^,d,g,w-x/v/y0i0s0w0x0y0z0{0|0}1O1P1Q1R1S1T1W1]2O2[3s3v4W4[4]4b4c5`6S6V6b6f6g7g7z8Z8m8y9_:|Q'f#`S)Y$a,iR-{)Z&^cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ%f{Q%g|Q%i!OQ%j!PR/f*rQ&e!iQ)[$cQ+w&hS.Q)`)wS0c+u+vW2S-}.O.P.kS4T0d0eU4|2U2V2WU6s4{5Y5ZQ7v6tR8b7yT+l&d+mS+j&d+mU0W+k+o+pU0]+q+r+sS0b+t2xS2s.y2vU3{0Z0[0^Q4P0_Q4Q0aS5c2t2{S5f2y2zU6Z3|4O4RQ6`4SS7Q5g5hQ7S5iS7k6]6_S8P7R7TQ8^7mR8g8QS+l&d+mT2u.y2vS&r!q/dQ-U(_Q-b(kS0V+j2sQ1g-VS1p-c-lU3}0]0b5fQ4h1bS4s1v1xU6^4P4Q7SQ6k4iQ6r4vR7n6`Q!xXS&q!q/dQ)W$[Q)b$eQ)h$kQ,Q&rQ-T(_Q-a(kQ-f(nQ.X)cQ/Q*]S0U+j2sS1f-U-VS1o-b-lQ1r-eQ1t-gQ3V/RW3y0V0]0b5fQ4g1bQ4k1gS4o1p1xQ4t1wQ5r3WW6[3}4P4Q7SS6j4h4iS6n4p:iQ6p4sQ6}5aQ7[5sS7l6^6`Q7r6kS7s6o:mQ7u6rQ7|7OQ8V7]Q8_7nS8a7t:nQ8d7}Q8s8eQ9Q8tQ9X9RQ:u:pQ;T:zQ;U:{Q;V;hR;[;m$rWORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oS!xn!k!j:o#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aR:u;`$rXORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oQ$[b!Y$em!j$h$i$j&U&j&k&l(k)f)g+]+j+|+}-d.[0Q0W0]0h1u3{4Q6Z7k8^S$kn!kQ)c$fQ*]%TW/R*^*_*`*aU3W/S/T/UQ5a2sS5s3X3YU7O5b5c5fQ7]5tU7}7P7Q7SS8e8O8PS8t8f8gQ9R8u!j:p#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aQ:z;_R:{;`$f]OSTjk}!S!W!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%c%e%f%g%i%m%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oY!hRU!]!`%xv$wrs!r!u$Z$u&`&t&w)x)y)z*m+Y+h,S,U/o0lQ*j%`!h:q#]#k'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aR:t&WS&[!b$vR0O+c$p[ORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8o!j'e#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aR*i%`$roORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8oQ'U!{!k:r#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;a!h#VZ!_$a%w%}&y'Q'_'`'a'b'g'k)p+R+g,O,^,d,w-x0i0s1T2O2[3v4W4[6V7g8Z8m8y9_!R9k'd'u+^,i/v/y0w1P1Q1R1S1W1]3s4]4b4c5`6S6b6f6g7z:|!d#XZ!_$a%w%}&y'Q'a'b'g'k)p+R+g,O,^,d,w-x0i0s1T2O2[3v4W4[6V7g8Z8m8y9_}9m'd'u+^,i/v/y0w1R1S1W1]3s4]4b4c5`6S6b6f6g7z:|!`#]Z!_$a%w%}&y'Q'g'k)p+R+g,O,^,d,w-x0i0s1T2O2[3v4W4[6V7g8Z8m8y9_Q1a-Px;a'd'u+^,i/v/y0w1W1]3s4]4b4c5`6S6b6f6g7z:|Q;i;pQ;j;qR;k;r&^cORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aS#l`#mR1Y,l&e_ORSTU`jk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k#m$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,l,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aS#g^#nT'n#i'rT#h^#nT'p#i'r&e`ORSTU`jk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#]#b#e#k#m$]$n%[%_%`%c%e%f%g%i%m%x%z&S&W&_&f&p&}'R'w(R)V)^*k*o*t+T+X+[+x,P,b,h,l,m-u-z.S.].|/_/`/a/c/g/j/l/{0T0j0t1X2i2q3R3f3h3i3q3x5o5}6W6{7j8]8o9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;aT#l`#mQ#o`R'y#m$rbORSTUjk}!S!W!]!`!n!v!z!|#P#Q#R#S#T#U#V#W#X#Y#Z#b#e$]$n%[%_%`%c%e%f%g%i%m%x%z&S&_&f&p&}'R(R)V)^*k*o*t+T+x,P,b,h-u-z.S.].|/_/`/a/c/g/j/l0T0j0t2i3R3f3h3i3x5o5}6W7j8]8o!k;_#]#k&W'w+X+[,m/{1X2q3q6{9^9`9c9e9f9g9h9i9j9k9l9m9n9o9p9s:Q:R:T:_:`:g:h;a#RdOSUj}!S!W!n!|#k$]%[%_%`%c%e%f%g%i%m&S&f'w)^*k*o*t+x,m-u.S.|/_/`/a/c/g/j/l1X2i3R3f3h3i5o5}x#{a!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;k#[&|!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vQ)S$WQ,x(Sd1V9r9y9|:P:W:Z:^:c:f:le8q9d9x9{:O:V:Y:]:b:e:kx#wa!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;kQ(d#xS(n#z(qQ)T$XQ-g(o#[:w!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vd:x9d9x9{:O:V:Y:]:b:e:kd:y9r9y9|:P:W:Z:^:c:f:lQ:};bQ;O;cQ;P;dQ;Q;eQ;R;fR;S;gx#{a!y$T$U$Y(W(Y(b(w(x,_-Y-w1a1y6i;^;i;j;k#[&|!w#d#v#y&g'}(Z(h)])_)a*O*R+y-Z-].R.T.p.s.{.}1k1s2Q2T2X2j3Q3S4l4u4}5k5p6z7W8T9w9z9}:U:X:[:a:d:j;l;n;t;u;vd1V9r9y9|:P:W:Z:^:c:f:le8q9d9x9{:O:V:Y:]:b:e:klfOSj}!n$]%c%f%g%i*o*t/g/jQ(g#yQ*}%pQ+O%rR1j-Z%O#|a!w!y#d#v#y$T$U$Y&g'}(W(Y(Z(b(h(w(x)])_)a*O*R+y,_-Y-Z-]-w.R.T.p.s.{.}1a1k1s1y2Q2T2X2j3Q3S4l4u4}5k5p6i6z7W8T9d9r9w9x9y9z9{9|9}:O:P:U:V:W:X:Y:Z:[:]:^:a:b:c:d:e:f:j:k:l;^;i;j;k;l;n;t;u;vQ*Q$}Q.r*SQ2m.qR5]2nT(p#z(qS(p#z(qT2u.y2vQ)b$eQ-f(nQ.X)cQ/Q*]Q3V/RQ5r3WQ6}5aQ7[5sQ7|7OQ8V7]Q8d7}Q8s8eQ9Q8tR9X9Rp(W#t'O)U-X-o-p0q1h1}4f4w7q:v;W;X;Y!n:U&z'i(^(f+v,[,t-P-^-|.P.o.q0e0p1i1m2W2l2n3O4Y4Z4m4q4y5O5Z5n6m6q7Y8`;Z;];p;q;r[:V8p9O9V9Y9Z9]]:W1U4a6c7o7p8zr(Y#t'O)U,}-X-o-p0q1h1}4f4w7q:v;W;X;Y!p:X&z'i(^(f+v,[,t-P-^-|.P.o.q0e0n0p1i1m2W2l2n3O4Y4Z4m4q4y5O5Z5n6m6q7Y8`;Z;];p;q;r^:Y8p9O9T9V9Y9Z9]_:Z1U4a6c6d7o7p8zpeOSjy}!n$]%Y%c%f%g%i*o*t/g/jQ%VxR*k%`peOSjy}!n$]%Y%c%f%g%i*o*t/g/jR%VxQ*U%OR.n)}qeOSjy}!n$]%Y%c%f%g%i*o*t/g/jQ.z*ZS3P/O/PW5j2|2}3O3TU7V5l5m5nU8R7U7X7YQ8h8SR8v8iQ%^yR*e%YR3^/XR7_5uS$mp$rR.d)nQ%czR*o%dR*u%jT/h*t/jR*y%kQ*x%kR/q*yQjOQ!nST$`j!nQ(P#sR,u(PQ!YQR%u!YQ!^RU%{!^%|+UQ%|!_R+U%}Q+a&XR/}+aQ,`'OR0r,`Q,c'QS0u,c0vR0v,dQ+m&dR0X+mS!eR$uU&a!e&b+VQ&b!fR+V&OQ+d&[R0P+dQ&u!sQ,R&sU,V&u,R0mR0m,WQ'r#iR,n'rQ#m`R'x#mQ#cZU'h#c+Q9qQ+Q9_R9q'uQ-S(_W1d-S1e4j6lU1e-T-U-VS4j1f1gR6l4k$k(U#t&z'O'i(^(f)P)Q)U+v,Y,Z,[,t,}-O-P-X-^-o-p-|.P.o.q0e0n0o0p0q1U1h1i1m1}2W2l2n3O4Y4Z4_4`4a4f4m4q4w4y5O5Z5n6c6d6e6m6q7Y7o7p7q8`8p8z8|8}9O9T9U9V9Y9Z9]:v;W;X;Y;Z;];p;q;rQ-[(fU1l-[1n4nQ1n-^R4n1mQ(q#zR-i(qQ(z$OR-r(zQ2R-|R4z2RQ){$xR.m){Q2p.tS5_2p6|R6|5`Q*W%PR.w*WQ2v.yR5d2vQ/W*bS3[/W5vR5v3^Q._)jW2a._2c5T6wQ2c.bQ5T2bR6w5UQ)o$mR.e)oQ/j*tR3l/jWiOSj!nQ%h}Q)X$]Q*n%cQ*p%fQ*q%gQ*s%iQ/e*oS/h*t/jR3k/gQ$_gQ%l!RQ%o!TQ%q!UQ%s!VQ)v$sQ)|$yQ*d%^Q*{%nQ-h(pS/Z*e*hQ/r*zQ/s*}Q/t+OS0S+j2sQ2f.hQ2k.oQ3U/QQ3`/]Q3j/fY3w0U0V0]0b5fQ5X2hQ5[2lQ5q3VQ5w3_[6U3v3y3}4P4Q7SQ6x5VQ7Z5rQ7`5xW7f6V6[6^6`Q7x6yQ7{6}Q8U7[U8X7g7l7nQ8c7|Q8j8VS8k8Z8_Q8r8dQ8w8mQ9P8sQ9S8yQ9W9QR9[9XQ$gmQ&i!jU)e$h$i$jQ+Z&UU+{&j&k&lQ-`(kS.Z)f)gQ/z+]Q0R+jS0g+|+}Q1q-dQ2Z.[Q3t0QS3z0W0]Q4V0hQ4r1uS6Y3{4QQ7i6ZQ8[7kR8n8^S#ua;^R({$PU$Oa$P;^R-q(yQ#taS&z!w)aQ'O!yQ'i#dQ(^#vQ(f#yQ)P$TQ)Q$UQ)U$YQ+v&gQ,Y9wQ,Z9zQ,[9}Q,t'}Q,}(WQ-O(YQ-P(ZQ-X(bQ-^(hQ-o(wQ-p(xd-|)].R.{2T3Q4}5k6z7W8TQ.P)_Q.o*OQ.q*RQ0e+yQ0n:UQ0o:XQ0p:[Q0q,_Q1U9rQ1h-YQ1i-ZQ1m-]Q1}-wQ2W.TQ2l.pQ2n.sQ3O.}Q4Y:aQ4Z:dQ4_9yQ4`9|Q4a:PQ4f1aQ4m1kQ4q1sQ4w1yQ4y2QQ5O2XQ5Z2jQ5n3SQ6c:^Q6d:WQ6e:ZQ6m4lQ6q4uQ7Y5pQ7o:cQ7p:fQ7q6iQ8`:jQ8p9dQ8z:lQ8|9xQ8}9{Q9O:OQ9T:VQ9U:YQ9V:]Q9Y:bQ9Z:eQ9]:kQ:v;^Q;W;iQ;X;jQ;Y;kQ;Z;lQ;];nQ;p;tQ;q;uR;r;vlgOSj}!n$]%c%f%g%i*o*t/g/jS!pU%eQ%n!SQ%t!WQ'V!|Q'v#kS*h%[%_Q*l%`Q*z%mQ+W&SQ+u&fQ,r'wQ.O)^Q/b*kQ0d+xQ1[,mQ1{-uQ2V.SQ2}.|Q3b/_Q3c/`Q3e/aQ3g/cQ3n/lQ4d1XQ5Y2iQ5m3RQ5|3fQ6O3hQ6P3iQ7X5oR7b5}!vZOSUj}!S!n!|$]%[%_%`%c%e%f%g%i%m&S&f)^*k*o*t+x-u.S.|/_/`/a/c/g/j/l2i3R3f3h3i5o5}Q!_RQ!oTQ$akS%w!]%zQ%}!`Q&y!vQ'Q!zQ'W#PQ'X#QQ'Y#RQ'Z#SQ'[#TQ']#UQ'^#VQ'_#WQ'`#XQ'a#YQ'b#ZQ'd#]Q'g#bQ'k#eW'u#k'w,m1XQ)p$nS+R%x+TS+^&W/{Q+g&_Q,O&pQ,^&}Q,d'RQ,g9^Q,i9`Q,w(RQ-x)VQ/v+XQ/y+[Q0i,PQ0s,bQ0w9cQ0x9eQ0y9fQ0z9gQ0{9hQ0|9iQ0}9jQ1O9kQ1P9lQ1Q9mQ1R9nQ1S9oQ1T,hQ1W9sQ1]9pQ2O-zQ2[.]Q3s:QQ3v0TQ4W0jQ4[0tQ4]:RQ4b:TQ4c:_Q5`2qQ6S3qQ6V3xQ6b:`Q6f:gQ6g:hQ7g6WQ7z6{Q8Z7jQ8m8]Q8y8oQ9_!WR:|;aR!aRR&Y!bS&U!b+`S+]&V&^R0Q+fR'P!yR'S!zT!tU$ZS!sU$ZU$xrs*mS&s!r!uQ,T&tQ,W&wQ.l)zS0k,S,UR4X0l`!dR!]!`$u%x&`)x+hh!qUrs!r!u$Z&t&w)z,S,U0lQ/d*mQ/w+YQ3p/oT:s&W)yT!gR$uS!fR$uS%y!]&`S&O!`)xS+S%x+hT+_&W)yT&]!b$vQ#i^R'{#nT'q#i'rR1Z,lT(a#v(cR(i#yQ-})]Q2U.RQ2|.{Q4{2TQ5l3QQ6t4}Q7U5kQ7y6zQ8S7WR8i8TlhOSj}!n$]%c%f%g%i*o*t/g/jQ%]yR*d%YV$yrs*mR.u*TR*c%WQ$qpR)u$rR)k$lT%az%dT%bz%dT/i*t/j",nodeNames:"\u26A0 extends ArithOp ArithOp InterpolationStart LineComment BlockComment Script ExportDeclaration export Star as VariableName String from ; default FunctionDeclaration async function VariableDefinition TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Interpolation null super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression PrivatePropertyName BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement",maxTerm:332,context:Za,nodeProps:[["closedBy",4,"InterpolationEnd",40,"]",51,"}",66,")",132,"JSXSelfCloseEndTag JSXEndTag",146,"JSXEndTag"],["group",-26,8,15,17,58,184,188,191,192,194,197,200,211,213,219,221,223,225,228,234,240,242,244,246,248,250,251,"Statement",-30,12,13,24,27,28,41,43,44,45,47,52,60,68,74,75,91,92,101,103,119,122,124,125,126,127,129,130,148,149,151,"Expression",-22,23,25,29,32,34,152,154,156,157,159,160,161,163,164,165,167,168,169,178,180,182,183,"Type",-3,79,85,90,"ClassItem"],["openedBy",30,"InterpolationStart",46,"[",50,"{",65,"(",131,"JSXStartTag",141,"JSXStartTag JSXStartCloseTag"]],propSources:[qa],skippedNodes:[0,5,6],repeatNodeCount:28,tokenData:"!C}~R!`OX%TXY%cYZ'RZ[%c[]%T]^'R^p%Tpq%cqr'crs(kst0htu2`uv4pvw5ewx6cxyk|}?O}!O>k!O!P?`!P!QCl!Q!R!0[!R![!1q![!]!7s!]!^!8V!^!_!8g!_!`!9d!`!a!:[!a!b!U#R#S2`#S#T!>i#T#o2`#o#p!>y#p#q!?O#q#r!?f#r#s!?x#s$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$I|2`$I|$I}!Bq$I}$JO!Bq$JO$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`W%YR$UWO!^%T!_#o%T#p~%T7Z%jg$UW'Y7ROX%TXY%cYZ%TZ[%c[p%Tpq%cq!^%T!_#o%T#p$f%T$f$g%c$g#BY%T#BY#BZ%c#BZ$IS%T$IS$I_%c$I_$JT%T$JT$JU%c$JU$KV%T$KV$KW%c$KW&FU%T&FU&FV%c&FV?HT%T?HT?HU%c?HU~%T7Z'YR$UW'Z7RO!^%T!_#o%T#p~%T$T'jS$UW!j#{O!^%T!_!`'v!`#o%T#p~%T$O'}S#e#v$UWO!^%T!_!`(Z!`#o%T#p~%T$O(bR#e#v$UWO!^%T!_#o%T#p~%T)X(rZ$UW]#eOY(kYZ)eZr(krs*rs!^(k!^!_+U!_#O(k#O#P-b#P#o(k#o#p+U#p~(k&r)jV$UWOr)ers*Ps!^)e!^!_*a!_#o)e#o#p*a#p~)e&r*WR$P&j$UWO!^%T!_#o%T#p~%T&j*dROr*ars*ms~*a&j*rO$P&j)X*{R$P&j$UW]#eO!^%T!_#o%T#p~%T)P+ZV]#eOY+UYZ*aZr+Urs+ps#O+U#O#P+w#P~+U)P+wO$P&j]#e)P+zROr+Urs,Ts~+U)P,[U$P&j]#eOY,nZr,nrs-Vs#O,n#O#P-[#P~,n#e,sU]#eOY,nZr,nrs-Vs#O,n#O#P-[#P~,n#e-[O]#e#e-_PO~,n)X-gV$UWOr(krs-|s!^(k!^!_+U!_#o(k#o#p+U#p~(k)X.VZ$P&j$UW]#eOY.xYZ%TZr.xrs/rs!^.x!^!_,n!_#O.x#O#P0S#P#o.x#o#p,n#p~.x#m/PZ$UW]#eOY.xYZ%TZr.xrs/rs!^.x!^!_,n!_#O.x#O#P0S#P#o.x#o#p,n#p~.x#m/yR$UW]#eO!^%T!_#o%T#p~%T#m0XT$UWO!^.x!^!_,n!_#o.x#o#p,n#p~.x3]0mZ$UWOt%Ttu1`u!^%T!_!c%T!c!}1`!}#R%T#R#S1`#S#T%T#T#o1`#p$g%T$g~1`3]1g]$UW'o3TOt%Ttu1`u!Q%T!Q![1`![!^%T!_!c%T!c!}1`!}#R%T#R#S1`#S#T%T#T#o1`#p$g%T$g~1`7Z2k_$UW#zS']$y'g3SOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`[3q_$UW#zSOt%Ttu3ju}%T}!O3j!O!Q%T!Q![3j![!^%T!_!c%T!c!}3j!}#R%T#R#S3j#S#T%T#T#o3j#p$g%T$g~3j$O4wS#^#v$UWO!^%T!_!`5T!`#o%T#p~%T$O5[R$UW#o#vO!^%T!_#o%T#p~%T5b5lU'x5Y$UWOv%Tvw6Ow!^%T!_!`5T!`#o%T#p~%T$O6VS$UW#i#vO!^%T!_!`5T!`#o%T#p~%T)X6jZ$UW]#eOY6cYZ7]Zw6cwx*rx!^6c!^!_8T!_#O6c#O#P:T#P#o6c#o#p8T#p~6c&r7bV$UWOw7]wx*Px!^7]!^!_7w!_#o7]#o#p7w#p~7]&j7zROw7wwx*mx~7w)P8YV]#eOY8TYZ7wZw8Twx+px#O8T#O#P8o#P~8T)P8rROw8Twx8{x~8T)P9SU$P&j]#eOY9fZw9fwx-Vx#O9f#O#P9}#P~9f#e9kU]#eOY9fZw9fwx-Vx#O9f#O#P9}#P~9f#e:QPO~9f)X:YV$UWOw6cwx:ox!^6c!^!_8T!_#o6c#o#p8T#p~6c)X:xZ$P&j$UW]#eOY;kYZ%TZw;kwx/rx!^;k!^!_9f!_#O;k#O#PW{!^%T!_!`5T!`#o%T#p~%T$O>_S#[#v$UWO!^%T!_!`5T!`#o%T#p~%T%w>rSj%o$UWO!^%T!_!`5T!`#o%T#p~%T&i?VR!R&a$UWO!^%T!_#o%T#p~%T7Z?gVu5^$UWO!O%T!O!P?|!P!Q%T!Q![@r![!^%T!_#o%T#p~%T!{@RT$UWO!O%T!O!P@b!P!^%T!_#o%T#p~%T!{@iR!Q!s$UWO!^%T!_#o%T#p~%T!{@yZ$UWk!sO!Q%T!Q![@r![!^%T!_!g%T!g!hAl!h#R%T#R#S@r#S#X%T#X#YAl#Y#o%T#p~%T!{AqZ$UWO{%T{|Bd|}%T}!OBd!O!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T!{BiV$UWO!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T!{CVV$UWk!sO!Q%T!Q![CO![!^%T!_#R%T#R#SCO#S#o%T#p~%T7ZCs`$UW#]#vOYDuYZ%TZzDuz{Jl{!PDu!P!Q!-e!Q!^Du!^!_Fx!_!`!.^!`!a!/]!a!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~DuXD|[$UW}POYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~DuXEy_$UW}PO!^%T!_#Z%T#Z#[Er#[#]%T#]#^Er#^#a%T#a#bEr#b#g%T#g#hEr#h#i%T#i#jEr#j#m%T#m#nEr#n#o%T#p~%TPF}V}POYFxZ!PFx!P!QGd!Q!}Fx!}#OG{#O#PHh#P~FxPGiU}P#Z#[Gd#]#^Gd#a#bGd#g#hGd#i#jGd#m#nGdPHOTOYG{Z#OG{#O#PH_#P#QFx#Q~G{PHbQOYG{Z~G{PHkQOYFxZ~FxXHvY$UWOYHqYZ%TZ!^Hq!^!_G{!_#OHq#O#PIf#P#QDu#Q#oHq#o#pG{#p~HqXIkV$UWOYHqYZ%TZ!^Hq!^!_G{!_#oHq#o#pG{#p~HqXJVV$UWOYDuYZ%TZ!^Du!^!_Fx!_#oDu#o#pFx#p~Du7ZJs^$UW}POYJlYZKoZzJlz{NQ{!PJl!P!Q!,R!Q!^Jl!^!_!!]!_!}Jl!}#O!'|#O#P!+a#P#oJl#o#p!!]#p~Jl7ZKtV$UWOzKoz{LZ{!^Ko!^!_M]!_#oKo#o#pM]#p~Ko7ZL`X$UWOzKoz{LZ{!PKo!P!QL{!Q!^Ko!^!_M]!_#oKo#o#pM]#p~Ko7ZMSR$UWU7RO!^%T!_#o%T#p~%T7RM`ROzM]z{Mi{~M]7RMlTOzM]z{Mi{!PM]!P!QM{!Q~M]7RNQOU7R7ZNX^$UW}POYJlYZKoZzJlz{NQ{!PJl!P!Q! T!Q!^Jl!^!_!!]!_!}Jl!}#O!'|#O#P!+a#P#oJl#o#p!!]#p~Jl7Z! ^_$UWU7R}PO!^%T!_#Z%T#Z#[Er#[#]%T#]#^Er#^#a%T#a#bEr#b#g%T#g#hEr#h#i%T#i#jEr#j#m%T#m#nEr#n#o%T#p~%T7R!!bY}POY!!]YZM]Zz!!]z{!#Q{!P!!]!P!Q!&x!Q!}!!]!}#O!$`#O#P!&f#P~!!]7R!#VY}POY!!]YZM]Zz!!]z{!#Q{!P!!]!P!Q!#u!Q!}!!]!}#O!$`#O#P!&f#P~!!]7R!#|UU7R}P#Z#[Gd#]#^Gd#a#bGd#g#hGd#i#jGd#m#nGd7R!$cWOY!$`YZM]Zz!$`z{!${{#O!$`#O#P!&S#P#Q!!]#Q~!$`7R!%OYOY!$`YZM]Zz!$`z{!${{!P!$`!P!Q!%n!Q#O!$`#O#P!&S#P#Q!!]#Q~!$`7R!%sTU7ROYG{Z#OG{#O#PH_#P#QFx#Q~G{7R!&VTOY!$`YZM]Zz!$`z{!${{~!$`7R!&iTOY!!]YZM]Zz!!]z{!#Q{~!!]7R!&}_}POzM]z{Mi{#ZM]#Z#[!&x#[#]M]#]#^!&x#^#aM]#a#b!&x#b#gM]#g#h!&x#h#iM]#i#j!&x#j#mM]#m#n!&x#n~M]7Z!(R[$UWOY!'|YZKoZz!'|z{!(w{!^!'|!^!_!$`!_#O!'|#O#P!*o#P#QJl#Q#o!'|#o#p!$`#p~!'|7Z!(|^$UWOY!'|YZKoZz!'|z{!(w{!P!'|!P!Q!)x!Q!^!'|!^!_!$`!_#O!'|#O#P!*o#P#QJl#Q#o!'|#o#p!$`#p~!'|7Z!*PY$UWU7ROYHqYZ%TZ!^Hq!^!_G{!_#OHq#O#PIf#P#QDu#Q#oHq#o#pG{#p~Hq7Z!*tX$UWOY!'|YZKoZz!'|z{!(w{!^!'|!^!_!$`!_#o!'|#o#p!$`#p~!'|7Z!+fX$UWOYJlYZKoZzJlz{NQ{!^Jl!^!_!!]!_#oJl#o#p!!]#p~Jl7Z!,Yc$UW}POzKoz{LZ{!^Ko!^!_M]!_#ZKo#Z#[!,R#[#]Ko#]#^!,R#^#aKo#a#b!,R#b#gKo#g#h!,R#h#iKo#i#j!,R#j#mKo#m#n!,R#n#oKo#o#pM]#p~Ko7Z!-lV$UWT7ROY!-eYZ%TZ!^!-e!^!_!.R!_#o!-e#o#p!.R#p~!-e7R!.WQT7ROY!.RZ~!.R$P!.g[$UW#o#v}POYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~Du]!/f[#wS$UW}POYDuYZ%TZ!PDu!P!QEr!Q!^Du!^!_Fx!_!}Du!}#OHq#O#PJQ#P#oDu#o#pFx#p~Du!{!0cd$UWk!sO!O%T!O!P@r!P!Q%T!Q![!1q![!^%T!_!g%T!g!hAl!h#R%T#R#S!1q#S#U%T#U#V!3X#V#X%T#X#YAl#Y#b%T#b#c!2w#c#d!4m#d#l%T#l#m!5{#m#o%T#p~%T!{!1x_$UWk!sO!O%T!O!P@r!P!Q%T!Q![!1q![!^%T!_!g%T!g!hAl!h#R%T#R#S!1q#S#X%T#X#YAl#Y#b%T#b#c!2w#c#o%T#p~%T!{!3OR$UWk!sO!^%T!_#o%T#p~%T!{!3^W$UWO!Q%T!Q!R!3v!R!S!3v!S!^%T!_#R%T#R#S!3v#S#o%T#p~%T!{!3}Y$UWk!sO!Q%T!Q!R!3v!R!S!3v!S!^%T!_#R%T#R#S!3v#S#b%T#b#c!2w#c#o%T#p~%T!{!4rV$UWO!Q%T!Q!Y!5X!Y!^%T!_#R%T#R#S!5X#S#o%T#p~%T!{!5`X$UWk!sO!Q%T!Q!Y!5X!Y!^%T!_#R%T#R#S!5X#S#b%T#b#c!2w#c#o%T#p~%T!{!6QZ$UWO!Q%T!Q![!6s![!^%T!_!c%T!c!i!6s!i#R%T#R#S!6s#S#T%T#T#Z!6s#Z#o%T#p~%T!{!6z]$UWk!sO!Q%T!Q![!6s![!^%T!_!c%T!c!i!6s!i#R%T#R#S!6s#S#T%T#T#Z!6s#Z#b%T#b#c!2w#c#o%T#p~%T$u!7|R!]V$UW#m$fO!^%T!_#o%T#p~%T!q!8^R_!i$UWO!^%T!_#o%T#p~%T5w!8rR'bd!a/n#x&s'|P!P!Q!8{!^!_!9Q!_!`!9_W!9QO$WW#v!9VP#`#v!_!`!9Y#v!9_O#o#v#v!9dO#a#v$u!9kT!{$m$UWO!^%T!_!`'v!`!a!9z!a#o%T#p~%T$P!:RR#W#w$UWO!^%T!_#o%T#p~%T%V!:gT'a!R#a#v$RS$UWO!^%T!_!`!:v!`!a!;W!a#o%T#p~%T$O!:}R#a#v$UWO!^%T!_#o%T#p~%T$O!;_T#`#v$UWO!^%T!_!`5T!`!a!;n!a#o%T#p~%T$O!;uS#`#v$UWO!^%T!_!`5T!`#o%T#p~%T*a!]S#g#v$UWO!^%T!_!`5T!`#o%T#p~%T$a!>pR$UW'f$XO!^%T!_#o%T#p~%T~!?OO!T~5b!?VT'w5Y$UWO!^%T!_!`5T!`#o%T#p#q!=P#q~%T6X!?oR!S5}nQ$UWO!^%T!_#o%T#p~%TX!@PR!kP$UWO!^%T!_#o%T#p~%T7Z!@gr$UW'Y7R#zS']$y'g3SOX%TXY%cYZ%TZ[%c[p%Tpq%cqt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$f%T$f$g%c$g#BY2`#BY#BZ!@Y#BZ$IS2`$IS$I_!@Y$I_$JT2`$JT$JU!@Y$JU$KV2`$KV$KW!@Y$KW&FU2`&FU&FV!@Y&FV?HT2`?HT?HU!@Y?HU~2`7Z!CO_$UW'Z7R#zS']$y'g3SOt%Ttu2`u}%T}!O3j!O!Q%T!Q![2`![!^%T!_!c%T!c!}2`!}#R%T#R#S2`#S#T%T#T#o2`#p$g%T$g~2`",tokenizers:[va,ja,wa,_a,0,1,2,3,4,5,6,7,8,9,Wa],topRules:{Script:[0,7]},dialects:{jsx:12107,ts:12109},dynamicPrecedences:{149:1,176:1},specialized:[{term:289,get:t=>za[t]||-1},{term:299,get:t=>Ga[t]||-1},{term:63,get:t=>Ca[t]||-1}],tokenPrec:12130}),Ya=[T("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),T("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),T("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),T("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),T("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),T(`try { \${} } catch (\${error}) { \${} diff --git a/ui/dist/assets/ConfirmEmailChangeDocs.4643c758.js b/ui/dist/assets/ConfirmEmailChangeDocs.a952ff52.js similarity index 98% rename from ui/dist/assets/ConfirmEmailChangeDocs.4643c758.js rename to ui/dist/assets/ConfirmEmailChangeDocs.a952ff52.js index a87fdfe2..d43dc0b5 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs.4643c758.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs.a952ff52.js @@ -1,4 +1,4 @@ -import{S as Ge,i as Xe,s as Ze,O as ze,e as s,w as m,b as p,c as be,f as b,g as r,h as l,m as he,x as j,P as Ye,Q as et,k as tt,R as lt,n as ot,t as I,a as J,o as c,d as _e,L as at,C as je,p as st,r as Q,u as nt}from"./index.be8ffbe5.js";import{S as it}from"./SdkTabs.8f55857f.js";function Ie(i,o,a){const n=i.slice();return n[5]=o[a],n}function Je(i,o,a){const n=i.slice();return n[5]=o[a],n}function Qe(i,o){let a,n=o[5].code+"",k,v,d,u;function h(){return o[4](o[5])}return{key:i,first:null,c(){a=s("button"),k=m(n),v=p(),b(a,"class","tab-item"),Q(a,"active",o[1]===o[5].code),this.first=a},m(C,$){r(C,a,$),l(a,k),l(a,v),d||(u=nt(a,"click",h),d=!0)},p(C,$){o=C,$&4&&n!==(n=o[5].code+"")&&j(k,n),$&6&&Q(a,"active",o[1]===o[5].code)},d(C){C&&c(a),d=!1,u()}}}function xe(i,o){let a,n,k,v;return n=new ze({props:{content:o[5].body}}),{key:i,first:null,c(){a=s("div"),be(n.$$.fragment),k=p(),b(a,"class","tab-item"),Q(a,"active",o[1]===o[5].code),this.first=a},m(d,u){r(d,a,u),he(n,a,null),l(a,k),v=!0},p(d,u){o=d;const h={};u&4&&(h.content=o[5].body),n.$set(h),(!v||u&6)&&Q(a,"active",o[1]===o[5].code)},i(d){v||(I(n.$$.fragment,d),v=!0)},o(d){J(n.$$.fragment,d),v=!1},d(d){d&&c(a),_e(n)}}}function rt(i){var We,He;let o,a,n=i[0].name+"",k,v,d,u,h,C,$,W=i[0].name+"",x,ke,ve,z,G,y,X,D,Z,w,H,Se,L,A,ge,ee,V=i[0].name+"",te,Ce,le,B,oe,q,ae,U,se,O,ne,$e,ie,T,re,ye,ce,we,_,Oe,E,Te,Pe,Re,de,Ee,pe,De,Ae,Be,ue,qe,fe,M,me,P,N,g=[],Ue=new Map,Me,F,S=[],Ne=new Map,R;y=new it({props:{js:` +import{S as Ge,i as Xe,s as Ze,O as ze,e as s,w as m,b as p,c as be,f as b,g as r,h as l,m as he,x as j,P as Ye,Q as et,k as tt,R as lt,n as ot,t as I,a as J,o as c,d as _e,L as at,C as je,p as st,r as Q,u as nt}from"./index.86238c7e.js";import{S as it}from"./SdkTabs.c9d3b27f.js";function Ie(i,o,a){const n=i.slice();return n[5]=o[a],n}function Je(i,o,a){const n=i.slice();return n[5]=o[a],n}function Qe(i,o){let a,n=o[5].code+"",k,v,d,u;function h(){return o[4](o[5])}return{key:i,first:null,c(){a=s("button"),k=m(n),v=p(),b(a,"class","tab-item"),Q(a,"active",o[1]===o[5].code),this.first=a},m(C,$){r(C,a,$),l(a,k),l(a,v),d||(u=nt(a,"click",h),d=!0)},p(C,$){o=C,$&4&&n!==(n=o[5].code+"")&&j(k,n),$&6&&Q(a,"active",o[1]===o[5].code)},d(C){C&&c(a),d=!1,u()}}}function xe(i,o){let a,n,k,v;return n=new ze({props:{content:o[5].body}}),{key:i,first:null,c(){a=s("div"),be(n.$$.fragment),k=p(),b(a,"class","tab-item"),Q(a,"active",o[1]===o[5].code),this.first=a},m(d,u){r(d,a,u),he(n,a,null),l(a,k),v=!0},p(d,u){o=d;const h={};u&4&&(h.content=o[5].body),n.$set(h),(!v||u&6)&&Q(a,"active",o[1]===o[5].code)},i(d){v||(I(n.$$.fragment,d),v=!0)},o(d){J(n.$$.fragment,d),v=!1},d(d){d&&c(a),_e(n)}}}function rt(i){var We,He;let o,a,n=i[0].name+"",k,v,d,u,h,C,$,W=i[0].name+"",x,ke,ve,z,G,y,X,D,Z,w,H,Se,L,A,ge,ee,V=i[0].name+"",te,Ce,le,B,oe,q,ae,U,se,O,ne,$e,ie,T,re,ye,ce,we,_,Oe,E,Te,Pe,Re,de,Ee,pe,De,Ae,Be,ue,qe,fe,M,me,P,N,g=[],Ue=new Map,Me,F,S=[],Ne=new Map,R;y=new it({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/ConfirmPasswordResetDocs.242b72e8.js b/ui/dist/assets/ConfirmPasswordResetDocs.e8766802.js similarity index 98% rename from ui/dist/assets/ConfirmPasswordResetDocs.242b72e8.js rename to ui/dist/assets/ConfirmPasswordResetDocs.e8766802.js index 8be049f2..7f4cb548 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs.242b72e8.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs.e8766802.js @@ -1,4 +1,4 @@ -import{S as Xe,i as Ye,s as Ze,O as Ge,e as a,w as b,b as p,c as me,f as m,g as r,h as l,m as he,x as j,P as Ue,Q as et,k as tt,R as lt,n as st,t as J,a as Q,o as d,d as _e,L as ot,C as je,p as at,r as x,u as nt}from"./index.be8ffbe5.js";import{S as it}from"./SdkTabs.8f55857f.js";function Je(i,s,o){const n=i.slice();return n[5]=s[o],n}function Qe(i,s,o){const n=i.slice();return n[5]=s[o],n}function xe(i,s){let o,n=s[5].code+"",k,S,c,f;function h(){return s[4](s[5])}return{key:i,first:null,c(){o=a("button"),k=b(n),S=p(),m(o,"class","tab-item"),x(o,"active",s[1]===s[5].code),this.first=o},m(P,R){r(P,o,R),l(o,k),l(o,S),c||(f=nt(o,"click",h),c=!0)},p(P,R){s=P,R&4&&n!==(n=s[5].code+"")&&j(k,n),R&6&&x(o,"active",s[1]===s[5].code)},d(P){P&&d(o),c=!1,f()}}}function ze(i,s){let o,n,k,S;return n=new Ge({props:{content:s[5].body}}),{key:i,first:null,c(){o=a("div"),me(n.$$.fragment),k=p(),m(o,"class","tab-item"),x(o,"active",s[1]===s[5].code),this.first=o},m(c,f){r(c,o,f),he(n,o,null),l(o,k),S=!0},p(c,f){s=c;const h={};f&4&&(h.content=s[5].body),n.$set(h),(!S||f&6)&&x(o,"active",s[1]===s[5].code)},i(c){S||(J(n.$$.fragment,c),S=!0)},o(c){Q(n.$$.fragment,c),S=!1},d(c){c&&d(o),_e(n)}}}function rt(i){var Ke,He;let s,o,n=i[0].name+"",k,S,c,f,h,P,R,K=i[0].name+"",z,ke,Se,G,X,g,Y,W,Z,C,H,ve,L,D,we,ee,V=i[0].name+"",te,Pe,le,E,se,A,oe,M,ae,$,ne,Re,ie,y,re,ge,de,Ce,_,$e,T,ye,Oe,Ne,ce,Te,pe,We,De,Ee,fe,Ae,ue,F,be,O,q,w=[],Me=new Map,Fe,B,v=[],qe=new Map,N;g=new it({props:{js:` +import{S as Xe,i as Ye,s as Ze,O as Ge,e as a,w as b,b as p,c as me,f as m,g as r,h as l,m as he,x as j,P as Ue,Q as et,k as tt,R as lt,n as st,t as J,a as Q,o as d,d as _e,L as ot,C as je,p as at,r as x,u as nt}from"./index.86238c7e.js";import{S as it}from"./SdkTabs.c9d3b27f.js";function Je(i,s,o){const n=i.slice();return n[5]=s[o],n}function Qe(i,s,o){const n=i.slice();return n[5]=s[o],n}function xe(i,s){let o,n=s[5].code+"",k,S,c,f;function h(){return s[4](s[5])}return{key:i,first:null,c(){o=a("button"),k=b(n),S=p(),m(o,"class","tab-item"),x(o,"active",s[1]===s[5].code),this.first=o},m(P,R){r(P,o,R),l(o,k),l(o,S),c||(f=nt(o,"click",h),c=!0)},p(P,R){s=P,R&4&&n!==(n=s[5].code+"")&&j(k,n),R&6&&x(o,"active",s[1]===s[5].code)},d(P){P&&d(o),c=!1,f()}}}function ze(i,s){let o,n,k,S;return n=new Ge({props:{content:s[5].body}}),{key:i,first:null,c(){o=a("div"),me(n.$$.fragment),k=p(),m(o,"class","tab-item"),x(o,"active",s[1]===s[5].code),this.first=o},m(c,f){r(c,o,f),he(n,o,null),l(o,k),S=!0},p(c,f){s=c;const h={};f&4&&(h.content=s[5].body),n.$set(h),(!S||f&6)&&x(o,"active",s[1]===s[5].code)},i(c){S||(J(n.$$.fragment,c),S=!0)},o(c){Q(n.$$.fragment,c),S=!1},d(c){c&&d(o),_e(n)}}}function rt(i){var Ke,He;let s,o,n=i[0].name+"",k,S,c,f,h,P,R,K=i[0].name+"",z,ke,Se,G,X,g,Y,W,Z,C,H,ve,L,D,we,ee,V=i[0].name+"",te,Pe,le,E,se,A,oe,M,ae,$,ne,Re,ie,y,re,ge,de,Ce,_,$e,T,ye,Oe,Ne,ce,Te,pe,We,De,Ee,fe,Ae,ue,F,be,O,q,w=[],Me=new Map,Fe,B,v=[],qe=new Map,N;g=new it({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/ConfirmVerificationDocs.c8ffdb27.js b/ui/dist/assets/ConfirmVerificationDocs.49a6a87a.js similarity index 98% rename from ui/dist/assets/ConfirmVerificationDocs.c8ffdb27.js rename to ui/dist/assets/ConfirmVerificationDocs.49a6a87a.js index 4a76de70..f45ce949 100644 --- a/ui/dist/assets/ConfirmVerificationDocs.c8ffdb27.js +++ b/ui/dist/assets/ConfirmVerificationDocs.49a6a87a.js @@ -1,4 +1,4 @@ -import{S as Ye,i as Ze,s as xe,O as Xe,e as a,w as b,b as f,c as me,f as m,g as r,h as l,m as he,x as J,P as Ie,Q as et,k as tt,R as lt,n as ot,t as Q,a as W,o as c,d as _e,L as st,C as Je,p as at,r as z,u as nt}from"./index.be8ffbe5.js";import{S as it}from"./SdkTabs.8f55857f.js";function Qe(i,o,s){const n=i.slice();return n[5]=o[s],n}function We(i,o,s){const n=i.slice();return n[5]=o[s],n}function ze(i,o){let s,n=o[5].code+"",k,v,d,p;function h(){return o[4](o[5])}return{key:i,first:null,c(){s=a("button"),k=b(n),v=f(),m(s,"class","tab-item"),z(s,"active",o[1]===o[5].code),this.first=s},m(y,g){r(y,s,g),l(s,k),l(s,v),d||(p=nt(s,"click",h),d=!0)},p(y,g){o=y,g&4&&n!==(n=o[5].code+"")&&J(k,n),g&6&&z(s,"active",o[1]===o[5].code)},d(y){y&&c(s),d=!1,p()}}}function Ge(i,o){let s,n,k,v;return n=new Xe({props:{content:o[5].body}}),{key:i,first:null,c(){s=a("div"),me(n.$$.fragment),k=f(),m(s,"class","tab-item"),z(s,"active",o[1]===o[5].code),this.first=s},m(d,p){r(d,s,p),he(n,s,null),l(s,k),v=!0},p(d,p){o=d;const h={};p&4&&(h.content=o[5].body),n.$set(h),(!v||p&6)&&z(s,"active",o[1]===o[5].code)},i(d){v||(Q(n.$$.fragment,d),v=!0)},o(d){W(n.$$.fragment,d),v=!1},d(d){d&&c(s),_e(n)}}}function rt(i){var He,Le;let o,s,n=i[0].name+"",k,v,d,p,h,y,g,H=i[0].name+"",G,ke,ve,X,Y,w,Z,D,x,C,L,Se,U,E,$e,ee,j=i[0].name+"",te,ye,le,q,oe,M,se,N,ae,T,ne,ge,ie,P,re,we,ce,Ce,_,Te,B,Pe,Oe,Ve,de,Be,fe,De,Ee,qe,pe,Me,ue,R,be,O,F,$=[],Ne=new Map,Re,K,S=[],Fe=new Map,V;w=new it({props:{js:` +import{S as Ye,i as Ze,s as xe,O as Xe,e as a,w as b,b as f,c as me,f as m,g as r,h as l,m as he,x as J,P as Ie,Q as et,k as tt,R as lt,n as ot,t as Q,a as W,o as c,d as _e,L as st,C as Je,p as at,r as z,u as nt}from"./index.86238c7e.js";import{S as it}from"./SdkTabs.c9d3b27f.js";function Qe(i,o,s){const n=i.slice();return n[5]=o[s],n}function We(i,o,s){const n=i.slice();return n[5]=o[s],n}function ze(i,o){let s,n=o[5].code+"",k,v,d,p;function h(){return o[4](o[5])}return{key:i,first:null,c(){s=a("button"),k=b(n),v=f(),m(s,"class","tab-item"),z(s,"active",o[1]===o[5].code),this.first=s},m(y,g){r(y,s,g),l(s,k),l(s,v),d||(p=nt(s,"click",h),d=!0)},p(y,g){o=y,g&4&&n!==(n=o[5].code+"")&&J(k,n),g&6&&z(s,"active",o[1]===o[5].code)},d(y){y&&c(s),d=!1,p()}}}function Ge(i,o){let s,n,k,v;return n=new Xe({props:{content:o[5].body}}),{key:i,first:null,c(){s=a("div"),me(n.$$.fragment),k=f(),m(s,"class","tab-item"),z(s,"active",o[1]===o[5].code),this.first=s},m(d,p){r(d,s,p),he(n,s,null),l(s,k),v=!0},p(d,p){o=d;const h={};p&4&&(h.content=o[5].body),n.$set(h),(!v||p&6)&&z(s,"active",o[1]===o[5].code)},i(d){v||(Q(n.$$.fragment,d),v=!0)},o(d){W(n.$$.fragment,d),v=!1},d(d){d&&c(s),_e(n)}}}function rt(i){var He,Le;let o,s,n=i[0].name+"",k,v,d,p,h,y,g,H=i[0].name+"",G,ke,ve,X,Y,w,Z,D,x,C,L,Se,U,E,$e,ee,j=i[0].name+"",te,ye,le,q,oe,M,se,N,ae,T,ne,ge,ie,P,re,we,ce,Ce,_,Te,B,Pe,Oe,Ve,de,Be,fe,De,Ee,qe,pe,Me,ue,R,be,O,F,$=[],Ne=new Map,Re,K,S=[],Fe=new Map,V;w=new it({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/CreateApiDocs.33991bcd.js b/ui/dist/assets/CreateApiDocs.33991bcd.js new file mode 100644 index 00000000..6478002d --- /dev/null +++ b/ui/dist/assets/CreateApiDocs.33991bcd.js @@ -0,0 +1,114 @@ +import{S as Lt,i as Ht,s as Pt,C as Q,O as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,P as He,Q as ht,k as Rt,R as gt,n as Bt,t as fe,a as pe,o as d,d as ge,L as Ft,p as jt,r as ue,u as Dt,y as le}from"./index.86238c7e.js";import{S as Nt}from"./SdkTabs.c9d3b27f.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,F,D,V,H,I,j,g,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?It:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional + username
+ String + The username of the auth record. +
+ If not set, it will be auto generated.`,b=m(),p=a("tr"),c=a("td"),f=a("div"),P.c(),y=m(),T=a("span"),T.textContent="email",w=m(),O=a("td"),O.innerHTML='String',F=m(),D=a("td"),D.textContent="Auth record email address.",V=m(),H=a("tr"),H.innerHTML=`
Optional + emailVisibility
+ Boolean + Whether to show/hide the auth record email when fetching the record data.`,I=m(),j=a("tr"),j.innerHTML=`
Required + password
+ String + Auth record password.`,g=m(),S=a("tr"),S.innerHTML=`
Required + passwordConfirm
+ String + Auth record password confirmation.`,N=m(),q=a("tr"),q.innerHTML=`
Optional + verified
+ Boolean + Indicates whether the auth record is verified or not. +
+ This field can be set only by admins or auth records with "Manage" access.`,C=m(),_=a("tr"),_.innerHTML='Schema fields',h(f,"class","inline-flex")},m(u,$){r(u,e,$),r(u,l,$),r(u,s,$),r(u,b,$),r(u,p,$),n(p,c),n(c,f),P.m(f,null),n(f,y),n(f,T),n(p,w),n(p,O),n(p,F),n(p,D),r(u,V,$),r(u,H,$),r(u,I,$),r(u,j,$),r(u,g,$),r(u,S,$),r(u,N,$),r(u,q,$),r(u,C,$),r(u,_,$)},p(u,$){z!==(z=M(u))&&(P.d(1),P=z(u),P&&(P.c(),P.m(f,y)))},d(u){u&&d(e),u&&d(l),u&&d(s),u&&d(b),u&&d(p),P.d(),u&&d(V),u&&d(H),u&&d(I),u&&d(j),u&&d(g),u&&d(S),u&&d(N),u&&d(q),u&&d(C),u&&d(_)}}}function Vt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function It(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Jt(o){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Et(o){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Ut(o){var p;let e,l=((p=o[12].options)==null?void 0:p.maxSelect)===1?"id":"ids",s,b;return{c(){e=k("Relation record "),s=k(l),b=k(".")},m(c,f){r(c,e,f),r(c,s,f),r(c,b,f)},p(c,f){var y;f&1&&l!==(l=((y=c[12].options)==null?void 0:y.maxSelect)===1?"id":"ids")&&x(s,l)},d(c){c&&d(e),c&&d(s),c&&d(b)}}}function Qt(o){let e,l,s,b,p;return{c(){e=k("File object."),l=a("br"),s=k(` + Set to `),b=a("code"),b.textContent="null",p=k(" to delete already uploaded file(s).")},m(c,f){r(c,e,f),r(c,l,f),r(c,s,f),r(c,b,f),r(c,p,f)},p:le,d(c){c&&d(e),c&&d(l),c&&d(s),c&&d(b),c&&d(p)}}}function zt(o){let e;return{c(){e=k("URL address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Kt(o){let e;return{c(){e=k("Email address.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Wt(o){let e;return{c(){e=k("JSON array or object.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Yt(o){let e;return{c(){e=k("Number value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function Gt(o){let e;return{c(){e=k("Plain text value.")},m(l,s){r(l,e,s)},p:le,d(l){l&&d(e)}}}function qt(o,e){let l,s,b,p,c,f=e[12].name+"",y,T,w,O,F=Q.getFieldValueType(e[12])+"",D,V,H,I;function j(_,M){return _[12].required?Et:Jt}let g=j(e),S=g(e);function N(_,M){if(_[12].type==="text")return Gt;if(_[12].type==="number")return Yt;if(_[12].type==="json")return Wt;if(_[12].type==="email")return Kt;if(_[12].type==="url")return zt;if(_[12].type==="file")return Qt;if(_[12].type==="relation")return Ut}let q=N(e),C=q&&q(e);return{key:o,first:null,c(){l=a("tr"),s=a("td"),b=a("div"),S.c(),p=m(),c=a("span"),y=k(f),T=m(),w=a("td"),O=a("span"),D=k(F),V=m(),H=a("td"),C&&C.c(),I=m(),h(b,"class","inline-flex"),h(O,"class","label"),this.first=l},m(_,M){r(_,l,M),n(l,s),n(s,b),S.m(b,null),n(b,p),n(b,c),n(c,y),n(l,T),n(l,w),n(w,O),n(O,D),n(l,V),n(l,H),C&&C.m(H,null),n(l,I)},p(_,M){e=_,g!==(g=j(e))&&(S.d(1),S=g(e),S&&(S.c(),S.m(b,p))),M&1&&f!==(f=e[12].name+"")&&x(y,f),M&1&&F!==(F=Q.getFieldValueType(e[12])+"")&&x(D,F),q===(q=N(e))&&C?C.p(e,M):(C&&C.d(1),C=q&&q(e),C&&(C.c(),C.m(H,null)))},d(_){_&&d(l),S.d(),C&&C.d()}}}function Ot(o,e){let l,s=e[7].code+"",b,p,c,f;function y(){return e[6](e[7])}return{key:o,first:null,c(){l=a("button"),b=k(s),p=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(T,w){r(T,l,w),n(l,b),n(l,p),c||(f=Dt(l,"click",y),c=!0)},p(T,w){e=T,w&4&&s!==(s=e[7].code+"")&&x(b,s),w&6&&ue(l,"active",e[1]===e[7].code)},d(T){T&&d(l),c=!1,f()}}}function Mt(o,e){let l,s,b,p;return s=new At({props:{content:e[7].body}}),{key:o,first:null,c(){l=a("div"),Pe(s.$$.fragment),b=m(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(c,f){r(c,l,f),Re(s,l,null),n(l,b),p=!0},p(c,f){e=c;const y={};f&4&&(y.content=e[7].body),s.$set(y),(!p||f&6)&&ue(l,"active",e[1]===e[7].code)},i(c){p||(fe(s.$$.fragment,c),p=!0)},o(c){pe(s.$$.fragment,c),p=!1},d(c){c&&d(l),ge(s)}}}function Xt(o){var st,it,at,ot,rt,dt,ct,ft;let e,l,s=o[0].name+"",b,p,c,f,y,T,w,O=o[0].name+"",F,D,V,H,I,j,g,S,N,q,C,_,M,z,P,u,$,ee,K=o[0].name+"",me,Be,Fe,be,ne,_e,W,ke,je,J,ye,De,ve,E=[],Ne=new Map,he,se,we,Y,Ce,Ve,Se,G,$e,Ie,Te,Je,A,Ee,te,Ue,Qe,ze,qe,Ke,Oe,We,Ye,Ge,Me,Xe,Ae,ie,Le,X,ae,U=[],Ze=new Map,xe,oe,B=[],et=new Map,Z;S=new Nt({props:{js:` +import PocketBase from 'pocketbase'; + +const pb = new PocketBase('${o[4]}'); + +... + +// example create data +const data = ${JSON.stringify(Object.assign({},o[3],Q.dummyCollectionSchemaData(o[0])),null,4)}; + +const record = await pb.collection('${(st=o[0])==null?void 0:st.name}').create(data); +`+((it=o[0])!=null&&it.isAuth?` +// (optional) send an email verification request +await pb.collection('${(at=o[0])==null?void 0:at.name}').requestVerification('test@example.com'); +`:""),dart:` +import 'package:pocketbase/pocketbase.dart'; + +final pb = PocketBase('${o[4]}'); + +... + +// example create body +final body = ${JSON.stringify(Object.assign({},o[3],Q.dummyCollectionSchemaData(o[0])),null,2)}; + +final record = await pb.collection('${(ot=o[0])==null?void 0:ot.name}').create(body: body); +`+((rt=o[0])!=null&&rt.isAuth?` +// (optional) send an email verification request +await pb.collection('${(dt=o[0])==null?void 0:dt.name}').requestVerification('test@example.com'); +`:"")}});let R=o[5]&&$t(),L=((ct=o[0])==null?void 0:ct.isAuth)&&Tt(o),de=(ft=o[0])==null?void 0:ft.schema;const tt=t=>t[12].name;for(let t=0;tt[7].code;for(let t=0;tt[7].code;for(let t=0;tapplication/json or + multipart/form-data.`,I=m(),j=a("p"),j.innerHTML=`File upload is supported only via multipart/form-data. +
+ For more info and examples you could check the detailed + Files upload and handling docs + .`,g=m(),Pe(S.$$.fragment),N=m(),q=a("h6"),q.textContent="API details",C=m(),_=a("div"),M=a("strong"),M.textContent="POST",z=m(),P=a("div"),u=a("p"),$=k("/api/collections/"),ee=a("strong"),me=k(K),Be=k("/records"),Fe=m(),R&&R.c(),be=m(),ne=a("div"),ne.textContent="Body Parameters",_e=m(),W=a("table"),ke=a("thead"),ke.innerHTML=`Param + Type + Description`,je=m(),J=a("tbody"),ye=a("tr"),ye.innerHTML=`
Optional + id
+ String + 15 characters string to store as record ID. +
+ If not set, it will be auto generated.`,De=m(),L&&L.c(),ve=m();for(let t=0;tParam + Type + Description`,Ve=m(),Se=a("tbody"),G=a("tr"),$e=a("td"),$e.textContent="expand",Ie=m(),Te=a("td"),Te.innerHTML='String',Je=m(),A=a("td"),Ee=k(`Auto expand relations when returning the created record. Ex.: + `),Pe(te.$$.fragment),Ue=k(` + Supports up to 6-levels depth nested relations expansion. `),Qe=a("br"),ze=k(` + The expanded relations will be appended to the record under the + `),qe=a("code"),qe.textContent="expand",Ke=k(" property (eg. "),Oe=a("code"),Oe.textContent='"expand": {"relField1": {...}, ...}',We=k(`). + `),Ye=a("br"),Ge=k(` + Only the relations to which the account has permissions to `),Me=a("strong"),Me.textContent="view",Xe=k(" will be expanded."),Ae=m(),ie=a("div"),ie.textContent="Responses",Le=m(),X=a("div"),ae=a("div");for(let t=0;t${JSON.stringify(Object.assign({},t[3],Q.dummyCollectionSchemaData(t[0])),null,2)}; + +final record = await pb.collection('${(bt=t[0])==null?void 0:bt.name}').create(body: body); +`+((_t=t[0])!=null&&_t.isAuth?` +// (optional) send an email verification request +await pb.collection('${(kt=t[0])==null?void 0:kt.name}').requestVerification('test@example.com'); +`:"")),S.$set(v),(!Z||i&1)&&K!==(K=t[0].name+"")&&x(me,K),t[5]?R||(R=$t(),R.c(),R.m(_,null)):R&&(R.d(1),R=null),(yt=t[0])!=null&&yt.isAuth?L?L.p(t,i):(L=Tt(t),L.c(),L.m(J,ve)):L&&(L.d(1),L=null),i&1&&(de=(vt=t[0])==null?void 0:vt.schema,E=He(E,i,tt,1,t,de,Ne,J,ht,qt,null,St)),i&6&&(ce=t[2],U=He(U,i,lt,1,t,ce,Ze,ae,ht,Ot,null,Ct)),i&6&&(re=t[2],Rt(),B=He(B,i,nt,1,t,re,et,oe,gt,Mt,null,wt),Bt())},i(t){if(!Z){fe(S.$$.fragment,t),fe(te.$$.fragment,t);for(let i=0;il(1,c=w.code);return o.$$set=w=>{"collection"in w&&l(0,p=w.collection)},o.$$.update=()=>{var w,O;o.$$.dirty&1&&l(5,s=(p==null?void 0:p.createRule)===null),o.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(p),null,2)},{code:400,body:` + { + "code": 400, + "message": "Failed to create record.", + "data": { + "${(O=(w=p==null?void 0:p.schema)==null?void 0:w[0])==null?void 0:O.name}": { + "code": "validation_required", + "message": "Missing required value." + } + } + } + `},{code:403,body:` + { + "code": 403, + "message": "You are not allowed to perform this request.", + "data": {} + } + `}]),o.$$.dirty&1&&(p.isAuth?l(3,y={username:"test_username",email:"test@example.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):l(3,y={}))},l(4,b=Q.getApiExampleUrl(jt.baseUrl)),[p,c,f,y,b,s,T]}class tl extends Lt{constructor(e){super(),Ht(this,e,Zt,Xt,Pt,{collection:0})}}export{tl as default}; diff --git a/ui/dist/assets/CreateApiDocs.5b22060b.js b/ui/dist/assets/CreateApiDocs.5b22060b.js deleted file mode 100644 index df8ae930..00000000 --- a/ui/dist/assets/CreateApiDocs.5b22060b.js +++ /dev/null @@ -1,102 +0,0 @@ -import{S as Ct,i as St,s as Tt,C as Q,O as wt,e as a,w as k,b,c as Pe,f as h,g as o,h as n,m as Re,x as Z,P as Ae,Q as pt,k as $t,R as Ot,n as Mt,t as fe,a as pe,o as r,d as ge,L as Lt,p as Ht,r as ue,u as qt,y as le}from"./index.be8ffbe5.js";import{S as At}from"./SdkTabs.8f55857f.js";function ut(d,e,l){const s=d.slice();return s[7]=e[l],s}function bt(d,e,l){const s=d.slice();return s[7]=e[l],s}function mt(d,e,l){const s=d.slice();return s[12]=e[l],s}function _t(d){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){o(l,e,s)},d(l){l&&r(e)}}}function kt(d){let e,l,s,m,p,c,f,y,$,w,M,F,D,I,A,J,j,g,S,N,O,C,_;function L(u,T){var ee,z;return(z=(ee=u[0])==null?void 0:ee.options)!=null&&z.requireEmail?Rt:Pt}let x=L(d),P=x(d);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=b(),s=a("tr"),s.innerHTML=`
Optional - username
- String - The username of the auth record. -
- If not set, it will be auto generated.`,m=b(),p=a("tr"),c=a("td"),f=a("div"),P.c(),y=b(),$=a("span"),$.textContent="email",w=b(),M=a("td"),M.innerHTML='String',F=b(),D=a("td"),D.textContent="Auth record email address.",I=b(),A=a("tr"),A.innerHTML=`
Optional - emailVisibility
- Boolean - Whether to show/hide the auth record email when fetching the record data.`,J=b(),j=a("tr"),j.innerHTML=`
Required - password
- String - Auth record password.`,g=b(),S=a("tr"),S.innerHTML=`
Required - passwordConfirm
- String - Auth record password confirmation.`,N=b(),O=a("tr"),O.innerHTML=`
Optional - verified
- Boolean - Indicates whether the auth record is verified or not. -
- This field can be set only by admins or auth records with "Manage" access.`,C=b(),_=a("tr"),_.innerHTML='Schema fields',h(f,"class","inline-flex")},m(u,T){o(u,e,T),o(u,l,T),o(u,s,T),o(u,m,T),o(u,p,T),n(p,c),n(c,f),P.m(f,null),n(f,y),n(f,$),n(p,w),n(p,M),n(p,F),n(p,D),o(u,I,T),o(u,A,T),o(u,J,T),o(u,j,T),o(u,g,T),o(u,S,T),o(u,N,T),o(u,O,T),o(u,C,T),o(u,_,T)},p(u,T){x!==(x=L(u))&&(P.d(1),P=x(u),P&&(P.c(),P.m(f,y)))},d(u){u&&r(e),u&&r(l),u&&r(s),u&&r(m),u&&r(p),P.d(),u&&r(I),u&&r(A),u&&r(J),u&&r(j),u&&r(g),u&&r(S),u&&r(N),u&&r(O),u&&r(C),u&&r(_)}}}function Pt(d){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){o(l,e,s)},d(l){l&&r(e)}}}function Rt(d){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){o(l,e,s)},d(l){l&&r(e)}}}function gt(d){let e;return{c(){e=a("span"),e.textContent="Optional",h(e,"class","label label-warning")},m(l,s){o(l,e,s)},d(l){l&&r(e)}}}function Bt(d){let e;return{c(){e=a("span"),e.textContent="Required",h(e,"class","label label-success")},m(l,s){o(l,e,s)},d(l){l&&r(e)}}}function Ft(d){var p;let e,l=((p=d[12].options)==null?void 0:p.maxSelect)===1?"id":"ids",s,m;return{c(){e=k("Relation record "),s=k(l),m=k(".")},m(c,f){o(c,e,f),o(c,s,f),o(c,m,f)},p(c,f){var y;f&1&&l!==(l=((y=c[12].options)==null?void 0:y.maxSelect)===1?"id":"ids")&&Z(s,l)},d(c){c&&r(e),c&&r(s),c&&r(m)}}}function jt(d){let e,l,s,m,p;return{c(){e=k("File object."),l=a("br"),s=k(` - Set to `),m=a("code"),m.textContent="null",p=k(" to delete already uploaded file(s).")},m(c,f){o(c,e,f),o(c,l,f),o(c,s,f),o(c,m,f),o(c,p,f)},p:le,d(c){c&&r(e),c&&r(l),c&&r(s),c&&r(m),c&&r(p)}}}function Dt(d){let e;return{c(){e=k("URL address.")},m(l,s){o(l,e,s)},p:le,d(l){l&&r(e)}}}function Nt(d){let e;return{c(){e=k("Email address.")},m(l,s){o(l,e,s)},p:le,d(l){l&&r(e)}}}function It(d){let e;return{c(){e=k("JSON array or object.")},m(l,s){o(l,e,s)},p:le,d(l){l&&r(e)}}}function Jt(d){let e;return{c(){e=k("Number value.")},m(l,s){o(l,e,s)},p:le,d(l){l&&r(e)}}}function Et(d){let e;return{c(){e=k("Plain text value.")},m(l,s){o(l,e,s)},p:le,d(l){l&&r(e)}}}function yt(d,e){let l,s,m,p,c,f=e[12].name+"",y,$,w,M,F=Q.getFieldValueType(e[12])+"",D,I,A,J;function j(_,L){return _[12].required?Bt:gt}let g=j(e),S=g(e);function N(_,L){if(_[12].type==="text")return Et;if(_[12].type==="number")return Jt;if(_[12].type==="json")return It;if(_[12].type==="email")return Nt;if(_[12].type==="url")return Dt;if(_[12].type==="file")return jt;if(_[12].type==="relation")return Ft}let O=N(e),C=O&&O(e);return{key:d,first:null,c(){l=a("tr"),s=a("td"),m=a("div"),S.c(),p=b(),c=a("span"),y=k(f),$=b(),w=a("td"),M=a("span"),D=k(F),I=b(),A=a("td"),C&&C.c(),J=b(),h(m,"class","inline-flex"),h(M,"class","label"),this.first=l},m(_,L){o(_,l,L),n(l,s),n(s,m),S.m(m,null),n(m,p),n(m,c),n(c,y),n(l,$),n(l,w),n(w,M),n(M,D),n(l,I),n(l,A),C&&C.m(A,null),n(l,J)},p(_,L){e=_,g!==(g=j(e))&&(S.d(1),S=g(e),S&&(S.c(),S.m(m,p))),L&1&&f!==(f=e[12].name+"")&&Z(y,f),L&1&&F!==(F=Q.getFieldValueType(e[12])+"")&&Z(D,F),O===(O=N(e))&&C?C.p(e,L):(C&&C.d(1),C=O&&O(e),C&&(C.c(),C.m(A,null)))},d(_){_&&r(l),S.d(),C&&C.d()}}}function vt(d,e){let l,s=e[7].code+"",m,p,c,f;function y(){return e[6](e[7])}return{key:d,first:null,c(){l=a("button"),m=k(s),p=b(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m($,w){o($,l,w),n(l,m),n(l,p),c||(f=qt(l,"click",y),c=!0)},p($,w){e=$,w&4&&s!==(s=e[7].code+"")&&Z(m,s),w&6&&ue(l,"active",e[1]===e[7].code)},d($){$&&r(l),c=!1,f()}}}function ht(d,e){let l,s,m,p;return s=new wt({props:{content:e[7].body}}),{key:d,first:null,c(){l=a("div"),Pe(s.$$.fragment),m=b(),h(l,"class","tab-item"),ue(l,"active",e[1]===e[7].code),this.first=l},m(c,f){o(c,l,f),Re(s,l,null),n(l,m),p=!0},p(c,f){e=c;const y={};f&4&&(y.content=e[7].body),s.$set(y),(!p||f&6)&&ue(l,"active",e[1]===e[7].code)},i(c){p||(fe(s.$$.fragment,c),p=!0)},o(c){pe(s.$$.fragment,c),p=!1},d(c){c&&r(l),ge(s)}}}function Ut(d){var st,it,at,ot;let e,l,s=d[0].name+"",m,p,c,f,y,$,w,M=d[0].name+"",F,D,I,A,J,j,g,S,N,O,C,_,L,x,P,u,T,ee,z=d[0].name+"",be,Be,Fe,me,ne,_e,K,ke,je,E,ye,De,ve,U=[],Ne=new Map,he,se,we,W,Ce,Ie,Se,Y,Te,Je,$e,Ee,H,Ue,te,Ve,Qe,xe,Oe,ze,Me,Ke,We,Ye,Le,Ge,He,ie,qe,G,ae,V=[],Xe=new Map,Ze,oe,B=[],et=new Map,X;S=new At({props:{js:` -import PocketBase from 'pocketbase'; - -const pb = new PocketBase('${d[4]}'); - -... - -// example create data -const data = ${JSON.stringify(Object.assign({},d[3],Q.dummyCollectionSchemaData(d[0])),null,4)}; - -const record = await pb.collection('${(st=d[0])==null?void 0:st.name}').create(data); - `,dart:` -import 'package:pocketbase/pocketbase.dart'; - -final pb = PocketBase('${d[4]}'); - -... - -// example create body -final body = ${JSON.stringify(Object.assign({},d[3],Q.dummyCollectionSchemaData(d[0])),null,2)}; - -final record = await pb.collection('${(it=d[0])==null?void 0:it.name}').create(body: body); - `}});let R=d[5]&&_t(),q=((at=d[0])==null?void 0:at.isAuth)&&kt(d),de=(ot=d[0])==null?void 0:ot.schema;const tt=t=>t[12].name;for(let t=0;tt[7].code;for(let t=0;tt[7].code;for(let t=0;tapplication/json or - multipart/form-data.`,J=b(),j=a("p"),j.innerHTML=`File upload is supported only via multipart/form-data. -
- For more info and examples you could check the detailed - Files upload and handling docs - .`,g=b(),Pe(S.$$.fragment),N=b(),O=a("h6"),O.textContent="API details",C=b(),_=a("div"),L=a("strong"),L.textContent="POST",x=b(),P=a("div"),u=a("p"),T=k("/api/collections/"),ee=a("strong"),be=k(z),Be=k("/records"),Fe=b(),R&&R.c(),me=b(),ne=a("div"),ne.textContent="Body Parameters",_e=b(),K=a("table"),ke=a("thead"),ke.innerHTML=`Param - Type - Description`,je=b(),E=a("tbody"),ye=a("tr"),ye.innerHTML=`
Optional - id
- String - 15 characters string to store as record ID. -
- If not set, it will be auto generated.`,De=b(),q&&q.c(),ve=b();for(let t=0;tParam - Type - Description`,Ie=b(),Se=a("tbody"),Y=a("tr"),Te=a("td"),Te.textContent="expand",Je=b(),$e=a("td"),$e.innerHTML='String',Ee=b(),H=a("td"),Ue=k(`Auto expand relations when returning the created record. Ex.: - `),Pe(te.$$.fragment),Ve=k(` - Supports up to 6-levels depth nested relations expansion. `),Qe=a("br"),xe=k(` - The expanded relations will be appended to the record under the - `),Oe=a("code"),Oe.textContent="expand",ze=k(" property (eg. "),Me=a("code"),Me.textContent='"expand": {"relField1": {...}, ...}',Ke=k(`). - `),We=a("br"),Ye=k(` - Only the relations to which the account has permissions to `),Le=a("strong"),Le.textContent="view",Ge=k(" will be expanded."),He=b(),ie=a("div"),ie.textContent="Responses",qe=b(),G=a("div"),ae=a("div");for(let t=0;t${JSON.stringify(Object.assign({},t[3],Q.dummyCollectionSchemaData(t[0])),null,2)}; - -final record = await pb.collection('${(dt=t[0])==null?void 0:dt.name}').create(body: body); - `),S.$set(v),(!X||i&1)&&z!==(z=t[0].name+"")&&Z(be,z),t[5]?R||(R=_t(),R.c(),R.m(_,null)):R&&(R.d(1),R=null),(ct=t[0])!=null&&ct.isAuth?q?q.p(t,i):(q=kt(t),q.c(),q.m(E,ve)):q&&(q.d(1),q=null),i&1&&(de=(ft=t[0])==null?void 0:ft.schema,U=Ae(U,i,tt,1,t,de,Ne,E,pt,yt,null,mt)),i&6&&(ce=t[2],V=Ae(V,i,lt,1,t,ce,Xe,ae,pt,vt,null,bt)),i&6&&(re=t[2],$t(),B=Ae(B,i,nt,1,t,re,et,oe,Ot,ht,null,ut),Mt())},i(t){if(!X){fe(S.$$.fragment,t),fe(te.$$.fragment,t);for(let i=0;il(1,c=w.code);return d.$$set=w=>{"collection"in w&&l(0,p=w.collection)},d.$$.update=()=>{var w,M;d.$$.dirty&1&&l(5,s=(p==null?void 0:p.createRule)===null),d.$$.dirty&1&&l(2,f=[{code:200,body:JSON.stringify(Q.dummyCollectionRecord(p),null,2)},{code:400,body:` - { - "code": 400, - "message": "Failed to create record.", - "data": { - "${(M=(w=p==null?void 0:p.schema)==null?void 0:w[0])==null?void 0:M.name}": { - "code": "validation_required", - "message": "Missing required value." - } - } - } - `},{code:403,body:` - { - "code": 403, - "message": "You are not allowed to perform this request.", - "data": {} - } - `}]),d.$$.dirty&1&&(p.isAuth?l(3,y={username:"test_username",email:"test@exampe.com",emailVisibility:!0,password:"12345678",passwordConfirm:"12345678"}):l(3,y={}))},l(4,m=Q.getApiExampleUrl(Ht.baseUrl)),[p,c,f,y,m,s,$]}class zt extends Ct{constructor(e){super(),St(this,e,Vt,Ut,Tt,{collection:0})}}export{zt as default}; diff --git a/ui/dist/assets/DeleteApiDocs.459334be.js b/ui/dist/assets/DeleteApiDocs.d73d5d41.js similarity index 97% rename from ui/dist/assets/DeleteApiDocs.459334be.js rename to ui/dist/assets/DeleteApiDocs.d73d5d41.js index 483cf345..1147a65f 100644 --- a/ui/dist/assets/DeleteApiDocs.459334be.js +++ b/ui/dist/assets/DeleteApiDocs.d73d5d41.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,P as _e,Q as Ee,k as Oe,R as Te,n as Be,t as ee,a as te,o as f,d as ge,L as Ie,C as Ae,p as Me,r as z,u as Se,O as qe}from"./index.be8ffbe5.js";import{S as Le}from"./SdkTabs.8f55857f.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&z(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&z(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function He(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",F,le,K,C,N,O,Q,y,L,se,H,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new Le({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,P as _e,Q as Ee,k as Oe,R as Te,n as Be,t as ee,a as te,o as f,d as ge,L as Ie,C as Ae,p as Me,r as z,u as Se,O as qe}from"./index.86238c7e.js";import{S as Le}from"./SdkTabs.c9d3b27f.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&z(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),z(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&z(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function He(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",F,le,K,C,N,O,Q,y,L,se,H,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new Le({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/FilterAutocompleteInput.66938328.js b/ui/dist/assets/FilterAutocompleteInput.83abd7f1.js similarity index 99% rename from ui/dist/assets/FilterAutocompleteInput.66938328.js rename to ui/dist/assets/FilterAutocompleteInput.83abd7f1.js index 5a05e5fa..9f516735 100644 --- a/ui/dist/assets/FilterAutocompleteInput.66938328.js +++ b/ui/dist/assets/FilterAutocompleteInput.83abd7f1.js @@ -1 +1 @@ -import{S as z,i as Q,s as X,e as Y,f as Z,g as j,y as A,o as $,I as ee,J as te,K as ne,L as ie,M as oe,C as L,N as re}from"./index.be8ffbe5.js";import{C as E,E as x,a as w,h as se,b as le,c as ae,d as ue,e as ce,s as fe,f as de,g as he,i as ge,r as pe,j as ye,k as me,l as be,m as ke,n as xe,o as we,p as Se,q as Ce,t as U,S as qe}from"./index.9c8b95cd.js";function Ke(t){V(t,"start");var i={},e=t.languageData||{},d=!1;for(var h in t)if(h!=e&&t.hasOwnProperty(h))for(var p=i[h]=[],s=t[h],r=0;r2&&s.token&&typeof s.token!="string"){e.pending=[];for(var c=2;c-1)return null;var h=e.indent.length-1,p=t[e.state];e:for(;;){for(var s=0;se(12,h=n));const p=ne();let{id:s=""}=i,{value:r=""}=i,{disabled:a=!1}=i,{placeholder:c=""}=i,{baseCollection:m=new ie}=i,{singleLine:S=!1}=i,{extraAutocompleteKeys:I=[]}=i,{disableRequestKeys:k=!1}=i,{disableIndirectCollectionsKeys:C=!1}=i,f,b,_=new E,M=new E,O=new E,B=new E;function v(){f==null||f.focus()}function P(n){let o=n.slice();return L.pushOrReplaceByKey(o,m,"id"),o}function F(){b==null||b.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0}))}function W(){if(!s)return;const n=document.querySelectorAll('[for="'+s+'"]');for(let o of n)o.removeEventListener("click",v)}function D(){if(!s)return;W();const n=document.querySelectorAll('[for="'+s+'"]');for(let o of n)o.addEventListener("click",v)}function R(n,o="",l=0){let y=d.find(g=>g.name==n||g.id==n);if(!y||l>=4)return[];let u=[o+"id",o+"created",o+"updated"];y.isAuth&&(u.push(o+"username"),u.push(o+"email"),u.push(o+"emailVisibility"),u.push(o+"verified"));for(const g of y.schema){const q=o+g.name;if(u.push(q),g.type==="relation"&&g.options.collectionId){const K=R(g.options.collectionId,q+".",l+1);K.length&&(u=u.concat(K))}}return u}function H(n=!0,o=!0){let l=[].concat(I);const y=R(m.name);for(const u of y)l.push(u);if(n&&(l.push("@request.method"),l.push("@request.query."),l.push("@request.data."),l.push("@request.auth."),l.push("@request.auth.id"),l.push("@request.auth.collectionId"),l.push("@request.auth.collectionName"),l.push("@request.auth.username"),l.push("@request.auth.email"),l.push("@request.auth.emailVisibility"),l.push("@request.auth.verified"),l.push("@request.auth.created"),l.push("@request.auth.updated")),n||o)for(const u of d){let g="";if(!o)continue;g="@collection."+u.name+".";const q=R(u.name,g);for(const K of q)l.push(K)}return l.sort(function(u,g){return g.length-u.length}),l}function G(n){let o=n.matchBefore(/[\'\"\@\w\.]*/);if(o&&o.from==o.to&&!n.explicit)return null;let l=[{label:"false"},{label:"true"},{label:"@now"}];C||l.push({label:"@collection.*",apply:"@collection."});const y=H(!k,!k&&o.text.startsWith("@c"));for(const u of y)l.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:o.from,options:l}}function J(){const n=[{regex:L.escapeRegExp("@now"),token:"keyword"}],o=H(!k,!C);for(const l of o){let y;l.endsWith(".")?y=L.escapeRegExp(l)+"\\w+[\\w.]*":y=L.escapeRegExp(l),n.push({regex:y,token:"keyword"})}return n}function N(){return qe.define(Ke({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}].concat(J())}))}oe(()=>{const n={key:"Enter",run:o=>{S&&p("submit",r)}};return D(),e(11,f=new x({parent:b,state:w.create({doc:r,extensions:[se(),le(),ae(),ue(),ce(),w.allowMultipleSelections.of(!0),fe(de,{fallback:!0}),he(),ge(),pe(),ye(),me.of([n,...be,...ke,xe.find(o=>o.key==="Mod-d"),...we,...Se]),x.lineWrapping,Ce({override:[G],icons:!1}),B.of(U(c)),M.of(x.editable.of(!0)),O.of(w.readOnly.of(!1)),_.of(N()),w.transactionFilter.of(o=>S&&o.newDoc.lines>1?[]:o),x.updateListener.of(o=>{!o.docChanged||a||(e(1,r=o.state.doc.toString()),F())})]})})),()=>{W(),f==null||f.destroy()}});function T(n){re[n?"unshift":"push"](()=>{b=n,e(0,b)})}return t.$$set=n=>{"id"in n&&e(2,s=n.id),"value"in n&&e(1,r=n.value),"disabled"in n&&e(3,a=n.disabled),"placeholder"in n&&e(4,c=n.placeholder),"baseCollection"in n&&e(5,m=n.baseCollection),"singleLine"in n&&e(6,S=n.singleLine),"extraAutocompleteKeys"in n&&e(7,I=n.extraAutocompleteKeys),"disableRequestKeys"in n&&e(8,k=n.disableRequestKeys),"disableIndirectCollectionsKeys"in n&&e(9,C=n.disableIndirectCollectionsKeys)},t.$$.update=()=>{t.$$.dirty&4096&&(d=P(h)),t.$$.dirty&4&&s&&D(),t.$$.dirty&2080&&f&&(m==null?void 0:m.schema)&&f.dispatch({effects:[_.reconfigure(N())]}),t.$$.dirty&2056&&f&&typeof a<"u"&&(f.dispatch({effects:[M.reconfigure(x.editable.of(!a)),O.reconfigure(w.readOnly.of(a))]}),F()),t.$$.dirty&2050&&f&&r!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:r}}),t.$$.dirty&2064&&f&&typeof c<"u"&&f.dispatch({effects:[B.reconfigure(U(c))]})},[b,r,s,a,c,m,S,I,k,C,v,f,h,T]}class Be extends z{constructor(i){super(),Q(this,i,_e,Ae,X,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10})}get focus(){return this.$$.ctx[10]}}export{Be as default}; +import{S as z,i as Q,s as X,e as Y,f as Z,g as j,y as A,o as $,I as ee,J as te,K as ne,L as ie,M as oe,C as L,N as re}from"./index.86238c7e.js";import{C as E,E as x,a as w,h as se,b as le,c as ae,d as ue,e as ce,s as fe,f as de,g as he,i as ge,r as pe,j as ye,k as me,l as be,m as ke,n as xe,o as we,p as Se,q as Ce,t as U,S as qe}from"./index.9c8b95cd.js";function Ke(t){V(t,"start");var i={},e=t.languageData||{},d=!1;for(var h in t)if(h!=e&&t.hasOwnProperty(h))for(var p=i[h]=[],s=t[h],r=0;r2&&s.token&&typeof s.token!="string"){e.pending=[];for(var c=2;c-1)return null;var h=e.indent.length-1,p=t[e.state];e:for(;;){for(var s=0;se(12,h=n));const p=ne();let{id:s=""}=i,{value:r=""}=i,{disabled:a=!1}=i,{placeholder:c=""}=i,{baseCollection:m=new ie}=i,{singleLine:S=!1}=i,{extraAutocompleteKeys:I=[]}=i,{disableRequestKeys:k=!1}=i,{disableIndirectCollectionsKeys:C=!1}=i,f,b,_=new E,M=new E,O=new E,B=new E;function v(){f==null||f.focus()}function P(n){let o=n.slice();return L.pushOrReplaceByKey(o,m,"id"),o}function F(){b==null||b.dispatchEvent(new CustomEvent("change",{detail:{value:r},bubbles:!0}))}function W(){if(!s)return;const n=document.querySelectorAll('[for="'+s+'"]');for(let o of n)o.removeEventListener("click",v)}function D(){if(!s)return;W();const n=document.querySelectorAll('[for="'+s+'"]');for(let o of n)o.addEventListener("click",v)}function R(n,o="",l=0){let y=d.find(g=>g.name==n||g.id==n);if(!y||l>=4)return[];let u=[o+"id",o+"created",o+"updated"];y.isAuth&&(u.push(o+"username"),u.push(o+"email"),u.push(o+"emailVisibility"),u.push(o+"verified"));for(const g of y.schema){const q=o+g.name;if(u.push(q),g.type==="relation"&&g.options.collectionId){const K=R(g.options.collectionId,q+".",l+1);K.length&&(u=u.concat(K))}}return u}function H(n=!0,o=!0){let l=[].concat(I);const y=R(m.name);for(const u of y)l.push(u);if(n&&(l.push("@request.method"),l.push("@request.query."),l.push("@request.data."),l.push("@request.auth."),l.push("@request.auth.id"),l.push("@request.auth.collectionId"),l.push("@request.auth.collectionName"),l.push("@request.auth.username"),l.push("@request.auth.email"),l.push("@request.auth.emailVisibility"),l.push("@request.auth.verified"),l.push("@request.auth.created"),l.push("@request.auth.updated")),n||o)for(const u of d){let g="";if(!o)continue;g="@collection."+u.name+".";const q=R(u.name,g);for(const K of q)l.push(K)}return l.sort(function(u,g){return g.length-u.length}),l}function G(n){let o=n.matchBefore(/[\'\"\@\w\.]*/);if(o&&o.from==o.to&&!n.explicit)return null;let l=[{label:"false"},{label:"true"},{label:"@now"}];C||l.push({label:"@collection.*",apply:"@collection."});const y=H(!k,!k&&o.text.startsWith("@c"));for(const u of y)l.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:o.from,options:l}}function J(){const n=[{regex:L.escapeRegExp("@now"),token:"keyword"}],o=H(!k,!C);for(const l of o){let y;l.endsWith(".")?y=L.escapeRegExp(l)+"\\w+[\\w.]*":y=L.escapeRegExp(l),n.push({regex:y,token:"keyword"})}return n}function N(){return qe.define(Ke({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}].concat(J())}))}oe(()=>{const n={key:"Enter",run:o=>{S&&p("submit",r)}};return D(),e(11,f=new x({parent:b,state:w.create({doc:r,extensions:[se(),le(),ae(),ue(),ce(),w.allowMultipleSelections.of(!0),fe(de,{fallback:!0}),he(),ge(),pe(),ye(),me.of([n,...be,...ke,xe.find(o=>o.key==="Mod-d"),...we,...Se]),x.lineWrapping,Ce({override:[G],icons:!1}),B.of(U(c)),M.of(x.editable.of(!0)),O.of(w.readOnly.of(!1)),_.of(N()),w.transactionFilter.of(o=>S&&o.newDoc.lines>1?[]:o),x.updateListener.of(o=>{!o.docChanged||a||(e(1,r=o.state.doc.toString()),F())})]})})),()=>{W(),f==null||f.destroy()}});function T(n){re[n?"unshift":"push"](()=>{b=n,e(0,b)})}return t.$$set=n=>{"id"in n&&e(2,s=n.id),"value"in n&&e(1,r=n.value),"disabled"in n&&e(3,a=n.disabled),"placeholder"in n&&e(4,c=n.placeholder),"baseCollection"in n&&e(5,m=n.baseCollection),"singleLine"in n&&e(6,S=n.singleLine),"extraAutocompleteKeys"in n&&e(7,I=n.extraAutocompleteKeys),"disableRequestKeys"in n&&e(8,k=n.disableRequestKeys),"disableIndirectCollectionsKeys"in n&&e(9,C=n.disableIndirectCollectionsKeys)},t.$$.update=()=>{t.$$.dirty&4096&&(d=P(h)),t.$$.dirty&4&&s&&D(),t.$$.dirty&2080&&f&&(m==null?void 0:m.schema)&&f.dispatch({effects:[_.reconfigure(N())]}),t.$$.dirty&2056&&f&&typeof a<"u"&&(f.dispatch({effects:[M.reconfigure(x.editable.of(!a)),O.reconfigure(w.readOnly.of(a))]}),F()),t.$$.dirty&2050&&f&&r!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:r}}),t.$$.dirty&2064&&f&&typeof c<"u"&&f.dispatch({effects:[B.reconfigure(U(c))]})},[b,r,s,a,c,m,S,I,k,C,v,f,h,T]}class Be extends z{constructor(i){super(),Q(this,i,_e,Ae,X,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10})}get focus(){return this.$$.ctx[10]}}export{Be as default}; diff --git a/ui/dist/assets/ListApiDocs.e6ffd7ae.js b/ui/dist/assets/ListApiDocs.57db06f5.js similarity index 99% rename from ui/dist/assets/ListApiDocs.e6ffd7ae.js rename to ui/dist/assets/ListApiDocs.57db06f5.js index 7250c8f6..f7f26025 100644 --- a/ui/dist/assets/ListApiDocs.e6ffd7ae.js +++ b/ui/dist/assets/ListApiDocs.57db06f5.js @@ -1,4 +1,4 @@ -import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as xt,o as u,w as k,h as e,O as Ae,c as ge,m as ye,x as Ue,P as Lt,Q as Dt,k as It,R as Bt,n as zt,t as ce,a as de,d as ve,L as Gt,C as je,p as Ut,r as Ee}from"./index.be8ffbe5.js";import{S as jt}from"./SdkTabs.8f55857f.js";function Qt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Show details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-down-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Jt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Hide details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-up-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Tt(r){let s,n,i,c,f,m,_,w,b,$,h,H,W,fe,T,pe,O,G,C,M,Fe,A,E,Ce,U,X,q,Y,xe,j,Q,D,P,ue,Z,v,I,ee,me,te,N,B,le,be,se,x,J,ne,Le,K,he,V;return{c(){s=l("p"),s.innerHTML=`The syntax basically follows the format +import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as xt,o as u,w as k,h as e,O as Ae,c as ge,m as ye,x as Ue,P as Lt,Q as Dt,k as It,R as Bt,n as zt,t as ce,a as de,d as ve,L as Gt,C as je,p as Ut,r as Ee}from"./index.86238c7e.js";import{S as jt}from"./SdkTabs.c9d3b27f.js";function Qt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Show details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-down-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Jt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Hide details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-up-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Tt(r){let s,n,i,c,f,m,_,w,b,$,h,H,W,fe,T,pe,O,G,C,M,Fe,A,E,Ce,U,X,q,Y,xe,j,Q,D,P,ue,Z,v,I,ee,me,te,N,B,le,be,se,x,J,ne,Le,K,he,V;return{c(){s=l("p"),s.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,n=a(),i=l("ul"),c=l("li"),c.innerHTML=`OPERAND - could be any of the above field literal, string (single diff --git a/ui/dist/assets/ListExternalAuthsDocs.305ff8e3.js b/ui/dist/assets/ListExternalAuthsDocs.ee06242a.js similarity index 98% rename from ui/dist/assets/ListExternalAuthsDocs.305ff8e3.js rename to ui/dist/assets/ListExternalAuthsDocs.ee06242a.js index b911f309..ad72fc5b 100644 --- a/ui/dist/assets/ListExternalAuthsDocs.305ff8e3.js +++ b/ui/dist/assets/ListExternalAuthsDocs.ee06242a.js @@ -1,4 +1,4 @@ -import{S as Be,i as qe,s as Le,e as n,w as v,b as h,c as Te,f as b,g as r,h as s,m as Ie,x as U,P as ye,Q as Oe,k as Me,R as Re,n as Ve,t as te,a as le,o as d,d as Se,L as ze,C as De,p as He,r as j,u as Ue,O as je}from"./index.be8ffbe5.js";import{S as Ge}from"./SdkTabs.8f55857f.js";function Ee(a,l,o){const i=a.slice();return i[5]=l[o],i}function Ae(a,l,o){const i=a.slice();return i[5]=l[o],i}function Pe(a,l){let o,i=l[5].code+"",m,_,c,u;function f(){return l[4](l[5])}return{key:a,first:null,c(){o=n("button"),m=v(i),_=h(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,y){r(g,o,y),s(o,m),s(o,_),c||(u=Ue(o,"click",f),c=!0)},p(g,y){l=g,y&4&&i!==(i=l[5].code+"")&&U(m,i),y&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Ce(a,l){let o,i,m,_;return i=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=n("div"),Te(i.$$.fragment),m=h(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Ie(i,o,null),s(o,m),_=!0},p(c,u){l=c;const f={};u&4&&(f.content=l[5].body),i.$set(f),(!_||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){_||(te(i.$$.fragment,c),_=!0)},o(c){le(i.$$.fragment,c),_=!1},d(c){c&&d(o),Se(i)}}}function Ke(a){var be,_e,he,ke;let l,o,i=a[0].name+"",m,_,c,u,f,g,y,M=a[0].name+"",G,oe,se,K,N,E,Q,T,F,w,R,ae,V,A,ie,J,z=a[0].name+"",W,ne,X,ce,re,D,Y,I,Z,S,x,B,ee,P,q,$=[],de=new Map,ue,L,k=[],pe=new Map,C;E=new Ge({props:{js:` +import{S as Be,i as qe,s as Le,e as n,w as v,b as h,c as Te,f as b,g as r,h as s,m as Ie,x as U,P as ye,Q as Oe,k as Me,R as Re,n as Ve,t as te,a as le,o as d,d as Se,L as ze,C as De,p as He,r as j,u as Ue,O as je}from"./index.86238c7e.js";import{S as Ge}from"./SdkTabs.c9d3b27f.js";function Ee(a,l,o){const i=a.slice();return i[5]=l[o],i}function Ae(a,l,o){const i=a.slice();return i[5]=l[o],i}function Pe(a,l){let o,i=l[5].code+"",m,_,c,u;function f(){return l[4](l[5])}return{key:a,first:null,c(){o=n("button"),m=v(i),_=h(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,y){r(g,o,y),s(o,m),s(o,_),c||(u=Ue(o,"click",f),c=!0)},p(g,y){l=g,y&4&&i!==(i=l[5].code+"")&&U(m,i),y&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Ce(a,l){let o,i,m,_;return i=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=n("div"),Te(i.$$.fragment),m=h(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Ie(i,o,null),s(o,m),_=!0},p(c,u){l=c;const f={};u&4&&(f.content=l[5].body),i.$set(f),(!_||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){_||(te(i.$$.fragment,c),_=!0)},o(c){le(i.$$.fragment,c),_=!1},d(c){c&&d(o),Se(i)}}}function Ke(a){var be,_e,he,ke;let l,o,i=a[0].name+"",m,_,c,u,f,g,y,M=a[0].name+"",G,oe,se,K,N,E,Q,T,F,w,R,ae,V,A,ie,J,z=a[0].name+"",W,ne,X,ce,re,D,Y,I,Z,S,x,B,ee,P,q,$=[],de=new Map,ue,L,k=[],pe=new Map,C;E=new Ge({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset.ad1b2398.js b/ui/dist/assets/PageAdminConfirmPasswordReset.8f2dede8.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset.ad1b2398.js rename to ui/dist/assets/PageAdminConfirmPasswordReset.8f2dede8.js index 039d5659..c24d3a8d 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset.ad1b2398.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset.8f2dede8.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index.be8ffbe5.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password +import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index.86238c7e.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password `),m&&m.c(),t=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",R=C(),P=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(P,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,P,$),_(P,v),k=!0,F||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],F=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(H(r.$$.fragment,a),H(d.$$.fragment,a),k=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(P),F=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(H(e.$$.fragment,s),o=!0)},o(s){N(e.$$.fragment,s),o=!1},d(s){T(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.errorResponseHandler(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset.d9c4c816.js b/ui/dist/assets/PageAdminRequestPasswordReset.af860e10.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset.d9c4c816.js rename to ui/dist/assets/PageAdminRequestPasswordReset.af860e10.js index 0057048f..769f088e 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset.d9c4c816.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset.af860e10.js @@ -1,2 +1,2 @@ -import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index.be8ffbe5.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

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

Forgotten admin password

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

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

Successfully changed the user email address.

You can now sign in with your new email address.

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

Successfully changed the user password.

You can now sign in with your new password.

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

Invalid or expired verification token.

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

Successfully verified email address.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function F(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function I(o){let t;function s(l,i){return l[1]?F:l[0]?E:T}let e=s(o),n=e(o);return{c(){n.c(),t=S()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function V(o){let t,s;return t=new x({props:{nobranding:!0,$$slots:{default:[I]},$$scope:{ctx:o}}}),{c(){C(t.$$.fragment)},m(e,n){g(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function q(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new M("../");try{const m=P(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class N extends v{constructor(t){super(),y(this,t,q,V,w,{params:2})}}export{N as default}; diff --git a/ui/dist/assets/RealtimeApiDocs.9639f54e.js b/ui/dist/assets/RealtimeApiDocs.b12acb7b.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs.9639f54e.js rename to ui/dist/assets/RealtimeApiDocs.b12acb7b.js index 0649a66d..96827b3a 100644 --- a/ui/dist/assets/RealtimeApiDocs.9639f54e.js +++ b/ui/dist/assets/RealtimeApiDocs.b12acb7b.js @@ -1,4 +1,4 @@ -import{S as ee,i as oe,s as te,O as se,C as I,e as u,w as E,b as a,c as K,f as p,g as s,h as P,m as Q,x as ne,t as X,a as Z,o as n,d as x,L as ie,p as ce}from"./index.be8ffbe5.js";import{S as re}from"./SdkTabs.8f55857f.js";function le(t){var B,U,W,L,A,H,T,q;let i,m,c=t[0].name+"",b,d,k,f,S,v,w,r,_,$,O,g,y,h,D,l,R;return r=new re({props:{js:` +import{S as ee,i as oe,s as te,O as se,C as I,e as u,w as E,b as a,c as K,f as p,g as s,h as P,m as Q,x as ne,t as X,a as Z,o as n,d as x,L as ie,p as ce}from"./index.86238c7e.js";import{S as re}from"./SdkTabs.c9d3b27f.js";function le(t){var B,U,W,L,A,H,T,q;let i,m,c=t[0].name+"",b,d,k,f,S,v,w,r,_,$,O,g,y,h,D,l,R;return r=new re({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${t[1]}'); diff --git a/ui/dist/assets/RequestEmailChangeDocs.a5bce610.js b/ui/dist/assets/RequestEmailChangeDocs.94646c17.js similarity index 98% rename from ui/dist/assets/RequestEmailChangeDocs.a5bce610.js rename to ui/dist/assets/RequestEmailChangeDocs.94646c17.js index f862f70b..2959cd8b 100644 --- a/ui/dist/assets/RequestEmailChangeDocs.a5bce610.js +++ b/ui/dist/assets/RequestEmailChangeDocs.94646c17.js @@ -1,4 +1,4 @@ -import{S as Pe,i as Te,s as Be,e as c,w as v,b as h,c as Ce,f,g as r,h as n,m as Ee,x as D,P as ve,Q as Se,k as Re,R as Me,n as Ae,t as x,a as ee,o as m,d as ye,L as Ve,C as ze,p as He,r as I,u as Le,O as Oe}from"./index.be8ffbe5.js";import{S as Ue}from"./SdkTabs.8f55857f.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Le(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&D(_,a),q&6&&I(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Oe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Ce(a.$$.fragment),_=h(),f(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ee(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&I(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function je(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,K,C,N,P,Q,w,H,le,L,T,se,G,O=o[0].name+"",J,ae,oe,U,W,B,X,S,Y,R,Z,E,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;C=new Ue({props:{js:` +import{S as Pe,i as Te,s as Be,e as c,w as v,b as h,c as Ce,f,g as r,h as n,m as Ee,x as D,P as ve,Q as Se,k as Re,R as Me,n as Ae,t as x,a as ee,o as m,d as ye,L as Ve,C as ze,p as He,r as I,u as Le,O as Oe}from"./index.86238c7e.js";import{S as Ue}from"./SdkTabs.c9d3b27f.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Le(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&D(_,a),q&6&&I(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Oe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Ce(a.$$.fragment),_=h(),f(s,"class","tab-item"),I(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ee(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&I(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function je(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",F,te,K,C,N,P,Q,w,H,le,L,T,se,G,O=o[0].name+"",J,ae,oe,U,W,B,X,S,Y,R,Z,E,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;C=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/RequestPasswordResetDocs.4c9f6ae3.js b/ui/dist/assets/RequestPasswordResetDocs.13d66dd3.js similarity index 97% rename from ui/dist/assets/RequestPasswordResetDocs.4c9f6ae3.js rename to ui/dist/assets/RequestPasswordResetDocs.13d66dd3.js index 24ad1346..985ee82d 100644 --- a/ui/dist/assets/RequestPasswordResetDocs.4c9f6ae3.js +++ b/ui/dist/assets/RequestPasswordResetDocs.13d66dd3.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as E,P as ue,Q as Re,k as ge,R as ye,n as Be,t as Z,a as x,o as d,d as he,L as Ce,C as Se,p as Te,r as F,u as Me,O as Ae}from"./index.be8ffbe5.js";import{S as Ue}from"./SdkTabs.8f55857f.js";function me(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),m=v(),b(l,"class","tab-item"),F(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,m),i||(p=Me(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&E(_,o),$&6&&F(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),F(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&F(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",Q,ee,z,q,G,B,J,R,H,te,I,C,se,K,L=a[0].name+"",N,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as E,P as ue,Q as Re,k as ge,R as ye,n as Be,t as Z,a as x,o as d,d as he,L as Ce,C as Se,p as Te,r as F,u as Me,O as Ae}from"./index.86238c7e.js";import{S as Ue}from"./SdkTabs.c9d3b27f.js";function me(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),m=v(),b(l,"class","tab-item"),F(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,m),i||(p=Me(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&E(_,o),$&6&&F(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),F(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&F(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",Q,ee,z,q,G,B,J,R,H,te,I,C,se,K,L=a[0].name+"",N,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/RequestVerificationDocs.28db8063.js b/ui/dist/assets/RequestVerificationDocs.85b1446d.js similarity index 97% rename from ui/dist/assets/RequestVerificationDocs.28db8063.js rename to ui/dist/assets/RequestVerificationDocs.85b1446d.js index 40c580c1..2a5b6e84 100644 --- a/ui/dist/assets/RequestVerificationDocs.28db8063.js +++ b/ui/dist/assets/RequestVerificationDocs.85b1446d.js @@ -1,4 +1,4 @@ -import{S as we,i as qe,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as O,P as ue,Q as ge,k as ye,R as Be,n as Ce,t as Z,a as x,o as f,d as $e,L as Se,C as Te,p as Re,r as E,u as Ve,O as Me}from"./index.be8ffbe5.js";import{S as Ae}from"./SdkTabs.8f55857f.js";function me(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,m,n,p;function u(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),m=v(),b(s,"class","tab-item"),E(s,"active",l[1]===l[5].code),this.first=s},m(w,q){r(w,s,q),i(s,_),i(s,m),n||(p=Ve(s,"click",u),n=!0)},p(w,q){l=w,q&4&&o!==(o=l[5].code+"")&&O(_,o),q&6&&E(s,"active",l[1]===l[5].code)},d(w){w&&f(s),n=!1,p()}}}function ke(a,l){let s,o,_,m;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),E(s,"active",l[1]===l[5].code),this.first=s},m(n,p){r(n,s,p),he(o,s,null),i(s,_),m=!0},p(n,p){l=n;const u={};p&4&&(u.content=l[5].body),o.$set(u),(!m||p&6)&&E(s,"active",l[1]===l[5].code)},i(n){m||(Z(o.$$.fragment,n),m=!0)},o(n){x(o.$$.fragment,n),m=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,m,n,p,u,w,q,j=a[0].name+"",F,ee,Q,P,z,C,G,g,D,te,H,S,le,J,I=a[0].name+"",K,se,N,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` +import{S as we,i as qe,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as O,P as ue,Q as ge,k as ye,R as Be,n as Ce,t as Z,a as x,o as f,d as $e,L as Se,C as Te,p as Re,r as E,u as Ve,O as Me}from"./index.86238c7e.js";import{S as Ae}from"./SdkTabs.c9d3b27f.js";function me(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,m,n,p;function u(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),m=v(),b(s,"class","tab-item"),E(s,"active",l[1]===l[5].code),this.first=s},m(w,q){r(w,s,q),i(s,_),i(s,m),n||(p=Ve(s,"click",u),n=!0)},p(w,q){l=w,q&4&&o!==(o=l[5].code+"")&&O(_,o),q&6&&E(s,"active",l[1]===l[5].code)},d(w){w&&f(s),n=!1,p()}}}function ke(a,l){let s,o,_,m;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),E(s,"active",l[1]===l[5].code),this.first=s},m(n,p){r(n,s,p),he(o,s,null),i(s,_),m=!0},p(n,p){l=n;const u={};p&4&&(u.content=l[5].body),o.$set(u),(!m||p&6)&&E(s,"active",l[1]===l[5].code)},i(n){m||(Z(o.$$.fragment,n),m=!0)},o(n){x(o.$$.fragment,n),m=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,m,n,p,u,w,q,j=a[0].name+"",F,ee,Q,P,z,C,G,g,D,te,H,S,le,J,I=a[0].name+"",K,se,N,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/SdkTabs.8f55857f.js b/ui/dist/assets/SdkTabs.c9d3b27f.js similarity index 95% rename from ui/dist/assets/SdkTabs.8f55857f.js rename to ui/dist/assets/SdkTabs.c9d3b27f.js index feb85a1d..baf11260 100644 --- a/ui/dist/assets/SdkTabs.8f55857f.js +++ b/ui/dist/assets/SdkTabs.c9d3b27f.js @@ -1 +1 @@ -import{S as q,i as B,s as F,e as b,b as v,f as h,g as y,h as f,P as w,Q as J,k as N,R as O,n as Q,t as I,a as M,o as E,w as S,r as j,u as Y,x as P,O as z,c as A,m as G,d as H}from"./index.be8ffbe5.js";function C(o,t,l){const n=o.slice();return n[5]=t[l],n}function D(o,t,l){const n=o.slice();return n[5]=t[l],n}function K(o,t){let l,n,_=t[5].title+"",u,r,s,c;function m(){return t[4](t[5])}return{key:o,first:null,c(){l=b("button"),n=b("div"),u=S(_),r=v(),h(n,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),j(l,"active",t[0]===t[5].language),this.first=l},m(g,d){y(g,l,d),f(l,n),f(n,u),f(l,r),s||(c=Y(l,"click",m),s=!0)},p(g,d){t=g,d&2&&_!==(_=t[5].title+"")&&P(u,_),d&3&&j(l,"active",t[0]===t[5].language)},d(g){g&&E(l),s=!1,c()}}}function R(o,t){let l,n,_,u,r,s,c=t[5].title+"",m,g,d,p,k;return n=new z({props:{language:t[5].language,content:t[5].content}}),{key:o,first:null,c(){l=b("div"),A(n.$$.fragment),_=v(),u=b("div"),r=b("em"),s=b("a"),m=S(c),g=S(" SDK"),p=v(),h(s,"href",d=t[5].url),h(s,"target","_blank"),h(s,"rel","noopener noreferrer"),h(r,"class","txt-sm txt-hint"),h(u,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),j(l,"active",t[0]===t[5].language),this.first=l},m(e,a){y(e,l,a),G(n,l,null),f(l,_),f(l,u),f(u,r),f(r,s),f(s,m),f(s,g),f(l,p),k=!0},p(e,a){t=e;const i={};a&2&&(i.language=t[5].language),a&2&&(i.content=t[5].content),n.$set(i),(!k||a&2)&&c!==(c=t[5].title+"")&&P(m,c),(!k||a&2&&d!==(d=t[5].url))&&h(s,"href",d),(!k||a&3)&&j(l,"active",t[0]===t[5].language)},i(e){k||(I(n.$$.fragment,e),k=!0)},o(e){M(n.$$.fragment,e),k=!1},d(e){e&&E(l),H(n)}}}function L(o){let t,l,n=[],_=new Map,u,r,s=[],c=new Map,m,g=o[1];const d=e=>e[5].language;for(let e=0;ee[5].language;for(let e=0;el(0,r=c.language);return o.$$set=c=>{"js"in c&&l(2,_=c.js),"dart"in c&&l(3,u=c.dart)},o.$$.update=()=>{o.$$.dirty&1&&r&&localStorage.setItem(T,r),o.$$.dirty&12&&l(1,n=[{title:"JavaScript",language:"javascript",content:_,url:"https://github.com/pocketbase/js-sdk/tree/rc"},{title:"Dart",language:"dart",content:u,url:"https://github.com/pocketbase/dart-sdk/tree/rc"}])},[r,n,_,u,s]}class W extends q{constructor(t){super(),B(this,t,U,L,F,{js:2,dart:3})}}export{W as S}; +import{S as q,i as B,s as F,e as b,b as v,f as h,g as y,h as f,P as w,Q as J,k as N,R as O,n as Q,t as I,a as M,o as E,w as S,r as j,u as Y,x as P,O as z,c as A,m as G,d as H}from"./index.86238c7e.js";function C(o,t,l){const n=o.slice();return n[5]=t[l],n}function D(o,t,l){const n=o.slice();return n[5]=t[l],n}function K(o,t){let l,n,_=t[5].title+"",u,r,s,c;function m(){return t[4](t[5])}return{key:o,first:null,c(){l=b("button"),n=b("div"),u=S(_),r=v(),h(n,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),j(l,"active",t[0]===t[5].language),this.first=l},m(g,d){y(g,l,d),f(l,n),f(n,u),f(l,r),s||(c=Y(l,"click",m),s=!0)},p(g,d){t=g,d&2&&_!==(_=t[5].title+"")&&P(u,_),d&3&&j(l,"active",t[0]===t[5].language)},d(g){g&&E(l),s=!1,c()}}}function R(o,t){let l,n,_,u,r,s,c=t[5].title+"",m,g,d,p,k;return n=new z({props:{language:t[5].language,content:t[5].content}}),{key:o,first:null,c(){l=b("div"),A(n.$$.fragment),_=v(),u=b("div"),r=b("em"),s=b("a"),m=S(c),g=S(" SDK"),p=v(),h(s,"href",d=t[5].url),h(s,"target","_blank"),h(s,"rel","noopener noreferrer"),h(r,"class","txt-sm txt-hint"),h(u,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),j(l,"active",t[0]===t[5].language),this.first=l},m(e,a){y(e,l,a),G(n,l,null),f(l,_),f(l,u),f(u,r),f(r,s),f(s,m),f(s,g),f(l,p),k=!0},p(e,a){t=e;const i={};a&2&&(i.language=t[5].language),a&2&&(i.content=t[5].content),n.$set(i),(!k||a&2)&&c!==(c=t[5].title+"")&&P(m,c),(!k||a&2&&d!==(d=t[5].url))&&h(s,"href",d),(!k||a&3)&&j(l,"active",t[0]===t[5].language)},i(e){k||(I(n.$$.fragment,e),k=!0)},o(e){M(n.$$.fragment,e),k=!1},d(e){e&&E(l),H(n)}}}function L(o){let t,l,n=[],_=new Map,u,r,s=[],c=new Map,m,g=o[1];const d=e=>e[5].language;for(let e=0;ee[5].language;for(let e=0;el(0,r=c.language);return o.$$set=c=>{"js"in c&&l(2,_=c.js),"dart"in c&&l(3,u=c.dart)},o.$$.update=()=>{o.$$.dirty&1&&r&&localStorage.setItem(T,r),o.$$.dirty&12&&l(1,n=[{title:"JavaScript",language:"javascript",content:_,url:"https://github.com/pocketbase/js-sdk/tree/rc"},{title:"Dart",language:"dart",content:u,url:"https://github.com/pocketbase/dart-sdk/tree/rc"}])},[r,n,_,u,s]}class W extends q{constructor(t){super(),B(this,t,U,L,F,{js:2,dart:3})}}export{W as S}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs.b05265d9.js b/ui/dist/assets/UnlinkExternalAuthDocs.728267cc.js similarity index 98% rename from ui/dist/assets/UnlinkExternalAuthDocs.b05265d9.js rename to ui/dist/assets/UnlinkExternalAuthDocs.728267cc.js index 07f2605b..6d798233 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs.b05265d9.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs.728267cc.js @@ -1,4 +1,4 @@ -import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as R,P as ye,Q as Le,k as Me,R as Ve,n as ze,t as le,a as oe,o as d,d as Ue,L as He,C as Ie,p as Re,r as j,u as je,O as Ke}from"./index.be8ffbe5.js";import{S as Ne}from"./SdkTabs.8f55857f.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Pe(n,l){let o,a=l[5].code+"",_,b,c,u;function p(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m($,E){r($,o,E),s(o,_),s(o,b),c||(u=je(o,"click",p),c=!0)},p($,E){l=$,E&4&&a!==(a=l[5].code+"")&&R(_,a),E&6&&j(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Te(n,l){let o,a,_,b;return a=new Ke({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const p={};u&4&&(p.content=l[5].body),a.$set(p),(!b||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,p,$,E,L=n[0].name+"",K,se,ae,N,Q,A,F,T,G,g,M,ne,V,y,ie,J,z=n[0].name+"",W,ce,X,re,Y,de,H,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,me,O,k=[],pe=new Map,P;A=new Ne({props:{js:` +import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as R,P as ye,Q as Le,k as Me,R as Ve,n as ze,t as le,a as oe,o as d,d as Ue,L as He,C as Ie,p as Re,r as j,u as je,O as Ke}from"./index.86238c7e.js";import{S as Ne}from"./SdkTabs.c9d3b27f.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Pe(n,l){let o,a=l[5].code+"",_,b,c,u;function p(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m($,E){r($,o,E),s(o,_),s(o,b),c||(u=je(o,"click",p),c=!0)},p($,E){l=$,E&4&&a!==(a=l[5].code+"")&&R(_,a),E&6&&j(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Te(n,l){let o,a,_,b;return a=new Ke({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const p={};u&4&&(p.content=l[5].body),a.$set(p),(!b||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,p,$,E,L=n[0].name+"",K,se,ae,N,Q,A,F,T,G,g,M,ne,V,y,ie,J,z=n[0].name+"",W,ce,X,re,Y,de,H,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,me,O,k=[],pe=new Map,P;A=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/UpdateApiDocs.e200c0d6.js b/ui/dist/assets/UpdateApiDocs.cddb18a8.js similarity index 99% rename from ui/dist/assets/UpdateApiDocs.e200c0d6.js rename to ui/dist/assets/UpdateApiDocs.cddb18a8.js index d57c9fdf..74e29b43 100644 --- a/ui/dist/assets/UpdateApiDocs.e200c0d6.js +++ b/ui/dist/assets/UpdateApiDocs.cddb18a8.js @@ -1,4 +1,4 @@ -import{S as Ct,i as St,s as Ot,C as I,O as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as U,P as Pe,Q as ut,k as Mt,R as $t,n as Rt,t as pe,a as fe,o,d as Fe,L as qt,p as Dt,r as ce,u as Ht,y as G}from"./index.be8ffbe5.js";import{S as Lt}from"./SdkTabs.8f55857f.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,j,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional +import{S as Ct,i as St,s as Ot,C as I,O as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as U,P as Pe,Q as ut,k as Mt,R as $t,n as Rt,t as pe,a as fe,o,d as Fe,L as qt,p as Dt,r as ce,u as Ht,y as G}from"./index.86238c7e.js";import{S as Lt}from"./SdkTabs.c9d3b27f.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,j,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional username
String The username of the auth record.`,b=m(),u=r("tr"),u.innerHTML=`
Optional diff --git a/ui/dist/assets/ViewApiDocs.7c16115c.js b/ui/dist/assets/ViewApiDocs.0c82d5c8.js similarity index 98% rename from ui/dist/assets/ViewApiDocs.7c16115c.js rename to ui/dist/assets/ViewApiDocs.0c82d5c8.js index 92bf26dd..c8f48c2b 100644 --- a/ui/dist/assets/ViewApiDocs.7c16115c.js +++ b/ui/dist/assets/ViewApiDocs.0c82d5c8.js @@ -1,4 +1,4 @@ -import{S as Ze,i as et,s as tt,O as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,P as Ve,Q as lt,k as st,R as nt,n as ot,t as z,a as G,o as d,d as he,L as it,C as ze,p as at,r as J,u as rt}from"./index.be8ffbe5.js";import{S as dt}from"./SdkTabs.8f55857f.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ue,je;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,U=i[0].name+"",K,ve,W,g,X,B,Y,$,j,we,N,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,I,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,Ie,fe,xe,ue,M,be,P,H,R=[],Ae=new Map,Me,L,y=[],He=new Map,T;g=new dt({props:{js:` +import{S as Ze,i as et,s as tt,O as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,P as Ve,Q as lt,k as st,R as nt,n as ot,t as z,a as G,o as d,d as he,L as it,C as ze,p as at,r as J,u as rt}from"./index.86238c7e.js";import{S as dt}from"./SdkTabs.c9d3b27f.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ue,je;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,U=i[0].name+"",K,ve,W,g,X,B,Y,$,j,we,N,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,I,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,Ie,fe,xe,ue,M,be,P,H,R=[],Ae=new Map,Me,L,y=[],He=new Map,T;g=new dt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/index.be8ffbe5.js b/ui/dist/assets/index.86238c7e.js similarity index 69% rename from ui/dist/assets/index.be8ffbe5.js rename to ui/dist/assets/index.86238c7e.js index 773aed09..daaf8eea 100644 --- a/ui/dist/assets/index.be8ffbe5.js +++ b/ui/dist/assets/index.86238c7e.js @@ -1,56 +1,56 @@ -(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 bl=n=>n;function Ye(n,e){for(const t in e)n[t]=e[t];return n}function j_(n){return n&&typeof n=="object"&&typeof n.then=="function"}function tm(n){return n()}function Xa(){return Object.create(null)}function Re(n){n.forEach(tm)}function Wt(n){return typeof n=="function"}function ke(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Pl;function Ln(n,e){return Pl||(Pl=document.createElement("a")),Pl.href=e,n===Pl.href}function q_(n){return Object.keys(n).length===0}function nm(n,...e){if(n==null)return x;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Je(n,e,t){n.$$.on_destroy.push(nm(e,t))}function Ot(n,e,t,i){if(n){const s=im(n,e,t,i);return n[0](s)}}function im(n,e,t,i){return n[1]&&i?Ye(t.ctx.slice(),n[1](i(e))):t.ctx}function Dt(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(),sa=sm?n=>requestAnimationFrame(n):x;const hs=new Set;function lm(n){hs.forEach(e=>{e.c(n)||(hs.delete(e),e.f())}),hs.size!==0&&sa(lm)}function Po(n){let e;return hs.size===0&&sa(lm),{promise:new Promise(t=>{hs.add(e={c:n,f:t})}),abort(){hs.delete(e)}}}function _(n,e){n.appendChild(e)}function om(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function V_(n){const e=v("style");return z_(om(n),e),e.sheet}function z_(n,e){return _(n.head||n,e),e.sheet}function $(n,e,t){n.insertBefore(e,t||null)}function S(n){n.parentNode.removeChild(n)}function Tt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function ut(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Yn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function B_(n){return function(e){e.target===this&&n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Un(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function rt(n){return n===""?null:+n}function U_(n){return Array.from(n.childNodes)}function ue(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function pe(n,e){n.value=e==null?"":e}function Qa(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ee(n,e,t){n.classList[t?"add":"remove"](e)}function rm(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function jt(n,e){return new n(e)}const fo=new Map;let co=0;function W_(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function Y_(n,e){const t={stylesheet:V_(e),rules:{}};return fo.set(n,t),t}function sl(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 bl=n=>n;function Ye(n,e){for(const t in e)n[t]=e[t];return n}function q_(n){return n&&typeof n=="object"&&typeof n.then=="function"}function nm(n){return n()}function Xa(){return Object.create(null)}function Re(n){n.forEach(nm)}function Wt(n){return typeof n=="function"}function ke(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Pl;function Ln(n,e){return Pl||(Pl=document.createElement("a")),Pl.href=e,n===Pl.href}function V_(n){return Object.keys(n).length===0}function im(n,...e){if(n==null)return x;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Je(n,e,t){n.$$.on_destroy.push(im(e,t))}function Ot(n,e,t,i){if(n){const s=sm(n,e,t,i);return n[0](s)}}function sm(n,e,t,i){return n[1]&&i?Ye(t.ctx.slice(),n[1](i(e))):t.ctx}function Dt(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(),sa=lm?n=>requestAnimationFrame(n):x;const hs=new Set;function om(n){hs.forEach(e=>{e.c(n)||(hs.delete(e),e.f())}),hs.size!==0&&sa(om)}function Po(n){let e;return hs.size===0&&sa(om),{promise:new Promise(t=>{hs.add(e={c:n,f:t})}),abort(){hs.delete(e)}}}function _(n,e){n.appendChild(e)}function rm(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function z_(n){const e=v("style");return B_(rm(n),e),e.sheet}function B_(n,e){return _(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode.removeChild(n)}function Tt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function ut(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Yn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function U_(n){return function(e){e.target===this&&n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Un(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function rt(n){return n===""?null:+n}function W_(n){return Array.from(n.childNodes)}function ue(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function pe(n,e){n.value=e==null?"":e}function Qa(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ee(n,e,t){n.classList[t?"add":"remove"](e)}function am(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function jt(n,e){return new n(e)}const fo=new Map;let co=0;function Y_(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function K_(n,e){const t={stylesheet:z_(e),rules:{}};return fo.set(n,t),t}function sl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ `;for(let g=0;g<=1;g+=a){const y=e+(t-e)*l(g);u+=g*100+`%{${o(y,1-y)}} `}const f=u+`100% {${o(t,1-t)}} -}`,c=`__svelte_${W_(f)}_${r}`,d=om(n),{stylesheet:h,rules:m}=fo.get(d)||Y_(d,n);m[c]||(m[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const b=n.style.animation||"";return n.style.animation=`${b?`${b}, `:""}${c} ${i}ms linear ${s}ms 1 both`,co+=1,c}function ll(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(", "),co-=s,co||K_())}function K_(){sa(()=>{co||(fo.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&S(e)}),fo.clear())})}function J_(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=bl,start:a=Io()+l,end:u=a+o,tick:f=x,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,m;function b(){c&&(m=sl(n,0,1,o,l,r,c)),l||(h=!0)}function g(){c&&ll(n,m),d=!1}return Po(y=>{if(!h&&y>=a&&(h=!0),h&&y>=u&&(f(1,0),g()),!d)return!1;if(h){const k=y-a,w=0+1*r(k/o);f(w,1-w)}return!0}),b(),f(0,1),g}function Z_(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,am(n,s)}}function am(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 ol;function ni(n){ol=n}function vl(){if(!ol)throw new Error("Function called outside component initialization");return ol}function un(n){vl().$$.on_mount.push(n)}function G_(n){vl().$$.after_update.push(n)}function X_(n){vl().$$.on_destroy.push(n)}function It(){const n=vl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=rm(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Ve(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Ws=[],le=[],io=[],Mr=[],um=Promise.resolve();let Tr=!1;function fm(){Tr||(Tr=!0,um.then(la))}function $n(){return fm(),um}function Qe(n){io.push(n)}function Me(n){Mr.push(n)}const Zo=new Set;let Ll=0;function la(){const n=ol;do{for(;Ll{Ps=null})),Ps}function Vi(n,e,t){n.dispatchEvent(rm(`${e?"intro":"outro"}${t}`))}const so=new Set;let qn;function be(){qn={r:0,c:[],p:qn}}function ve(){qn.r||Re(qn.c),qn=qn.p}function E(n,e){n&&n.i&&(so.delete(n),n.i(e))}function I(n,e,t,i){if(n&&n.o){if(so.has(n))return;so.add(n),qn.c.push(()=>{so.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ra={duration:0};function cm(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&ll(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=bl,tick:m=x,css:b}=i||ra;b&&(l=sl(n,0,1,d,c,h,b,r++)),m(0,1);const g=Io()+c,y=g+d;o&&o.abort(),s=!0,Qe(()=>Vi(n,!0,"start")),o=Po(k=>{if(s){if(k>=y)return m(1,0),Vi(n,!0,"end"),a(),s=!1;if(k>=g){const w=h((k-g)/d);m(w,1-w)}}return s})}let f=!1;return{start(){f||(f=!0,ll(n),Wt(i)?(i=i(),oa().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function dm(n,e,t){let i=e(n,t),s=!0,l;const o=qn;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=bl,tick:c=x,css:d}=i||ra;d&&(l=sl(n,1,0,u,a,f,d));const h=Io()+a,m=h+u;Qe(()=>Vi(n,!1,"start")),Po(b=>{if(s){if(b>=m)return c(0,1),Vi(n,!1,"end"),--o.r||Re(o.c),!1;if(b>=h){const g=f((b-h)/u);c(1-g,g)}}return s})}return Wt(i)?oa().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&ll(n,l),s=!1)}}}function je(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&ll(n,a)}function f(d,h){const m=d.b-l;return h*=Math.abs(m),{a:l,b:d.b,d:m,duration:h,start:d.start,end:d.start+h,group:d.group}}function c(d){const{delay:h=0,duration:m=300,easing:b=bl,tick:g=x,css:y}=s||ra,k={start:Io()+h,b:d};d||(k.group=qn,qn.r+=1),o||r?r=k:(y&&(u(),a=sl(n,l,d,m,h,b,y)),d&&g(0,1),o=f(k,m),Qe(()=>Vi(n,d,"start")),Po(w=>{if(r&&w>r.start&&(o=f(r,m),r=null,Vi(n,o.b,"start"),y&&(u(),a=sl(n,l,o.b,o.duration,0,b,s.css))),o){if(w>=o.end)g(l=o.b,1-l),Vi(n,o.b,"end"),r||(o.b?u():--o.group.r||Re(o.group.c)),o=null;else if(w>=o.start){const C=w-o.start;l=o.a+o.d*b(C/o.duration),g(l,1-l)}}return!!(o||r)}))}return{run(d){Wt(s)?oa().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function xa(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&&(be(),I(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),ve())}):e.block.d(1),u.c(),E(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&la()}if(j_(n)){const s=vl();if(n.then(l=>{ni(s),i(e.then,1,e.value,l),ni(null)},l=>{if(ni(s),i(e.catch,2,e.error,l),ni(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 x_(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 Gi(n,e){n.d(1),e.delete(n.key)}function xt(n,e){I(n,1,1,()=>{e.delete(n.key)})}function e0(n,e){n.f(),xt(n,e)}function bt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,h=l.length,m=d;const b={};for(;m--;)b[n[m].key]=m;const g=[],y=new Map,k=new Map;for(m=h;m--;){const T=c(s,l,m),D=t(T);let A=o.get(D);A?i&&A.p(T,e):(A=u(D,T),A.c()),y.set(D,g[m]=A),D in b&&k.set(D,Math.abs(m-b[D]))}const w=new Set,C=new Set;function M(T){E(T,1),T.m(r,f),o.set(T.key,T),f=T.first,h--}for(;d&&h;){const T=g[h-1],D=n[d-1],A=T.key,P=D.key;T===D?(f=T.first,d--,h--):y.has(P)?!o.has(A)||w.has(A)?M(T):C.has(P)?d--:k.get(A)>k.get(P)?(C.add(A),M(T)):(w.add(P),d--):(a(D,o),d--)}for(;d--;){const T=n[d];y.has(T.key)||a(T,o)}for(;h;)M(g[h-1]);return g}function Yt(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 Kn(n){return typeof n=="object"&&n!==null?n:{}}function ye(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function j(n){n&&n.c()}function R(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||Qe(()=>{const o=n.$$.on_mount.map(tm).filter(Wt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Re(o),n.$$.on_mount=[]}),l.forEach(Qe)}function H(n,e){const t=n.$$;t.fragment!==null&&(Re(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function t0(n,e){n.$$.dirty[0]===-1&&(Ws.push(n),fm(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const m=h.length?h[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=m)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](m),f&&t0(n,c)),d}):[],u.update(),f=!0,Re(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=U_(e.target);u.fragment&&u.fragment.l(c),c.forEach(S)}else u.fragment&&u.fragment.c();e.intro&&E(n.$$.fragment),R(n,e.target,e.anchor,e.customElement),la()}ni(a)}class Ce{$destroy(){H(this,1),this.$destroy=x}$on(e,t){if(!Wt(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&&!q_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function vt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function hm(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return pm(t,o=>{let r=!1;const a=[];let u=0,f=x;const c=()=>{if(u)return;f();const h=e(i?a[0]:a,o);l?o(h):f=Wt(h)?h:x},d=s.map((h,m)=>nm(h,b=>{a[m]=b,u&=~(1<{u|=1<{H(f,1)}),ve()}l?(e=jt(l,o()),e.$on("routeEvent",r[7]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&S(t),e&&H(e,r)}}}function i0(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{H(f,1)}),ve()}l?(e=jt(l,o()),e.$on("routeEvent",r[6]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&S(t),e&&H(e,r)}}}function s0(n){let e,t,i,s;const l=[i0,n0],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Fe()},m(a,u){o[e].m(a,u),$(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(be(),I(o[f],1,1,()=>{o[f]=null}),ve(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),E(t,1),t.m(i.parentNode,i))},i(a){s||(E(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&S(i)}}}function eu(){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 Lo=pm(null,function(e){e(eu());const t=()=>{e(eu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});hm(Lo,n=>n.location);const aa=hm(Lo,n=>n.querystring),tu=Cn(void 0);async function ki(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await $n();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 zt(n,e){if(e=iu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return nu(n,e),{update(t){t=iu(t),nu(n,t)}}}function l0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function nu(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||o0(i.currentTarget.getAttribute("href"))})}function iu(n){return n&&typeof n=="string"?{href:n}:n||{}}function o0(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function r0(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(M,T){if(!T||typeof T!="function"&&(typeof T!="object"||T._sveltesparouter!==!0))throw Error("Invalid component object");if(!M||typeof M=="string"&&(M.length<1||M.charAt(0)!="/"&&M.charAt(0)!="*")||typeof M=="object"&&!(M instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:D,keys:A}=mm(M);this.path=M,typeof T=="object"&&T._sveltesparouter===!0?(this.component=T.component,this.conditions=T.conditions||[],this.userData=T.userData,this.props=T.props||{}):(this.component=()=>Promise.resolve(T),this.conditions=[],this.props={}),this._pattern=D,this._keys=A}match(M){if(s){if(typeof s=="string")if(M.startsWith(s))M=M.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const P=M.match(s);if(P&&P[0])M=M.substr(P[0].length)||"/";else return null}}const T=this._pattern.exec(M);if(T===null)return null;if(this._keys===!1)return T;const D={};let A=0;for(;A{r.push(new o(M,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const c=It();async function d(C,M){await $n(),c(C,M)}let h=null,m=null;l&&(m=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?h=C.state:h=null},window.addEventListener("popstate",m),G_(()=>{l0(h)}));let b=null,g=null;const y=Lo.subscribe(async C=>{b=C;let M=0;for(;M{tu.set(u)});return}t(0,a=null),g=null,tu.set(void 0)});X_(()=>{y(),m&&window.removeEventListener("popstate",m)});function k(C){Ve.call(this,n,C)}function w(C){Ve.call(this,n,C)}return n.$$set=C=>{"routes"in C&&t(3,i=C.routes),"prefix"in C&&t(4,s=C.prefix),"restoreScrollState"in C&&t(5,l=C.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,k,w]}class a0 extends Ce{constructor(e){super(),$e(this,e,r0,s0,ke,{routes:3,prefix:4,restoreScrollState:5})}}const lo=[];let gm;function _m(n){const e=n.pattern.test(gm);su(n,n.className,e),su(n,n.inactiveClassName,!e)}function su(n,e,t){(e||"").split(" ").forEach(i=>{!i||(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Lo.subscribe(n=>{gm=n.location+(n.querystring?"?"+n.querystring:""),lo.map(_m)});function On(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"?mm(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return lo.push(i),_m(i),{destroy(){lo.splice(lo.indexOf(i),1)}}}const u0="modulepreload",f0=function(n,e){return new URL(n,e).href},lu={},st=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=f0(l,i),l in lu)return;lu[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":u0,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Or=function(n,e){return Or=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])},Or(n,e)};function Ut(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}Or(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Dr=function(){return Dr=Object.assign||function(n){for(var e,t=1,i=arguments.length;t0&&s[s.length-1])||f[0]!==6&&f[0]!==2)){o=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var yl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){for(var t=0,i=Object.entries(e);t0&&(!i.exp||i.exp-t>Date.now()/1e3))}(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this.baseToken=e||"",this.baseModel=t!==null&&typeof t=="object"?t.collectionId!==void 0?new Wi(t):new Yi(t):null,this.triggerChange()},n.prototype.clear=function(){this.baseToken="",this.baseModel=null,this.triggerChange()},n.prototype.loadFromCookie=function(e,t){t===void 0&&(t="pb_auth");var i=function(l,o){var r={};if(typeof l!="string")return r;for(var a=Object.assign({},o||{}).decode||c0,u=0;u4096&&(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 Wi&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=ou(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?n:1,this.perPage=e>=0?e:0,this.totalItems=t>=0?t:0,this.totalPages=i>=0?i:0,this.items=s||[]},ua=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Ut(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=200),i===void 0&&(i={}),this._getFullList(this.baseCrudPath,t,i)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Ut(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var o=[],r=function(a){return Dn(l,void 0,void 0,function(){return En(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,h=c.totalItems;return o=o.concat(d),d.length&&h>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u=400)throw new Er({url:k.url,status:k.status,data:w});return[2,w]}})})}).catch(function(k){throw new Er(k)})]})})},n.prototype.getFileUrl=function(e,t,i){i===void 0&&(i={});var s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));var l=this.buildUrl(s.join("/"));if(Object.keys(i).length){var o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function zi(n){return typeof n=="number"}function Fo(n){return typeof n=="number"&&n%1===0}function M0(n){return typeof n=="string"}function T0(n){return Object.prototype.toString.call(n)==="[object Date]"}function Vm(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function O0(n){return Array.isArray(n)?n:[n]}function au(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 D0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function ys(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ii(n,e,t){return Fo(n)&&n>=e&&n<=t}function E0(n,e){return n-e*Math.floor(n/e)}function yt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function di(n){if(!(Ze(n)||n===null||n===""))return parseInt(n,10)}function Ei(n){if(!(Ze(n)||n===null||n===""))return parseFloat(n)}function ca(n){if(!(Ze(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function da(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function kl(n){return n%4===0&&(n%100!==0||n%400===0)}function Gs(n){return kl(n)?366:365}function po(n,e){const t=E0(e-1,12)+1,i=n+(e-t)/12;return t===2?kl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function pa(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 ho(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 Pr(n){return n>99?n:n>60?1900+n:2e3+n}function zm(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 Ro(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 Bm(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new _n(`Invalid unit value ${n}`);return e}function mo(n,e){const t={};for(const i in n)if(ys(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Bm(s)}return t}function Xs(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}${yt(t,2)}:${yt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${yt(t,2)}${yt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ho(n){return D0(n,["hour","minute","second","millisecond"])}const Um=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,A0=["January","February","March","April","May","June","July","August","September","October","November","December"],Wm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],I0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Ym(n){switch(n){case"narrow":return[...I0];case"short":return[...Wm];case"long":return[...A0];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 Km=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Jm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],P0=["M","T","W","T","F","S","S"];function Zm(n){switch(n){case"narrow":return[...P0];case"short":return[...Jm];case"long":return[...Km];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Gm=["AM","PM"],L0=["Before Christ","Anno Domini"],N0=["BC","AD"],F0=["B","A"];function Xm(n){switch(n){case"narrow":return[...F0];case"short":return[...N0];case"long":return[...L0];default:return null}}function R0(n){return Gm[n.hour<12?0:1]}function H0(n,e){return Zm(e)[n.weekday-1]}function j0(n,e){return Ym(e)[n.month-1]}function q0(n,e){return Xm(e)[n.year<0?0:1]}function V0(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 uu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const z0={D:Ir,DD:wm,DDD:Sm,DDDD:$m,t:Cm,tt:Mm,ttt:Tm,tttt:Om,T:Dm,TT:Em,TTT:Am,TTTT:Im,f:Pm,ff:Nm,fff:Rm,ffff:jm,F:Lm,FF:Fm,FFF:Hm,FFFF:qm};class Qt{static create(e,t={}){return new Qt(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 z0[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 yt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(h,m)=>this.loc.extract(e,h,m),o=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",r=()=>i?R0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(h,m)=>i?j0(e,h):l(m?{month:h}:{month:h,day:"numeric"},"month"),u=(h,m)=>i?H0(e,h):l(m?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const m=Qt.macroTokenToFormatOpts(h);return m?this.formatWithSystemDefault(e,m):h},c=h=>i?q0(e,h):l({era:h},"era"),d=h=>{switch(h){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(h)}};return uu(Qt.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=Qt.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 uu(l,s(r))}}class An{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class wl{get type(){throw new fi}get name(){throw new fi}get ianaName(){return this.name}get isUniversal(){throw new fi}offsetName(e,t){throw new fi}formatOffset(e,t){throw new fi}offset(e){throw new fi}equals(e){throw new fi}get isValid(){throw new fi}}let Go=null;class ha extends wl{static get instance(){return Go===null&&(Go=new ha),Go}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return zm(e,t,i)}formatOffset(e,t){return Xs(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let oo={};function B0(n){return oo[n]||(oo[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"})),oo[n]}const U0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function W0(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 Y0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?m:1e3+m,(d-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Xo=null;class Bt extends wl{static get utcInstance(){return Xo===null&&(Xo=new Bt(0)),Xo}static instance(e){return e===0?Bt.utcInstance:new Bt(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Bt(Ro(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Xs(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Xs(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Xs(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 K0 extends wl{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 pi(n,e){if(Ze(n)||n===null)return e;if(n instanceof wl)return n;if(M0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?Bt.utcInstance:Bt.parseSpecifier(t)||si.create(n)}else return zi(n)?Bt.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new K0(n)}let fu=()=>Date.now(),cu="system",du=null,pu=null,hu=null,mu;class Mt{static get now(){return fu}static set now(e){fu=e}static set defaultZone(e){cu=e}static get defaultZone(){return pi(cu,ha.instance)}static get defaultLocale(){return du}static set defaultLocale(e){du=e}static get defaultNumberingSystem(){return pu}static set defaultNumberingSystem(e){pu=e}static get defaultOutputCalendar(){return hu}static set defaultOutputCalendar(e){hu=e}static get throwOnInvalid(){return mu}static set throwOnInvalid(e){mu=e}static resetCaches(){ct.resetCache(),si.resetCache()}}let gu={};function J0(n,e={}){const t=JSON.stringify([n,e]);let i=gu[t];return i||(i=new Intl.ListFormat(n,e),gu[t]=i),i}let Lr={};function Nr(n,e={}){const t=JSON.stringify([n,e]);let i=Lr[t];return i||(i=new Intl.DateTimeFormat(n,e),Lr[t]=i),i}let Fr={};function Z0(n,e={}){const t=JSON.stringify([n,e]);let i=Fr[t];return i||(i=new Intl.NumberFormat(n,e),Fr[t]=i),i}let Rr={};function G0(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Rr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Rr[s]=l),l}let Ks=null;function X0(){return Ks||(Ks=new Intl.DateTimeFormat().resolvedOptions().locale,Ks)}function Q0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Nr(n).resolvedOptions()}catch{t=Nr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function x0(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function eb(n){const e=[];for(let t=1;t<=12;t++){const i=He.utc(2016,t,1);e.push(n(i))}return e}function tb(n){const e=[];for(let t=1;t<=7;t++){const i=He.utc(2016,11,13+t);e.push(n(i))}return e}function Rl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function nb(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 ib{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=Z0(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):da(e,3);return yt(t,this.padTo)}}}class sb{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&&si.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:He.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=Nr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class lb{constructor(e,t,i){this.opts={style:"long",...i},!t&&Vm()&&(this.rtf=G0(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):V0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class ct{static fromOpts(e){return ct.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Mt.defaultLocale,o=l||(s?"en-US":X0()),r=t||Mt.defaultNumberingSystem,a=i||Mt.defaultOutputCalendar;return new ct(o,r,a,l)}static resetCache(){Ks=null,Lr={},Fr={},Rr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return ct.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=Q0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=x0(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=nb(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:ct.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 Rl(this,e,i,Ym,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=eb(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Rl(this,e,i,Zm,()=>{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]=tb(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Rl(this,void 0,e,()=>Gm,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[He.utc(2016,11,13,9),He.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Rl(this,e,t,Xm,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[He.utc(-40,1,1),He.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 ib(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new sb(e,this.intl,t)}relFormatter(e={}){return new lb(this.intl,this.isEnglish(),e)}listFormatter(e={}){return J0(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 Ms(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Ts(...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 Os(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 Qm(...n){return(e,t)=>{const i={};let s;for(s=0;sh!==void 0&&(m||h&&f)?-h:h;return[{years:d(Ei(t)),months:d(Ei(i)),weeks:d(Ei(s)),days:d(Ei(l)),hours:d(Ei(o)),minutes:d(Ei(r)),seconds:d(Ei(a),a==="-0"),milliseconds:d(ca(u),c)}]}const bb={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 _a(n,e,t,i,s,l,o){const r={year:e.length===2?Pr(di(e)):di(e),month:Wm.indexOf(t)+1,day:di(i),hour:di(s),minute:di(l)};return o&&(r.second=di(o)),n&&(r.weekday=n.length>3?Km.indexOf(n)+1:Jm.indexOf(n)+1),r}const vb=/^(?:(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 yb(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=_a(e,s,i,t,l,o,r);let h;return a?h=bb[a]:u?h=0:h=Ro(f,c),[d,new Bt(h)]}function kb(n){return n.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const wb=/^(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$/,Sb=/^(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$/,$b=/^(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 _u(n){const[,e,t,i,s,l,o,r]=n;return[_a(e,s,i,t,l,o,r),Bt.utcInstance]}function Cb(n){const[,e,t,i,s,l,o,r]=n;return[_a(e,r,t,i,s,l,o),Bt.utcInstance]}const Mb=Ms(rb,ga),Tb=Ms(ab,ga),Ob=Ms(ub,ga),Db=Ms(eg),ng=Ts(hb,Ds,Sl,$l),Eb=Ts(fb,Ds,Sl,$l),Ab=Ts(cb,Ds,Sl,$l),Ib=Ts(Ds,Sl,$l);function Pb(n){return Os(n,[Mb,ng],[Tb,Eb],[Ob,Ab],[Db,Ib])}function Lb(n){return Os(kb(n),[vb,yb])}function Nb(n){return Os(n,[wb,_u],[Sb,_u],[$b,Cb])}function Fb(n){return Os(n,[gb,_b])}const Rb=Ts(Ds);function Hb(n){return Os(n,[mb,Rb])}const jb=Ms(db,pb),qb=Ms(tg),Vb=Ts(Ds,Sl,$l);function zb(n){return Os(n,[jb,ng],[qb,Vb])}const Bb="Invalid Duration",ig={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}},Ub={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},...ig},dn=146097/400,as=146097/4800,Wb={years:{quarters:4,months:12,weeks:dn/7,days:dn,hours:dn*24,minutes:dn*24*60,seconds:dn*24*60*60,milliseconds:dn*24*60*60*1e3},quarters:{months:3,weeks:dn/28,days:dn/4,hours:dn*24/4,minutes:dn*24*60/4,seconds:dn*24*60*60/4,milliseconds:dn*24*60*60*1e3/4},months:{weeks:as/7,days:as,hours:as*24,minutes:as*24*60,seconds:as*24*60*60,milliseconds:as*24*60*60*1e3},...ig},Fi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Yb=Fi.slice(0).reverse();function Ai(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 xe(i)}function Kb(n){return n<0?Math.floor(n):Math.ceil(n)}function sg(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?Kb(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function Jb(n,e){Yb.reduce((t,i)=>Ze(e[i])?t:(t&&sg(n,e,t,e,i),i),null)}class xe{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||ct.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Wb:Ub,this.isLuxonDuration=!0}static fromMillis(e,t){return xe.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new _n(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new xe({values:mo(e,xe.normalizeUnit),loc:ct.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(zi(e))return xe.fromMillis(e);if(xe.isDuration(e))return e;if(typeof e=="object")return xe.fromObject(e);throw new _n(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Fb(e);return i?xe.fromObject(i,t):xe.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Hb(e);return i?xe.fromObject(i,t):xe.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new _n("need to specify a reason the Duration is invalid");const i=e instanceof An?e:new An(e,t);if(Mt.throwOnInvalid)throw new S0(i);return new xe({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 km(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?Qt.create(this.loc,i).formatDurationFromString(this,e):Bb}toHuman(e={}){const t=Fi.map(i=>{const s=this.values[i];return Ze(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+=da(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=xe.fromDurationLike(e),i={};for(const s of Fi)(ys(t.values,s)||ys(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ai(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=xe.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]=Bm(e(this.values[i],i));return Ai(this,{values:t},!0)}get(e){return this[xe.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...mo(e,xe.normalizeUnit)};return Ai(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),Ai(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Jb(this.matrix,e),Ai(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>xe.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Fi)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;zi(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)Fi.indexOf(u)>Fi.indexOf(o)&&sg(this.matrix,s,u,t,o)}else zi(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 Ai(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 Ai(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 Fi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Ls="Invalid Interval";function Zb(n,e){return!n||!n.isValid?dt.invalid("missing or invalid start"):!e||!e.isValid?dt.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?dt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Rs).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(dt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=xe.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(dt.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:dt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return dt.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(dt.fromDateTimes(t,a.time)),t=null);return dt.merge(s)}difference(...e){return dt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Ls}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ls}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ls}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ls}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Ls}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):xe.invalid(this.invalidReason)}mapEndpoints(e){return dt.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Mt.defaultZone){const t=He.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return si.isValidZone(e)}static normalizeZone(e){return pi(e,Mt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||ct.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||ct.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ct.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ct.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ct.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ct.create(t,null,"gregory").eras(e)}static features(){return{relative:Vm()}}}function bu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(xe.fromMillis(i).as("days"))}function Gb(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=bu(r,a);return(u-u%7)/7}],["days",bu]],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 Xb(n,e,t,i){let[s,l,o,r]=Gb(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?xe.fromMillis(a,i).shiftTo(...u).plus(f):f}const ba={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},vu={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]},Qb=ba.hanidec.replace(/[\[|\]]/g,"").split("");function xb(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 Mn({numberingSystem:n},e=""){return new RegExp(`${ba[n||"latn"]}${e}`)}const e1="missing Intl.DateTimeFormat.formatToParts support";function et(n,e=t=>t){return{regex:n,deser:([t])=>e(xb(t))}}const t1=String.fromCharCode(160),lg=`[ ${t1}]`,og=new RegExp(lg,"g");function n1(n){return n.replace(/\./g,"\\.?").replace(og,lg)}function yu(n){return n.replace(/\./g,"").replace(og," ").toLowerCase()}function Tn(n,e){return n===null?null:{regex:RegExp(n.map(n1).join("|")),deser:([t])=>n.findIndex(i=>yu(t)===yu(i))+e}}function ku(n,e){return{regex:n,deser:([,t,i])=>Ro(t,i),groups:e}}function Qo(n){return{regex:n,deser:([e])=>e}}function i1(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function s1(n,e){const t=Mn(e),i=Mn(e,"{2}"),s=Mn(e,"{3}"),l=Mn(e,"{4}"),o=Mn(e,"{6}"),r=Mn(e,"{1,2}"),a=Mn(e,"{1,3}"),u=Mn(e,"{1,6}"),f=Mn(e,"{1,9}"),c=Mn(e,"{2,4}"),d=Mn(e,"{4,6}"),h=g=>({regex:RegExp(i1(g.val)),deser:([y])=>y,literal:!0}),b=(g=>{if(n.literal)return h(g);switch(g.val){case"G":return Tn(e.eras("short",!1),0);case"GG":return Tn(e.eras("long",!1),0);case"y":return et(u);case"yy":return et(c,Pr);case"yyyy":return et(l);case"yyyyy":return et(d);case"yyyyyy":return et(o);case"M":return et(r);case"MM":return et(i);case"MMM":return Tn(e.months("short",!0,!1),1);case"MMMM":return Tn(e.months("long",!0,!1),1);case"L":return et(r);case"LL":return et(i);case"LLL":return Tn(e.months("short",!1,!1),1);case"LLLL":return Tn(e.months("long",!1,!1),1);case"d":return et(r);case"dd":return et(i);case"o":return et(a);case"ooo":return et(s);case"HH":return et(i);case"H":return et(r);case"hh":return et(i);case"h":return et(r);case"mm":return et(i);case"m":return et(r);case"q":return et(r);case"qq":return et(i);case"s":return et(r);case"ss":return et(i);case"S":return et(a);case"SSS":return et(s);case"u":return Qo(f);case"uu":return Qo(r);case"uuu":return et(t);case"a":return Tn(e.meridiems(),0);case"kkkk":return et(l);case"kk":return et(c,Pr);case"W":return et(r);case"WW":return et(i);case"E":case"c":return et(t);case"EEE":return Tn(e.weekdays("short",!1,!1),1);case"EEEE":return Tn(e.weekdays("long",!1,!1),1);case"ccc":return Tn(e.weekdays("short",!0,!1),1);case"cccc":return Tn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return ku(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return ku(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return Qo(/[a-z_+-/]{1,256}?/i);default:return h(g)}})(n)||{invalidReason:e1};return b.token=n,b}const l1={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 o1(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=l1[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function r1(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function a1(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(ys(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 u1(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 Ze(n.z)||(t=si.create(n.z)),Ze(n.Z)||(t||(t=new Bt(n.Z)),i=n.Z),Ze(n.q)||(n.M=(n.q-1)*3+1),Ze(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),Ze(n.u)||(n.S=ca(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let xo=null;function f1(){return xo||(xo=He.fromMillis(1555555555555)),xo}function c1(n,e){if(n.literal)return n;const t=Qt.macroTokenToFormatOpts(n.val);if(!t)return n;const l=Qt.create(e,t).formatDateTimeParts(f1()).map(o=>o1(o,e,t));return l.includes(void 0)?n:l}function d1(n,e){return Array.prototype.concat(...n.map(t=>c1(t,e)))}function rg(n,e,t){const i=d1(Qt.parseFormat(t),n),s=i.map(o=>s1(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=r1(s),a=RegExp(o,"i"),[u,f]=a1(e,a,r),[c,d,h]=f?u1(f):[null,null,void 0];if(ys(f,"a")&&ys(f,"H"))throw new Ys("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:h}}}function p1(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=rg(n,e,t);return[i,s,l,o]}const ag=[0,31,59,90,120,151,181,212,243,273,304,334],ug=[0,31,60,91,121,152,182,213,244,274,305,335];function vn(n,e){return new An("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function fg(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 cg(n,e,t){return t+(kl(n)?ug:ag)[e-1]}function dg(n,e){const t=kl(n)?ug:ag,i=t.findIndex(l=>lho(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Ho(n)}}function wu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=fg(e,1,4),l=Gs(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=Gs(r)):o>l?(r=e+1,o-=Gs(e)):r=e;const{month:a,day:u}=dg(r,o);return{year:r,month:a,day:u,...Ho(n)}}function er(n){const{year:e,month:t,day:i}=n,s=cg(e,t,i);return{year:e,ordinal:s,...Ho(n)}}function Su(n){const{year:e,ordinal:t}=n,{month:i,day:s}=dg(e,t);return{year:e,month:i,day:s,...Ho(n)}}function h1(n){const e=Fo(n.weekYear),t=ii(n.weekNumber,1,ho(n.weekYear)),i=ii(n.weekday,1,7);return e?t?i?!1:vn("weekday",n.weekday):vn("week",n.week):vn("weekYear",n.weekYear)}function m1(n){const e=Fo(n.year),t=ii(n.ordinal,1,Gs(n.year));return e?t?!1:vn("ordinal",n.ordinal):vn("year",n.year)}function pg(n){const e=Fo(n.year),t=ii(n.month,1,12),i=ii(n.day,1,po(n.year,n.month));return e?t?i?!1:vn("day",n.day):vn("month",n.month):vn("year",n.year)}function hg(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=ii(e,0,23)||e===24&&t===0&&i===0&&s===0,o=ii(t,0,59),r=ii(i,0,59),a=ii(s,0,999);return l?o?r?a?!1:vn("millisecond",s):vn("second",i):vn("minute",t):vn("hour",e)}const tr="Invalid DateTime",$u=864e13;function jl(n){return new An("unsupported zone",`the zone "${n.name}" is not supported`)}function nr(n){return n.weekData===null&&(n.weekData=Hr(n.c)),n.weekData}function Ns(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new He({...t,...e,old:t})}function mg(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 Cu(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 ro(n,e,t){return mg(pa(n),e,t)}function Mu(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,po(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=xe.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=pa(l);let[a,u]=mg(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Fs(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=He.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return He.invalid(new An("unparsable",`the input "${s}" can't be parsed as ${i}`))}function ql(n,e,t=!0){return n.isValid?Qt.create(ct.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function ir(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=yt(n.c.year,t?6:4),e?(i+="-",i+=yt(n.c.month),i+="-",i+=yt(n.c.day)):(i+=yt(n.c.month),i+=yt(n.c.day)),i}function Tu(n,e,t,i,s,l){let o=yt(n.c.hour);return e?(o+=":",o+=yt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=yt(n.c.minute),(n.c.second!==0||!t)&&(o+=yt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=yt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=yt(Math.trunc(-n.o/60)),o+=":",o+=yt(Math.trunc(-n.o%60))):(o+="+",o+=yt(Math.trunc(n.o/60)),o+=":",o+=yt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const gg={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},g1={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},_1={ordinal:1,hour:0,minute:0,second:0,millisecond:0},_g=["year","month","day","hour","minute","second","millisecond"],b1=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],v1=["year","ordinal","hour","minute","second","millisecond"];function Ou(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 km(n);return e}function Du(n,e){const t=pi(e.zone,Mt.defaultZone),i=ct.fromObject(e),s=Mt.now();let l,o;if(Ze(n.year))l=s;else{for(const u of _g)Ze(n[u])&&(n[u]=gg[u]);const r=pg(n)||hg(n);if(r)return He.invalid(r);const a=t.offset(s);[l,o]=ro(n,a,t)}return new He({ts:l,zone:t,loc:i,o})}function Eu(n,e,t){const i=Ze(t.round)?!0:t.round,s=(o,r)=>(o=da(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 Au(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 He{constructor(e){const t=e.zone||Mt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new An("invalid input"):null)||(t.isValid?null:jl(t));this.ts=Ze(e.ts)?Mt.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=Cu(this.ts,r),i=Number.isNaN(s.year)?new An("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||ct.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new He({})}static local(){const[e,t]=Au(arguments),[i,s,l,o,r,a,u]=t;return Du({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Au(arguments),[i,s,l,o,r,a,u]=t;return e.zone=Bt.utcInstance,Du({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=T0(e)?e.valueOf():NaN;if(Number.isNaN(i))return He.invalid("invalid input");const s=pi(t.zone,Mt.defaultZone);return s.isValid?new He({ts:i,zone:s,loc:ct.fromObject(t)}):He.invalid(jl(s))}static fromMillis(e,t={}){if(zi(e))return e<-$u||e>$u?He.invalid("Timestamp out of range"):new He({ts:e,zone:pi(t.zone,Mt.defaultZone),loc:ct.fromObject(t)});throw new _n(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(zi(e))return new He({ts:e*1e3,zone:pi(t.zone,Mt.defaultZone),loc:ct.fromObject(t)});throw new _n("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=pi(t.zone,Mt.defaultZone);if(!i.isValid)return He.invalid(jl(i));const s=Mt.now(),l=Ze(t.specificOffset)?i.offset(s):t.specificOffset,o=mo(e,Ou),r=!Ze(o.ordinal),a=!Ze(o.year),u=!Ze(o.month)||!Ze(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=ct.fromObject(t);if((f||r)&&c)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Ys("Can't mix ordinal dates with month/day");const h=c||o.weekday&&!f;let m,b,g=Cu(s,l);h?(m=b1,b=g1,g=Hr(g)):r?(m=v1,b=_1,g=er(g)):(m=_g,b=gg);let y=!1;for(const A of m){const P=o[A];Ze(P)?y?o[A]=b[A]:o[A]=g[A]:y=!0}const k=h?h1(o):r?m1(o):pg(o),w=k||hg(o);if(w)return He.invalid(w);const C=h?wu(o):r?Su(o):o,[M,T]=ro(C,l,i),D=new He({ts:M,zone:i,o:T,loc:d});return o.weekday&&f&&e.weekday!==D.weekday?He.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${D.toISO()}`):D}static fromISO(e,t={}){const[i,s]=Pb(e);return Fs(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Lb(e);return Fs(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Nb(e);return Fs(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Ze(e)||Ze(t))throw new _n("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=ct.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=p1(o,e,t);return f?He.invalid(f):Fs(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return He.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=zb(e);return Fs(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new _n("need to specify a reason the DateTime is invalid");const i=e instanceof An?e:new An(e,t);if(Mt.throwOnInvalid)throw new k0(i);return new He({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?nr(this).weekYear:NaN}get weekNumber(){return this.isValid?nr(this).weekNumber:NaN}get weekday(){return this.isValid?nr(this).weekday:NaN}get ordinal(){return this.isValid?er(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 kl(this.year)}get daysInMonth(){return po(this.year,this.month)}get daysInYear(){return this.isValid?Gs(this.year):NaN}get weeksInWeekYear(){return this.isValid?ho(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=Qt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(Bt.instance(e),t)}toLocal(){return this.setZone(Mt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=pi(e,Mt.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]=ro(o,l,e)}return Ns(this,{ts:s,zone:e})}else return He.invalid(jl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Ns(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=mo(e,Ou),i=!Ze(t.weekYear)||!Ze(t.weekNumber)||!Ze(t.weekday),s=!Ze(t.ordinal),l=!Ze(t.year),o=!Ze(t.month)||!Ze(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Ys("Can't mix ordinal dates with month/day");let u;i?u=wu({...Hr(this.c),...t}):Ze(t.ordinal)?(u={...this.toObject(),...t},Ze(t.day)&&(u.day=Math.min(po(u.year,u.month),u.day))):u=Su({...er(this.c),...t});const[f,c]=ro(u,this.o,this.zone);return Ns(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=xe.fromDurationLike(e);return Ns(this,Mu(this,t))}minus(e){if(!this.isValid)return this;const t=xe.fromDurationLike(e).negate();return Ns(this,Mu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=xe.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?Qt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):tr}toLocaleString(e=Ir,t={}){return this.isValid?Qt.create(this.loc.clone(t),e).formatDateTime(this):tr}toLocaleParts(e={}){return this.isValid?Qt.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=ir(this,o);return r+="T",r+=Tu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?ir(this,e==="extended"):null}toISOWeekDate(){return ql(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":"")+Tu(this,o==="extended",t,e,i,l):null}toRFC2822(){return ql(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ql(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ir(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")),ql(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():tr}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 xe.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=O0(t).map(xe.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=Xb(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(He.now(),e,t)}until(e){return this.isValid?dt.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||He.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(He.isDateTime))throw new _n("max requires all arguments be DateTimes");return au(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=ct.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return rg(o,e,t)}static fromStringExplain(e,t,i={}){return He.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Ir}static get DATE_MED(){return wm}static get DATE_MED_WITH_WEEKDAY(){return $0}static get DATE_FULL(){return Sm}static get DATE_HUGE(){return $m}static get TIME_SIMPLE(){return Cm}static get TIME_WITH_SECONDS(){return Mm}static get TIME_WITH_SHORT_OFFSET(){return Tm}static get TIME_WITH_LONG_OFFSET(){return Om}static get TIME_24_SIMPLE(){return Dm}static get TIME_24_WITH_SECONDS(){return Em}static get TIME_24_WITH_SHORT_OFFSET(){return Am}static get TIME_24_WITH_LONG_OFFSET(){return Im}static get DATETIME_SHORT(){return Pm}static get DATETIME_SHORT_WITH_SECONDS(){return Lm}static get DATETIME_MED(){return Nm}static get DATETIME_MED_WITH_SECONDS(){return Fm}static get DATETIME_MED_WITH_WEEKDAY(){return C0}static get DATETIME_FULL(){return Rm}static get DATETIME_FULL_WITH_SECONDS(){return Hm}static get DATETIME_HUGE(){return jm}static get DATETIME_HUGE_WITH_SECONDS(){return qm}}function Rs(n){if(He.isDateTime(n))return n;if(n&&n.valueOf&&zi(n.valueOf()))return He.fromJSDate(n);if(n&&typeof n=="object")return He.fromObject(n);throw new _n(`Unknown datetime argument: ${n}, of type ${typeof n}`)}class B{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||B.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return B.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!B.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e:(t||!B.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){B.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=B.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!B.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!B.isObject(l)&&!Array.isArray(l)||!B.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!B.isObject(s)&&!Array.isArray(s)||!B.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):B.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||B.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||B.isObject(e)&&Object.keys(e).length>0)&&B.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s{console.warn("Failed to copy.",i)})}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",t+".json"),s.click(),s.remove()}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return/\.jpg|\.jpeg|\.png|\.svg|\.gif|\.webp|\.avif$/.test(e)}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 defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static dummyCollectionRecord(e){var s,l,o,r,a;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name,created:"2022-01-01 01:00:00Z",updated:"2022-01-01 23:59:59Z"};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com");for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00.123Z":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)!==1&&(f=[f])):u.type==="select"?(f=(o=(l=u.options)==null?void 0:l.values)==null?void 0:o[0],((r=u.options)==null?void 0:r.maxSelect)!==1&&(f=[f])):u.type==="relation"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)!==1&&(f=[f])):f="test",i[u.name]=f}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"single":return"ri-file-list-2-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"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":["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=B.isObject(u)&&B.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type=="auth"?t.push(l):l.type=="single"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}}const jo=Cn([]);function bg(n,e=4e3){return qo(n,"info",e)}function Lt(n,e=3e3){return qo(n,"success",e)}function rl(n,e=4500){return qo(n,"error",e)}function y1(n,e=4500){return qo(n,"warning",e)}function qo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{vg(i)},t)};jo.update(s=>(va(s,i.message),B.pushOrReplaceByKey(s,i,"message"),s))}function vg(n){jo.update(e=>(va(e,n),e))}function yg(){jo.update(n=>{for(let e of n)va(n,e);return[]})}function va(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 wi=Cn({});function Fn(n){wi.set(n||{})}function al(n){wi.update(e=>(B.deleteByPath(e,n),e))}const ya=Cn({});function jr(n){ya.set(n||{})}fa.prototype.logout=function(n=!0){this.authStore.clear(),n&&ki("/login")};fa.prototype.errorResponseHandler=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&rl(l)}if(B.isEmpty(s.data)||Fn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),ki("/")};class k1 extends vm{save(e,t){super.save(e,t),t instanceof Yi&&jr(t)}clear(){super.clear(),jr(null)}}const me=new fa("../",new k1("pb_admin_auth"));me.authStore.model instanceof Yi&&jr(me.authStore.model);function w1(n){let e,t,i,s,l,o,r,a;const u=n[3].default,f=Ot(u,n,n[2],null);return{c(){e=v("div"),t=v("main"),f&&f.c(),i=O(),s=v("footer"),l=v("a"),o=v("span"),o.textContent="PocketBase v0.8.0-rc2",p(t,"class","page-content"),p(o,"class","txt"),p(l,"href","https://github.com/pocketbase/pocketbase/releases"),p(l,"class","inline-flex flex-gap-5"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(l,"title","Releases"),p(s,"class","page-footer"),p(e,"class",r="page-wrapper "+n[1]),ee(e,"center-content",n[0])},m(c,d){$(c,e,d),_(e,t),f&&f.m(t,null),_(e,i),_(e,s),_(s,l),_(l,o),a=!0},p(c,[d]){f&&f.p&&(!a||d&4)&&Et(f,u,c,c[2],a?Dt(u,c[2],d,null):At(c[2]),null),(!a||d&2&&r!==(r="page-wrapper "+c[1]))&&p(e,"class",r),(!a||d&3)&&ee(e,"center-content",c[0])},i(c){a||(E(f,c),a=!0)},o(c){I(f,c),a=!1},d(c){c&&S(e),f&&f.d(c)}}}function S1(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 cn extends Ce{constructor(e){super(),$e(this,e,S1,w1,ke,{center:0,class:1})}}function Iu(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=O(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){$(s,e,l),$(s,t,l),$(s,i,l)},d(s){s&&S(e),s&&S(t),s&&S(i)}}}function $1(n){let e,t,i,s=!n[0]&&Iu();const l=n[1].default,o=Ot(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=O(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){$(r,e,a),s&&s.m(e,null),_(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Iu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&Et(o,l,r,r[2],i?Dt(l,r[2],a,null):At(r[2]),null)},i(r){i||(E(o,r),i=!0)},o(r){I(o,r),i=!1},d(r){r&&S(e),s&&s.d(),o&&o.d(r)}}}function C1(n){let e,t;return e=new cn({props:{class:"full-page",center:!0,$$slots:{default:[$1]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function M1(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 kg extends Ce{constructor(e){super(),$e(this,e,M1,C1,ke,{nobranding:0})}}function Pu(n,e,t){const i=n.slice();return i[11]=e[t],i}const T1=n=>({}),Lu=n=>({uniqueId:n[3]});function O1(n){let e=(n[11]||go)+"",t;return{c(){t=z(e)},m(i,s){$(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||go)+"")&&ue(t,e)},d(i){i&&S(t)}}}function D1(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||go)+"",i;return{c(){e=v("pre"),i=z(t)},m(o,r){$(o,e,r),_(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||go)+"")&&ue(i,t)},d(o){o&&S(e)}}}function Nu(n){let e,t;function i(o,r){return typeof o[11]=="object"?D1:O1}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=O(),p(e,"class","help-block help-block-error")},m(o,r){$(o,e,r),l.m(e,null),_(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&S(e),l.d()}}}function E1(n){let e,t,i,s,l;const o=n[7].default,r=Ot(o,n,n[6],Lu);let a=n[2],u=[];for(let f=0;ft(5,i=m));let{$$slots:s={},$$scope:l}=e;const o="field_"+B.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){al(r)}un(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(m){Ve.call(this,n,m)}function h(m){le[m?"unshift":"push"](()=>{u=m,t(1,u)})}return n.$$set=m=>{"name"in m&&t(4,r=m.name),"class"in m&&t(0,a=m.class),"$$scope"in m&&t(6,l=m.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=B.toArray(B.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,h]}class _e extends Ce{constructor(e){super(),$e(this,e,A1,E1,ke,{name:4,class:0})}}function I1(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0]),l.focus(),r||(a=W(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]&&pe(l,u[0])},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function P1(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Password"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){$(c,e,d),_(e,t),$(c,s,d),$(c,l,d),pe(l,n[1]),$(c,r,d),$(c,a,d),u||(f=W(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]&&pe(l,c[1])},d(c){c&&S(e),c&&S(s),c&&S(l),c&&S(r),c&&S(a),u=!1,f()}}}function L1(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Password confirm"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[2]),r||(a=W(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]&&pe(l,u[2])},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function N1(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return s=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[I1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[P1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[L1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),f=v("button"),f.innerHTML=`Create and login - `,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),ee(f,"btn-disabled",n[3]),ee(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(m,b){$(m,e,b),_(e,t),_(e,i),R(s,e,null),_(e,l),R(o,e,null),_(e,r),R(a,e,null),_(e,u),_(e,f),c=!0,d||(h=W(e,"submit",ut(n[4])),d=!0)},p(m,[b]){const g={};b&1537&&(g.$$scope={dirty:b,ctx:m}),s.$set(g);const y={};b&1538&&(y.$$scope={dirty:b,ctx:m}),o.$set(y);const k={};b&1540&&(k.$$scope={dirty:b,ctx:m}),a.$set(k),(!c||b&8)&&ee(f,"btn-disabled",m[3]),(!c||b&8)&&ee(f,"btn-loading",m[3])},i(m){c||(E(s.$$.fragment,m),E(o.$$.fragment,m),E(a.$$.fragment,m),c=!0)},o(m){I(s.$$.fragment,m),I(o.$$.fragment,m),I(a.$$.fragment,m),c=!1},d(m){m&&S(e),H(s),H(o),H(a),d=!1,h()}}}function F1(n,e,t){const i=It();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await me.admins.create({email:s,password:l,passwordConfirm:o}),await me.admins.authWithPassword(s,l),i("submit")}catch(d){me.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class R1 extends Ce{constructor(e){super(),$e(this,e,F1,N1,ke,{})}}function Fu(n){let e,t;return e=new kg({props:{$$slots:{default:[H1]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function H1(n){let e,t;return e=new R1({}),e.$on("submit",n[1]),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p:x,i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function j1(n){let e,t,i=n[0]&&Fu(n);return{c(){i&&i.c(),e=Fe()},m(s,l){i&&i.m(s,l),$(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&E(i,1)):(i=Fu(s),i.c(),E(i,1),i.m(e.parentNode,e)):i&&(be(),I(i,1,1,()=>{i=null}),ve())},i(s){t||(E(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&S(e)}}}function q1(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){me.logout(!1),t(0,i=!0);return}me.authStore.isValid?ki("/collections"):me.logout()}return[i,async()=>{t(0,i=!1),await $n(),window.location.search=""}]}class V1 extends Ce{constructor(e){super(),$e(this,e,q1,j1,ke,{})}}const mt=Cn(""),_o=Cn(""),ks=Cn(!1);function Vo(n){const e=n-1;return e*e*e+1}function bo(n,{delay:e=0,duration:t=400,easing:i=bl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function kn(n,{delay:e=0,duration:t=400,easing:i=Vo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>` +}`,c=`__svelte_${Y_(f)}_${r}`,d=rm(n),{stylesheet:h,rules:m}=fo.get(d)||K_(d,n);m[c]||(m[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const b=n.style.animation||"";return n.style.animation=`${b?`${b}, `:""}${c} ${i}ms linear ${s}ms 1 both`,co+=1,c}function ll(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(", "),co-=s,co||J_())}function J_(){sa(()=>{co||(fo.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),fo.clear())})}function Z_(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=bl,start:a=Io()+l,end:u=a+o,tick:f=x,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,m;function b(){c&&(m=sl(n,0,1,o,l,r,c)),l||(h=!0)}function g(){c&&ll(n,m),d=!1}return Po(y=>{if(!h&&y>=a&&(h=!0),h&&y>=u&&(f(1,0),g()),!d)return!1;if(h){const k=y-a,$=0+1*r(k/o);f($,1-$)}return!0}),b(),f(0,1),g}function G_(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,um(n,s)}}function um(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 ol;function ni(n){ol=n}function vl(){if(!ol)throw new Error("Function called outside component initialization");return ol}function un(n){vl().$$.on_mount.push(n)}function X_(n){vl().$$.after_update.push(n)}function Q_(n){vl().$$.on_destroy.push(n)}function It(){const n=vl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=am(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Ve(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Ws=[],le=[],io=[],Mr=[],fm=Promise.resolve();let Tr=!1;function cm(){Tr||(Tr=!0,fm.then(la))}function $n(){return cm(),fm}function Qe(n){io.push(n)}function Me(n){Mr.push(n)}const Zo=new Set;let Ll=0;function la(){const n=ol;do{for(;Ll{Ps=null})),Ps}function Vi(n,e,t){n.dispatchEvent(am(`${e?"intro":"outro"}${t}`))}const so=new Set;let qn;function be(){qn={r:0,c:[],p:qn}}function ve(){qn.r||Re(qn.c),qn=qn.p}function E(n,e){n&&n.i&&(so.delete(n),n.i(e))}function I(n,e,t,i){if(n&&n.o){if(so.has(n))return;so.add(n),qn.c.push(()=>{so.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ra={duration:0};function dm(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&ll(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=bl,tick:m=x,css:b}=i||ra;b&&(l=sl(n,0,1,d,c,h,b,r++)),m(0,1);const g=Io()+c,y=g+d;o&&o.abort(),s=!0,Qe(()=>Vi(n,!0,"start")),o=Po(k=>{if(s){if(k>=y)return m(1,0),Vi(n,!0,"end"),a(),s=!1;if(k>=g){const $=h((k-g)/d);m($,1-$)}}return s})}let f=!1;return{start(){f||(f=!0,ll(n),Wt(i)?(i=i(),oa().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function pm(n,e,t){let i=e(n,t),s=!0,l;const o=qn;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=bl,tick:c=x,css:d}=i||ra;d&&(l=sl(n,1,0,u,a,f,d));const h=Io()+a,m=h+u;Qe(()=>Vi(n,!1,"start")),Po(b=>{if(s){if(b>=m)return c(0,1),Vi(n,!1,"end"),--o.r||Re(o.c),!1;if(b>=h){const g=f((b-h)/u);c(1-g,g)}}return s})}return Wt(i)?oa().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&ll(n,l),s=!1)}}}function je(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&ll(n,a)}function f(d,h){const m=d.b-l;return h*=Math.abs(m),{a:l,b:d.b,d:m,duration:h,start:d.start,end:d.start+h,group:d.group}}function c(d){const{delay:h=0,duration:m=300,easing:b=bl,tick:g=x,css:y}=s||ra,k={start:Io()+h,b:d};d||(k.group=qn,qn.r+=1),o||r?r=k:(y&&(u(),a=sl(n,l,d,m,h,b,y)),d&&g(0,1),o=f(k,m),Qe(()=>Vi(n,d,"start")),Po($=>{if(r&&$>r.start&&(o=f(r,m),r=null,Vi(n,o.b,"start"),y&&(u(),a=sl(n,l,o.b,o.duration,0,b,s.css))),o){if($>=o.end)g(l=o.b,1-l),Vi(n,o.b,"end"),r||(o.b?u():--o.group.r||Re(o.group.c)),o=null;else if($>=o.start){const C=$-o.start;l=o.a+o.d*b(C/o.duration),g(l,1-l)}}return!!(o||r)}))}return{run(d){Wt(s)?oa().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function xa(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&&(be(),I(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),ve())}):e.block.d(1),u.c(),E(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&la()}if(q_(n)){const s=vl();if(n.then(l=>{ni(s),i(e.then,1,e.value,l),ni(null)},l=>{if(ni(s),i(e.catch,2,e.error,l),ni(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 Gi(n,e){n.d(1),e.delete(n.key)}function xt(n,e){I(n,1,1,()=>{e.delete(n.key)})}function t0(n,e){n.f(),xt(n,e)}function bt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,h=l.length,m=d;const b={};for(;m--;)b[n[m].key]=m;const g=[],y=new Map,k=new Map;for(m=h;m--;){const T=c(s,l,m),D=t(T);let A=o.get(D);A?i&&A.p(T,e):(A=u(D,T),A.c()),y.set(D,g[m]=A),D in b&&k.set(D,Math.abs(m-b[D]))}const $=new Set,C=new Set;function M(T){E(T,1),T.m(r,f),o.set(T.key,T),f=T.first,h--}for(;d&&h;){const T=g[h-1],D=n[d-1],A=T.key,P=D.key;T===D?(f=T.first,d--,h--):y.has(P)?!o.has(A)||$.has(A)?M(T):C.has(P)?d--:k.get(A)>k.get(P)?(C.add(A),M(T)):($.add(P),d--):(a(D,o),d--)}for(;d--;){const T=n[d];y.has(T.key)||a(T,o)}for(;h;)M(g[h-1]);return g}function Yt(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 Kn(n){return typeof n=="object"&&n!==null?n:{}}function ye(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function j(n){n&&n.c()}function R(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||Qe(()=>{const o=n.$$.on_mount.map(nm).filter(Wt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Re(o),n.$$.on_mount=[]}),l.forEach(Qe)}function H(n,e){const t=n.$$;t.fragment!==null&&(Re(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&&(Ws.push(n),cm(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const m=h.length?h[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=m)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](m),f&&n0(n,c)),d}):[],u.update(),f=!0,Re(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=W_(e.target);u.fragment&&u.fragment.l(c),c.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&E(n.$$.fragment),R(n,e.target,e.anchor,e.customElement),la()}ni(a)}class Ce{$destroy(){H(this,1),this.$destroy=x}$on(e,t){if(!Wt(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&&!V_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function vt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function mm(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return hm(t,o=>{let r=!1;const a=[];let u=0,f=x;const c=()=>{if(u)return;f();const h=e(i?a[0]:a,o);l?o(h):f=Wt(h)?h:x},d=s.map((h,m)=>im(h,b=>{a[m]=b,u&=~(1<{u|=1<{H(f,1)}),ve()}l?(e=jt(l,o()),e.$on("routeEvent",r[7]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(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{H(f,1)}),ve()}l?(e=jt(l,o()),e.$on("routeEvent",r[6]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(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=Fe()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(be(),I(o[f],1,1,()=>{o[f]=null}),ve(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),E(t,1),t.m(i.parentNode,i))},i(a){s||(E(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function eu(){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 Lo=hm(null,function(e){e(eu());const t=()=>{e(eu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});mm(Lo,n=>n.location);const aa=mm(Lo,n=>n.querystring),tu=Cn(void 0);async function ki(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await $n();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 zt(n,e){if(e=iu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with
tags');return nu(n,e),{update(t){t=iu(t),nu(n,t)}}}function o0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function nu(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 iu(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(M,T){if(!T||typeof T!="function"&&(typeof T!="object"||T._sveltesparouter!==!0))throw Error("Invalid component object");if(!M||typeof M=="string"&&(M.length<1||M.charAt(0)!="/"&&M.charAt(0)!="*")||typeof M=="object"&&!(M instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:D,keys:A}=gm(M);this.path=M,typeof T=="object"&&T._sveltesparouter===!0?(this.component=T.component,this.conditions=T.conditions||[],this.userData=T.userData,this.props=T.props||{}):(this.component=()=>Promise.resolve(T),this.conditions=[],this.props={}),this._pattern=D,this._keys=A}match(M){if(s){if(typeof s=="string")if(M.startsWith(s))M=M.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const P=M.match(s);if(P&&P[0])M=M.substr(P[0].length)||"/";else return null}}const T=this._pattern.exec(M);if(T===null)return null;if(this._keys===!1)return T;const D={};let A=0;for(;A{r.push(new o(M,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const c=It();async function d(C,M){await $n(),c(C,M)}let h=null,m=null;l&&(m=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?h=C.state:h=null},window.addEventListener("popstate",m),X_(()=>{o0(h)}));let b=null,g=null;const y=Lo.subscribe(async C=>{b=C;let M=0;for(;M{tu.set(u)});return}t(0,a=null),g=null,tu.set(void 0)});Q_(()=>{y(),m&&window.removeEventListener("popstate",m)});function k(C){Ve.call(this,n,C)}function $(C){Ve.call(this,n,C)}return n.$$set=C=>{"routes"in C&&t(3,i=C.routes),"prefix"in C&&t(4,s=C.prefix),"restoreScrollState"in C&&t(5,l=C.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,k,$]}class u0 extends Ce{constructor(e){super(),$e(this,e,a0,l0,ke,{routes:3,prefix:4,restoreScrollState:5})}}const lo=[];let _m;function bm(n){const e=n.pattern.test(_m);su(n,n.className,e),su(n,n.inactiveClassName,!e)}function su(n,e,t){(e||"").split(" ").forEach(i=>{!i||(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Lo.subscribe(n=>{_m=n.location+(n.querystring?"?"+n.querystring:""),lo.map(bm)});function On(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"?gm(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return lo.push(i),bm(i),{destroy(){lo.splice(lo.indexOf(i),1)}}}const f0="modulepreload",c0=function(n,e){return new URL(n,e).href},lu={},st=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 lu)return;lu[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())};var Or=function(n,e){return Or=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])},Or(n,e)};function Ut(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}Or(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Dr=function(){return Dr=Object.assign||function(n){for(var e,t=1,i=arguments.length;t0&&s[s.length-1])||f[0]!==6&&f[0]!==2)){o=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var yl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){for(var t=0,i=Object.entries(e);t0&&(!i.exp||i.exp-t>Date.now()/1e3))}(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this.baseToken=e||"",this.baseModel=t!==null&&typeof t=="object"?t.collectionId!==void 0?new Wi(t):new Yi(t):null,this.triggerChange()},n.prototype.clear=function(){this.baseToken="",this.baseModel=null,this.triggerChange()},n.prototype.loadFromCookie=function(e,t){t===void 0&&(t="pb_auth");var i=function(l,o){var r={};if(typeof l!="string")return r;for(var a=Object.assign({},o||{}).decode||d0,u=0;u4096&&(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 Wi&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=ou(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?n:1,this.perPage=e>=0?e:0,this.totalItems=t>=0?t:0,this.totalPages=i>=0?i:0,this.items=s||[]},ua=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Ut(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=200),i===void 0&&(i={}),this._getFullList(this.baseCrudPath,t,i)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return Ut(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var o=[],r=function(a){return Dn(l,void 0,void 0,function(){return En(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,h=c.totalItems;return o=o.concat(d),d.length&&h>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u=400)throw new Er({url:k.url,status:k.status,data:$});return[2,$]}})})}).catch(function(k){throw new Er(k)})]})})},n.prototype.getFileUrl=function(e,t,i){i===void 0&&(i={});var s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));var l=this.buildUrl(s.join("/"));if(Object.keys(i).length){var o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function zi(n){return typeof n=="number"}function Fo(n){return typeof n=="number"&&n%1===0}function T0(n){return typeof n=="string"}function O0(n){return Object.prototype.toString.call(n)==="[object Date]"}function zm(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function D0(n){return Array.isArray(n)?n:[n]}function au(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 E0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function ys(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ii(n,e,t){return Fo(n)&&n>=e&&n<=t}function A0(n,e){return n-e*Math.floor(n/e)}function yt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function di(n){if(!(Ze(n)||n===null||n===""))return parseInt(n,10)}function Ei(n){if(!(Ze(n)||n===null||n===""))return parseFloat(n)}function ca(n){if(!(Ze(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function da(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function kl(n){return n%4===0&&(n%100!==0||n%400===0)}function Gs(n){return kl(n)?366:365}function po(n,e){const t=A0(e-1,12)+1,i=n+(e-t)/12;return t===2?kl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function pa(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 ho(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 Pr(n){return n>99?n:n>60?1900+n:2e3+n}function Bm(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 Ro(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 Um(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new _n(`Invalid unit value ${n}`);return e}function mo(n,e){const t={};for(const i in n)if(ys(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=Um(s)}return t}function Xs(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}${yt(t,2)}:${yt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${yt(t,2)}${yt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ho(n){return E0(n,["hour","minute","second","millisecond"])}const Wm=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,I0=["January","February","March","April","May","June","July","August","September","October","November","December"],Ym=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],P0=["J","F","M","A","M","J","J","A","S","O","N","D"];function Km(n){switch(n){case"narrow":return[...P0];case"short":return[...Ym];case"long":return[...I0];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 Jm=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Zm=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],L0=["M","T","W","T","F","S","S"];function Gm(n){switch(n){case"narrow":return[...L0];case"short":return[...Zm];case"long":return[...Jm];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Xm=["AM","PM"],N0=["Before Christ","Anno Domini"],F0=["BC","AD"],R0=["B","A"];function Qm(n){switch(n){case"narrow":return[...R0];case"short":return[...F0];case"long":return[...N0];default:return null}}function H0(n){return Xm[n.hour<12?0:1]}function j0(n,e){return Gm(e)[n.weekday-1]}function q0(n,e){return Km(e)[n.month-1]}function V0(n,e){return Qm(e)[n.year<0?0:1]}function z0(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 uu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const B0={D:Ir,DD:Sm,DDD:$m,DDDD:Cm,t:Mm,tt:Tm,ttt:Om,tttt:Dm,T:Em,TT:Am,TTT:Im,TTTT:Pm,f:Lm,ff:Fm,fff:Hm,ffff:qm,F:Nm,FF:Rm,FFF:jm,FFFF:Vm};class Qt{static create(e,t={}){return new Qt(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 B0[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 yt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(h,m)=>this.loc.extract(e,h,m),o=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",r=()=>i?H0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(h,m)=>i?q0(e,h):l(m?{month:h}:{month:h,day:"numeric"},"month"),u=(h,m)=>i?j0(e,h):l(m?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const m=Qt.macroTokenToFormatOpts(h);return m?this.formatWithSystemDefault(e,m):h},c=h=>i?V0(e,h):l({era:h},"era"),d=h=>{switch(h){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(h)}};return uu(Qt.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=Qt.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 uu(l,s(r))}}class An{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class wl{get type(){throw new fi}get name(){throw new fi}get ianaName(){return this.name}get isUniversal(){throw new fi}offsetName(e,t){throw new fi}formatOffset(e,t){throw new fi}offset(e){throw new fi}equals(e){throw new fi}get isValid(){throw new fi}}let Go=null;class ha extends wl{static get instance(){return Go===null&&(Go=new ha),Go}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Bm(e,t,i)}formatOffset(e,t){return Xs(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let oo={};function U0(n){return oo[n]||(oo[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"})),oo[n]}const W0={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Y0(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 K0(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?m:1e3+m,(d-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Xo=null;class Bt extends wl{static get utcInstance(){return Xo===null&&(Xo=new Bt(0)),Xo}static instance(e){return e===0?Bt.utcInstance:new Bt(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Bt(Ro(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Xs(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Xs(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return Xs(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 J0 extends wl{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 pi(n,e){if(Ze(n)||n===null)return e;if(n instanceof wl)return n;if(T0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?Bt.utcInstance:Bt.parseSpecifier(t)||si.create(n)}else return zi(n)?Bt.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new J0(n)}let fu=()=>Date.now(),cu="system",du=null,pu=null,hu=null,mu;class Mt{static get now(){return fu}static set now(e){fu=e}static set defaultZone(e){cu=e}static get defaultZone(){return pi(cu,ha.instance)}static get defaultLocale(){return du}static set defaultLocale(e){du=e}static get defaultNumberingSystem(){return pu}static set defaultNumberingSystem(e){pu=e}static get defaultOutputCalendar(){return hu}static set defaultOutputCalendar(e){hu=e}static get throwOnInvalid(){return mu}static set throwOnInvalid(e){mu=e}static resetCaches(){ct.resetCache(),si.resetCache()}}let gu={};function Z0(n,e={}){const t=JSON.stringify([n,e]);let i=gu[t];return i||(i=new Intl.ListFormat(n,e),gu[t]=i),i}let Lr={};function Nr(n,e={}){const t=JSON.stringify([n,e]);let i=Lr[t];return i||(i=new Intl.DateTimeFormat(n,e),Lr[t]=i),i}let Fr={};function G0(n,e={}){const t=JSON.stringify([n,e]);let i=Fr[t];return i||(i=new Intl.NumberFormat(n,e),Fr[t]=i),i}let Rr={};function X0(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Rr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Rr[s]=l),l}let Ks=null;function Q0(){return Ks||(Ks=new Intl.DateTimeFormat().resolvedOptions().locale,Ks)}function x0(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Nr(n).resolvedOptions()}catch{t=Nr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function eb(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function tb(n){const e=[];for(let t=1;t<=12;t++){const i=He.utc(2016,t,1);e.push(n(i))}return e}function nb(n){const e=[];for(let t=1;t<=7;t++){const i=He.utc(2016,11,13+t);e.push(n(i))}return e}function Rl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function ib(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 sb{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=G0(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):da(e,3);return yt(t,this.padTo)}}}class lb{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&&si.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:He.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=Nr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class ob{constructor(e,t,i){this.opts={style:"long",...i},!t&&zm()&&(this.rtf=X0(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):z0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class ct{static fromOpts(e){return ct.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Mt.defaultLocale,o=l||(s?"en-US":Q0()),r=t||Mt.defaultNumberingSystem,a=i||Mt.defaultOutputCalendar;return new ct(o,r,a,l)}static resetCache(){Ks=null,Lr={},Fr={},Rr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return ct.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=x0(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=eb(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=ib(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:ct.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 Rl(this,e,i,Km,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=tb(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Rl(this,e,i,Gm,()=>{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]=nb(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Rl(this,void 0,e,()=>Xm,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[He.utc(2016,11,13,9),He.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Rl(this,e,t,Qm,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[He.utc(-40,1,1),He.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 sb(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new lb(e,this.intl,t)}relFormatter(e={}){return new ob(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Z0(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 Ms(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Ts(...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 Os(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 xm(...n){return(e,t)=>{const i={};let s;for(s=0;sh!==void 0&&(m||h&&f)?-h:h;return[{years:d(Ei(t)),months:d(Ei(i)),weeks:d(Ei(s)),days:d(Ei(l)),hours:d(Ei(o)),minutes:d(Ei(r)),seconds:d(Ei(a),a==="-0"),milliseconds:d(ca(u),c)}]}const vb={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 _a(n,e,t,i,s,l,o){const r={year:e.length===2?Pr(di(e)):di(e),month:Ym.indexOf(t)+1,day:di(i),hour:di(s),minute:di(l)};return o&&(r.second=di(o)),n&&(r.weekday=n.length>3?Jm.indexOf(n)+1:Zm.indexOf(n)+1),r}const yb=/^(?:(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 kb(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=_a(e,s,i,t,l,o,r);let h;return a?h=vb[a]:u?h=0:h=Ro(f,c),[d,new Bt(h)]}function wb(n){return n.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Sb=/^(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$/,$b=/^(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$/,Cb=/^(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 _u(n){const[,e,t,i,s,l,o,r]=n;return[_a(e,s,i,t,l,o,r),Bt.utcInstance]}function Mb(n){const[,e,t,i,s,l,o,r]=n;return[_a(e,r,t,i,s,l,o),Bt.utcInstance]}const Tb=Ms(ab,ga),Ob=Ms(ub,ga),Db=Ms(fb,ga),Eb=Ms(tg),ig=Ts(mb,Ds,Sl,$l),Ab=Ts(cb,Ds,Sl,$l),Ib=Ts(db,Ds,Sl,$l),Pb=Ts(Ds,Sl,$l);function Lb(n){return Os(n,[Tb,ig],[Ob,Ab],[Db,Ib],[Eb,Pb])}function Nb(n){return Os(wb(n),[yb,kb])}function Fb(n){return Os(n,[Sb,_u],[$b,_u],[Cb,Mb])}function Rb(n){return Os(n,[_b,bb])}const Hb=Ts(Ds);function jb(n){return Os(n,[gb,Hb])}const qb=Ms(pb,hb),Vb=Ms(ng),zb=Ts(Ds,Sl,$l);function Bb(n){return Os(n,[qb,ig],[Vb,zb])}const Ub="Invalid Duration",sg={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}},Wb={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},...sg},dn=146097/400,as=146097/4800,Yb={years:{quarters:4,months:12,weeks:dn/7,days:dn,hours:dn*24,minutes:dn*24*60,seconds:dn*24*60*60,milliseconds:dn*24*60*60*1e3},quarters:{months:3,weeks:dn/28,days:dn/4,hours:dn*24/4,minutes:dn*24*60/4,seconds:dn*24*60*60/4,milliseconds:dn*24*60*60*1e3/4},months:{weeks:as/7,days:as,hours:as*24,minutes:as*24*60,seconds:as*24*60*60,milliseconds:as*24*60*60*1e3},...sg},Fi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Kb=Fi.slice(0).reverse();function Ai(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 xe(i)}function Jb(n){return n<0?Math.floor(n):Math.ceil(n)}function lg(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?Jb(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function Zb(n,e){Kb.reduce((t,i)=>Ze(e[i])?t:(t&&lg(n,e,t,e,i),i),null)}class xe{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||ct.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?Yb:Wb,this.isLuxonDuration=!0}static fromMillis(e,t){return xe.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new _n(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new xe({values:mo(e,xe.normalizeUnit),loc:ct.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(zi(e))return xe.fromMillis(e);if(xe.isDuration(e))return e;if(typeof e=="object")return xe.fromObject(e);throw new _n(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Rb(e);return i?xe.fromObject(i,t):xe.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=jb(e);return i?xe.fromObject(i,t):xe.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new _n("need to specify a reason the Duration is invalid");const i=e instanceof An?e:new An(e,t);if(Mt.throwOnInvalid)throw new $0(i);return new xe({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 wm(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?Qt.create(this.loc,i).formatDurationFromString(this,e):Ub}toHuman(e={}){const t=Fi.map(i=>{const s=this.values[i];return Ze(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+=da(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=xe.fromDurationLike(e),i={};for(const s of Fi)(ys(t.values,s)||ys(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ai(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=xe.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]=Um(e(this.values[i],i));return Ai(this,{values:t},!0)}get(e){return this[xe.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...mo(e,xe.normalizeUnit)};return Ai(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),Ai(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Zb(this.matrix,e),Ai(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>xe.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Fi)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;zi(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)Fi.indexOf(u)>Fi.indexOf(o)&&lg(this.matrix,s,u,t,o)}else zi(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 Ai(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 Ai(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 Fi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Ls="Invalid Interval";function Gb(n,e){return!n||!n.isValid?dt.invalid("missing or invalid start"):!e||!e.isValid?dt.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?dt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Rs).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(dt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=xe.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(dt.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:dt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return dt.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(dt.fromDateTimes(t,a.time)),t=null);return dt.merge(s)}difference(...e){return dt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Ls}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ls}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ls}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ls}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Ls}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):xe.invalid(this.invalidReason)}mapEndpoints(e){return dt.fromDateTimes(e(this.s),e(this.e))}}class Hl{static hasDST(e=Mt.defaultZone){const t=He.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return si.isValidZone(e)}static normalizeZone(e){return pi(e,Mt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||ct.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||ct.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ct.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ct.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ct.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ct.create(t,null,"gregory").eras(e)}static features(){return{relative:zm()}}}function bu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(xe.fromMillis(i).as("days"))}function Xb(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=bu(r,a);return(u-u%7)/7}],["days",bu]],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 Qb(n,e,t,i){let[s,l,o,r]=Xb(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?xe.fromMillis(a,i).shiftTo(...u).plus(f):f}const ba={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},vu={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]},xb=ba.hanidec.replace(/[\[|\]]/g,"").split("");function e1(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 Mn({numberingSystem:n},e=""){return new RegExp(`${ba[n||"latn"]}${e}`)}const t1="missing Intl.DateTimeFormat.formatToParts support";function et(n,e=t=>t){return{regex:n,deser:([t])=>e(e1(t))}}const n1=String.fromCharCode(160),og=`[ ${n1}]`,rg=new RegExp(og,"g");function i1(n){return n.replace(/\./g,"\\.?").replace(rg,og)}function yu(n){return n.replace(/\./g,"").replace(rg," ").toLowerCase()}function Tn(n,e){return n===null?null:{regex:RegExp(n.map(i1).join("|")),deser:([t])=>n.findIndex(i=>yu(t)===yu(i))+e}}function ku(n,e){return{regex:n,deser:([,t,i])=>Ro(t,i),groups:e}}function Qo(n){return{regex:n,deser:([e])=>e}}function s1(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function l1(n,e){const t=Mn(e),i=Mn(e,"{2}"),s=Mn(e,"{3}"),l=Mn(e,"{4}"),o=Mn(e,"{6}"),r=Mn(e,"{1,2}"),a=Mn(e,"{1,3}"),u=Mn(e,"{1,6}"),f=Mn(e,"{1,9}"),c=Mn(e,"{2,4}"),d=Mn(e,"{4,6}"),h=g=>({regex:RegExp(s1(g.val)),deser:([y])=>y,literal:!0}),b=(g=>{if(n.literal)return h(g);switch(g.val){case"G":return Tn(e.eras("short",!1),0);case"GG":return Tn(e.eras("long",!1),0);case"y":return et(u);case"yy":return et(c,Pr);case"yyyy":return et(l);case"yyyyy":return et(d);case"yyyyyy":return et(o);case"M":return et(r);case"MM":return et(i);case"MMM":return Tn(e.months("short",!0,!1),1);case"MMMM":return Tn(e.months("long",!0,!1),1);case"L":return et(r);case"LL":return et(i);case"LLL":return Tn(e.months("short",!1,!1),1);case"LLLL":return Tn(e.months("long",!1,!1),1);case"d":return et(r);case"dd":return et(i);case"o":return et(a);case"ooo":return et(s);case"HH":return et(i);case"H":return et(r);case"hh":return et(i);case"h":return et(r);case"mm":return et(i);case"m":return et(r);case"q":return et(r);case"qq":return et(i);case"s":return et(r);case"ss":return et(i);case"S":return et(a);case"SSS":return et(s);case"u":return Qo(f);case"uu":return Qo(r);case"uuu":return et(t);case"a":return Tn(e.meridiems(),0);case"kkkk":return et(l);case"kk":return et(c,Pr);case"W":return et(r);case"WW":return et(i);case"E":case"c":return et(t);case"EEE":return Tn(e.weekdays("short",!1,!1),1);case"EEEE":return Tn(e.weekdays("long",!1,!1),1);case"ccc":return Tn(e.weekdays("short",!0,!1),1);case"cccc":return Tn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return ku(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return ku(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return Qo(/[a-z_+-/]{1,256}?/i);default:return h(g)}})(n)||{invalidReason:t1};return b.token=n,b}const o1={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 r1(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=o1[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function a1(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function u1(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(ys(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 f1(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 Ze(n.z)||(t=si.create(n.z)),Ze(n.Z)||(t||(t=new Bt(n.Z)),i=n.Z),Ze(n.q)||(n.M=(n.q-1)*3+1),Ze(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),Ze(n.u)||(n.S=ca(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let xo=null;function c1(){return xo||(xo=He.fromMillis(1555555555555)),xo}function d1(n,e){if(n.literal)return n;const t=Qt.macroTokenToFormatOpts(n.val);if(!t)return n;const l=Qt.create(e,t).formatDateTimeParts(c1()).map(o=>r1(o,e,t));return l.includes(void 0)?n:l}function p1(n,e){return Array.prototype.concat(...n.map(t=>d1(t,e)))}function ag(n,e,t){const i=p1(Qt.parseFormat(t),n),s=i.map(o=>l1(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=a1(s),a=RegExp(o,"i"),[u,f]=u1(e,a,r),[c,d,h]=f?f1(f):[null,null,void 0];if(ys(f,"a")&&ys(f,"H"))throw new Ys("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:h}}}function h1(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=ag(n,e,t);return[i,s,l,o]}const ug=[0,31,59,90,120,151,181,212,243,273,304,334],fg=[0,31,60,91,121,152,182,213,244,274,305,335];function vn(n,e){return new An("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function cg(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 dg(n,e,t){return t+(kl(n)?fg:ug)[e-1]}function pg(n,e){const t=kl(n)?fg:ug,i=t.findIndex(l=>lho(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...Ho(n)}}function wu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=cg(e,1,4),l=Gs(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=Gs(r)):o>l?(r=e+1,o-=Gs(e)):r=e;const{month:a,day:u}=pg(r,o);return{year:r,month:a,day:u,...Ho(n)}}function er(n){const{year:e,month:t,day:i}=n,s=dg(e,t,i);return{year:e,ordinal:s,...Ho(n)}}function Su(n){const{year:e,ordinal:t}=n,{month:i,day:s}=pg(e,t);return{year:e,month:i,day:s,...Ho(n)}}function m1(n){const e=Fo(n.weekYear),t=ii(n.weekNumber,1,ho(n.weekYear)),i=ii(n.weekday,1,7);return e?t?i?!1:vn("weekday",n.weekday):vn("week",n.week):vn("weekYear",n.weekYear)}function g1(n){const e=Fo(n.year),t=ii(n.ordinal,1,Gs(n.year));return e?t?!1:vn("ordinal",n.ordinal):vn("year",n.year)}function hg(n){const e=Fo(n.year),t=ii(n.month,1,12),i=ii(n.day,1,po(n.year,n.month));return e?t?i?!1:vn("day",n.day):vn("month",n.month):vn("year",n.year)}function mg(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=ii(e,0,23)||e===24&&t===0&&i===0&&s===0,o=ii(t,0,59),r=ii(i,0,59),a=ii(s,0,999);return l?o?r?a?!1:vn("millisecond",s):vn("second",i):vn("minute",t):vn("hour",e)}const tr="Invalid DateTime",$u=864e13;function jl(n){return new An("unsupported zone",`the zone "${n.name}" is not supported`)}function nr(n){return n.weekData===null&&(n.weekData=Hr(n.c)),n.weekData}function Ns(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new He({...t,...e,old:t})}function gg(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 Cu(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 ro(n,e,t){return gg(pa(n),e,t)}function Mu(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,po(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=xe.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=pa(l);let[a,u]=gg(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Fs(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=He.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return He.invalid(new An("unparsable",`the input "${s}" can't be parsed as ${i}`))}function ql(n,e,t=!0){return n.isValid?Qt.create(ct.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function ir(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=yt(n.c.year,t?6:4),e?(i+="-",i+=yt(n.c.month),i+="-",i+=yt(n.c.day)):(i+=yt(n.c.month),i+=yt(n.c.day)),i}function Tu(n,e,t,i,s,l){let o=yt(n.c.hour);return e?(o+=":",o+=yt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=yt(n.c.minute),(n.c.second!==0||!t)&&(o+=yt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=yt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=yt(Math.trunc(-n.o/60)),o+=":",o+=yt(Math.trunc(-n.o%60))):(o+="+",o+=yt(Math.trunc(n.o/60)),o+=":",o+=yt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const _g={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},_1={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},b1={ordinal:1,hour:0,minute:0,second:0,millisecond:0},bg=["year","month","day","hour","minute","second","millisecond"],v1=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],y1=["year","ordinal","hour","minute","second","millisecond"];function Ou(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 wm(n);return e}function Du(n,e){const t=pi(e.zone,Mt.defaultZone),i=ct.fromObject(e),s=Mt.now();let l,o;if(Ze(n.year))l=s;else{for(const u of bg)Ze(n[u])&&(n[u]=_g[u]);const r=hg(n)||mg(n);if(r)return He.invalid(r);const a=t.offset(s);[l,o]=ro(n,a,t)}return new He({ts:l,zone:t,loc:i,o})}function Eu(n,e,t){const i=Ze(t.round)?!0:t.round,s=(o,r)=>(o=da(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 Au(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 He{constructor(e){const t=e.zone||Mt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new An("invalid input"):null)||(t.isValid?null:jl(t));this.ts=Ze(e.ts)?Mt.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=Cu(this.ts,r),i=Number.isNaN(s.year)?new An("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||ct.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new He({})}static local(){const[e,t]=Au(arguments),[i,s,l,o,r,a,u]=t;return Du({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Au(arguments),[i,s,l,o,r,a,u]=t;return e.zone=Bt.utcInstance,Du({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=O0(e)?e.valueOf():NaN;if(Number.isNaN(i))return He.invalid("invalid input");const s=pi(t.zone,Mt.defaultZone);return s.isValid?new He({ts:i,zone:s,loc:ct.fromObject(t)}):He.invalid(jl(s))}static fromMillis(e,t={}){if(zi(e))return e<-$u||e>$u?He.invalid("Timestamp out of range"):new He({ts:e,zone:pi(t.zone,Mt.defaultZone),loc:ct.fromObject(t)});throw new _n(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(zi(e))return new He({ts:e*1e3,zone:pi(t.zone,Mt.defaultZone),loc:ct.fromObject(t)});throw new _n("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=pi(t.zone,Mt.defaultZone);if(!i.isValid)return He.invalid(jl(i));const s=Mt.now(),l=Ze(t.specificOffset)?i.offset(s):t.specificOffset,o=mo(e,Ou),r=!Ze(o.ordinal),a=!Ze(o.year),u=!Ze(o.month)||!Ze(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=ct.fromObject(t);if((f||r)&&c)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Ys("Can't mix ordinal dates with month/day");const h=c||o.weekday&&!f;let m,b,g=Cu(s,l);h?(m=v1,b=_1,g=Hr(g)):r?(m=y1,b=b1,g=er(g)):(m=bg,b=_g);let y=!1;for(const A of m){const P=o[A];Ze(P)?y?o[A]=b[A]:o[A]=g[A]:y=!0}const k=h?m1(o):r?g1(o):hg(o),$=k||mg(o);if($)return He.invalid($);const C=h?wu(o):r?Su(o):o,[M,T]=ro(C,l,i),D=new He({ts:M,zone:i,o:T,loc:d});return o.weekday&&f&&e.weekday!==D.weekday?He.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${D.toISO()}`):D}static fromISO(e,t={}){const[i,s]=Lb(e);return Fs(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Nb(e);return Fs(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Fb(e);return Fs(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Ze(e)||Ze(t))throw new _n("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=ct.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=h1(o,e,t);return f?He.invalid(f):Fs(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return He.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=Bb(e);return Fs(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new _n("need to specify a reason the DateTime is invalid");const i=e instanceof An?e:new An(e,t);if(Mt.throwOnInvalid)throw new w0(i);return new He({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?nr(this).weekYear:NaN}get weekNumber(){return this.isValid?nr(this).weekNumber:NaN}get weekday(){return this.isValid?nr(this).weekday:NaN}get ordinal(){return this.isValid?er(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 kl(this.year)}get daysInMonth(){return po(this.year,this.month)}get daysInYear(){return this.isValid?Gs(this.year):NaN}get weeksInWeekYear(){return this.isValid?ho(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=Qt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(Bt.instance(e),t)}toLocal(){return this.setZone(Mt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=pi(e,Mt.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]=ro(o,l,e)}return Ns(this,{ts:s,zone:e})}else return He.invalid(jl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Ns(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=mo(e,Ou),i=!Ze(t.weekYear)||!Ze(t.weekNumber)||!Ze(t.weekday),s=!Ze(t.ordinal),l=!Ze(t.year),o=!Ze(t.month)||!Ze(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Ys("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Ys("Can't mix ordinal dates with month/day");let u;i?u=wu({...Hr(this.c),...t}):Ze(t.ordinal)?(u={...this.toObject(),...t},Ze(t.day)&&(u.day=Math.min(po(u.year,u.month),u.day))):u=Su({...er(this.c),...t});const[f,c]=ro(u,this.o,this.zone);return Ns(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=xe.fromDurationLike(e);return Ns(this,Mu(this,t))}minus(e){if(!this.isValid)return this;const t=xe.fromDurationLike(e).negate();return Ns(this,Mu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=xe.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?Qt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):tr}toLocaleString(e=Ir,t={}){return this.isValid?Qt.create(this.loc.clone(t),e).formatDateTime(this):tr}toLocaleParts(e={}){return this.isValid?Qt.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=ir(this,o);return r+="T",r+=Tu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?ir(this,e==="extended"):null}toISOWeekDate(){return ql(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":"")+Tu(this,o==="extended",t,e,i,l):null}toRFC2822(){return ql(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ql(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ir(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")),ql(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():tr}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 xe.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=D0(t).map(xe.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=Qb(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(He.now(),e,t)}until(e){return this.isValid?dt.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||He.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(He.isDateTime))throw new _n("max requires all arguments be DateTimes");return au(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=ct.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return ag(o,e,t)}static fromStringExplain(e,t,i={}){return He.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Ir}static get DATE_MED(){return Sm}static get DATE_MED_WITH_WEEKDAY(){return C0}static get DATE_FULL(){return $m}static get DATE_HUGE(){return Cm}static get TIME_SIMPLE(){return Mm}static get TIME_WITH_SECONDS(){return Tm}static get TIME_WITH_SHORT_OFFSET(){return Om}static get TIME_WITH_LONG_OFFSET(){return Dm}static get TIME_24_SIMPLE(){return Em}static get TIME_24_WITH_SECONDS(){return Am}static get TIME_24_WITH_SHORT_OFFSET(){return Im}static get TIME_24_WITH_LONG_OFFSET(){return Pm}static get DATETIME_SHORT(){return Lm}static get DATETIME_SHORT_WITH_SECONDS(){return Nm}static get DATETIME_MED(){return Fm}static get DATETIME_MED_WITH_SECONDS(){return Rm}static get DATETIME_MED_WITH_WEEKDAY(){return M0}static get DATETIME_FULL(){return Hm}static get DATETIME_FULL_WITH_SECONDS(){return jm}static get DATETIME_HUGE(){return qm}static get DATETIME_HUGE_WITH_SECONDS(){return Vm}}function Rs(n){if(He.isDateTime(n))return n;if(n&&n.valueOf&&zi(n.valueOf()))return He.fromJSDate(n);if(n&&typeof n=="object")return He.fromObject(n);throw new _n(`Unknown datetime argument: ${n}, of type ${typeof n}`)}class B{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||B.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return B.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!B.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e:(t||!B.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){B.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=B.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!B.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!B.isObject(l)&&!Array.isArray(l)||!B.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!B.isObject(s)&&!Array.isArray(s)||!B.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):B.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||B.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||B.isObject(e)&&Object.keys(e).length>0)&&B.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s{console.warn("Failed to copy.",i)})}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",t+".json"),s.click(),s.remove()}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return/\.jpg|\.jpeg|\.png|\.svg|\.gif|\.webp|\.avif$/.test(e)}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 defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static dummyCollectionRecord(e){var s,l,o,r,a;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name,created:"2022-01-01 01:00:00Z",updated:"2022-01-01 23:59:59Z"};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com");for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00.123Z":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)!==1&&(f=[f])):u.type==="select"?(f=(o=(l=u.options)==null?void 0:l.values)==null?void 0:o[0],((r=u.options)==null?void 0:r.maxSelect)!==1&&(f=[f])):u.type==="relation"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)!==1&&(f=[f])):f="test",i[u.name]=f}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"single":return"ri-file-list-2-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"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":["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!B.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=B.isObject(u)&&B.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type=="auth"?t.push(l):l.type=="single"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}}const jo=Cn([]);function vg(n,e=4e3){return qo(n,"info",e)}function Lt(n,e=3e3){return qo(n,"success",e)}function rl(n,e=4500){return qo(n,"error",e)}function k1(n,e=4500){return qo(n,"warning",e)}function qo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{yg(i)},t)};jo.update(s=>(va(s,i.message),B.pushOrReplaceByKey(s,i,"message"),s))}function yg(n){jo.update(e=>(va(e,n),e))}function kg(){jo.update(n=>{for(let e of n)va(n,e);return[]})}function va(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 wi=Cn({});function Fn(n){wi.set(n||{})}function al(n){wi.update(e=>(B.deleteByPath(e,n),e))}const ya=Cn({});function jr(n){ya.set(n||{})}fa.prototype.logout=function(n=!0){this.authStore.clear(),n&&ki("/login")};fa.prototype.errorResponseHandler=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&rl(l)}if(B.isEmpty(s.data)||Fn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),ki("/")};class w1 extends ym{save(e,t){super.save(e,t),t instanceof Yi&&jr(t)}clear(){super.clear(),jr(null)}}const me=new fa("../",new w1("pb_admin_auth"));me.authStore.model instanceof Yi&&jr(me.authStore.model);function S1(n){let e,t,i,s,l,o,r,a;const u=n[3].default,f=Ot(u,n,n[2],null);return{c(){e=v("div"),t=v("main"),f&&f.c(),i=O(),s=v("footer"),l=v("a"),o=v("span"),o.textContent="PocketBase v0.8.0-rc2",p(t,"class","page-content"),p(o,"class","txt"),p(l,"href","https://github.com/pocketbase/pocketbase/releases"),p(l,"class","inline-flex flex-gap-5"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(l,"title","Releases"),p(s,"class","page-footer"),p(e,"class",r="page-wrapper "+n[1]),ee(e,"center-content",n[0])},m(c,d){S(c,e,d),_(e,t),f&&f.m(t,null),_(e,i),_(e,s),_(s,l),_(l,o),a=!0},p(c,[d]){f&&f.p&&(!a||d&4)&&Et(f,u,c,c[2],a?Dt(u,c[2],d,null):At(c[2]),null),(!a||d&2&&r!==(r="page-wrapper "+c[1]))&&p(e,"class",r),(!a||d&3)&&ee(e,"center-content",c[0])},i(c){a||(E(f,c),a=!0)},o(c){I(f,c),a=!1},d(c){c&&w(e),f&&f.d(c)}}}function $1(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 cn extends Ce{constructor(e){super(),$e(this,e,$1,S1,ke,{center:0,class:1})}}function Iu(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=O(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function C1(n){let e,t,i,s=!n[0]&&Iu();const l=n[1].default,o=Ot(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=O(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),_(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Iu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&Et(o,l,r,r[2],i?Dt(l,r[2],a,null):At(r[2]),null)},i(r){i||(E(o,r),i=!0)},o(r){I(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function M1(n){let e,t;return e=new cn({props:{class:"full-page",center:!0,$$slots:{default:[C1]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function T1(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 wg extends Ce{constructor(e){super(),$e(this,e,T1,M1,ke,{nobranding:0})}}function Pu(n,e,t){const i=n.slice();return i[11]=e[t],i}const O1=n=>({}),Lu=n=>({uniqueId:n[3]});function D1(n){let e=(n[11]||go)+"",t;return{c(){t=z(e)},m(i,s){S(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||go)+"")&&ue(t,e)},d(i){i&&w(t)}}}function E1(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||go)+"",i;return{c(){e=v("pre"),i=z(t)},m(o,r){S(o,e,r),_(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||go)+"")&&ue(i,t)},d(o){o&&w(e)}}}function Nu(n){let e,t;function i(o,r){return typeof o[11]=="object"?E1:D1}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=O(),p(e,"class","help-block help-block-error")},m(o,r){S(o,e,r),l.m(e,null),_(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function A1(n){let e,t,i,s,l;const o=n[7].default,r=Ot(o,n,n[6],Lu);let a=n[2],u=[];for(let f=0;ft(5,i=m));let{$$slots:s={},$$scope:l}=e;const o="field_"+B.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){al(r)}un(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(m){Ve.call(this,n,m)}function h(m){le[m?"unshift":"push"](()=>{u=m,t(1,u)})}return n.$$set=m=>{"name"in m&&t(4,r=m.name),"class"in m&&t(0,a=m.class),"$$scope"in m&&t(6,l=m.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=B.toArray(B.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,h]}class _e extends Ce{constructor(e){super(),$e(this,e,I1,A1,ke,{name:4,class:0})}}function P1(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0]),l.focus(),r||(a=W(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]&&pe(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function L1(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Password"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),pe(l,n[1]),S(c,r,d),S(c,a,d),u||(f=W(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]&&pe(l,c[1])},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function N1(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Password confirm"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[2]),r||(a=W(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]&&pe(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function F1(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return s=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[P1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[L1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[N1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),f=v("button"),f.innerHTML=`Create and login + `,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),ee(f,"btn-disabled",n[3]),ee(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(m,b){S(m,e,b),_(e,t),_(e,i),R(s,e,null),_(e,l),R(o,e,null),_(e,r),R(a,e,null),_(e,u),_(e,f),c=!0,d||(h=W(e,"submit",ut(n[4])),d=!0)},p(m,[b]){const g={};b&1537&&(g.$$scope={dirty:b,ctx:m}),s.$set(g);const y={};b&1538&&(y.$$scope={dirty:b,ctx:m}),o.$set(y);const k={};b&1540&&(k.$$scope={dirty:b,ctx:m}),a.$set(k),(!c||b&8)&&ee(f,"btn-disabled",m[3]),(!c||b&8)&&ee(f,"btn-loading",m[3])},i(m){c||(E(s.$$.fragment,m),E(o.$$.fragment,m),E(a.$$.fragment,m),c=!0)},o(m){I(s.$$.fragment,m),I(o.$$.fragment,m),I(a.$$.fragment,m),c=!1},d(m){m&&w(e),H(s),H(o),H(a),d=!1,h()}}}function R1(n,e,t){const i=It();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await me.admins.create({email:s,password:l,passwordConfirm:o}),await me.admins.authWithPassword(s,l),i("submit")}catch(d){me.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class H1 extends Ce{constructor(e){super(),$e(this,e,R1,F1,ke,{})}}function Fu(n){let e,t;return e=new wg({props:{$$slots:{default:[j1]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function j1(n){let e,t;return e=new H1({}),e.$on("submit",n[1]),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p:x,i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function q1(n){let e,t,i=n[0]&&Fu(n);return{c(){i&&i.c(),e=Fe()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&E(i,1)):(i=Fu(s),i.c(),E(i,1),i.m(e.parentNode,e)):i&&(be(),I(i,1,1,()=>{i=null}),ve())},i(s){t||(E(i),t=!0)},o(s){I(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function V1(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){me.logout(!1),t(0,i=!0);return}me.authStore.isValid?ki("/collections"):me.logout()}return[i,async()=>{t(0,i=!1),await $n(),window.location.search=""}]}class z1 extends Ce{constructor(e){super(),$e(this,e,V1,q1,ke,{})}}const mt=Cn(""),_o=Cn(""),ks=Cn(!1);function Vo(n){const e=n-1;return e*e*e+1}function bo(n,{delay:e=0,duration:t=400,easing:i=bl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function kn(n,{delay:e=0,duration:t=400,easing:i=Vo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>` transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px); opacity: ${a-f*d}`}}function St(n,{delay:e=0,duration:t=400,easing:i=Vo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:h=>`overflow: hidden;opacity: ${Math.min(h*20,1)*l};height: ${h*o}px;padding-top: ${h*r}px;padding-bottom: ${h*a}px;margin-top: ${h*u}px;margin-bottom: ${h*f}px;border-top-width: ${h*c}px;border-bottom-width: ${h*d}px;`}}function $t(n,{delay:e=0,duration:t=400,easing:i=Vo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` transform: ${a} scale(${1-u*d}); opacity: ${r-f*d} - `}}function z1(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){$(l,e,o),n[13](e),pe(e,n[7]),i||(s=W(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]&&pe(e,l[7])},i:x,o:x,d(l){l&&S(e),n[13](null),i=!1,s()}}}function B1(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>ye(e,"value",l)),e.$on("submit",n[10])),{c(){e&&j(e.$$.fragment),i=Fe()},m(a,u){e&&R(e,a,u),$(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],Me(()=>t=!1)),o!==(o=a[4])){if(e){be();const c=e;I(c.$$.fragment,1,0,()=>{H(c,1)}),ve()}o?(e=jt(o,r(a)),le.push(()=>ye(e,"value",l)),e.$on("submit",a[10]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&S(i),e&&H(e,a)}}}function Ru(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Hu();return{c(){r&&r.c(),e=O(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),$(a,e,u),$(a,t,u),s=!0,l||(o=W(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&E(r,1):(r=Hu(),r.c(),E(r,1),r.m(e.parentNode,e)):r&&(be(),I(r,1,1,()=>{r=null}),ve())},i(a){s||(E(r),a&&Qe(()=>{i||(i=je(t,kn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){I(r),a&&(i||(i=je(t,kn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&S(e),a&&S(t),a&&i&&i.end(),l=!1,o()}}}function Hu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){$(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{t||(t=je(e,kn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,kn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&S(e),s&&t&&t.end()}}}function U1(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[B1,z1],h=[];function m(g,y){return g[4]&&!g[5]?0:1}o=m(n),r=h[o]=d[o](n);let b=(n[0].length||n[7].length)&&Ru(n);return{c(){e=v("div"),t=v("form"),i=v("label"),s=v("i"),l=O(),r.c(),a=O(),b&&b.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(g,y){$(g,e,y),_(e,t),_(t,i),_(i,s),_(t,l),h[o].m(t,null),_(t,a),b&&b.m(t,null),u=!0,f||(c=[W(t,"click",Yn(n[11])),W(t,"submit",ut(n[10]))],f=!0)},p(g,[y]){let k=o;o=m(g),o===k?h[o].p(g,y):(be(),I(h[k],1,1,()=>{h[k]=null}),ve(),r=h[o],r?r.p(g,y):(r=h[o]=d[o](g),r.c()),E(r,1),r.m(t,a)),g[0].length||g[7].length?b?(b.p(g,y),y&129&&E(b,1)):(b=Ru(g),b.c(),E(b,1),b.m(t,null)):b&&(be(),I(b,1,1,()=>{b=null}),ve())},i(g){u||(E(r),E(b),u=!0)},o(g){I(r),I(b),u=!1},d(g){g&&S(e),h[o].d(),b&&b.d(),f=!1,Re(c)}}}function W1(n,e,t){const i=It(),s="search_"+B.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new Pn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function m(){t(0,l=d),i("submit",l)}async function b(){u||f||(t(5,f=!0),t(4,u=(await st(()=>import("./FilterAutocompleteInput.66938328.js"),["./FilterAutocompleteInput.66938328.js","./index.9c8b95cd.js"],import.meta.url)).default),t(5,f=!1))}un(()=>{b()});function g(M){Ve.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){le[M?"unshift":"push"](()=>{c=M,t(6,c)})}function w(){d=this.value,t(7,d),t(0,l)}const C=()=>{h(!1),m()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,m,g,y,k,w,C]}class ka extends Ce{constructor(e){super(),$e(this,e,W1,U1,ke,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let qr,Ii;const Vr="app-tooltip";function ju(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function _i(){return Ii=Ii||document.querySelector("."+Vr),Ii||(Ii=document.createElement("div"),Ii.classList.add(Vr),document.body.appendChild(Ii)),Ii}function wg(n,e){let t=_i();if(!t.classList.contains("active")||!(e!=null&&e.text)){zr();return}t.textContent=e.text,t.className=Vr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function zr(){clearTimeout(qr),_i().classList.remove("active"),_i().activeNode=void 0}function Y1(n,e){_i().activeNode=n,clearTimeout(qr),qr=setTimeout(()=>{_i().classList.add("active"),wg(n,e)},isNaN(e.delay)?0:e.delay)}function Be(n,e){let t=ju(e);function i(){Y1(n,t)}function s(){zr()}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),_i(),{update(l){var o,r;t=ju(l),(r=(o=_i())==null?void 0:o.activeNode)!=null&&r.contains(n)&&wg(n,t)},destroy(){var l,o;(o=(l=_i())==null?void 0:l.activeNode)!=null&&o.contains(n)&&zr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function K1(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle svelte-1bvelc2"),ee(e,"refreshing",n[1])},m(l,o){$(l,e,o),i||(s=[Le(t=Be.call(null,e,n[0])),W(e,"click",n[2])],i=!0)},p(l,[o]){t&&Wt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&ee(e,"refreshing",l[1])},i:x,o:x,d(l){l&&S(e),i=!1,Re(s)}}}function J1(n,e,t){const i=It();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return un(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class wa extends Ce{constructor(e){super(),$e(this,e,J1,K1,ke,{tooltip:0})}}function Z1(n){let e,t,i,s,l;const o=n[6].default,r=Ot(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"class",t="col-sort "+n[1]),ee(e,"col-sort-disabled",n[3]),ee(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),ee(e,"sort-desc",n[0]==="-"+n[2]),ee(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){$(a,e,u),r&&r.m(e,null),i=!0,s||(l=[W(e,"click",n[7]),W(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Et(r,o,a,a[5],i?Dt(o,a[5],u,null):At(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&ee(e,"col-sort-disabled",a[3]),(!i||u&7)&&ee(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&ee(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&ee(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(E(r,a),i=!0)},o(a){I(r,a),i=!1},d(a){a&&S(e),r&&r.d(a),s=!1,Re(l)}}}function G1(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class Ft extends Ce{constructor(e){super(),$e(this,e,G1,Z1,ke,{class:1,name:2,sort:0,disable:3})}}function X1(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function Q1(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=z(n[2]),s=O(),l=v("div"),o=z(n[1]),r=z(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){$(a,e,u),_(e,t),_(t,i),_(e,s),_(e,l),_(l,o),_(l,r)},p(a,u){u&4&&ue(i,a[2]),u&2&&ue(o,a[1])},d(a){a&&S(e)}}}function x1(n){let e;function t(l,o){return l[0]?Q1:X1}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function ev(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Ki extends Ce{constructor(e){super(),$e(this,e,ev,x1,ke,{date:0})}}const tv=n=>({}),qu=n=>({}),nv=n=>({}),Vu=n=>({});function iv(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ot(u,n,n[4],Vu),c=n[5].default,d=Ot(c,n,n[4],null),h=n[5].after,m=Ot(h,n,n[4],qu);return{c(){e=v("div"),f&&f.c(),t=O(),i=v("div"),d&&d.c(),l=O(),m&&m.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(b,g){$(b,e,g),f&&f.m(e,null),_(e,t),_(e,i),d&&d.m(i,null),n[6](i),_(e,l),m&&m.m(e,null),o=!0,r||(a=[W(window,"resize",n[1]),W(i,"scroll",n[1])],r=!0)},p(b,[g]){f&&f.p&&(!o||g&16)&&Et(f,u,b,b[4],o?Dt(u,b[4],g,nv):At(b[4]),Vu),d&&d.p&&(!o||g&16)&&Et(d,c,b,b[4],o?Dt(c,b[4],g,null):At(b[4]),null),(!o||g&9&&s!==(s="horizontal-scroller "+b[0]+" "+b[3]+" svelte-wc2j9h"))&&p(i,"class",s),m&&m.p&&(!o||g&16)&&Et(m,h,b,b[4],o?Dt(h,b[4],g,tv):At(b[4]),qu)},i(b){o||(E(f,b),E(d,b),E(m,b),o=!0)},o(b){I(f,b),I(d,b),I(m,b),o=!1},d(b){b&&S(e),f&&f.d(b),d&&d.d(b),n[6](null),m&&m.d(b),r=!1,Re(a)}}}function sv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){!o||(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,h=o.scrollWidth;h-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==h&&t(3,r+=" scroll-end")):t(3,r="")},100))}un(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){le[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class Sa extends Ce{constructor(e){super(),$e(this,e,sv,iv,ke,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function zu(n,e,t){const i=n.slice();return i[23]=e[t],i}function lv(n){let e;return{c(){e=v("div"),e.innerHTML=` - method`,p(e,"class","col-header-content")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function ov(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="url",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function rv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="referer",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function av(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="User IP",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function uv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="status",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function fv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function Bu(n){let e;function t(l,o){return l[6]?dv:cv}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function cv(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Uu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){$(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Uu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&S(e),o&&o.d()}}}function dv(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function Uu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[19]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function Wu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function Yu(n,e){var Se,we,Ue;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,h,m,b,g,y,k=(e[23].referer||"N/A")+"",w,C,M,T,D,A=(e[23].userIp||"N/A")+"",P,L,V,F,U,G=e[23].status+"",K,X,Z,ie,J,fe,Y,re,Oe,ge,ae=(((we=e[23].meta)==null?void 0:we.errorMessage)||((Ue=e[23].meta)==null?void 0:Ue.errorData))&&Wu();ie=new Ki({props:{date:e[23].created}});function he(){return e[17](e[23])}function de(...ce){return e[18](e[23],...ce)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=z(l),a=O(),u=v("td"),f=v("span"),d=z(c),m=O(),ae&&ae.c(),b=O(),g=v("td"),y=v("span"),w=z(k),M=O(),T=v("td"),D=v("span"),P=z(A),V=O(),F=v("td"),U=v("span"),K=z(G),X=O(),Z=v("td"),j(ie.$$.fragment),J=O(),fe=v("td"),fe.innerHTML='',Y=O(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[23].referer),ee(y,"txt-hint",!e[23].referer),p(g,"class","col-type-text col-field-referer"),p(D,"class","txt txt-ellipsis"),p(D,"title",L=e[23].userIp),ee(D,"txt-hint",!e[23].userIp),p(T,"class","col-type-number col-field-userIp"),p(U,"class","label"),ee(U,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(Z,"class","col-type-date col-field-created"),p(fe,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ce,se){$(ce,t,se),_(t,i),_(i,s),_(s,o),_(t,a),_(t,u),_(u,f),_(f,d),_(u,m),ae&&ae.m(u,null),_(t,b),_(t,g),_(g,y),_(y,w),_(t,M),_(t,T),_(T,D),_(D,P),_(t,V),_(t,F),_(F,U),_(U,K),_(t,X),_(t,Z),R(ie,Z,null),_(t,J),_(t,fe),_(t,Y),re=!0,Oe||(ge=[W(t,"click",he),W(t,"keydown",de)],Oe=!0)},p(ce,se){var ne,Ee,it;e=ce,(!re||se&8)&&l!==(l=((ne=e[23].method)==null?void 0:ne.toUpperCase())+"")&&ue(o,l),(!re||se&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!re||se&8)&&c!==(c=e[23].url+"")&&ue(d,c),(!re||se&8&&h!==(h=e[23].url))&&p(f,"title",h),((Ee=e[23].meta)==null?void 0:Ee.errorMessage)||((it=e[23].meta)==null?void 0:it.errorData)?ae||(ae=Wu(),ae.c(),ae.m(u,null)):ae&&(ae.d(1),ae=null),(!re||se&8)&&k!==(k=(e[23].referer||"N/A")+"")&&ue(w,k),(!re||se&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!re||se&8)&&ee(y,"txt-hint",!e[23].referer),(!re||se&8)&&A!==(A=(e[23].userIp||"N/A")+"")&&ue(P,A),(!re||se&8&&L!==(L=e[23].userIp))&&p(D,"title",L),(!re||se&8)&&ee(D,"txt-hint",!e[23].userIp),(!re||se&8)&&G!==(G=e[23].status+"")&&ue(K,G),(!re||se&8)&&ee(U,"label-danger",e[23].status>=400);const te={};se&8&&(te.date=e[23].created),ie.$set(te)},i(ce){re||(E(ie.$$.fragment,ce),re=!0)},o(ce){I(ie.$$.fragment,ce),re=!1},d(ce){ce&&S(t),ae&&ae.d(),H(ie),Oe=!1,Re(ge)}}}function pv(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M,T,D,A,P=[],L=new Map,V;function F(de){n[11](de)}let U={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[lv]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),s=new Ft({props:U}),le.push(()=>ye(s,"sort",F));function G(de){n[12](de)}let K={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[ov]},$$scope:{ctx:n}};n[1]!==void 0&&(K.sort=n[1]),r=new Ft({props:K}),le.push(()=>ye(r,"sort",G));function X(de){n[13](de)}let Z={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[rv]},$$scope:{ctx:n}};n[1]!==void 0&&(Z.sort=n[1]),f=new Ft({props:Z}),le.push(()=>ye(f,"sort",X));function ie(de){n[14](de)}let J={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[av]},$$scope:{ctx:n}};n[1]!==void 0&&(J.sort=n[1]),h=new Ft({props:J}),le.push(()=>ye(h,"sort",ie));function fe(de){n[15](de)}let Y={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[uv]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),g=new Ft({props:Y}),le.push(()=>ye(g,"sort",fe));function re(de){n[16](de)}let Oe={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[fv]},$$scope:{ctx:n}};n[1]!==void 0&&(Oe.sort=n[1]),w=new Ft({props:Oe}),le.push(()=>ye(w,"sort",re));let ge=n[3];const ae=de=>de[23].id;for(let de=0;del=!1)),s.$set(we);const Ue={};Se&67108864&&(Ue.$$scope={dirty:Se,ctx:de}),!a&&Se&2&&(a=!0,Ue.sort=de[1],Me(()=>a=!1)),r.$set(Ue);const ce={};Se&67108864&&(ce.$$scope={dirty:Se,ctx:de}),!c&&Se&2&&(c=!0,ce.sort=de[1],Me(()=>c=!1)),f.$set(ce);const se={};Se&67108864&&(se.$$scope={dirty:Se,ctx:de}),!m&&Se&2&&(m=!0,se.sort=de[1],Me(()=>m=!1)),h.$set(se);const te={};Se&67108864&&(te.$$scope={dirty:Se,ctx:de}),!y&&Se&2&&(y=!0,te.sort=de[1],Me(()=>y=!1)),g.$set(te);const ne={};Se&67108864&&(ne.$$scope={dirty:Se,ctx:de}),!C&&Se&2&&(C=!0,ne.sort=de[1],Me(()=>C=!1)),w.$set(ne),Se&841&&(ge=de[3],be(),P=bt(P,Se,ae,1,de,ge,L,A,xt,Yu,null,zu),ve(),!ge.length&&he?he.p(de,Se):ge.length?he&&(he.d(1),he=null):(he=Bu(de),he.c(),he.m(A,null))),(!V||Se&64)&&ee(e,"table-loading",de[6])},i(de){if(!V){E(s.$$.fragment,de),E(r.$$.fragment,de),E(f.$$.fragment,de),E(h.$$.fragment,de),E(g.$$.fragment,de),E(w.$$.fragment,de);for(let Se=0;Se{if(L<=1&&b(),t(6,d=!1),t(5,f=F.page),t(4,c=F.totalItems),s("load",u.concat(F.items)),V){const U=++h;for(;F.items.length&&h==U;)t(3,u=u.concat(F.items.splice(0,10))),await B.yieldToMain()}else t(3,u=u.concat(F.items))}).catch(F=>{F!=null&&F.isAbort||(t(6,d=!1),console.warn(F),b(),me.errorResponseHandler(F,!1))})}function b(){t(3,u=[]),t(5,f=1),t(4,c=0)}function g(L){a=L,t(1,a)}function y(L){a=L,t(1,a)}function k(L){a=L,t(1,a)}function w(L){a=L,t(1,a)}function C(L){a=L,t(1,a)}function M(L){a=L,t(1,a)}const T=L=>s("select",L),D=(L,V)=>{V.code==="Enter"&&(V.preventDefault(),s("select",L))},A=()=>t(0,o=""),P=()=>m(f+1);return n.$$set=L=>{"filter"in L&&t(0,o=L.filter),"presets"in L&&t(10,r=L.presets),"sort"in L&&t(1,a=L.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(b(),m(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,m,u,c,f,d,i,s,l,r,g,y,k,w,C,M,T,D,A,P]}class gv extends Ce{constructor(e){super(),$e(this,e,mv,hv,ke,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! + `}}function B1(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),pe(e,n[7]),i||(s=W(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]&&pe(e,l[7])},i:x,o:x,d(l){l&&w(e),n[13](null),i=!1,s()}}}function U1(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>ye(e,"value",l)),e.$on("submit",n[10])),{c(){e&&j(e.$$.fragment),i=Fe()},m(a,u){e&&R(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],Me(()=>t=!1)),o!==(o=a[4])){if(e){be();const c=e;I(c.$$.fragment,1,0,()=>{H(c,1)}),ve()}o?(e=jt(o,r(a)),le.push(()=>ye(e,"value",l)),e.$on("submit",a[10]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function Ru(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Hu();return{c(){r&&r.c(),e=O(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=W(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&E(r,1):(r=Hu(),r.c(),E(r,1),r.m(e.parentNode,e)):r&&(be(),I(r,1,1,()=>{r=null}),ve())},i(a){s||(E(r),a&&Qe(()=>{i||(i=je(t,kn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){I(r),a&&(i||(i=je(t,kn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Hu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{t||(t=je(e,kn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,kn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function W1(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[U1,B1],h=[];function m(g,y){return g[4]&&!g[5]?0:1}o=m(n),r=h[o]=d[o](n);let b=(n[0].length||n[7].length)&&Ru(n);return{c(){e=v("div"),t=v("form"),i=v("label"),s=v("i"),l=O(),r.c(),a=O(),b&&b.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(i,s),_(t,l),h[o].m(t,null),_(t,a),b&&b.m(t,null),u=!0,f||(c=[W(t,"click",Yn(n[11])),W(t,"submit",ut(n[10]))],f=!0)},p(g,[y]){let k=o;o=m(g),o===k?h[o].p(g,y):(be(),I(h[k],1,1,()=>{h[k]=null}),ve(),r=h[o],r?r.p(g,y):(r=h[o]=d[o](g),r.c()),E(r,1),r.m(t,a)),g[0].length||g[7].length?b?(b.p(g,y),y&129&&E(b,1)):(b=Ru(g),b.c(),E(b,1),b.m(t,null)):b&&(be(),I(b,1,1,()=>{b=null}),ve())},i(g){u||(E(r),E(b),u=!0)},o(g){I(r),I(b),u=!1},d(g){g&&w(e),h[o].d(),b&&b.d(),f=!1,Re(c)}}}function Y1(n,e,t){const i=It(),s="search_"+B.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new Pn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function m(){t(0,l=d),i("submit",l)}async function b(){u||f||(t(5,f=!0),t(4,u=(await st(()=>import("./FilterAutocompleteInput.83abd7f1.js"),["./FilterAutocompleteInput.83abd7f1.js","./index.9c8b95cd.js"],import.meta.url)).default),t(5,f=!1))}un(()=>{b()});function g(M){Ve.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){le[M?"unshift":"push"](()=>{c=M,t(6,c)})}function $(){d=this.value,t(7,d),t(0,l)}const C=()=>{h(!1),m()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,m,g,y,k,$,C]}class ka extends Ce{constructor(e){super(),$e(this,e,Y1,W1,ke,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let qr,Ii;const Vr="app-tooltip";function ju(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function _i(){return Ii=Ii||document.querySelector("."+Vr),Ii||(Ii=document.createElement("div"),Ii.classList.add(Vr),document.body.appendChild(Ii)),Ii}function Sg(n,e){let t=_i();if(!t.classList.contains("active")||!(e!=null&&e.text)){zr();return}t.textContent=e.text,t.className=Vr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function zr(){clearTimeout(qr),_i().classList.remove("active"),_i().activeNode=void 0}function K1(n,e){_i().activeNode=n,clearTimeout(qr),qr=setTimeout(()=>{_i().classList.add("active"),Sg(n,e)},isNaN(e.delay)?0:e.delay)}function Be(n,e){let t=ju(e);function i(){K1(n,t)}function s(){zr()}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),_i(),{update(l){var o,r;t=ju(l),(r=(o=_i())==null?void 0:o.activeNode)!=null&&r.contains(n)&&Sg(n,t)},destroy(){var l,o;(o=(l=_i())==null?void 0:l.activeNode)!=null&&o.contains(n)&&zr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function J1(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle svelte-1bvelc2"),ee(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Le(t=Be.call(null,e,n[0])),W(e,"click",n[2])],i=!0)},p(l,[o]){t&&Wt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&ee(e,"refreshing",l[1])},i:x,o:x,d(l){l&&w(e),i=!1,Re(s)}}}function Z1(n,e,t){const i=It();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return un(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class wa extends Ce{constructor(e){super(),$e(this,e,Z1,J1,ke,{tooltip:0})}}function G1(n){let e,t,i,s,l;const o=n[6].default,r=Ot(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"class",t="col-sort "+n[1]),ee(e,"col-sort-disabled",n[3]),ee(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),ee(e,"sort-desc",n[0]==="-"+n[2]),ee(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[W(e,"click",n[7]),W(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&Et(r,o,a,a[5],i?Dt(o,a[5],u,null):At(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&ee(e,"col-sort-disabled",a[3]),(!i||u&7)&&ee(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&ee(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&ee(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(E(r,a),i=!0)},o(a){I(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Re(l)}}}function X1(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class Ft extends Ce{constructor(e){super(),$e(this,e,X1,G1,ke,{class:1,name:2,sort:0,disable:3})}}function Q1(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function x1(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=z(n[2]),s=O(),l=v("div"),o=z(n[1]),r=z(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(e,s),_(e,l),_(l,o),_(l,r)},p(a,u){u&4&&ue(i,a[2]),u&2&&ue(o,a[1])},d(a){a&&w(e)}}}function ev(n){let e;function t(l,o){return l[0]?x1:Q1}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&w(e)}}}function tv(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Ki extends Ce{constructor(e){super(),$e(this,e,tv,ev,ke,{date:0})}}const nv=n=>({}),qu=n=>({}),iv=n=>({}),Vu=n=>({});function sv(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ot(u,n,n[4],Vu),c=n[5].default,d=Ot(c,n,n[4],null),h=n[5].after,m=Ot(h,n,n[4],qu);return{c(){e=v("div"),f&&f.c(),t=O(),i=v("div"),d&&d.c(),l=O(),m&&m.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(b,g){S(b,e,g),f&&f.m(e,null),_(e,t),_(e,i),d&&d.m(i,null),n[6](i),_(e,l),m&&m.m(e,null),o=!0,r||(a=[W(window,"resize",n[1]),W(i,"scroll",n[1])],r=!0)},p(b,[g]){f&&f.p&&(!o||g&16)&&Et(f,u,b,b[4],o?Dt(u,b[4],g,iv):At(b[4]),Vu),d&&d.p&&(!o||g&16)&&Et(d,c,b,b[4],o?Dt(c,b[4],g,null):At(b[4]),null),(!o||g&9&&s!==(s="horizontal-scroller "+b[0]+" "+b[3]+" svelte-wc2j9h"))&&p(i,"class",s),m&&m.p&&(!o||g&16)&&Et(m,h,b,b[4],o?Dt(h,b[4],g,nv):At(b[4]),qu)},i(b){o||(E(f,b),E(d,b),E(m,b),o=!0)},o(b){I(f,b),I(d,b),I(m,b),o=!1},d(b){b&&w(e),f&&f.d(b),d&&d.d(b),n[6](null),m&&m.d(b),r=!1,Re(a)}}}function lv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){!o||(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,h=o.scrollWidth;h-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==h&&t(3,r+=" scroll-end")):t(3,r="")},100))}un(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){le[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class Sa extends Ce{constructor(e){super(),$e(this,e,lv,sv,ke,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function zu(n,e,t){const i=n.slice();return i[23]=e[t],i}function ov(n){let e;return{c(){e=v("div"),e.innerHTML=` + method`,p(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function rv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="url",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function av(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="referer",p(t,"class",B.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function uv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="User IP",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function fv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="status",p(t,"class",B.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function cv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function Bu(n){let e;function t(l,o){return l[6]?pv:dv}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function dv(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Uu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Uu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function pv(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function Uu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[19]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function Wu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yu(n,e){var Se,we,Ue;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,h,m,b,g,y,k=(e[23].referer||"N/A")+"",$,C,M,T,D,A=(e[23].userIp||"N/A")+"",P,L,V,F,U,G=e[23].status+"",K,X,Z,ie,J,fe,Y,re,Oe,ge,ae=(((we=e[23].meta)==null?void 0:we.errorMessage)||((Ue=e[23].meta)==null?void 0:Ue.errorData))&&Wu();ie=new Ki({props:{date:e[23].created}});function he(){return e[17](e[23])}function de(...ce){return e[18](e[23],...ce)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=z(l),a=O(),u=v("td"),f=v("span"),d=z(c),m=O(),ae&&ae.c(),b=O(),g=v("td"),y=v("span"),$=z(k),M=O(),T=v("td"),D=v("span"),P=z(A),V=O(),F=v("td"),U=v("span"),K=z(G),X=O(),Z=v("td"),j(ie.$$.fragment),J=O(),fe=v("td"),fe.innerHTML='',Y=O(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[23].referer),ee(y,"txt-hint",!e[23].referer),p(g,"class","col-type-text col-field-referer"),p(D,"class","txt txt-ellipsis"),p(D,"title",L=e[23].userIp),ee(D,"txt-hint",!e[23].userIp),p(T,"class","col-type-number col-field-userIp"),p(U,"class","label"),ee(U,"label-danger",e[23].status>=400),p(F,"class","col-type-number col-field-status"),p(Z,"class","col-type-date col-field-created"),p(fe,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ce,se){S(ce,t,se),_(t,i),_(i,s),_(s,o),_(t,a),_(t,u),_(u,f),_(f,d),_(u,m),ae&&ae.m(u,null),_(t,b),_(t,g),_(g,y),_(y,$),_(t,M),_(t,T),_(T,D),_(D,P),_(t,V),_(t,F),_(F,U),_(U,K),_(t,X),_(t,Z),R(ie,Z,null),_(t,J),_(t,fe),_(t,Y),re=!0,Oe||(ge=[W(t,"click",he),W(t,"keydown",de)],Oe=!0)},p(ce,se){var ne,Ee,it;e=ce,(!re||se&8)&&l!==(l=((ne=e[23].method)==null?void 0:ne.toUpperCase())+"")&&ue(o,l),(!re||se&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!re||se&8)&&c!==(c=e[23].url+"")&&ue(d,c),(!re||se&8&&h!==(h=e[23].url))&&p(f,"title",h),((Ee=e[23].meta)==null?void 0:Ee.errorMessage)||((it=e[23].meta)==null?void 0:it.errorData)?ae||(ae=Wu(),ae.c(),ae.m(u,null)):ae&&(ae.d(1),ae=null),(!re||se&8)&&k!==(k=(e[23].referer||"N/A")+"")&&ue($,k),(!re||se&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!re||se&8)&&ee(y,"txt-hint",!e[23].referer),(!re||se&8)&&A!==(A=(e[23].userIp||"N/A")+"")&&ue(P,A),(!re||se&8&&L!==(L=e[23].userIp))&&p(D,"title",L),(!re||se&8)&&ee(D,"txt-hint",!e[23].userIp),(!re||se&8)&&G!==(G=e[23].status+"")&&ue(K,G),(!re||se&8)&&ee(U,"label-danger",e[23].status>=400);const te={};se&8&&(te.date=e[23].created),ie.$set(te)},i(ce){re||(E(ie.$$.fragment,ce),re=!0)},o(ce){I(ie.$$.fragment,ce),re=!1},d(ce){ce&&w(t),ae&&ae.d(),H(ie),Oe=!1,Re(ge)}}}function hv(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,P=[],L=new Map,V;function F(de){n[11](de)}let U={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[ov]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),s=new Ft({props:U}),le.push(()=>ye(s,"sort",F));function G(de){n[12](de)}let K={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[rv]},$$scope:{ctx:n}};n[1]!==void 0&&(K.sort=n[1]),r=new Ft({props:K}),le.push(()=>ye(r,"sort",G));function X(de){n[13](de)}let Z={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[av]},$$scope:{ctx:n}};n[1]!==void 0&&(Z.sort=n[1]),f=new Ft({props:Z}),le.push(()=>ye(f,"sort",X));function ie(de){n[14](de)}let J={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[uv]},$$scope:{ctx:n}};n[1]!==void 0&&(J.sort=n[1]),h=new Ft({props:J}),le.push(()=>ye(h,"sort",ie));function fe(de){n[15](de)}let Y={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[fv]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),g=new Ft({props:Y}),le.push(()=>ye(g,"sort",fe));function re(de){n[16](de)}let Oe={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[cv]},$$scope:{ctx:n}};n[1]!==void 0&&(Oe.sort=n[1]),$=new Ft({props:Oe}),le.push(()=>ye($,"sort",re));let ge=n[3];const ae=de=>de[23].id;for(let de=0;del=!1)),s.$set(we);const Ue={};Se&67108864&&(Ue.$$scope={dirty:Se,ctx:de}),!a&&Se&2&&(a=!0,Ue.sort=de[1],Me(()=>a=!1)),r.$set(Ue);const ce={};Se&67108864&&(ce.$$scope={dirty:Se,ctx:de}),!c&&Se&2&&(c=!0,ce.sort=de[1],Me(()=>c=!1)),f.$set(ce);const se={};Se&67108864&&(se.$$scope={dirty:Se,ctx:de}),!m&&Se&2&&(m=!0,se.sort=de[1],Me(()=>m=!1)),h.$set(se);const te={};Se&67108864&&(te.$$scope={dirty:Se,ctx:de}),!y&&Se&2&&(y=!0,te.sort=de[1],Me(()=>y=!1)),g.$set(te);const ne={};Se&67108864&&(ne.$$scope={dirty:Se,ctx:de}),!C&&Se&2&&(C=!0,ne.sort=de[1],Me(()=>C=!1)),$.$set(ne),Se&841&&(ge=de[3],be(),P=bt(P,Se,ae,1,de,ge,L,A,xt,Yu,null,zu),ve(),!ge.length&&he?he.p(de,Se):ge.length?he&&(he.d(1),he=null):(he=Bu(de),he.c(),he.m(A,null))),(!V||Se&64)&&ee(e,"table-loading",de[6])},i(de){if(!V){E(s.$$.fragment,de),E(r.$$.fragment,de),E(f.$$.fragment,de),E(h.$$.fragment,de),E(g.$$.fragment,de),E($.$$.fragment,de);for(let Se=0;Se{if(L<=1&&b(),t(6,d=!1),t(5,f=F.page),t(4,c=F.totalItems),s("load",u.concat(F.items)),V){const U=++h;for(;F.items.length&&h==U;)t(3,u=u.concat(F.items.splice(0,10))),await B.yieldToMain()}else t(3,u=u.concat(F.items))}).catch(F=>{F!=null&&F.isAbort||(t(6,d=!1),console.warn(F),b(),me.errorResponseHandler(F,!1))})}function b(){t(3,u=[]),t(5,f=1),t(4,c=0)}function g(L){a=L,t(1,a)}function y(L){a=L,t(1,a)}function k(L){a=L,t(1,a)}function $(L){a=L,t(1,a)}function C(L){a=L,t(1,a)}function M(L){a=L,t(1,a)}const T=L=>s("select",L),D=(L,V)=>{V.code==="Enter"&&(V.preventDefault(),s("select",L))},A=()=>t(0,o=""),P=()=>m(f+1);return n.$$set=L=>{"filter"in L&&t(0,o=L.filter),"presets"in L&&t(10,r=L.presets),"sort"in L&&t(1,a=L.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(b(),m(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,m,u,c,f,d,i,s,l,r,g,y,k,$,C,M,T,D,A,P]}class _v extends Ce{constructor(e){super(),$e(this,e,gv,mv,ke,{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 Qn(){}const _v=function(){let n=0;return function(){return n++}}();function nt(n){return n===null||typeof n>"u"}function ft(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 We(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const _t=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function hn(n,e){return _t(n)?n:e}function Ge(n,e){return typeof n>"u"?e:n}const bv=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,Sg=(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 lt(n,e,t,i){let s,l,o;if(ft(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 vi(n,e){return(Zu[e]||(Zu[e]=kv(e)))(n)}function kv(n){const e=wv(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function wv(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 $a(n){return n.charAt(0).toUpperCase()+n.slice(1)}const wn=n=>typeof n<"u",yi=n=>typeof n=="function",Gu=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function Sv(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const gt=Math.PI,ot=2*gt,$v=ot+gt,ko=Number.POSITIVE_INFINITY,Cv=gt/180,ht=gt/2,Hs=gt/4,Xu=gt*2/3,bn=Math.log10,zn=Math.sign;function Qu(n){const e=Math.round(n);n=xs(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 Mv(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function ws(n){return!isNaN(parseFloat(n))&&isFinite(n)}function xs(n,e,t){return Math.abs(n-e)=n}function Cg(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 Ma(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 qi=(n,e,t,i)=>Ma(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ma(n,t,i=>n[i][e]>=t);function Av(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+$a(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 ef(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)&&(Tg.forEach(l=>{delete n[l]}),delete n._chartjs)}function Og(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function Eg(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,Dg.call(window,()=>{s=!1,n.apply(e,l)}))}}function Pv(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Lv=n=>n==="start"?"left":n==="end"?"right":"center",tf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function Ag(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=Rt(Math.min(qi(r,o.axis,u).lo,t?i:qi(e,a,o.getPixelForValue(u)).lo),0,i-1)),d?l=Rt(Math.max(qi(r,o.axis,f,!0).hi+1,t?0:qi(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function Ig(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 Vl=n=>n===0||n===1,nf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*ot/t)),sf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*ot/t)+1,el={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*ht)+1,easeOutSine:n=>Math.sin(n*ht),easeInOutSine:n=>-.5*(Math.cos(gt*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=>Vl(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=>Vl(n)?n:nf(n,.075,.3),easeOutElastic:n=>Vl(n)?n:sf(n,.075,.3),easeInOutElastic(n){return Vl(n)?n:n<.5?.5*nf(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-el.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?el.easeInBounce(n*2)*.5:el.easeOutBounce(n*2-1)*.5+.5};/*! + */function Qn(){}const bv=function(){let n=0;return function(){return n++}}();function nt(n){return n===null||typeof n>"u"}function ft(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 We(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const _t=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function hn(n,e){return _t(n)?n:e}function Ge(n,e){return typeof n>"u"?e:n}const vv=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,$g=(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 lt(n,e,t,i){let s,l,o;if(ft(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 vi(n,e){return(Zu[e]||(Zu[e]=wv(e)))(n)}function wv(n){const e=Sv(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Sv(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 $a(n){return n.charAt(0).toUpperCase()+n.slice(1)}const wn=n=>typeof n<"u",yi=n=>typeof n=="function",Gu=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function $v(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const gt=Math.PI,ot=2*gt,Cv=ot+gt,ko=Number.POSITIVE_INFINITY,Mv=gt/180,ht=gt/2,Hs=gt/4,Xu=gt*2/3,bn=Math.log10,zn=Math.sign;function Qu(n){const e=Math.round(n);n=xs(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 Tv(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function ws(n){return!isNaN(parseFloat(n))&&isFinite(n)}function xs(n,e,t){return Math.abs(n-e)=n}function Mg(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 Ma(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 qi=(n,e,t,i)=>Ma(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ma(n,t,i=>n[i][e]>=t);function Iv(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+$a(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 ef(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)&&(Og.forEach(l=>{delete n[l]}),delete n._chartjs)}function Dg(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function Ag(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,Eg.call(window,()=>{s=!1,n.apply(e,l)}))}}function Lv(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Nv=n=>n==="start"?"left":n==="end"?"right":"center",tf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function Ig(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=Rt(Math.min(qi(r,o.axis,u).lo,t?i:qi(e,a,o.getPixelForValue(u)).lo),0,i-1)),d?l=Rt(Math.max(qi(r,o.axis,f,!0).hi+1,t?0:qi(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function Pg(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 Vl=n=>n===0||n===1,nf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*ot/t)),sf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*ot/t)+1,el={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*ht)+1,easeOutSine:n=>Math.sin(n*ht),easeInOutSine:n=>-.5*(Math.cos(gt*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=>Vl(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=>Vl(n)?n:nf(n,.075,.3),easeOutElastic:n=>Vl(n)?n:sf(n,.075,.3),easeInOutElastic(n){return Vl(n)?n:n<.5?.5*nf(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-el.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?el.easeInBounce(n*2)*.5:el.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 Cl(n){return n+.5|0}const hi=(n,e,t)=>Math.max(Math.min(n,t),e);function Js(n){return hi(Cl(n*2.55),0,255)}function bi(n){return hi(Cl(n*255),0,255)}function ti(n){return hi(Cl(n/2.55)/100,0,1)}function lf(n){return hi(Cl(n*100),0,100)}const pn={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},Ur=[..."0123456789ABCDEF"],Nv=n=>Ur[n&15],Fv=n=>Ur[(n&240)>>4]+Ur[n&15],zl=n=>(n&240)>>4===(n&15),Rv=n=>zl(n.r)&&zl(n.g)&&zl(n.b)&&zl(n.a);function Hv(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&pn[n[1]]*17,g:255&pn[n[2]]*17,b:255&pn[n[3]]*17,a:e===5?pn[n[4]]*17:255}:(e===7||e===9)&&(t={r:pn[n[1]]<<4|pn[n[2]],g:pn[n[3]]<<4|pn[n[4]],b:pn[n[5]]<<4|pn[n[6]],a:e===9?pn[n[7]]<<4|pn[n[8]]:255})),t}const jv=(n,e)=>n<255?e(n):"";function qv(n){var e=Rv(n)?Nv:Fv;return n?"#"+e(n.r)+e(n.g)+e(n.b)+jv(n.a,e):void 0}const Vv=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Pg(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 zv(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 Bv(n,e,t){const i=Pg(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 Uv(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=Uv(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Oa(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(bi)}function Da(n,e,t){return Oa(Pg,n,e,t)}function Wv(n,e,t){return Oa(Bv,n,e,t)}function Yv(n,e,t){return Oa(zv,n,e,t)}function Lg(n){return(n%360+360)%360}function Kv(n){const e=Vv.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Js(+e[5]):bi(+e[5]));const s=Lg(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=Wv(s,l,o):e[1]==="hsv"?i=Yv(s,l,o):i=Da(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function Jv(n,e){var t=Ta(n);t[0]=Lg(t[0]+e),t=Da(t),n.r=t[0],n.g=t[1],n.b=t[2]}function Zv(n){if(!n)return;const e=Ta(n),t=e[0],i=lf(e[1]),s=lf(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${ti(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const of={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"},rf={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 Gv(){const n={},e=Object.keys(rf),t=Object.keys(of);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Bl;function Xv(n){Bl||(Bl=Gv(),Bl.transparent=[0,0,0,0]);const e=Bl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const Qv=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function xv(n){const e=Qv.exec(n);let t=255,i,s,l;if(!!e){if(e[7]!==i){const o=+e[7];t=e[8]?Js(o):hi(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?Js(i):hi(i,0,255)),s=255&(e[4]?Js(s):hi(s,0,255)),l=255&(e[6]?Js(l):hi(l,0,255)),{r:i,g:s,b:l,a:t}}}function ey(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${ti(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const sr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,us=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function ty(n,e,t){const i=us(ti(n.r)),s=us(ti(n.g)),l=us(ti(n.b));return{r:bi(sr(i+t*(us(ti(e.r))-i))),g:bi(sr(s+t*(us(ti(e.g))-s))),b:bi(sr(l+t*(us(ti(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Ul(n,e,t){if(n){let i=Ta(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Da(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Ng(n,e){return n&&Object.assign(e||{},n)}function af(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=bi(n[3]))):(e=Ng(n,{r:0,g:0,b:0,a:1}),e.a=bi(e.a)),e}function ny(n){return n.charAt(0)==="r"?xv(n):Kv(n)}class wo{constructor(e){if(e instanceof wo)return e;const t=typeof e;let i;t==="object"?i=af(e):t==="string"&&(i=Hv(e)||Xv(e)||ny(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Ng(this._rgb);return e&&(e.a=ti(e.a)),e}set rgb(e){this._rgb=af(e)}rgbString(){return this._valid?ey(this._rgb):void 0}hexString(){return this._valid?qv(this._rgb):void 0}hslString(){return this._valid?Zv(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=ty(this._rgb,e._rgb,t)),this}clone(){return new wo(this.rgb)}alpha(e){return this._rgb.a=bi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Cl(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 Ul(this._rgb,2,e),this}darken(e){return Ul(this._rgb,2,-e),this}saturate(e){return Ul(this._rgb,1,e),this}desaturate(e){return Ul(this._rgb,1,-e),this}rotate(e){return Jv(this._rgb,e),this}}function Fg(n){return new wo(n)}function Rg(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function uf(n){return Rg(n)?n:Fg(n)}function lr(n){return Rg(n)?n:Fg(n).saturate(.5).darken(.1).hexString()}const Ji=Object.create(null),Wr=Object.create(null);function tl(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)=>lr(i.backgroundColor),this.hoverBorderColor=(t,i)=>lr(i.borderColor),this.hoverColor=(t,i)=>lr(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 or(this,e,t)}get(e){return tl(this,e)}describe(e,t){return or(Wr,e,t)}override(e,t){return or(Ji,e,t)}route(e,t,i,s){const l=tl(this,e),o=tl(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 We(a)?Object.assign({},u,a):Ge(a,u)},set(a){this[r]=a}}})}}var Xe=new iy({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function sy(n){return!n||nt(n.size)||nt(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function So(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 ly(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 dl(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,uy(n,l),a=0;a+n||0;function Ia(n,e){const t={},i=We(e),s=i?Object.keys(e):e,l=We(n)?i?o=>Ge(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=hy(l(o));return t}function Hg(n){return Ia(n,{top:"y",right:"x",bottom:"y",left:"x"})}function gs(n){return Ia(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Sn(n){const e=Hg(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function rn(n,e){n=n||{},e=e||Xe.font;let t=Ge(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=Ge(n.style,e.style);i&&!(""+i).match(dy)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:Ge(n.family,e.family),lineHeight:py(Ge(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:Ge(n.weight,e.weight),string:""};return s.string=sy(s),s}function Wl(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 Si(n,e){return Object.assign(Object.create(n),e)}function Pa(n,e=[""],t=n,i,s=()=>n[0]){wn(i)||(i=zg("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Pa([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 qg(o,r,()=>Sy(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return df(o).includes(r)},ownKeys(o){return df(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Ss(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:jg(n,i),setContext:l=>Ss(n,l,t,i),override:l=>Ss(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 qg(l,o,()=>_y(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 jg(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:yi(t)?t:()=>t,isIndexable:yi(i)?i:()=>i}}const gy=(n,e)=>n?n+$a(e):e,La=(n,e)=>We(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function qg(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function _y(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return yi(r)&&o.isScriptable(e)&&(r=by(e,r,n,t)),ft(r)&&r.length&&(r=vy(e,r,n,o.isIndexable)),La(e,r)&&(r=Ss(r,s,l&&l[e],o)),r}function by(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),La(n,e)&&(e=Na(s._scopes,s,n,e)),e}function vy(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(We(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Na(u,s,n,f);e.push(Ss(c,l,o&&o[n],r))}}return e}function Vg(n,e,t){return yi(n)?n(e,t):n}const yy=(n,e)=>n===!0?e:typeof n=="string"?vi(e,n):void 0;function ky(n,e,t,i,s){for(const l of e){const o=yy(t,l);if(o){n.add(o);const r=Vg(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 Na(n,e,t,i){const s=e._rootScopes,l=Vg(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=cf(r,o,t,l||t,i);return a===null||wn(l)&&l!==t&&(a=cf(r,o,l,a,i),a===null)?!1:Pa(Array.from(r),[""],s,l,()=>wy(e,t,i))}function cf(n,e,t,i,s){for(;t;)t=ky(n,e,t,i,s);return t}function wy(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return ft(s)&&We(t)?t:s}function Sy(n,e,t,i){let s;for(const l of e)if(s=zg(gy(l,n),t),wn(s))return La(n,s)?Na(t,i,n,s):s}function zg(n,e){for(const t of e){if(!t)continue;const i=t[n];if(wn(i))return i}}function df(n){let e=n._keys;return e||(e=n._keys=$y(n._scopes)),e}function $y(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 Bg(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 My(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=Br(l,s),a=Br(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 Ty(n,e,t){const i=n.length;let s,l,o,r,a,u=$s(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")Dy(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Iy(n,e){return zo(n).getPropertyValue(e)}const Py=["top","right","bottom","left"];function Bi(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=Py[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Ly=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Ny(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(Ly(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 Ri(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=zo(t),l=s.boxSizing==="border-box",o=Bi(s,"padding"),r=Bi(s,"border","width"),{x:a,y:u,box:f}=Ny(n,t),c=o.left+(f&&r.left),d=o.top+(f&&r.top);let{width:h,height:m}=e;return l&&(h-=o.width+r.width,m-=o.height+r.height),{x:Math.round((a-c)/h*t.width/i),y:Math.round((u-d)/m*t.height/i)}}function Fy(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Fa(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=zo(l),a=Bi(r,"border","width"),u=Bi(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Mo(r.maxWidth,l,"clientWidth"),s=Mo(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||ko,maxHeight:s||ko}}const rr=n=>Math.round(n*10)/10;function Ry(n,e,t,i){const s=zo(n),l=Bi(s,"margin"),o=Mo(s.maxWidth,n,"clientWidth")||ko,r=Mo(s.maxHeight,n,"clientHeight")||ko,a=Fy(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=Bi(s,"border","width"),d=Bi(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=rr(Math.min(u,o,a.maxWidth)),f=rr(Math.min(f,r,a.maxHeight)),u&&!f&&(f=rr(u/2)),{width:u,height:f}}function pf(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 Hy=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 hf(n,e){const t=Iy(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Hi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function jy(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 qy(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=Hi(n,s,t),r=Hi(s,l,t),a=Hi(l,e,t),u=Hi(o,r,t),f=Hi(r,a,t);return Hi(u,f,t)}const mf=new Map;function Vy(n,e){e=e||{};const t=n+JSON.stringify(e);let i=mf.get(t);return i||(i=new Intl.NumberFormat(n,e),mf.set(t,i)),i}function Ml(n,e,t){return Vy(e,t).format(n)}const zy=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}}},By=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function ar(n,e,t){return n?zy(e,t):By()}function Uy(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 Wy(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function Yg(n){return n==="angle"?{between:fl,compare:Ov,normalize:on}:{between:cl,compare:(e,t)=>e-t,normalize:e=>e}}function gf({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 Yy(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=Yg(i),a=e.length;let{start:u,end:f,loop:c}=n,d,h;if(c){for(u+=a,f+=a,d=0,h=a;da(s,w,y)&&r(s,w)!==0,M=()=>r(l,y)===0||a(l,w,y),T=()=>b||C(),D=()=>!b||M();for(let A=f,P=f;A<=c;++A)k=e[A%o],!k.skip&&(y=u(k[i]),y!==w&&(b=a(y,s,l),g===null&&T()&&(g=r(y,s)===0?A:P),g!==null&&D()&&(m.push(gf({start:g,end:A,loop:d,count:o,style:h})),g=null),P=A,w=y));return g!==null&&m.push(gf({start:g,end:c,loop:d,count:o,style:h})),m}function Jg(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 Jy(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 Zy(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=Ky(t,s,l,i);if(i===!0)return _f(n,[{start:o,end:r,loop:l}],t,e);const a=rMath.max(Math.min(n,t),e);function Js(n){return hi(Cl(n*2.55),0,255)}function bi(n){return hi(Cl(n*255),0,255)}function ti(n){return hi(Cl(n/2.55)/100,0,1)}function lf(n){return hi(Cl(n*100),0,100)}const pn={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},Ur=[..."0123456789ABCDEF"],Fv=n=>Ur[n&15],Rv=n=>Ur[(n&240)>>4]+Ur[n&15],zl=n=>(n&240)>>4===(n&15),Hv=n=>zl(n.r)&&zl(n.g)&&zl(n.b)&&zl(n.a);function jv(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&pn[n[1]]*17,g:255&pn[n[2]]*17,b:255&pn[n[3]]*17,a:e===5?pn[n[4]]*17:255}:(e===7||e===9)&&(t={r:pn[n[1]]<<4|pn[n[2]],g:pn[n[3]]<<4|pn[n[4]],b:pn[n[5]]<<4|pn[n[6]],a:e===9?pn[n[7]]<<4|pn[n[8]]:255})),t}const qv=(n,e)=>n<255?e(n):"";function Vv(n){var e=Hv(n)?Fv:Rv;return n?"#"+e(n.r)+e(n.g)+e(n.b)+qv(n.a,e):void 0}const zv=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Lg(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 Bv(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 Uv(n,e,t){const i=Lg(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 Wv(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=Wv(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Oa(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(bi)}function Da(n,e,t){return Oa(Lg,n,e,t)}function Yv(n,e,t){return Oa(Uv,n,e,t)}function Kv(n,e,t){return Oa(Bv,n,e,t)}function Ng(n){return(n%360+360)%360}function Jv(n){const e=zv.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Js(+e[5]):bi(+e[5]));const s=Ng(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=Yv(s,l,o):e[1]==="hsv"?i=Kv(s,l,o):i=Da(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function Zv(n,e){var t=Ta(n);t[0]=Ng(t[0]+e),t=Da(t),n.r=t[0],n.g=t[1],n.b=t[2]}function Gv(n){if(!n)return;const e=Ta(n),t=e[0],i=lf(e[1]),s=lf(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${ti(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const of={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"},rf={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 Xv(){const n={},e=Object.keys(rf),t=Object.keys(of);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Bl;function Qv(n){Bl||(Bl=Xv(),Bl.transparent=[0,0,0,0]);const e=Bl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const xv=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function ey(n){const e=xv.exec(n);let t=255,i,s,l;if(!!e){if(e[7]!==i){const o=+e[7];t=e[8]?Js(o):hi(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?Js(i):hi(i,0,255)),s=255&(e[4]?Js(s):hi(s,0,255)),l=255&(e[6]?Js(l):hi(l,0,255)),{r:i,g:s,b:l,a:t}}}function ty(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${ti(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const sr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,us=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function ny(n,e,t){const i=us(ti(n.r)),s=us(ti(n.g)),l=us(ti(n.b));return{r:bi(sr(i+t*(us(ti(e.r))-i))),g:bi(sr(s+t*(us(ti(e.g))-s))),b:bi(sr(l+t*(us(ti(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Ul(n,e,t){if(n){let i=Ta(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Da(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Fg(n,e){return n&&Object.assign(e||{},n)}function af(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=bi(n[3]))):(e=Fg(n,{r:0,g:0,b:0,a:1}),e.a=bi(e.a)),e}function iy(n){return n.charAt(0)==="r"?ey(n):Jv(n)}class wo{constructor(e){if(e instanceof wo)return e;const t=typeof e;let i;t==="object"?i=af(e):t==="string"&&(i=jv(e)||Qv(e)||iy(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Fg(this._rgb);return e&&(e.a=ti(e.a)),e}set rgb(e){this._rgb=af(e)}rgbString(){return this._valid?ty(this._rgb):void 0}hexString(){return this._valid?Vv(this._rgb):void 0}hslString(){return this._valid?Gv(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=ny(this._rgb,e._rgb,t)),this}clone(){return new wo(this.rgb)}alpha(e){return this._rgb.a=bi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Cl(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 Ul(this._rgb,2,e),this}darken(e){return Ul(this._rgb,2,-e),this}saturate(e){return Ul(this._rgb,1,e),this}desaturate(e){return Ul(this._rgb,1,-e),this}rotate(e){return Zv(this._rgb,e),this}}function Rg(n){return new wo(n)}function Hg(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function uf(n){return Hg(n)?n:Rg(n)}function lr(n){return Hg(n)?n:Rg(n).saturate(.5).darken(.1).hexString()}const Ji=Object.create(null),Wr=Object.create(null);function tl(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)=>lr(i.backgroundColor),this.hoverBorderColor=(t,i)=>lr(i.borderColor),this.hoverColor=(t,i)=>lr(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 or(this,e,t)}get(e){return tl(this,e)}describe(e,t){return or(Wr,e,t)}override(e,t){return or(Ji,e,t)}route(e,t,i,s){const l=tl(this,e),o=tl(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 We(a)?Object.assign({},u,a):Ge(a,u)},set(a){this[r]=a}}})}}var Xe=new sy({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function ly(n){return!n||nt(n.size)||nt(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function So(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 oy(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 dl(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,fy(n,l),a=0;a+n||0;function Ia(n,e){const t={},i=We(e),s=i?Object.keys(e):e,l=We(n)?i?o=>Ge(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=my(l(o));return t}function jg(n){return Ia(n,{top:"y",right:"x",bottom:"y",left:"x"})}function gs(n){return Ia(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Sn(n){const e=jg(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function rn(n,e){n=n||{},e=e||Xe.font;let t=Ge(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=Ge(n.style,e.style);i&&!(""+i).match(py)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:Ge(n.family,e.family),lineHeight:hy(Ge(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:Ge(n.weight,e.weight),string:""};return s.string=ly(s),s}function Wl(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 Si(n,e){return Object.assign(Object.create(n),e)}function Pa(n,e=[""],t=n,i,s=()=>n[0]){wn(i)||(i=Bg("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Pa([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 Vg(o,r,()=>$y(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return df(o).includes(r)},ownKeys(o){return df(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Ss(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:qg(n,i),setContext:l=>Ss(n,l,t,i),override:l=>Ss(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 Vg(l,o,()=>by(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 qg(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:yi(t)?t:()=>t,isIndexable:yi(i)?i:()=>i}}const _y=(n,e)=>n?n+$a(e):e,La=(n,e)=>We(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Vg(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function by(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return yi(r)&&o.isScriptable(e)&&(r=vy(e,r,n,t)),ft(r)&&r.length&&(r=yy(e,r,n,o.isIndexable)),La(e,r)&&(r=Ss(r,s,l&&l[e],o)),r}function vy(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),La(n,e)&&(e=Na(s._scopes,s,n,e)),e}function yy(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(We(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Na(u,s,n,f);e.push(Ss(c,l,o&&o[n],r))}}return e}function zg(n,e,t){return yi(n)?n(e,t):n}const ky=(n,e)=>n===!0?e:typeof n=="string"?vi(e,n):void 0;function wy(n,e,t,i,s){for(const l of e){const o=ky(t,l);if(o){n.add(o);const r=zg(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 Na(n,e,t,i){const s=e._rootScopes,l=zg(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=cf(r,o,t,l||t,i);return a===null||wn(l)&&l!==t&&(a=cf(r,o,l,a,i),a===null)?!1:Pa(Array.from(r),[""],s,l,()=>Sy(e,t,i))}function cf(n,e,t,i,s){for(;t;)t=wy(n,e,t,i,s);return t}function Sy(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return ft(s)&&We(t)?t:s}function $y(n,e,t,i){let s;for(const l of e)if(s=Bg(_y(l,n),t),wn(s))return La(n,s)?Na(t,i,n,s):s}function Bg(n,e){for(const t of e){if(!t)continue;const i=t[n];if(wn(i))return i}}function df(n){let e=n._keys;return e||(e=n._keys=Cy(n._scopes)),e}function Cy(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 Ug(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 Ty(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=Br(l,s),a=Br(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 Oy(n,e,t){const i=n.length;let s,l,o,r,a,u=$s(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")Ey(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Py(n,e){return zo(n).getPropertyValue(e)}const Ly=["top","right","bottom","left"];function Bi(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=Ly[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Ny=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Fy(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(Ny(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 Ri(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=zo(t),l=s.boxSizing==="border-box",o=Bi(s,"padding"),r=Bi(s,"border","width"),{x:a,y:u,box:f}=Fy(n,t),c=o.left+(f&&r.left),d=o.top+(f&&r.top);let{width:h,height:m}=e;return l&&(h-=o.width+r.width,m-=o.height+r.height),{x:Math.round((a-c)/h*t.width/i),y:Math.round((u-d)/m*t.height/i)}}function Ry(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Fa(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=zo(l),a=Bi(r,"border","width"),u=Bi(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Mo(r.maxWidth,l,"clientWidth"),s=Mo(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||ko,maxHeight:s||ko}}const rr=n=>Math.round(n*10)/10;function Hy(n,e,t,i){const s=zo(n),l=Bi(s,"margin"),o=Mo(s.maxWidth,n,"clientWidth")||ko,r=Mo(s.maxHeight,n,"clientHeight")||ko,a=Ry(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=Bi(s,"border","width"),d=Bi(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=rr(Math.min(u,o,a.maxWidth)),f=rr(Math.min(f,r,a.maxHeight)),u&&!f&&(f=rr(u/2)),{width:u,height:f}}function pf(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 jy=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 hf(n,e){const t=Py(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Hi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function qy(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 Vy(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=Hi(n,s,t),r=Hi(s,l,t),a=Hi(l,e,t),u=Hi(o,r,t),f=Hi(r,a,t);return Hi(u,f,t)}const mf=new Map;function zy(n,e){e=e||{};const t=n+JSON.stringify(e);let i=mf.get(t);return i||(i=new Intl.NumberFormat(n,e),mf.set(t,i)),i}function Ml(n,e,t){return zy(e,t).format(n)}const By=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}}},Uy=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function ar(n,e,t){return n?By(e,t):Uy()}function Wy(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 Yy(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function Kg(n){return n==="angle"?{between:fl,compare:Dv,normalize:on}:{between:cl,compare:(e,t)=>e-t,normalize:e=>e}}function gf({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 Ky(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=Kg(i),a=e.length;let{start:u,end:f,loop:c}=n,d,h;if(c){for(u+=a,f+=a,d=0,h=a;da(s,$,y)&&r(s,$)!==0,M=()=>r(l,y)===0||a(l,$,y),T=()=>b||C(),D=()=>!b||M();for(let A=f,P=f;A<=c;++A)k=e[A%o],!k.skip&&(y=u(k[i]),y!==$&&(b=a(y,s,l),g===null&&T()&&(g=r(y,s)===0?A:P),g!==null&&D()&&(m.push(gf({start:g,end:A,loop:d,count:o,style:h})),g=null),P=A,$=y));return g!==null&&m.push(gf({start:g,end:c,loop:d,count:o,style:h})),m}function Zg(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 Zy(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 Gy(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=Jy(t,s,l,i);if(i===!0)return _f(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=Dg.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 xn=new Qy;const vf="transparent",xy={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=uf(n||vf),s=i.valid&&uf(e||vf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class e2{constructor(e,t,i,s){const l=t[i];s=Wl([e.to,s,l,e.from]);const o=Wl([e.from,l,s]);this._active=!0,this._fn=e.fn||xy[e.type||typeof o],this._easing=el[e.easing]||el.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=Wl([e.to,t,s,e.from]),this._from=Wl([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"});Xe.set("animations",{colors:{type:"color",properties:n2},numbers:{type:"number",properties:t2}});Xe.describe("animations",{_fallback:"animation"});Xe.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 Zg{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!We(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!We(s))return;const l={};for(const o of i2)l[o]=s[o];(ft(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=l2(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&s2(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 e2(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 xn.add(this._chart,i),!0}}function s2(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function $f(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=u2(l,o,i),c=e.length;let d;for(let h=0;ht[i].axis===e).shift()}function d2(n,e){return Si(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function p2(n,e,t){return Si(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 fr=n=>n==="reset"||n==="none",Cf=(n,e)=>e?n:Object.assign({},n),h2=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:Gg(t,!0),values:null};class Rn{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=wf(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,h,m)=>c==="x"?d:c==="r"?m:h,l=t.xAxisID=Ge(i.xAxisID,ur(e,"x")),o=t.yAxisID=Ge(i.yAxisID,ur(e,"y")),r=t.rAxisID=Ge(i.rAxisID,ur(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&&ef(this._data,this),e._stacked&&js(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(We(t))this._data=a2(t);else if(i!==t){if(i){ef(i,this);const s=this._cachedMeta;js(s),s._parsed=[]}t&&Object.isExtensible(t)&&Iv(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=wf(t.vScale,t),t.stack!==i.stack&&(s=!0,js(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&$f(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{ft(s[e])?d=this.parseArrayData(i,s,e,t):We(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const h=()=>c[r]===null||u&&c[r]b||c=0;--d)if(!m()){this.updateRangeFromParsed(u,e,h,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),b=u.resolveNamedOptions(d,h,m,c);return b.$shared&&(b.$shared=a,l[o]=Object.freeze(Cf(b,a))),b}_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 Zg(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||fr(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){fr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!fr(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 g2(n){const e=n.iScale,t=m2(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 Xg(n,e,t,i){return ft(n)?v2(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Mf(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 k2(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(nt(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;dfl(w,r,a,!0)?1:Math.max(C,C*t,M,M*t),m=(w,C,M)=>fl(w,r,a,!0)?-1:Math.min(C,C*t,M,M*t),b=h(0,u,c),g=h(ht,f,d),y=m(gt,u,c),k=m(gt+ht,f,d);i=(b-y)/2,s=(g-k)/2,l=-(b+y)/2,o=-(g+k)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Tl extends Rn{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(We(i[e])){const{key:a="value"}=this._parsing;l=u=>+vi(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?ot*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Ml(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"};Tl.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 ft(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Bo extends Rn{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}=Ag(t,s,o);this._drawStart=r,this._drawCount=a,Ig(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,h=r.axis,{spanGaps:m,segment:b}=this.options,g=ws(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||l||s==="none";let k=t>0&&this.getParsed(t-1);for(let w=t;w0&&Math.abs(M[d]-k[d])>g,b&&(T.parsed=M,T.raw=u.data[w]),c&&(T.options=f||this.resolveDataElementOptions(w,C.active?"active":s)),y||this.updateElement(C,w,T,s),k=M}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Bo.id="line";Bo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Bo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class ja extends Rn{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=Ml(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return Bg.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*gt;let h=d,m;const b=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?In(this.resolveDataElementOptions(e,t).angle||i):0}}ja.id="polarArea";ja.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};ja.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 Qg extends Tl{}Qg.id="pie";Qg.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class qa extends Rn{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 Bg.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}}li.defaults={};li.defaultRoutes=void 0;const xg={values(n){return ft(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=M2(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),Ml(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?xg.numeric.call(this,n,e,t):""}};function M2(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 Uo={formatters:xg};Xe.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:Uo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});Xe.route("scale.ticks","color","","color");Xe.route("scale.grid","color","","borderColor");Xe.route("scale.grid","borderColor","","borderColor");Xe.route("scale.title","color","","color");Xe.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});Xe.describe("scales",{_fallback:"scale"});Xe.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function T2(n,e){const t=n.options.ticks,i=t.maxTicksLimit||O2(n),s=t.major.enabled?E2(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return A2(e,a,s,l/i),a;const u=D2(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Kl(e,a,u,nt(d)?0:o-d,o),f=0,c=l-1;fs)return a}return Math.max(s,1)}function E2(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Df=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Ef(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function N2(n,e){lt(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:hn(t,hn(i,t)),max:hn(i,hn(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=my(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,h=Rt(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:h/(i-1),c+6>r&&(r=h/(i-(e.offset?.5:1)),a=this.maxHeight-qs(e.grid)-t.padding-Af(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),o=Ca(Math.min(Math.asin(Rt((f.highest.height+6)/r,-1,1)),Math.asin(Rt(a/u,-1,1))-Math.asin(Rt(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=Af(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=qs(l)+a):(e.height=this.maxHeight,e.width=qs(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),h=i.padding*2,m=In(this.labelRotation),b=Math.cos(m),g=Math.sin(m);if(r){const y=i.mirror?0:g*c.width+b*d.height;e.height=Math.min(this.maxHeight,e.height+y+h)}else{const y=i.mirror?0:b*c.width+g*d.height;e.width=Math.min(this.maxWidth,e.width+y+h)}this._calculatePadding(u,f,g,b)}}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,h=0;a?u?(d=s*e.width,h=i*t.height):(d=i*e.height,h=s*t.width):l==="start"?h=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,h=t.width/2),this.paddingLeft=Math.max((d-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((h-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[D]||0,height:o[D]||0});return{first:T(0),last:T(t-1),widest:T(C),highest:T(M),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Dv(this._alignToPixels?Pi(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=qs(l),d=[],h=l.setContext(this.getContext()),m=h.drawBorder?h.borderWidth:0,b=m/2,g=function(K){return Pi(i,K,m)};let y,k,w,C,M,T,D,A,P,L,V,F;if(o==="top")y=g(this.bottom),T=this.bottom-c,A=y-b,L=g(e.top)+b,F=e.bottom;else if(o==="bottom")y=g(this.top),L=e.top,F=g(e.bottom)-b,T=y+b,A=this.top+c;else if(o==="left")y=g(this.right),M=this.right-c,D=y-b,P=g(e.left)+b,V=e.right;else if(o==="right")y=g(this.left),P=e.left,V=g(e.right)-b,M=y+b,D=this.left+c;else if(t==="x"){if(o==="center")y=g((e.top+e.bottom)/2+.5);else if(We(o)){const K=Object.keys(o)[0],X=o[K];y=g(this.chart.scales[K].getPixelForValue(X))}L=e.top,F=e.bottom,T=y+b,A=T+c}else if(t==="y"){if(o==="center")y=g((e.left+e.right)/2);else if(We(o)){const K=Object.keys(o)[0],X=o[K];y=g(this.chart.scales[K].getPixelForValue(X))}M=y-b,D=M-c,P=e.left,V=e.right}const U=Ge(s.ticks.maxTicksLimit,f),G=Math.max(1,Math.ceil(f/U));for(k=0;kl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");Xe.route(l,s,a,r)})}function z2(n){return"id"in n&&"defaults"in n}class B2{constructor(){this.controllers=new Jl(Rn,"datasets",!0),this.elements=new Jl(li,"elements"),this.plugins=new Jl(Object,"plugins"),this.scales=new Jl(Qi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):lt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=$a(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 C=t;C0&&Math.abs(T[h]-w[h])>y,g&&(D.parsed=T,D.raw=u.data[C]),d&&(D.options=c||this.resolveDataElementOptions(C,M.active?"active":s)),k||this.updateElement(M,C,D,s),w=T}this.updateSharedOptions(c,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}Va.id="scatter";Va.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Va.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Li(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kr{constructor(e){this.options=e||{}}init(e){}formats(){return Li()}parse(e,t){return Li()}format(e,t){return Li()}add(e,t,i){return Li()}diff(e,t,i){return Li()}startOf(e,t,i){return Li()}endOf(e,t){return Li()}}Kr.override=function(n){Object.assign(Kr.prototype,n)};var e_={_date:Kr};function U2(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?Ev:qi;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 Ol(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 J2={evaluateInteractionItems:Ol,modes:{index(n,e,t,i){const s=Ri(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?dr(n,s,l,i,o):pr(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=Ri(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?dr(n,s,l,i,o):pr(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 Pf(n,e){return n.filter(t=>t_.indexOf(t.pos)===-1&&t.box.axis===e)}function zs(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 Z2(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=zs(Vs(e,"left"),!0),s=zs(Vs(e,"right")),l=zs(Vs(e,"top"),!0),o=zs(Vs(e,"bottom")),r=Pf(e,"x"),a=Pf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Vs(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Lf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function n_(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 x2(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!We(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&&n_(o,l.getPadding());const r=Math.max(0,e.outerWidth-Lf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Lf(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 ek(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 tk(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 Zs(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof b.beforeLayout=="function"&&b.beforeLayout()});const f=a.reduce((b,g)=>g.box.options&&g.box.options.display===!1?b:b+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);n_(d,Sn(i));const h=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),m=X2(a.concat(u),c);Zs(r.fullSize,h,c,m),Zs(a,h,c,m),Zs(u,h,c,m)&&Zs(a,h,c,m),ek(h),Nf(r.leftAndTop,h,c,m),h.x+=h.w,h.y+=h.h,Nf(r.rightAndBottom,h,c,m),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},lt(r.chartArea,b=>{const g=b.box;Object.assign(g,n.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class i_{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 nk extends i_{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ao="$chartjs",ik={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ff=n=>n===null||n==="";function sk(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[ao]={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",Ff(s)){const l=hf(n,"width");l!==void 0&&(n.width=l)}if(Ff(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=hf(n,"height");l!==void 0&&(n.height=l)}return n}const s_=Hy?{passive:!0}:!1;function lk(n,e,t){n.addEventListener(e,t,s_)}function ok(n,e,t){n.canvas.removeEventListener(e,t,s_)}function rk(n,e){const t=ik[n.type]||n.type,{x:i,y:s}=Ri(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function To(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function ak(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||To(r.addedNodes,i),o=o&&!To(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function uk(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||To(r.removedNodes,i),o=o&&!To(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const pl=new Map;let Rf=0;function l_(){const n=window.devicePixelRatio;n!==Rf&&(Rf=n,pl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function fk(n,e){pl.size||window.addEventListener("resize",l_),pl.set(n,e)}function ck(n){pl.delete(n),pl.size||window.removeEventListener("resize",l_)}function dk(n,e,t){const i=n.canvas,s=i&&Fa(i);if(!s)return;const l=Eg((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),fk(n,l),o}function hr(n,e,t){t&&t.disconnect(),e==="resize"&&ck(n)}function pk(n,e,t){const i=n.canvas,s=Eg(l=>{n.ctx!==null&&t(rk(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return lk(i,e,s),s}class hk extends i_{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(sk(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[ao])return!1;const i=t[ao].initial;["height","width"].forEach(l=>{const o=i[l];nt(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[ao],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:ak,detach:uk,resize:dk}[t]||pk;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:hr,detach:hr,resize:hr}[t]||ok)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Ry(e,t,i,s)}isAttached(e){const t=Fa(e);return!!(t&&t.isConnected)}}function mk(n){return!Wg()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?nk:hk}class gk{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(){nt(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=Ge(i.options&&i.options.plugins,{}),l=_k(i);return s===!1&&!t?[]:vk(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 _k(n){const e={},t=[],i=Object.keys(Vn.plugins.items);for(let l=0;l{const a=i[r];if(!We(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=Zr(r,a),f=wk(u,s),c=t.scales||{};l[u]=l[u]||r,o[r]=Qs(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||Jr(a,e),c=(Ji[a]||{}).scales||{};Object.keys(c).forEach(d=>{const h=kk(d,u),m=r[h+"AxisID"]||l[h]||h;o[m]=o[m]||Object.create(null),Qs(o[m],[{axis:h},i[m],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Qs(a,[Xe.scales[a.type],Xe.scale])}),o}function o_(n){const e=n.options||(n.options={});e.plugins=Ge(e.plugins,{}),e.scales=$k(n,e)}function r_(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Ck(n){return n=n||{},n.data=r_(n.data),o_(n),n}const Hf=new Map,a_=new Set;function Xl(n,e){let t=Hf.get(n);return t||(t=e(),Hf.set(n,t),a_.add(t)),t}const Bs=(n,e,t)=>{const i=vi(e,t);i!==void 0&&n.add(i)};class Mk{constructor(e){this._config=Ck(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=r_(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(),o_(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Xl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Xl(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Xl(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return Xl(`${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=>Bs(a,e,c))),f.forEach(c=>Bs(a,s,c)),f.forEach(c=>Bs(a,Ji[l]||{},c)),f.forEach(c=>Bs(a,Xe,c)),f.forEach(c=>Bs(a,Wr,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),a_.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,Ji[t]||{},Xe.datasets[t]||{},{type:t},Xe,Wr]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=jf(this._resolverCache,e,s);let a=o;if(Ok(o,t)){l.$shared=!1,i=yi(i)?i():i;const u=this.createResolver(e,i,r);a=Ss(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=jf(this._resolverCache,e,i);return We(t)?Ss(l,t,void 0,s):l}}function jf(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:Pa(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const Tk=n=>We(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||yi(n[t]),!1);function Ok(n,e){const{isScriptable:t,isIndexable:i}=jg(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(yi(r)||Tk(r))||o&&ft(r))return!0}return!1}var Dk="3.9.1";const Ek=["top","bottom","left","right","chartArea"];function qf(n,e){return n==="top"||n==="bottom"||Ek.indexOf(n)===-1&&e==="x"}function Vf(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function zf(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),pt(t&&t.onComplete,[n],e)}function Ak(n){const e=n.chart,t=e.options.animation;pt(t&&t.onProgress,[n],e)}function u_(n){return Wg()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Oo={},f_=n=>{const e=u_(n);return Object.values(Oo).filter(t=>t.canvas===e).pop()};function Ik(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 Pk(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Do{constructor(e,t){const i=this.config=new Mk(t),s=u_(e),l=f_(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||mk(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=_v(),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 gk,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Pv(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Oo[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}xn.listen(this,"complete",zf),xn.listen(this,"progress",Ak),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return nt(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():pf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ff(this.canvas,this.ctx),this}stop(){return xn.stop(this),this}resize(e,t){xn.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,pf(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||{};lt(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=Zr(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),lt(l,o=>{const r=o.options,a=r.id,u=Zr(a,r),f=Ge(r.type,o.dtype);(r.position===void 0||qf(r.position,u)!==qf(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=Vn.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),lt(s,(o,r)=>{o||delete i[r]}),lt(i,o=>{Gl.configure(this,o,o.options),Gl.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(Vf("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){lt(this.scales,e=>{Gl.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Gu(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;Ik(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;Gl.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],lt(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&&Ea(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&&Aa(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return dl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=J2.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=Si(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(),xn.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)};lt(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(){lt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},lt(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}});!vo(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=Sv(e),u=Pk(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=!vo(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 Bf=()=>lt(Do.instances,n=>n._plugins.invalidate()),ci=!0;Object.defineProperties(Do,{defaults:{enumerable:ci,value:Xe},instances:{enumerable:ci,value:Oo},overrides:{enumerable:ci,value:Ji},registry:{enumerable:ci,value:Vn},version:{enumerable:ci,value:Dk},getChart:{enumerable:ci,value:f_},register:{enumerable:ci,value:(...n)=>{Vn.add(...n),Bf()}},unregister:{enumerable:ci,value:(...n)=>{Vn.remove(...n),Bf()}}});function c_(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+ht,i-ht),n.closePath(),n.clip()}function Lk(n){return Ia(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Nk(n,e,t,i){const s=Lk(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 Rt(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:Rt(s.innerStart,0,o),innerEnd:Rt(s.innerEnd,0,o)}}function fs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function Gr(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 h=0;const m=s-a;if(i){const K=f>0?f-i:0,X=c>0?c-i:0,Z=(K+X)/2,ie=Z!==0?m*Z/(Z+i):m;h=(m-ie)/2}const b=Math.max(.001,m*c-t/gt)/c,g=(m-b)/2,y=a+g+h,k=s-g-h,{outerStart:w,outerEnd:C,innerStart:M,innerEnd:T}=Nk(e,d,c,k-y),D=c-w,A=c-C,P=y+w/D,L=k-C/A,V=d+M,F=d+T,U=y+M/V,G=k-T/F;if(n.beginPath(),l){if(n.arc(o,r,c,P,L),C>0){const Z=fs(A,L,o,r);n.arc(Z.x,Z.y,C,L,k+ht)}const K=fs(F,k,o,r);if(n.lineTo(K.x,K.y),T>0){const Z=fs(F,G,o,r);n.arc(Z.x,Z.y,T,k+ht,G+Math.PI)}if(n.arc(o,r,d,k-T/d,y+M/d,!0),M>0){const Z=fs(V,U,o,r);n.arc(Z.x,Z.y,M,U+Math.PI,y-ht)}const X=fs(D,y,o,r);if(n.lineTo(X.x,X.y),w>0){const Z=fs(D,P,o,r);n.arc(Z.x,Z.y,w,y-ht,P)}}else{n.moveTo(o,r);const K=Math.cos(P)*c+o,X=Math.sin(P)*c+r;n.lineTo(K,X);const Z=Math.cos(L)*c+o,ie=Math.sin(L)*c+r;n.lineTo(Z,ie)}n.closePath()}function Fk(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){Gr(n,e,t,i,o+ot,s);for(let u=0;u=ot||fl(l,r,a),b=cl(o,u+d,f+d);return m&&b}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>ot?Math.floor(i/ot):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>=gt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=Fk(e,this,r,l,o);Hk(e,this,r,l,a,o),e.restore()}}za.id="arc";za.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};za.defaultRoutes={backgroundColor:"backgroundColor"};function d_(n,e,t=e){n.lineCap=Ge(t.borderCapStyle,e.borderCapStyle),n.setLineDash(Ge(t.borderDash,e.borderDash)),n.lineDashOffset=Ge(t.borderDashOffset,e.borderDashOffset),n.lineJoin=Ge(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=Ge(t.borderWidth,e.borderWidth),n.strokeStyle=Ge(t.borderColor,e.borderColor)}function jk(n,e,t){n.lineTo(t.x,t.y)}function qk(n){return n.stepped?ry:n.tension||n.cubicInterpolationMode==="monotone"?ay:jk}function p_(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-C:C))%l,w=()=>{b!==g&&(n.lineTo(f,g),n.lineTo(f,b),n.lineTo(f,y))};for(a&&(h=s[k(0)],n.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=s[k(d)],h.skip)continue;const C=h.x,M=h.y,T=C|0;T===m?(Mg&&(g=M),f=(c*f+C)/++c):(w(),n.lineTo(C,M),m=T,c=0,b=g=M),y=M}w()}function Xr(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?zk:Vk}function Bk(n){return n.stepped?jy:n.tension||n.cubicInterpolationMode==="monotone"?qy:Hi}function Uk(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),d_(n,e.options),n.stroke(s)}function Wk(n,e,t,i){const{segments:s,options:l}=e,o=Xr(e);for(const r of s)d_(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const Yk=typeof Path2D=="function";function Kk(n,e,t,i){Yk&&!e.options.segment?Uk(n,e,t,i):Wk(n,e,t,i)}class $i extends li{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;Ay(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=Zy(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=Jg(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=Bk(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function Uf(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=Ua(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 Ua(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Wf(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function m_(n,e){let t=[],i=!1;return ft(n)?(i=!0,t=n):t=ew(n,e),t.length?new $i({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function Yf(n){return n&&n.fill!==!1}function tw(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!_t(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function nw(n,e,t){const i=ow(n);if(We(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return _t(s)&&Math.floor(s)===s?iw(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function iw(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function sw(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:We(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function lw(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:We(n)?i=n.value:i=e.getBaseValue(),i}function ow(n){const e=n.options,t=e.fill;let i=Ge(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function rw(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=aw(e,t);r.push(m_({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&&_r(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;Yf(l)&&_r(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!Yf(i)||t.drawTime!=="beforeDatasetDraw"||_r(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const nl={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=Eg.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 xn=new xy;const vf="transparent",e2={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=uf(n||vf),s=i.valid&&uf(e||vf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class t2{constructor(e,t,i,s){const l=t[i];s=Wl([e.to,s,l,e.from]);const o=Wl([e.from,l,s]);this._active=!0,this._fn=e.fn||e2[e.type||typeof o],this._easing=el[e.easing]||el.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=Wl([e.to,t,s,e.from]),this._from=Wl([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"});Xe.set("animations",{colors:{type:"color",properties:i2},numbers:{type:"number",properties:n2}});Xe.describe("animations",{_fallback:"animation"});Xe.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 Gg{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!We(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!We(s))return;const l={};for(const o of s2)l[o]=s[o];(ft(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=o2(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&l2(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 t2(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 xn.add(this._chart,i),!0}}function l2(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function $f(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=f2(l,o,i),c=e.length;let d;for(let h=0;ht[i].axis===e).shift()}function p2(n,e){return Si(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function h2(n,e,t){return Si(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 fr=n=>n==="reset"||n==="none",Cf=(n,e)=>e?n:Object.assign({},n),m2=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:Xg(t,!0),values:null};class Rn{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=wf(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,h,m)=>c==="x"?d:c==="r"?m:h,l=t.xAxisID=Ge(i.xAxisID,ur(e,"x")),o=t.yAxisID=Ge(i.yAxisID,ur(e,"y")),r=t.rAxisID=Ge(i.rAxisID,ur(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&&ef(this._data,this),e._stacked&&js(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(We(t))this._data=u2(t);else if(i!==t){if(i){ef(i,this);const s=this._cachedMeta;js(s),s._parsed=[]}t&&Object.isExtensible(t)&&Pv(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=wf(t.vScale,t),t.stack!==i.stack&&(s=!0,js(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&$f(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{ft(s[e])?d=this.parseArrayData(i,s,e,t):We(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const h=()=>c[r]===null||u&&c[r]b||c=0;--d)if(!m()){this.updateRangeFromParsed(u,e,h,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),b=u.resolveNamedOptions(d,h,m,c);return b.$shared&&(b.$shared=a,l[o]=Object.freeze(Cf(b,a))),b}_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 Gg(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||fr(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){fr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!fr(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 _2(n){const e=n.iScale,t=g2(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 Qg(n,e,t,i){return ft(n)?y2(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Mf(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 w2(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(nt(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;dfl($,r,a,!0)?1:Math.max(C,C*t,M,M*t),m=($,C,M)=>fl($,r,a,!0)?-1:Math.min(C,C*t,M,M*t),b=h(0,u,c),g=h(ht,f,d),y=m(gt,u,c),k=m(gt+ht,f,d);i=(b-y)/2,s=(g-k)/2,l=-(b+y)/2,o=-(g+k)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Tl extends Rn{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(We(i[e])){const{key:a="value"}=this._parsing;l=u=>+vi(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?ot*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Ml(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"};Tl.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 ft(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Bo extends Rn{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}=Ig(t,s,o);this._drawStart=r,this._drawCount=a,Pg(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,h=r.axis,{spanGaps:m,segment:b}=this.options,g=ws(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||l||s==="none";let k=t>0&&this.getParsed(t-1);for(let $=t;$0&&Math.abs(M[d]-k[d])>g,b&&(T.parsed=M,T.raw=u.data[$]),c&&(T.options=f||this.resolveDataElementOptions($,C.active?"active":s)),y||this.updateElement(C,$,T,s),k=M}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Bo.id="line";Bo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Bo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class ja extends Rn{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=Ml(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return Ug.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*gt;let h=d,m;const b=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?In(this.resolveDataElementOptions(e,t).angle||i):0}}ja.id="polarArea";ja.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};ja.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 xg extends Tl{}xg.id="pie";xg.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class qa extends Rn{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 Ug.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}}li.defaults={};li.defaultRoutes=void 0;const e_={values(n){return ft(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=T2(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),Ml(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?e_.numeric.call(this,n,e,t):""}};function T2(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 Uo={formatters:e_};Xe.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:Uo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});Xe.route("scale.ticks","color","","color");Xe.route("scale.grid","color","","borderColor");Xe.route("scale.grid","borderColor","","borderColor");Xe.route("scale.title","color","","color");Xe.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});Xe.describe("scales",{_fallback:"scale"});Xe.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function O2(n,e){const t=n.options.ticks,i=t.maxTicksLimit||D2(n),s=t.major.enabled?A2(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return I2(e,a,s,l/i),a;const u=E2(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Kl(e,a,u,nt(d)?0:o-d,o),f=0,c=l-1;fs)return a}return Math.max(s,1)}function A2(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Df=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Ef(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function F2(n,e){lt(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:hn(t,hn(i,t)),max:hn(i,hn(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=gy(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,h=Rt(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:h/(i-1),c+6>r&&(r=h/(i-(e.offset?.5:1)),a=this.maxHeight-qs(e.grid)-t.padding-Af(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),o=Ca(Math.min(Math.asin(Rt((f.highest.height+6)/r,-1,1)),Math.asin(Rt(a/u,-1,1))-Math.asin(Rt(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=Af(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=qs(l)+a):(e.height=this.maxHeight,e.width=qs(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),h=i.padding*2,m=In(this.labelRotation),b=Math.cos(m),g=Math.sin(m);if(r){const y=i.mirror?0:g*c.width+b*d.height;e.height=Math.min(this.maxHeight,e.height+y+h)}else{const y=i.mirror?0:b*c.width+g*d.height;e.width=Math.min(this.maxWidth,e.width+y+h)}this._calculatePadding(u,f,g,b)}}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,h=0;a?u?(d=s*e.width,h=i*t.height):(d=i*e.height,h=s*t.width):l==="start"?h=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,h=t.width/2),this.paddingLeft=Math.max((d-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((h-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[D]||0,height:o[D]||0});return{first:T(0),last:T(t-1),widest:T(C),highest:T(M),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Ev(this._alignToPixels?Pi(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=qs(l),d=[],h=l.setContext(this.getContext()),m=h.drawBorder?h.borderWidth:0,b=m/2,g=function(K){return Pi(i,K,m)};let y,k,$,C,M,T,D,A,P,L,V,F;if(o==="top")y=g(this.bottom),T=this.bottom-c,A=y-b,L=g(e.top)+b,F=e.bottom;else if(o==="bottom")y=g(this.top),L=e.top,F=g(e.bottom)-b,T=y+b,A=this.top+c;else if(o==="left")y=g(this.right),M=this.right-c,D=y-b,P=g(e.left)+b,V=e.right;else if(o==="right")y=g(this.left),P=e.left,V=g(e.right)-b,M=y+b,D=this.left+c;else if(t==="x"){if(o==="center")y=g((e.top+e.bottom)/2+.5);else if(We(o)){const K=Object.keys(o)[0],X=o[K];y=g(this.chart.scales[K].getPixelForValue(X))}L=e.top,F=e.bottom,T=y+b,A=T+c}else if(t==="y"){if(o==="center")y=g((e.left+e.right)/2);else if(We(o)){const K=Object.keys(o)[0],X=o[K];y=g(this.chart.scales[K].getPixelForValue(X))}M=y-b,D=M-c,P=e.left,V=e.right}const U=Ge(s.ticks.maxTicksLimit,f),G=Math.max(1,Math.ceil(f/U));for(k=0;kl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");Xe.route(l,s,a,r)})}function B2(n){return"id"in n&&"defaults"in n}class U2{constructor(){this.controllers=new Jl(Rn,"datasets",!0),this.elements=new Jl(li,"elements"),this.plugins=new Jl(Object,"plugins"),this.scales=new Jl(Qi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):lt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=$a(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 C=t;C0&&Math.abs(T[h]-$[h])>y,g&&(D.parsed=T,D.raw=u.data[C]),d&&(D.options=c||this.resolveDataElementOptions(C,M.active?"active":s)),k||this.updateElement(M,C,D,s),$=T}this.updateSharedOptions(c,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}Va.id="scatter";Va.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Va.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Li(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kr{constructor(e){this.options=e||{}}init(e){}formats(){return Li()}parse(e,t){return Li()}format(e,t){return Li()}add(e,t,i){return Li()}diff(e,t,i){return Li()}startOf(e,t,i){return Li()}endOf(e,t){return Li()}}Kr.override=function(n){Object.assign(Kr.prototype,n)};var t_={_date:Kr};function W2(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?Av:qi;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 Ol(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 Z2={evaluateInteractionItems:Ol,modes:{index(n,e,t,i){const s=Ri(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?dr(n,s,l,i,o):pr(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=Ri(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?dr(n,s,l,i,o):pr(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 Pf(n,e){return n.filter(t=>n_.indexOf(t.pos)===-1&&t.box.axis===e)}function zs(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 G2(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=zs(Vs(e,"left"),!0),s=zs(Vs(e,"right")),l=zs(Vs(e,"top"),!0),o=zs(Vs(e,"bottom")),r=Pf(e,"x"),a=Pf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Vs(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Lf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function i_(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 ek(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!We(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&&i_(o,l.getPadding());const r=Math.max(0,e.outerWidth-Lf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Lf(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 tk(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 nk(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 Zs(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof b.beforeLayout=="function"&&b.beforeLayout()});const f=a.reduce((b,g)=>g.box.options&&g.box.options.display===!1?b:b+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);i_(d,Sn(i));const h=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),m=Q2(a.concat(u),c);Zs(r.fullSize,h,c,m),Zs(a,h,c,m),Zs(u,h,c,m)&&Zs(a,h,c,m),tk(h),Nf(r.leftAndTop,h,c,m),h.x+=h.w,h.y+=h.h,Nf(r.rightAndBottom,h,c,m),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},lt(r.chartArea,b=>{const g=b.box;Object.assign(g,n.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class s_{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 ik extends s_{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const ao="$chartjs",sk={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ff=n=>n===null||n==="";function lk(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[ao]={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",Ff(s)){const l=hf(n,"width");l!==void 0&&(n.width=l)}if(Ff(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=hf(n,"height");l!==void 0&&(n.height=l)}return n}const l_=jy?{passive:!0}:!1;function ok(n,e,t){n.addEventListener(e,t,l_)}function rk(n,e,t){n.canvas.removeEventListener(e,t,l_)}function ak(n,e){const t=sk[n.type]||n.type,{x:i,y:s}=Ri(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function To(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function uk(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||To(r.addedNodes,i),o=o&&!To(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function fk(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||To(r.removedNodes,i),o=o&&!To(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const pl=new Map;let Rf=0;function o_(){const n=window.devicePixelRatio;n!==Rf&&(Rf=n,pl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function ck(n,e){pl.size||window.addEventListener("resize",o_),pl.set(n,e)}function dk(n){pl.delete(n),pl.size||window.removeEventListener("resize",o_)}function pk(n,e,t){const i=n.canvas,s=i&&Fa(i);if(!s)return;const l=Ag((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),ck(n,l),o}function hr(n,e,t){t&&t.disconnect(),e==="resize"&&dk(n)}function hk(n,e,t){const i=n.canvas,s=Ag(l=>{n.ctx!==null&&t(ak(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return ok(i,e,s),s}class mk extends s_{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(lk(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[ao])return!1;const i=t[ao].initial;["height","width"].forEach(l=>{const o=i[l];nt(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[ao],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:uk,detach:fk,resize:pk}[t]||hk;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:hr,detach:hr,resize:hr}[t]||rk)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Hy(e,t,i,s)}isAttached(e){const t=Fa(e);return!!(t&&t.isConnected)}}function gk(n){return!Yg()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?ik:mk}class _k{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(){nt(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=Ge(i.options&&i.options.plugins,{}),l=bk(i);return s===!1&&!t?[]:yk(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 bk(n){const e={},t=[],i=Object.keys(Vn.plugins.items);for(let l=0;l{const a=i[r];if(!We(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=Zr(r,a),f=Sk(u,s),c=t.scales||{};l[u]=l[u]||r,o[r]=Qs(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||Jr(a,e),c=(Ji[a]||{}).scales||{};Object.keys(c).forEach(d=>{const h=wk(d,u),m=r[h+"AxisID"]||l[h]||h;o[m]=o[m]||Object.create(null),Qs(o[m],[{axis:h},i[m],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];Qs(a,[Xe.scales[a.type],Xe.scale])}),o}function r_(n){const e=n.options||(n.options={});e.plugins=Ge(e.plugins,{}),e.scales=Ck(n,e)}function a_(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Mk(n){return n=n||{},n.data=a_(n.data),r_(n),n}const Hf=new Map,u_=new Set;function Xl(n,e){let t=Hf.get(n);return t||(t=e(),Hf.set(n,t),u_.add(t)),t}const Bs=(n,e,t)=>{const i=vi(e,t);i!==void 0&&n.add(i)};class Tk{constructor(e){this._config=Mk(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=a_(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(),r_(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Xl(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return Xl(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return Xl(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return Xl(`${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=>Bs(a,e,c))),f.forEach(c=>Bs(a,s,c)),f.forEach(c=>Bs(a,Ji[l]||{},c)),f.forEach(c=>Bs(a,Xe,c)),f.forEach(c=>Bs(a,Wr,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),u_.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,Ji[t]||{},Xe.datasets[t]||{},{type:t},Xe,Wr]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=jf(this._resolverCache,e,s);let a=o;if(Dk(o,t)){l.$shared=!1,i=yi(i)?i():i;const u=this.createResolver(e,i,r);a=Ss(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=jf(this._resolverCache,e,i);return We(t)?Ss(l,t,void 0,s):l}}function jf(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:Pa(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const Ok=n=>We(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||yi(n[t]),!1);function Dk(n,e){const{isScriptable:t,isIndexable:i}=qg(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(yi(r)||Ok(r))||o&&ft(r))return!0}return!1}var Ek="3.9.1";const Ak=["top","bottom","left","right","chartArea"];function qf(n,e){return n==="top"||n==="bottom"||Ak.indexOf(n)===-1&&e==="x"}function Vf(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function zf(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),pt(t&&t.onComplete,[n],e)}function Ik(n){const e=n.chart,t=e.options.animation;pt(t&&t.onProgress,[n],e)}function f_(n){return Yg()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Oo={},c_=n=>{const e=f_(n);return Object.values(Oo).filter(t=>t.canvas===e).pop()};function Pk(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 Lk(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Do{constructor(e,t){const i=this.config=new Tk(t),s=f_(e),l=c_(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||gk(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=bv(),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 _k,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Lv(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Oo[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}xn.listen(this,"complete",zf),xn.listen(this,"progress",Ik),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return nt(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():pf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ff(this.canvas,this.ctx),this}stop(){return xn.stop(this),this}resize(e,t){xn.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,pf(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||{};lt(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=Zr(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),lt(l,o=>{const r=o.options,a=r.id,u=Zr(a,r),f=Ge(r.type,o.dtype);(r.position===void 0||qf(r.position,u)!==qf(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=Vn.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),lt(s,(o,r)=>{o||delete i[r]}),lt(i,o=>{Gl.configure(this,o,o.options),Gl.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(Vf("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){lt(this.scales,e=>{Gl.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Gu(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;Pk(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;Gl.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],lt(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&&Ea(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&&Aa(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return dl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=Z2.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=Si(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(),xn.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)};lt(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(){lt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},lt(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}});!vo(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=$v(e),u=Lk(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=!vo(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 Bf=()=>lt(Do.instances,n=>n._plugins.invalidate()),ci=!0;Object.defineProperties(Do,{defaults:{enumerable:ci,value:Xe},instances:{enumerable:ci,value:Oo},overrides:{enumerable:ci,value:Ji},registry:{enumerable:ci,value:Vn},version:{enumerable:ci,value:Ek},getChart:{enumerable:ci,value:c_},register:{enumerable:ci,value:(...n)=>{Vn.add(...n),Bf()}},unregister:{enumerable:ci,value:(...n)=>{Vn.remove(...n),Bf()}}});function d_(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+ht,i-ht),n.closePath(),n.clip()}function Nk(n){return Ia(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Fk(n,e,t,i){const s=Nk(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 Rt(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:Rt(s.innerStart,0,o),innerEnd:Rt(s.innerEnd,0,o)}}function fs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function Gr(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 h=0;const m=s-a;if(i){const K=f>0?f-i:0,X=c>0?c-i:0,Z=(K+X)/2,ie=Z!==0?m*Z/(Z+i):m;h=(m-ie)/2}const b=Math.max(.001,m*c-t/gt)/c,g=(m-b)/2,y=a+g+h,k=s-g-h,{outerStart:$,outerEnd:C,innerStart:M,innerEnd:T}=Fk(e,d,c,k-y),D=c-$,A=c-C,P=y+$/D,L=k-C/A,V=d+M,F=d+T,U=y+M/V,G=k-T/F;if(n.beginPath(),l){if(n.arc(o,r,c,P,L),C>0){const Z=fs(A,L,o,r);n.arc(Z.x,Z.y,C,L,k+ht)}const K=fs(F,k,o,r);if(n.lineTo(K.x,K.y),T>0){const Z=fs(F,G,o,r);n.arc(Z.x,Z.y,T,k+ht,G+Math.PI)}if(n.arc(o,r,d,k-T/d,y+M/d,!0),M>0){const Z=fs(V,U,o,r);n.arc(Z.x,Z.y,M,U+Math.PI,y-ht)}const X=fs(D,y,o,r);if(n.lineTo(X.x,X.y),$>0){const Z=fs(D,P,o,r);n.arc(Z.x,Z.y,$,y-ht,P)}}else{n.moveTo(o,r);const K=Math.cos(P)*c+o,X=Math.sin(P)*c+r;n.lineTo(K,X);const Z=Math.cos(L)*c+o,ie=Math.sin(L)*c+r;n.lineTo(Z,ie)}n.closePath()}function Rk(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){Gr(n,e,t,i,o+ot,s);for(let u=0;u=ot||fl(l,r,a),b=cl(o,u+d,f+d);return m&&b}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>ot?Math.floor(i/ot):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>=gt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=Rk(e,this,r,l,o);jk(e,this,r,l,a,o),e.restore()}}za.id="arc";za.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};za.defaultRoutes={backgroundColor:"backgroundColor"};function p_(n,e,t=e){n.lineCap=Ge(t.borderCapStyle,e.borderCapStyle),n.setLineDash(Ge(t.borderDash,e.borderDash)),n.lineDashOffset=Ge(t.borderDashOffset,e.borderDashOffset),n.lineJoin=Ge(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=Ge(t.borderWidth,e.borderWidth),n.strokeStyle=Ge(t.borderColor,e.borderColor)}function qk(n,e,t){n.lineTo(t.x,t.y)}function Vk(n){return n.stepped?ay:n.tension||n.cubicInterpolationMode==="monotone"?uy:qk}function h_(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-C:C))%l,$=()=>{b!==g&&(n.lineTo(f,g),n.lineTo(f,b),n.lineTo(f,y))};for(a&&(h=s[k(0)],n.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=s[k(d)],h.skip)continue;const C=h.x,M=h.y,T=C|0;T===m?(Mg&&(g=M),f=(c*f+C)/++c):($(),n.lineTo(C,M),m=T,c=0,b=g=M),y=M}$()}function Xr(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?Bk:zk}function Uk(n){return n.stepped?qy:n.tension||n.cubicInterpolationMode==="monotone"?Vy:Hi}function Wk(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),p_(n,e.options),n.stroke(s)}function Yk(n,e,t,i){const{segments:s,options:l}=e,o=Xr(e);for(const r of s)p_(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const Kk=typeof Path2D=="function";function Jk(n,e,t,i){Kk&&!e.options.segment?Wk(n,e,t,i):Yk(n,e,t,i)}class $i extends li{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;Iy(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=Gy(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=Zg(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=Uk(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function Uf(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=Ua(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 Ua(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Wf(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function g_(n,e){let t=[],i=!1;return ft(n)?(i=!0,t=n):t=tw(n,e),t.length?new $i({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function Yf(n){return n&&n.fill!==!1}function nw(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!_t(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function iw(n,e,t){const i=rw(n);if(We(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return _t(s)&&Math.floor(s)===s?sw(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function sw(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function lw(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:We(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function ow(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:We(n)?i=n.value:i=e.getBaseValue(),i}function rw(n){const e=n.options,t=e.fill;let i=Ge(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function aw(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=uw(e,t);r.push(g_({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&&_r(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;Yf(l)&&_r(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!Yf(i)||t.drawTime!=="beforeDatasetDraw"||_r(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const nl={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 vw(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function Gf(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=rn(e.bodyFont),u=rn(e.titleFont),f=rn(e.footerFont),c=l.length,d=s.length,h=i.length,m=Sn(e.padding);let b=m.height,g=0,y=i.reduce((C,M)=>C+M.before.length+M.lines.length+M.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(b+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;b+=h*C+(y-h)*a.lineHeight+(y-1)*e.bodySpacing}d&&(b+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let k=0;const w=function(C){g=Math.max(g,t.measureText(C).width+k)};return t.save(),t.font=u.string,lt(n.title,w),t.font=a.string,lt(n.beforeBody.concat(n.afterBody),w),k=e.displayColors?o+2+e.boxPadding:0,lt(i,C=>{lt(C.before,w),lt(C.lines,w),lt(C.after,w)}),k=0,t.font=f.string,lt(n.footer,w),t.restore(),g+=m.width,{width:g,height:b}}function yw(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function kw(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 ww(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"),kw(u,n,e,t)&&(u="center"),u}function Xf(n,e,t){const i=t.yAlign||e.yAlign||yw(n,t);return{xAlign:t.xAlign||e.xAlign||ww(n,e,t,i),yAlign:i}}function Sw(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function $w(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function Qf(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=gs(o);let m=Sw(e,r);const b=$w(e,a,u);return a==="center"?r==="left"?m+=u:r==="right"&&(m-=u):r==="left"?m-=Math.max(f,d)+s:r==="right"&&(m+=Math.max(c,h)+s),{x:Rt(m,0,i.width-e.width),y:Rt(b,0,i.height-e.height)}}function Ql(n,e,t){const i=Sn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function xf(n){return jn([],ei(n))}function Cw(n,e,t){return Si(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function ec(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class xr extends li{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 Zg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=Cw(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=jn(r,ei(s)),r=jn(r,ei(l)),r=jn(r,ei(o)),r}getBeforeBody(e,t){return xf(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return lt(e,l=>{const o={before:[],lines:[],after:[]},r=ec(i,l);jn(o.before,ei(r.beforeLabel.call(this,l))),jn(o.lines,r.label.call(this,l)),jn(o.after,ei(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return xf(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=jn(r,ei(s)),r=jn(r,ei(l)),r=jn(r,ei(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))),lt(r,f=>{const c=ec(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=nl[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=Gf(this,i),u=Object.assign({},r,a),f=Xf(this.chart,i,u),c=Qf(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}=gs(r),{x:d,y:h}=e,{width:m,height:b}=t;let g,y,k,w,C,M;return l==="center"?(C=h+b/2,s==="left"?(g=d,y=g-o,w=C+o,M=C-o):(g=d+m,y=g+o,w=C-o,M=C+o),k=g):(s==="left"?y=d+Math.max(a,f)+o:s==="right"?y=d+m-Math.max(u,c)-o:y=this.caretX,l==="top"?(w=h,C=w-o,g=y-o,k=y+o):(w=h+b,C=w+o,g=y+o,k=y-o),M=w),{x1:g,x2:y,x3:k,y1:w,y2:C,y3:M}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=ar(i.rtl,this.x,this.width);for(e.x=Ql(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=rn(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;aw!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Co(e,{x:g,y:b,w:u,h:a,radius:k}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Co(e,{x:y,y:b+1,w:u-2,h:a-2,radius:k}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(g,b,u,a),e.strokeRect(g,b,u,a),e.fillStyle=o.backgroundColor,e.fillRect(y,b+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=rn(i.bodyFont);let d=c.lineHeight,h=0;const m=ar(i.rtl,this.x,this.width),b=function(A){t.fillText(A,m.x(e.x+h),e.y+d/2),e.y+=d+l},g=m.textAlign(o);let y,k,w,C,M,T,D;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=Ql(this,g,i),t.fillStyle=i.bodyColor,lt(this.beforeBody,b),h=r&&g!=="right"?o==="center"?u/2+f:u+2+f:0,C=0,T=s.length;C0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=nl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=Gf(this,e),a=Object.assign({},o,this._size),u=Xf(t,e,a),f=Qf(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=Sn(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),Uy(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),Wy(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=!vo(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||!vo(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=nl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}xr.positioners=nl;var Mw={id:"tooltip",_element:xr,positioners:nl,afterInit(n,e,t){t&&(n.tooltip=new xr({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:Qn,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 Tw=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function Ow(n,e,t,i){const s=n.indexOf(e);if(s===-1)return Tw(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const Dw=(n,e)=>n===null?null:Rt(Math.round(n),0,e);class ea extends Qi{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(nt(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:Ow(i,e,Ge(t,e),this._addedLabels),Dw(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}}ea.id="category";ea.defaults={ticks:{callback:ea.prototype.getLabelForValue}};function Ew(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,h=l||1,m=f-1,{min:b,max:g}=e,y=!nt(o),k=!nt(r),w=!nt(u),C=(g-b)/(c+1);let M=Qu((g-b)/m/h)*h,T,D,A,P;if(M<1e-14&&!y&&!k)return[{value:b},{value:g}];P=Math.ceil(g/M)-Math.floor(b/M),P>m&&(M=Qu(P*M/m/h)*h),nt(a)||(T=Math.pow(10,a),M=Math.ceil(M*T)/T),s==="ticks"?(D=Math.floor(b/M)*M,A=Math.ceil(g/M)*M):(D=b,A=g),y&&k&&l&&Tv((r-o)/l,M/1e3)?(P=Math.round(Math.min((r-o)/M,f)),M=(r-o)/P,D=o,A=r):w?(D=y?o:D,A=k?r:A,P=u-1,M=(A-D)/P):(P=(A-D)/M,xs(P,Math.round(P),M/1e3)?P=Math.round(P):P=Math.ceil(P));const L=Math.max(xu(M),xu(D));T=Math.pow(10,nt(a)?L:a),D=Math.round(D*T)/T,A=Math.round(A*T)/T;let V=0;for(y&&(d&&D!==o?(t.push({value:o}),Ds=t?s:a,r=a=>l=i?l:a;if(e){const a=zn(s),u=zn(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=Ew(s,l);return e.bounds==="ticks"&&Cg(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 Ml(e,this.chart.options.locale,this.options.ticks.format)}}class Wa extends Eo{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=_t(e)?e:0,this.max=_t(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=In(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}}Wa.id="linear";Wa.defaults={ticks:{callback:Uo.formatters.numeric}};function nc(n){return n/Math.pow(10,Math.floor(bn(n)))===1}function Aw(n,e){const t=Math.floor(bn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=hn(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:nc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=_t(e)?Math.max(0,e):null,this.max=_t(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(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=Aw(t,this);return e.bounds==="ticks"&&Cg(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":Ml(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)}}__.id="logarithmic";__.defaults={ticks:{callback:Uo.formatters.logarithmic,major:{enabled:!0}}};function ta(n){const e=n.ticks;if(e.display&&n.display){const t=Sn(e.backdropPadding);return Ge(e.font&&e.font.size,Xe.font.size)+t.height}return 0}function Iw(n,e,t){return t=ft(t)?t:[t],{w:ly(n,e.string,t),h:t.length*e.lineHeight}}function ic(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 Pw(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?gt/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 Nw(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ta(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?gt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function jw(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=rn(l.font),{x:r,y:a,textAlign:u,left:f,top:c,right:d,bottom:h}=n._pointLabelItems[s],{backdropColor:m}=l;if(!nt(m)){const b=gs(l.borderRadius),g=Sn(l.backdropPadding);t.fillStyle=m;const y=f-g.left,k=c-g.top,w=d-f+g.width,C=h-c+g.height;Object.values(b).some(M=>M!==0)?(t.beginPath(),Co(t,{x:y,y:k,w,h:C,radius:b}),t.fill()):t.fillRect(y,k,w,C)}$o(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function b_(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,ot);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?Pw(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=ot/(this._pointLabels.length||1),i=this.options.startAngle||0;return on(e*t+In(i))}getDistanceFromCenterForValue(e){if(nt(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(nt(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));qw(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=rn(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=Sn(u.backdropPadding);e.fillRect(-o/2-c.left,-l-f.size/2-c.top,o+c.width,f.size+c.height)}$o(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Yo.id="radialLinear";Yo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Uo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Yo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Yo.descriptors={angleLines:{_fallback:"grid"}};const Ko={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}},Xt=Object.keys(Ko);function zw(n,e){return n-e}function sc(n,e){if(nt(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),_t(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(ws(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function lc(n,e,t,i){const s=Xt.length;for(let l=Xt.indexOf(n);l=Xt.indexOf(t);l--){const o=Xt[l];if(Ko[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return Xt[t?Xt.indexOf(t):0]}function Uw(n){for(let e=Xt.indexOf(n)+1,t=Xt.length;e=e?t[i]:t[s];n[l]=!0}}function Ww(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 rc(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=Rt(t,0,o),i=Rt(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||lc(l.minUnit,t,i,this._getLabelCapacity(t)),r=Ge(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=ws(a)||a===!0,f={};let c=t,d,h;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 m=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,h=0;db-g).map(b=>+b)}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,h=this._adapter.format(e,s||(d?f:u)),m=l.ticks.callback;return m?pt(m,[h,t,i],this):h}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}=qi(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}=qi(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 v_ extends Dl{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=xl(t,this.min),this._tableRange=xl(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;oC+M.before.length+M.lines.length+M.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(b+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;b+=h*C+(y-h)*a.lineHeight+(y-1)*e.bodySpacing}d&&(b+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let k=0;const $=function(C){g=Math.max(g,t.measureText(C).width+k)};return t.save(),t.font=u.string,lt(n.title,$),t.font=a.string,lt(n.beforeBody.concat(n.afterBody),$),k=e.displayColors?o+2+e.boxPadding:0,lt(i,C=>{lt(C.before,$),lt(C.lines,$),lt(C.after,$)}),k=0,t.font=f.string,lt(n.footer,$),t.restore(),g+=m.width,{width:g,height:b}}function kw(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function ww(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 Sw(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"),ww(u,n,e,t)&&(u="center"),u}function Xf(n,e,t){const i=t.yAlign||e.yAlign||kw(n,t);return{xAlign:t.xAlign||e.xAlign||Sw(n,e,t,i),yAlign:i}}function $w(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function Cw(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function Qf(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=gs(o);let m=$w(e,r);const b=Cw(e,a,u);return a==="center"?r==="left"?m+=u:r==="right"&&(m-=u):r==="left"?m-=Math.max(f,d)+s:r==="right"&&(m+=Math.max(c,h)+s),{x:Rt(m,0,i.width-e.width),y:Rt(b,0,i.height-e.height)}}function Ql(n,e,t){const i=Sn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function xf(n){return jn([],ei(n))}function Mw(n,e,t){return Si(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function ec(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class xr extends li{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 Gg(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=Mw(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=jn(r,ei(s)),r=jn(r,ei(l)),r=jn(r,ei(o)),r}getBeforeBody(e,t){return xf(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return lt(e,l=>{const o={before:[],lines:[],after:[]},r=ec(i,l);jn(o.before,ei(r.beforeLabel.call(this,l))),jn(o.lines,r.label.call(this,l)),jn(o.after,ei(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return xf(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=jn(r,ei(s)),r=jn(r,ei(l)),r=jn(r,ei(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))),lt(r,f=>{const c=ec(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=nl[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=Gf(this,i),u=Object.assign({},r,a),f=Xf(this.chart,i,u),c=Qf(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}=gs(r),{x:d,y:h}=e,{width:m,height:b}=t;let g,y,k,$,C,M;return l==="center"?(C=h+b/2,s==="left"?(g=d,y=g-o,$=C+o,M=C-o):(g=d+m,y=g+o,$=C-o,M=C+o),k=g):(s==="left"?y=d+Math.max(a,f)+o:s==="right"?y=d+m-Math.max(u,c)-o:y=this.caretX,l==="top"?($=h,C=$-o,g=y-o,k=y+o):($=h+b,C=$+o,g=y+o,k=y-o),M=$),{x1:g,x2:y,x3:k,y1:$,y2:C,y3:M}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=ar(i.rtl,this.x,this.width);for(e.x=Ql(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=rn(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;a$!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Co(e,{x:g,y:b,w:u,h:a,radius:k}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Co(e,{x:y,y:b+1,w:u-2,h:a-2,radius:k}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(g,b,u,a),e.strokeRect(g,b,u,a),e.fillStyle=o.backgroundColor,e.fillRect(y,b+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=rn(i.bodyFont);let d=c.lineHeight,h=0;const m=ar(i.rtl,this.x,this.width),b=function(A){t.fillText(A,m.x(e.x+h),e.y+d/2),e.y+=d+l},g=m.textAlign(o);let y,k,$,C,M,T,D;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=Ql(this,g,i),t.fillStyle=i.bodyColor,lt(this.beforeBody,b),h=r&&g!=="right"?o==="center"?u/2+f:u+2+f:0,C=0,T=s.length;C0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=nl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=Gf(this,e),a=Object.assign({},o,this._size),u=Xf(t,e,a),f=Qf(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=Sn(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),Wy(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),Yy(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=!vo(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||!vo(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=nl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}xr.positioners=nl;var Tw={id:"tooltip",_element:xr,positioners:nl,afterInit(n,e,t){t&&(n.tooltip=new xr({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:Qn,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 Ow=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function Dw(n,e,t,i){const s=n.indexOf(e);if(s===-1)return Ow(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const Ew=(n,e)=>n===null?null:Rt(Math.round(n),0,e);class ea extends Qi{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(nt(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:Dw(i,e,Ge(t,e),this._addedLabels),Ew(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}}ea.id="category";ea.defaults={ticks:{callback:ea.prototype.getLabelForValue}};function Aw(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,h=l||1,m=f-1,{min:b,max:g}=e,y=!nt(o),k=!nt(r),$=!nt(u),C=(g-b)/(c+1);let M=Qu((g-b)/m/h)*h,T,D,A,P;if(M<1e-14&&!y&&!k)return[{value:b},{value:g}];P=Math.ceil(g/M)-Math.floor(b/M),P>m&&(M=Qu(P*M/m/h)*h),nt(a)||(T=Math.pow(10,a),M=Math.ceil(M*T)/T),s==="ticks"?(D=Math.floor(b/M)*M,A=Math.ceil(g/M)*M):(D=b,A=g),y&&k&&l&&Ov((r-o)/l,M/1e3)?(P=Math.round(Math.min((r-o)/M,f)),M=(r-o)/P,D=o,A=r):$?(D=y?o:D,A=k?r:A,P=u-1,M=(A-D)/P):(P=(A-D)/M,xs(P,Math.round(P),M/1e3)?P=Math.round(P):P=Math.ceil(P));const L=Math.max(xu(M),xu(D));T=Math.pow(10,nt(a)?L:a),D=Math.round(D*T)/T,A=Math.round(A*T)/T;let V=0;for(y&&(d&&D!==o?(t.push({value:o}),Ds=t?s:a,r=a=>l=i?l:a;if(e){const a=zn(s),u=zn(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=Aw(s,l);return e.bounds==="ticks"&&Mg(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 Ml(e,this.chart.options.locale,this.options.ticks.format)}}class Wa extends Eo{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=_t(e)?e:0,this.max=_t(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=In(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}}Wa.id="linear";Wa.defaults={ticks:{callback:Uo.formatters.numeric}};function nc(n){return n/Math.pow(10,Math.floor(bn(n)))===1}function Iw(n,e){const t=Math.floor(bn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=hn(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:nc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=_t(e)?Math.max(0,e):null,this.max=_t(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(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=Iw(t,this);return e.bounds==="ticks"&&Mg(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":Ml(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)}}b_.id="logarithmic";b_.defaults={ticks:{callback:Uo.formatters.logarithmic,major:{enabled:!0}}};function ta(n){const e=n.ticks;if(e.display&&n.display){const t=Sn(e.backdropPadding);return Ge(e.font&&e.font.size,Xe.font.size)+t.height}return 0}function Pw(n,e,t){return t=ft(t)?t:[t],{w:oy(n,e.string,t),h:t.length*e.lineHeight}}function ic(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 Lw(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?gt/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 Fw(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ta(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?gt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function qw(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=rn(l.font),{x:r,y:a,textAlign:u,left:f,top:c,right:d,bottom:h}=n._pointLabelItems[s],{backdropColor:m}=l;if(!nt(m)){const b=gs(l.borderRadius),g=Sn(l.backdropPadding);t.fillStyle=m;const y=f-g.left,k=c-g.top,$=d-f+g.width,C=h-c+g.height;Object.values(b).some(M=>M!==0)?(t.beginPath(),Co(t,{x:y,y:k,w:$,h:C,radius:b}),t.fill()):t.fillRect(y,k,$,C)}$o(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function v_(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,ot);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?Lw(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=ot/(this._pointLabels.length||1),i=this.options.startAngle||0;return on(e*t+In(i))}getDistanceFromCenterForValue(e){if(nt(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(nt(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));Vw(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=rn(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=Sn(u.backdropPadding);e.fillRect(-o/2-c.left,-l-f.size/2-c.top,o+c.width,f.size+c.height)}$o(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Yo.id="radialLinear";Yo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Uo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Yo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Yo.descriptors={angleLines:{_fallback:"grid"}};const Ko={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}},Xt=Object.keys(Ko);function Bw(n,e){return n-e}function sc(n,e){if(nt(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),_t(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(ws(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function lc(n,e,t,i){const s=Xt.length;for(let l=Xt.indexOf(n);l=Xt.indexOf(t);l--){const o=Xt[l];if(Ko[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return Xt[t?Xt.indexOf(t):0]}function Ww(n){for(let e=Xt.indexOf(n)+1,t=Xt.length;e=e?t[i]:t[s];n[l]=!0}}function Yw(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 rc(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=Rt(t,0,o),i=Rt(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||lc(l.minUnit,t,i,this._getLabelCapacity(t)),r=Ge(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=ws(a)||a===!0,f={};let c=t,d,h;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 m=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,h=0;db-g).map(b=>+b)}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,h=this._adapter.format(e,s||(d?f:u)),m=l.ticks.callback;return m?pt(m,[h,t,i],this):h}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}=qi(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}=qi(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 y_ extends Dl{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=xl(t,this.min),this._tableRange=xl(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o{t||(t=je(e,$t,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,$t,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&S(e),s&&t&&t.end()}}}function Kw(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=z(n[1]),t=O(),s=z(i)},m(l,o){$(l,e,o),$(l,t,o),$(l,s,o)},p(l,o){o&2&&ue(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&ue(s,i)},d(l){l&&S(e),l&&S(t),l&&S(s)}}}function Jw(n){let e;return{c(){e=z("Loading...")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function Zw(n){let e,t,i,s,l,o=n[2]&&ac();function r(f,c){return f[2]?Jw:Kw}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=O(),i=v("canvas"),s=O(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Qa(i,"height","250px"),Qa(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),ee(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){$(f,e,c),o&&o.m(e,null),_(e,t),_(e,i),n[8](i),$(f,s,c),$(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&E(o,1):(o=ac(),o.c(),E(o,1),o.m(e,t)):o&&(be(),I(o,1,1,()=>{o=null}),ve()),c&4&&ee(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){E(o)},o(f){I(o)},d(f){f&&S(e),o&&o.d(),n[8](null),f&&S(s),f&&S(l),u.d()}}}function Gw(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),me.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let m of h)r.push({x:new Date(m.date),y:m.total}),t(1,a+=m.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(c(),console.warn(h),me.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}un(()=>(Do.register($i,Wo,Bo,Wa,Dl,bw,Mw),t(6,o=new Do(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(h){le[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class Xw extends Ce{constructor(e){super(),$e(this,e,Gw,Zw,ke,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},y_={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + */const Kw={datetime:He.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:He.TIME_WITH_SECONDS,minute:He.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};t_._date.override({_id:"luxon",_create:function(n){return He.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return Kw},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=He.fromFormat(n,e,t):n=He.fromISO(n,t):n instanceof Date?n=He.fromJSDate(n,t):i==="object"&&!(n instanceof He)&&(n=He.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 ac(n){let e,t,i;return{c(){e=v("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{t||(t=je(e,$t,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,$t,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function Jw(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=z(n[1]),t=O(),s=z(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&ue(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&ue(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function Zw(n){let e;return{c(){e=z("Loading...")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function Gw(n){let e,t,i,s,l,o=n[2]&&ac();function r(f,c){return f[2]?Zw:Jw}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=O(),i=v("canvas"),s=O(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Qa(i,"height","250px"),Qa(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),ee(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){S(f,e,c),o&&o.m(e,null),_(e,t),_(e,i),n[8](i),S(f,s,c),S(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&E(o,1):(o=ac(),o.c(),E(o,1),o.m(e,t)):o&&(be(),I(o,1,1,()=>{o=null}),ve()),c&4&&ee(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){E(o)},o(f){I(o)},d(f){f&&w(e),o&&o.d(),n[8](null),f&&w(s),f&&w(l),u.d()}}}function Xw(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),me.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let m of h)r.push({x:new Date(m.date),y:m.total}),t(1,a+=m.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(c(),console.warn(h),me.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}un(()=>(Do.register($i,Wo,Bo,Wa,Dl,vw,Tw),t(6,o=new Do(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(h){le[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class Qw extends Ce{constructor(e){super(),$e(this,e,Xw,Gw,ke,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},k_={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 k(w){return w instanceof a?new a(w.type,k(w.content),w.alias):Array.isArray(w)?w.map(k):w.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var k=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(k){var w=document.getElementsByTagName("script");for(var C in w)if(w[C].src==k)return w[C]}return null}},isActive:function(k,w,C){for(var M="no-"+w;k;){var T=k.classList;if(T.contains(w))return!0;if(T.contains(M))return!1;k=k.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(k,w){var C=r.util.clone(r.languages[k]);for(var M in w)C[M]=w[M];return C},insertBefore:function(k,w,C,M){M=M||r.languages;var T=M[k],D={};for(var A in T)if(T.hasOwnProperty(A)){if(A==w)for(var P in C)C.hasOwnProperty(P)&&(D[P]=C[P]);C.hasOwnProperty(A)||(D[A]=T[A])}var L=M[k];return M[k]=D,r.languages.DFS(r.languages,function(V,F){F===L&&V!=k&&(this[V]=D)}),D},DFS:function k(w,C,M,T){T=T||{};var D=r.util.objId;for(var A in w)if(w.hasOwnProperty(A)){C.call(w,A,w[A],M||A);var P=w[A],L=r.util.type(P);L==="Object"&&!T[D(P)]?(T[D(P)]=!0,k(P,C,null,T)):L==="Array"&&!T[D(P)]&&(T[D(P)]=!0,k(P,C,A,T))}}},plugins:{},highlightAll:function(k,w){r.highlightAllUnder(document,k,w)},highlightAllUnder:function(k,w,C){var M={callback:C,container:k,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),r.hooks.run("before-all-elements-highlight",M);for(var T=0,D;D=M.elements[T++];)r.highlightElement(D,w===!0,M.callback)},highlightElement:function(k,w,C){var M=r.util.getLanguage(k),T=r.languages[M];r.util.setLanguage(k,M);var D=k.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(D,M);var A=k.textContent,P={element:k,language:M,grammar:T,code:A};function L(F){P.highlightedCode=F,r.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,r.hooks.run("after-highlight",P),r.hooks.run("complete",P),C&&C.call(P.element)}if(r.hooks.run("before-sanity-check",P),D=P.element.parentElement,D&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!P.code){r.hooks.run("complete",P),C&&C.call(P.element);return}if(r.hooks.run("before-highlight",P),!P.grammar){L(r.util.encode(P.code));return}if(w&&i.Worker){var V=new Worker(r.filename);V.onmessage=function(F){L(F.data)},V.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else L(r.highlight(P.code,P.grammar,P.language))},highlight:function(k,w,C){var M={code:k,grammar:w,language:C};if(r.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=r.tokenize(M.code,M.grammar),r.hooks.run("after-tokenize",M),a.stringify(r.util.encode(M.tokens),M.language)},tokenize:function(k,w){var C=w.rest;if(C){for(var M in C)w[M]=C[M];delete w.rest}var T=new c;return d(T,T.head,k),f(k,T,w,T.head,0),m(T)},hooks:{all:{},add:function(k,w){var C=r.hooks.all;C[k]=C[k]||[],C[k].push(w)},run:function(k,w){var C=r.hooks.all[k];if(!(!C||!C.length))for(var M=0,T;T=C[M++];)T(w)}},Token:a};i.Prism=r;function a(k,w,C,M){this.type=k,this.content=w,this.alias=C,this.length=(M||"").length|0}a.stringify=function k(w,C){if(typeof w=="string")return w;if(Array.isArray(w)){var M="";return w.forEach(function(L){M+=k(L,C)}),M}var T={type:w.type,content:k(w.content,C),tag:"span",classes:["token",w.type],attributes:{},language:C},D=w.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(T.classes,D):T.classes.push(D)),r.hooks.run("wrap",T);var A="";for(var P in T.attributes)A+=" "+P+'="'+(T.attributes[P]||"").replace(/"/g,""")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+A+">"+T.content+""};function u(k,w,C,M){k.lastIndex=w;var T=k.exec(C);if(T&&M&&T[1]){var D=T[1].length;T.index+=D,T[0]=T[0].slice(D)}return T}function f(k,w,C,M,T,D){for(var A in C)if(!(!C.hasOwnProperty(A)||!C[A])){var P=C[A];P=Array.isArray(P)?P:[P];for(var L=0;L=D.reach);J+=ie.value.length,ie=ie.next){var fe=ie.value;if(w.length>k.length)return;if(!(fe instanceof a)){var Y=1,re;if(G){if(re=u(Z,J,k,U),!re||re.index>=k.length)break;var he=re.index,Oe=re.index+re[0].length,ge=J;for(ge+=ie.value.length;he>=ge;)ie=ie.next,ge+=ie.value.length;if(ge-=ie.value.length,J=ge,ie.value instanceof a)continue;for(var ae=ie;ae!==w.tail&&(geD.reach&&(D.reach=Ue);var ce=ie.prev;Se&&(ce=d(w,ce,Se),J+=Se.length),h(w,ce,Y);var se=new a(A,F?r.tokenize(de,F):de,K,de);if(ie=d(w,ce,se),we&&d(w,ie,we),Y>1){var te={cause:A+","+L,reach:Ue};f(k,w,C,ie.prev,J,te),D&&te.reach>D.reach&&(D.reach=te.reach)}}}}}}function c(){var k={value:null,prev:null,next:null},w={value:null,prev:k,next:null};k.next=w,this.head=k,this.tail=w,this.length=0}function d(k,w,C){var M=w.next,T={value:C,prev:w,next:M};return w.next=T,M.prev=T,k.length++,T}function h(k,w,C){for(var M=w.next,T=0;T/,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\u2026",s=function(b,g){return"\u2716 Error "+b+" while fetching file: "+g},l="\u2716 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(b,g,y){var k=new XMLHttpRequest;k.open("GET",b,!0),k.onreadystatechange=function(){k.readyState==4&&(k.status<400&&k.responseText?g(k.responseText):k.status>=400?y(s(k.status,k.statusText)):y(l))},k.send(null)}function h(b){var g=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(b||"");if(g){var y=Number(g[1]),k=g[2],w=g[3];return k?w?[y,Number(w)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(b){b.selector+=", "+c}),t.hooks.add("before-sanity-check",function(b){var g=b.element;if(g.matches(c)){b.code="",g.setAttribute(r,a);var y=g.appendChild(document.createElement("CODE"));y.textContent=i;var k=g.getAttribute("data-src"),w=b.language;if(w==="none"){var C=(/\.(\w+)$/.exec(k)||[,"none"])[1];w=o[C]||C}t.util.setLanguage(y,w),t.util.setLanguage(g,w);var M=t.plugins.autoloader;M&&M.loadLanguages(w),d(k,function(T){g.setAttribute(r,u);var D=h(g.getAttribute("data-range"));if(D){var A=T.split(/\r\n?|\n/g),P=D[0],L=D[1]==null?A.length:D[1];P<0&&(P+=A.length),P=Math.max(0,Math.min(P-1,A.length)),L<0&&(L+=A.length),L=Math.max(0,Math.min(L,A.length)),T=A.slice(P,L).join(` -`),g.hasAttribute("data-start")||g.setAttribute("data-start",String(P+1))}y.textContent=T,t.highlightElement(y)},function(T){g.setAttribute(r,f),y.textContent=T})}}),t.plugins.fileHighlight={highlight:function(g){for(var y=(g||document).querySelectorAll(c),k=0,w;w=y[k++];)t.highlightElement(w)}};var m=!1;t.fileHighlight=function(){m||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),m=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(y_);const Us=y_.exports;var Qw={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(M){var k=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(k){var $=document.getElementsByTagName("script");for(var C in $)if($[C].src==k)return $[C]}return null}},isActive:function(k,$,C){for(var M="no-"+$;k;){var T=k.classList;if(T.contains($))return!0;if(T.contains(M))return!1;k=k.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(k,$){var C=r.util.clone(r.languages[k]);for(var M in $)C[M]=$[M];return C},insertBefore:function(k,$,C,M){M=M||r.languages;var T=M[k],D={};for(var A in T)if(T.hasOwnProperty(A)){if(A==$)for(var P in C)C.hasOwnProperty(P)&&(D[P]=C[P]);C.hasOwnProperty(A)||(D[A]=T[A])}var L=M[k];return M[k]=D,r.languages.DFS(r.languages,function(V,F){F===L&&V!=k&&(this[V]=D)}),D},DFS:function k($,C,M,T){T=T||{};var D=r.util.objId;for(var A in $)if($.hasOwnProperty(A)){C.call($,A,$[A],M||A);var P=$[A],L=r.util.type(P);L==="Object"&&!T[D(P)]?(T[D(P)]=!0,k(P,C,null,T)):L==="Array"&&!T[D(P)]&&(T[D(P)]=!0,k(P,C,A,T))}}},plugins:{},highlightAll:function(k,$){r.highlightAllUnder(document,k,$)},highlightAllUnder:function(k,$,C){var M={callback:C,container:k,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),r.hooks.run("before-all-elements-highlight",M);for(var T=0,D;D=M.elements[T++];)r.highlightElement(D,$===!0,M.callback)},highlightElement:function(k,$,C){var M=r.util.getLanguage(k),T=r.languages[M];r.util.setLanguage(k,M);var D=k.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(D,M);var A=k.textContent,P={element:k,language:M,grammar:T,code:A};function L(F){P.highlightedCode=F,r.hooks.run("before-insert",P),P.element.innerHTML=P.highlightedCode,r.hooks.run("after-highlight",P),r.hooks.run("complete",P),C&&C.call(P.element)}if(r.hooks.run("before-sanity-check",P),D=P.element.parentElement,D&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!P.code){r.hooks.run("complete",P),C&&C.call(P.element);return}if(r.hooks.run("before-highlight",P),!P.grammar){L(r.util.encode(P.code));return}if($&&i.Worker){var V=new Worker(r.filename);V.onmessage=function(F){L(F.data)},V.postMessage(JSON.stringify({language:P.language,code:P.code,immediateClose:!0}))}else L(r.highlight(P.code,P.grammar,P.language))},highlight:function(k,$,C){var M={code:k,grammar:$,language:C};if(r.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=r.tokenize(M.code,M.grammar),r.hooks.run("after-tokenize",M),a.stringify(r.util.encode(M.tokens),M.language)},tokenize:function(k,$){var C=$.rest;if(C){for(var M in C)$[M]=C[M];delete $.rest}var T=new c;return d(T,T.head,k),f(k,T,$,T.head,0),m(T)},hooks:{all:{},add:function(k,$){var C=r.hooks.all;C[k]=C[k]||[],C[k].push($)},run:function(k,$){var C=r.hooks.all[k];if(!(!C||!C.length))for(var M=0,T;T=C[M++];)T($)}},Token:a};i.Prism=r;function a(k,$,C,M){this.type=k,this.content=$,this.alias=C,this.length=(M||"").length|0}a.stringify=function k($,C){if(typeof $=="string")return $;if(Array.isArray($)){var M="";return $.forEach(function(L){M+=k(L,C)}),M}var T={type:$.type,content:k($.content,C),tag:"span",classes:["token",$.type],attributes:{},language:C},D=$.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(T.classes,D):T.classes.push(D)),r.hooks.run("wrap",T);var A="";for(var P in T.attributes)A+=" "+P+'="'+(T.attributes[P]||"").replace(/"/g,""")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+A+">"+T.content+""};function u(k,$,C,M){k.lastIndex=$;var T=k.exec(C);if(T&&M&&T[1]){var D=T[1].length;T.index+=D,T[0]=T[0].slice(D)}return T}function f(k,$,C,M,T,D){for(var A in C)if(!(!C.hasOwnProperty(A)||!C[A])){var P=C[A];P=Array.isArray(P)?P:[P];for(var L=0;L=D.reach);J+=ie.value.length,ie=ie.next){var fe=ie.value;if($.length>k.length)return;if(!(fe instanceof a)){var Y=1,re;if(G){if(re=u(Z,J,k,U),!re||re.index>=k.length)break;var he=re.index,Oe=re.index+re[0].length,ge=J;for(ge+=ie.value.length;he>=ge;)ie=ie.next,ge+=ie.value.length;if(ge-=ie.value.length,J=ge,ie.value instanceof a)continue;for(var ae=ie;ae!==$.tail&&(geD.reach&&(D.reach=Ue);var ce=ie.prev;Se&&(ce=d($,ce,Se),J+=Se.length),h($,ce,Y);var se=new a(A,F?r.tokenize(de,F):de,K,de);if(ie=d($,ce,se),we&&d($,ie,we),Y>1){var te={cause:A+","+L,reach:Ue};f(k,$,C,ie.prev,J,te),D&&te.reach>D.reach&&(D.reach=te.reach)}}}}}}function c(){var k={value:null,prev:null,next:null},$={value:null,prev:k,next:null};k.next=$,this.head=k,this.tail=$,this.length=0}function d(k,$,C){var M=$.next,T={value:C,prev:$,next:M};return $.next=T,M.prev=T,k.length++,T}function h(k,$,C){for(var M=$.next,T=0;T/,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\u2026",s=function(b,g){return"\u2716 Error "+b+" while fetching file: "+g},l="\u2716 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(b,g,y){var k=new XMLHttpRequest;k.open("GET",b,!0),k.onreadystatechange=function(){k.readyState==4&&(k.status<400&&k.responseText?g(k.responseText):k.status>=400?y(s(k.status,k.statusText)):y(l))},k.send(null)}function h(b){var g=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(b||"");if(g){var y=Number(g[1]),k=g[2],$=g[3];return k?$?[y,Number($)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(b){b.selector+=", "+c}),t.hooks.add("before-sanity-check",function(b){var g=b.element;if(g.matches(c)){b.code="",g.setAttribute(r,a);var y=g.appendChild(document.createElement("CODE"));y.textContent=i;var k=g.getAttribute("data-src"),$=b.language;if($==="none"){var C=(/\.(\w+)$/.exec(k)||[,"none"])[1];$=o[C]||C}t.util.setLanguage(y,$),t.util.setLanguage(g,$);var M=t.plugins.autoloader;M&&M.loadLanguages($),d(k,function(T){g.setAttribute(r,u);var D=h(g.getAttribute("data-range"));if(D){var A=T.split(/\r\n?|\n/g),P=D[0],L=D[1]==null?A.length:D[1];P<0&&(P+=A.length),P=Math.max(0,Math.min(P-1,A.length)),L<0&&(L+=A.length),L=Math.max(0,Math.min(L,A.length)),T=A.slice(P,L).join(` +`),g.hasAttribute("data-start")||g.setAttribute("data-start",String(P+1))}y.textContent=T,t.highlightElement(y)},function(T){g.setAttribute(r,f),y.textContent=T})}}),t.plugins.fileHighlight={highlight:function(g){for(var y=(g||document).querySelectorAll(c),k=0,$;$=y[k++];)t.highlightElement($)}};var m=!1;t.fileHighlight=function(){m||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),m=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(k_);const Us=k_.exports;var xw={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;ar&&(f[d]=` `+f[d],c=h)}a[u]=f.join("")}return a.join(` -`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&!!Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,h="",m="",b=!1,g=0;g>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 xw(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){$(s,e,l),_(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:x,o:x,d(s){s&&S(e)}}}function eS(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=Us.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Us.highlight(a,Us.languages[l]||Us.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 Us<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class k_ extends Ce{constructor(e){super(),$e(this,e,eS,xw,ke,{class:0,content:2,language:3})}}const tS=n=>({}),fc=n=>({}),nS=n=>({}),cc=n=>({});function dc(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w=n[4]&&!n[2]&&pc(n);const C=n[18].header,M=Ot(C,n,n[17],cc);let T=n[4]&&n[2]&&hc(n);const D=n[18].default,A=Ot(D,n,n[17],null),P=n[18].footer,L=Ot(P,n,n[17],fc);return{c(){e=v("div"),t=v("div"),s=O(),l=v("div"),o=v("div"),w&&w.c(),r=O(),M&&M.c(),a=O(),T&&T.c(),u=O(),f=v("div"),A&&A.c(),c=O(),d=v("div"),L&&L.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",h="overlay-panel "+n[1]+" "+n[8]),ee(l,"popup",n[2]),p(e,"class","overlay-panel-container"),ee(e,"padded",n[2]),ee(e,"active",n[0])},m(V,F){$(V,e,F),_(e,t),_(e,s),_(e,l),_(l,o),w&&w.m(o,null),_(o,r),M&&M.m(o,null),_(o,a),T&&T.m(o,null),_(l,u),_(l,f),A&&A.m(f,null),n[20](f),_(l,c),_(l,d),L&&L.m(d,null),g=!0,y||(k=[W(t,"click",ut(n[19])),W(f,"scroll",n[21])],y=!0)},p(V,F){n=V,n[4]&&!n[2]?w?w.p(n,F):(w=pc(n),w.c(),w.m(o,r)):w&&(w.d(1),w=null),M&&M.p&&(!g||F&131072)&&Et(M,C,n,n[17],g?Dt(C,n[17],F,nS):At(n[17]),cc),n[4]&&n[2]?T?T.p(n,F):(T=hc(n),T.c(),T.m(o,null)):T&&(T.d(1),T=null),A&&A.p&&(!g||F&131072)&&Et(A,D,n,n[17],g?Dt(D,n[17],F,null):At(n[17]),null),L&&L.p&&(!g||F&131072)&&Et(L,P,n,n[17],g?Dt(P,n[17],F,tS):At(n[17]),fc),(!g||F&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),(!g||F&262)&&ee(l,"popup",n[2]),(!g||F&4)&&ee(e,"padded",n[2]),(!g||F&1)&&ee(e,"active",n[0])},i(V){g||(Qe(()=>{i||(i=je(t,bo,{duration:cs,opacity:0},!0)),i.run(1)}),E(M,V),E(A,V),E(L,V),Qe(()=>{b&&b.end(1),m=cm(l,kn,n[2]?{duration:cs,y:-10}:{duration:cs,x:50}),m.start()}),g=!0)},o(V){i||(i=je(t,bo,{duration:cs,opacity:0},!1)),i.run(0),I(M,V),I(A,V),I(L,V),m&&m.invalidate(),b=dm(l,kn,n[2]?{duration:cs,y:10}:{duration:cs,x:50}),g=!1},d(V){V&&S(e),V&&i&&i.end(),w&&w.d(),M&&M.d(V),T&&T.d(),A&&A.d(V),n[20](null),L&&L.d(V),V&&b&&b.end(),y=!1,Re(k)}}}function pc(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","overlay-close")},m(s,l){$(s,e,l),t||(i=W(e,"click",ut(n[5])),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}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-secondary btn-close m-l-auto")},m(s,l){$(s,e,l),t||(i=W(e,"click",ut(n[5])),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function iS(n){let e,t,i,s,l=n[0]&&dc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(o,r){$(o,e,r),l&&l.m(e,null),n[22](e),t=!0,i||(s=[W(window,"resize",n[10]),W(window,"keydown",n[9])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&E(l,1)):(l=dc(o),l.c(),E(l,1),l.m(e,null)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){t||(E(l),t=!0)},o(o){I(l),t=!1},d(o){o&&S(e),l&&l.d(),n[22](null),i=!1,Re(s)}}}let Ni;function w_(){return Ni=Ni||document.querySelector(".overlays"),Ni||(Ni=document.createElement("div"),Ni.classList.add("overlays"),document.body.appendChild(Ni)),Ni}let cs=150;function mc(){return 1e3+w_().querySelectorAll(".overlay-panel-container.active").length}function sS(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const h=It();let m,b,g,y,k="";function w(){typeof c=="function"&&c()===!1||t(0,o=!0)}function C(){typeof d=="function"&&d()===!1||t(0,o=!1)}function M(){return o}async function T(K){K?(g=document.activeElement,m==null||m.focus(),h("show"),document.body.classList.add("overlay-active")):(clearTimeout(y),g==null||g.focus(),h("hide"),document.body.classList.remove("overlay-active")),await $n(),D()}function D(){!m||(o?t(6,m.style.zIndex=mc(),m):t(6,m.style="",m))}function A(K){o&&f&&K.code=="Escape"&&!B.isInput(K.target)&&m&&m.style.zIndex==mc()&&(K.preventDefault(),C())}function P(K){o&&L(b)}function L(K,X){X&&t(8,k=""),K&&(y||(y=setTimeout(()=>{if(clearTimeout(y),y=null,!K)return;if(K.scrollHeight-K.offsetHeight>0)t(8,k="scrollable");else{t(8,k="");return}K.scrollTop==0?t(8,k+=" scroll-top-reached"):K.scrollTop+K.offsetHeight==K.scrollHeight&&t(8,k+=" scroll-bottom-reached")},100)))}un(()=>(w_().appendChild(m),()=>{var K;clearTimeout(y),(K=m==null?void 0:m.classList)==null||K.add("hidden"),setTimeout(()=>{m==null||m.remove()},0)}));const V=()=>a?C():!0;function F(K){le[K?"unshift":"push"](()=>{b=K,t(7,b)})}const U=K=>L(K.target);function G(K){le[K?"unshift":"push"](()=>{m=K,t(6,m)})}return n.$$set=K=>{"class"in K&&t(1,l=K.class),"active"in K&&t(0,o=K.active),"popup"in K&&t(2,r=K.popup),"overlayClose"in K&&t(3,a=K.overlayClose),"btnClose"in K&&t(4,u=K.btnClose),"escClose"in K&&t(12,f=K.escClose),"beforeOpen"in K&&t(13,c=K.beforeOpen),"beforeHide"in K&&t(14,d=K.beforeHide),"$$scope"in K&&t(17,s=K.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&T(o),n.$$.dirty&128&&L(b,!0),n.$$.dirty&64&&m&&D()},[o,l,r,a,u,C,m,b,k,A,P,L,f,c,d,w,M,s,i,V,F,U,G]}class Jn extends Ce{constructor(e){super(),$e(this,e,sS,iS,ke,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16})}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function lS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function oS(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=z(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){$(l,e,o),_(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&ue(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&S(e)}}}function rS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){$(t,e,i)},p:x,i:x,o:x,d(t){t&&S(e)}}}function aS(n){let e,t;return e=new k_({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.content=JSON.stringify(i[2].meta,null,2)),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function uS(n){var Ie;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,h,m,b=n[2].status+"",g,y,k,w,C,M,T=((Ie=n[2].method)==null?void 0:Ie.toUpperCase())+"",D,A,P,L,V,F,U=n[2].auth+"",G,K,X,Z,ie,J,fe=n[2].url+"",Y,re,Oe,ge,ae,he,de,Se,we,Ue,ce,se=n[2].remoteIp+"",te,ne,Ee,it,en,Kt,tn=n[2].userIp+"",Gn,Mi,oi,ri,As,ai,es=n[2].userAgent+"",ts,El,ui,ns,Al,Ti,is,Jt,Ke,ss,Xn,ls,Oi,Di,Pt,qt;function Il(Pe,De){return Pe[2].referer?oS:lS}let N=Il(n),q=N(n);const Q=[aS,rS],oe=[];function Te(Pe,De){return De&4&&(is=null),is==null&&(is=!B.isEmpty(Pe[2].meta)),is?0:1}return Jt=Te(n,-1),Ke=oe[Jt]=Q[Jt](n),Pt=new Ki({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=O(),o=v("td"),a=z(r),u=O(),f=v("tr"),c=v("td"),c.textContent="Status",d=O(),h=v("td"),m=v("span"),g=z(b),y=O(),k=v("tr"),w=v("td"),w.textContent="Method",C=O(),M=v("td"),D=z(T),A=O(),P=v("tr"),L=v("td"),L.textContent="Auth",V=O(),F=v("td"),G=z(U),K=O(),X=v("tr"),Z=v("td"),Z.textContent="URL",ie=O(),J=v("td"),Y=z(fe),re=O(),Oe=v("tr"),ge=v("td"),ge.textContent="Referer",ae=O(),he=v("td"),q.c(),de=O(),Se=v("tr"),we=v("td"),we.textContent="Remote IP",Ue=O(),ce=v("td"),te=z(se),ne=O(),Ee=v("tr"),it=v("td"),it.textContent="User IP",en=O(),Kt=v("td"),Gn=z(tn),Mi=O(),oi=v("tr"),ri=v("td"),ri.textContent="UserAgent",As=O(),ai=v("td"),ts=z(es),El=O(),ui=v("tr"),ns=v("td"),ns.textContent="Meta",Al=O(),Ti=v("td"),Ke.c(),ss=O(),Xn=v("tr"),ls=v("td"),ls.textContent="Created",Oi=O(),Di=v("td"),j(Pt.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(m,"class","label"),ee(m,"label-danger",n[2].status>=400),p(w,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(Z,"class","min-width txt-hint txt-bold"),p(ge,"class","min-width txt-hint txt-bold"),p(we,"class","min-width txt-hint txt-bold"),p(it,"class","min-width txt-hint txt-bold"),p(ri,"class","min-width txt-hint txt-bold"),p(ns,"class","min-width txt-hint txt-bold"),p(ls,"class","min-width txt-hint txt-bold"),p(e,"class","table-compact table-border")},m(Pe,De){$(Pe,e,De),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,a),_(t,u),_(t,f),_(f,c),_(f,d),_(f,h),_(h,m),_(m,g),_(t,y),_(t,k),_(k,w),_(k,C),_(k,M),_(M,D),_(t,A),_(t,P),_(P,L),_(P,V),_(P,F),_(F,G),_(t,K),_(t,X),_(X,Z),_(X,ie),_(X,J),_(J,Y),_(t,re),_(t,Oe),_(Oe,ge),_(Oe,ae),_(Oe,he),q.m(he,null),_(t,de),_(t,Se),_(Se,we),_(Se,Ue),_(Se,ce),_(ce,te),_(t,ne),_(t,Ee),_(Ee,it),_(Ee,en),_(Ee,Kt),_(Kt,Gn),_(t,Mi),_(t,oi),_(oi,ri),_(oi,As),_(oi,ai),_(ai,ts),_(t,El),_(t,ui),_(ui,ns),_(ui,Al),_(ui,Ti),oe[Jt].m(Ti,null),_(t,ss),_(t,Xn),_(Xn,ls),_(Xn,Oi),_(Xn,Di),R(Pt,Di,null),qt=!0},p(Pe,De){var qe;(!qt||De&4)&&r!==(r=Pe[2].id+"")&&ue(a,r),(!qt||De&4)&&b!==(b=Pe[2].status+"")&&ue(g,b),(!qt||De&4)&&ee(m,"label-danger",Pe[2].status>=400),(!qt||De&4)&&T!==(T=((qe=Pe[2].method)==null?void 0:qe.toUpperCase())+"")&&ue(D,T),(!qt||De&4)&&U!==(U=Pe[2].auth+"")&&ue(G,U),(!qt||De&4)&&fe!==(fe=Pe[2].url+"")&&ue(Y,fe),N===(N=Il(Pe))&&q?q.p(Pe,De):(q.d(1),q=N(Pe),q&&(q.c(),q.m(he,null))),(!qt||De&4)&&se!==(se=Pe[2].remoteIp+"")&&ue(te,se),(!qt||De&4)&&tn!==(tn=Pe[2].userIp+"")&&ue(Gn,tn),(!qt||De&4)&&es!==(es=Pe[2].userAgent+"")&&ue(ts,es);let ze=Jt;Jt=Te(Pe,De),Jt===ze?oe[Jt].p(Pe,De):(be(),I(oe[ze],1,1,()=>{oe[ze]=null}),ve(),Ke=oe[Jt],Ke?Ke.p(Pe,De):(Ke=oe[Jt]=Q[Jt](Pe),Ke.c()),E(Ke,1),Ke.m(Ti,null));const Ne={};De&4&&(Ne.date=Pe[2].created),Pt.$set(Ne)},i(Pe){qt||(E(Ke),E(Pt.$$.fragment,Pe),qt=!0)},o(Pe){I(Ke),I(Pt.$$.fragment,Pe),qt=!1},d(Pe){Pe&&S(e),q.d(),oe[Jt].d(),H(Pt)}}}function fS(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function cS(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[4]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function dS(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[cS],header:[fS],default:[uS]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[5](null),H(e,s)}}}function pS(n,e,t){let i,s=new Ar;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){le[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){Ve.call(this,n,c)}function f(c){Ve.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class hS extends Ce{constructor(e){super(),$e(this,e,pS,dS,ke,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function mS(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){$(u,e,f),e.checked=n[0],$(u,i,f),$(u,s,f),_(s,l),r||(a=W(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&S(e),u&&S(i),u&&S(s),r=!1,a()}}}function gc(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new Xw({props:l}),le.push(()=>ye(e,"filter",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function _c(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new gv({props:l}),le.push(()=>ye(e,"filter",s)),e.$on("select",n[12]),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function gS(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k=n[3],w,C=n[3],M,T;r=new wa({}),r.$on("refresh",n[7]),d=new _e({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[mS,({uniqueId:P})=>({14:P}),({uniqueId:P})=>P?16384:0]},$$scope:{ctx:n}}}),m=new ka({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),m.$on("submit",n[9]);let D=gc(n),A=_c(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=z(n[5]),o=O(),j(r.$$.fragment),a=O(),u=v("div"),f=O(),c=v("div"),j(d.$$.fragment),h=O(),j(m.$$.fragment),b=O(),g=v("div"),y=O(),D.c(),w=O(),A.c(),M=Fe(),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(g,"class","clearfix m-b-xs"),p(e,"class","page-header-wrapper m-b-0")},m(P,L){$(P,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(t,o),R(r,t,null),_(t,a),_(t,u),_(t,f),_(t,c),R(d,c,null),_(e,h),R(m,e,null),_(e,b),_(e,g),_(e,y),D.m(e,null),$(P,w,L),A.m(P,L),$(P,M,L),T=!0},p(P,L){(!T||L&32)&&ue(l,P[5]);const V={};L&49153&&(V.$$scope={dirty:L,ctx:P}),d.$set(V);const F={};L&4&&(F.value=P[2]),m.$set(F),L&8&&ke(k,k=P[3])?(be(),I(D,1,1,x),ve(),D=gc(P),D.c(),E(D,1),D.m(e,null)):D.p(P,L),L&8&&ke(C,C=P[3])?(be(),I(A,1,1,x),ve(),A=_c(P),A.c(),E(A,1),A.m(M.parentNode,M)):A.p(P,L)},i(P){T||(E(r.$$.fragment,P),E(d.$$.fragment,P),E(m.$$.fragment,P),E(D),E(A),T=!0)},o(P){I(r.$$.fragment,P),I(d.$$.fragment,P),I(m.$$.fragment,P),I(D),I(A),T=!1},d(P){P&&S(e),H(r),H(d),H(m),D.d(P),P&&S(w),P&&S(M),A.d(P)}}}function _S(n){let e,t,i,s;e=new cn({props:{$$slots:{default:[gS]},$$scope:{ctx:n}}});let l={};return i=new hS({props:l}),n[13](i),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(o,r){R(e,o,r),$(o,t,r),R(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(E(e.$$.fragment,o),E(i.$$.fragment,o),s=!0)},o(o){I(e.$$.fragment,o),I(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&S(t),n[13](null),H(i,o)}}}const bc="includeAdminLogs";function bS(n,e,t){var y;let i,s;Je(n,mt,k=>t(5,s=k)),Ht(mt,s="Request logs",s);let l,o="",r=((y=window.localStorage)==null?void 0:y.getItem(bc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function c(){r=this.checked,t(0,r)}const d=k=>t(2,o=k.detail);function h(k){o=k,t(2,o)}function m(k){o=k,t(2,o)}const b=k=>l==null?void 0:l.show(k==null?void 0:k.detail);function g(k){le[k?"unshift":"push"](()=>{l=k,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(bc,r<<0)},[r,l,o,a,i,s,u,f,c,d,h,m,b,g]}class vS extends Ce{constructor(e){super(),$e(this,e,bS,_S,ke,{})}}const Zi=Cn([]),Bn=Cn({}),na=Cn(!1);function yS(n){Zi.update(e=>{const t=B.findByKey(e,"id",n);return t?Bn.set(t):e.length&&Bn.set(e[0]),e})}function kS(n){Bn.update(e=>B.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),Zi.update(e=>(B.pushOrReplaceByKey(e,n,"id"),B.sortCollections(e)))}function wS(n){Zi.update(e=>(B.removeByKey(e,"id",n.id),Bn.update(t=>t.id===n.id?e[0]:t),e))}async function SS(n=null){return na.set(!0),Bn.set({}),Zi.set([]),me.collections.getFullList(200,{sort:"+created"}).then(e=>{Zi.set(B.sortCollections(e));const t=n&&B.findByKey(e,"id",n);t?Bn.set(t):e.length&&Bn.set(e[0])}).catch(e=>{me.errorResponseHandler(e)}).finally(()=>{na.set(!1)})}const Ya=Cn({});function yn(n,e,t){Ya.set({text:n,yesCallback:e,noCallback:t})}function S_(){Ya.set({})}function vc(n){let e,t,i,s;const l=n[14].default,o=Ot(l,n,n[13],null);return{c(){e=v("div"),o&&o.c(),p(e,"class",n[1]),ee(e,"active",n[0])},m(r,a){$(r,e,a),o&&o.m(e,null),s=!0},p(r,a){o&&o.p&&(!s||a&8192)&&Et(o,l,r,r[13],s?Dt(l,r[13],a,null):At(r[13]),null),(!s||a&2)&&p(e,"class",r[1]),(!s||a&3)&&ee(e,"active",r[0])},i(r){s||(E(o,r),r&&Qe(()=>{i&&i.end(1),t=cm(e,kn,{duration:150,y:-5}),t.start()}),s=!0)},o(r){I(o,r),t&&t.invalidate(),r&&(i=dm(e,kn,{duration:150,y:2})),s=!1},d(r){r&&S(e),o&&o.d(r),r&&i&&i.end()}}}function $S(n){let e,t,i,s,l=n[0]&&vc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container")},m(o,r){$(o,e,r),l&&l.m(e,null),n[15](e),t=!0,i||(s=[W(window,"click",n[3]),W(window,"keydown",n[4]),W(window,"focusin",n[5])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&E(l,1)):(l=vc(o),l.c(),E(l,1),l.m(e,null)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){t||(E(l),t=!0)},o(o){I(l),t=!1},d(o){o&&S(e),l&&l.d(),n[15](null),i=!1,Re(s)}}}function CS(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f,c;const d=It();function h(){t(0,o=!1)}function m(){t(0,o=!0)}function b(){o?h():m()}function g(P){return!f||P.classList.contains(a)||(c==null?void 0:c.contains(P))&&!f.contains(P)||f.contains(P)&&P.closest&&P.closest("."+a)}function y(P){(!o||g(P.target))&&(P.preventDefault(),P.stopPropagation(),b())}function k(P){(P.code==="Enter"||P.code==="Space")&&(!o||g(P.target))&&(P.preventDefault(),P.stopPropagation(),b())}function w(P){o&&!(f!=null&&f.contains(P.target))&&!(c!=null&&c.contains(P.target))&&h()}function C(P){o&&r&&P.code==="Escape"&&(P.preventDefault(),h())}function M(P){return w(P)}function T(P){D(),t(12,c=P||(f==null?void 0:f.parentNode)),c&&(f==null||f.addEventListener("click",y),c.addEventListener("click",y),c.addEventListener("keydown",k))}function D(){!c||(f==null||f.removeEventListener("click",y),c.removeEventListener("click",y),c.removeEventListener("keydown",k))}un(()=>(T(),()=>D()));function A(P){le[P?"unshift":"push"](()=>{f=P,t(2,f)})}return n.$$set=P=>{"trigger"in P&&t(6,l=P.trigger),"active"in P&&t(0,o=P.active),"escClose"in P&&t(7,r=P.escClose),"closableClass"in P&&t(8,a=P.closableClass),"class"in P&&t(1,u=P.class),"$$scope"in P&&t(13,s=P.$$scope)},n.$$.update=()=>{var P,L;n.$$.dirty&68&&f&&T(l),n.$$.dirty&4097&&(o?((P=c==null?void 0:c.classList)==null||P.add("active"),d("show")):((L=c==null?void 0:c.classList)==null||L.remove("active"),d("hide")))},[o,u,f,w,C,M,l,r,a,h,m,b,c,s,i,A]}class Zn extends Ce{constructor(e){super(),$e(this,e,CS,$S,ke,{trigger:6,active:0,escClose:7,closableClass:8,class:1,hide:9,show:10,toggle:11})}get hide(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}get toggle(){return this.$$.ctx[11]}}const MS=n=>({active:n&1}),yc=n=>({active:n[0]});function kc(n){let e,t,i;const s=n[15].default,l=Ot(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){$(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Et(l,s,o,o[14],i?Dt(s,o[14],r,null):At(o[14]),null)},i(o){i||(E(l,o),o&&Qe(()=>{t||(t=je(e,St,{duration:150},!0)),t.run(1)}),i=!0)},o(o){I(l,o),o&&(t||(t=je(e,St,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&S(e),l&&l.d(o),o&&t&&t.end()}}}function TS(n){let e,t,i,s,l,o,r,a;const u=n[15].header,f=Ot(u,n,n[14],yc);let c=n[0]&&kc(n);return{c(){e=v("div"),t=v("header"),f&&f.c(),i=O(),c&&c.c(),p(t,"class","accordion-header"),p(t,"draggable",n[2]),ee(t,"interactive",n[3]),p(e,"tabindex",s=n[3]?0:-1),p(e,"class",l="accordion "+(n[7]?"drag-over":"")+" "+n[1]),ee(e,"active",n[0])},m(d,h){$(d,e,h),_(e,t),f&&f.m(t,null),_(e,i),c&&c.m(e,null),n[22](e),o=!0,r||(a=[W(t,"click",ut(n[17])),W(t,"drop",ut(n[18])),W(t,"dragstart",n[19]),W(t,"dragenter",n[20]),W(t,"dragleave",n[21]),W(t,"dragover",ut(n[16])),W(e,"keydown",B_(n[9]))],r=!0)},p(d,[h]){f&&f.p&&(!o||h&16385)&&Et(f,u,d,d[14],o?Dt(u,d[14],h,MS):At(d[14]),yc),(!o||h&4)&&p(t,"draggable",d[2]),(!o||h&8)&&ee(t,"interactive",d[3]),d[0]?c?(c.p(d,h),h&1&&E(c,1)):(c=kc(d),c.c(),E(c,1),c.m(e,null)):c&&(be(),I(c,1,1,()=>{c=null}),ve()),(!o||h&8&&s!==(s=d[3]?0:-1))&&p(e,"tabindex",s),(!o||h&130&&l!==(l="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&p(e,"class",l),(!o||h&131)&&ee(e,"active",d[0])},i(d){o||(E(f,d),E(c),o=!0)},o(d){I(f,d),I(c),o=!1},d(d){d&&S(e),f&&f.d(d),c&&c.d(),n[22](null),r=!1,Re(a)}}}function OS(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=It();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,h=!1;function m(){y(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function g(){l("toggle"),f?b():m()}function y(){if(d&&o.closest(".accordions")){const L=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const V of L)V.click()}}function k(L){!c||(L.code==="Enter"||L.code==="Space")&&(L.preventDefault(),g())}un(()=>()=>clearTimeout(r));function w(L){Ve.call(this,n,L)}const C=()=>c&&g(),M=L=>{u&&(t(7,h=!1),y(),l("drop",L))},T=L=>u&&l("dragstart",L),D=L=>{u&&(t(7,h=!0),l("dragenter",L))},A=L=>{u&&(t(7,h=!1),l("dragleave",L))};function P(L){le[L?"unshift":"push"](()=>{o=L,t(6,o)})}return n.$$set=L=>{"class"in L&&t(1,a=L.class),"draggable"in L&&t(2,u=L.draggable),"active"in L&&t(0,f=L.active),"interactive"in L&&t(3,c=L.interactive),"single"in L&&t(10,d=L.single),"$$scope"in L&&t(14,s=L.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},250)))},[f,a,u,c,g,y,o,h,l,k,d,m,b,r,s,i,w,C,M,T,D,A,P]}class _s extends Ce{constructor(e){super(),$e(this,e,OS,TS,ke,{class:1,draggable:2,active:0,interactive:3,single:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}const DS=n=>({}),wc=n=>({});function Sc(n,e,t){const i=n.slice();return i[45]=e[t],i}const ES=n=>({}),$c=n=>({});function Cc(n,e,t){const i=n.slice();return i[45]=e[t],i}function Mc(n){let e,t,i;return{c(){e=v("div"),t=z(n[2]),i=O(),p(e,"class","block txt-placeholder"),ee(e,"link-hint",!n[5])},m(s,l){$(s,e,l),_(e,t),_(e,i)},p(s,l){l[0]&4&&ue(t,s[2]),l[0]&32&&ee(e,"link-hint",!s[5])},d(s){s&&S(e)}}}function AS(n){let e,t=n[45]+"",i;return{c(){e=v("span"),i=z(t),p(e,"class","txt")},m(s,l){$(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=s[45]+"")&&ue(i,t)},i:x,o:x,d(s){s&&S(e)}}}function IS(n){let e,t,i;const s=[{item:n[45]},n[8]];var l=n[7];function o(r){let a={};for(let u=0;u{H(f,1)}),ve()}l?(e=jt(l,o()),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&S(t),e&&H(e,r)}}}function Tc(n){let e,t,i;function s(){return n[33](n[45])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){$(l,e,o),t||(i=[Le(Be.call(null,e,"Clear")),W(e,"click",Yn(ut(s)))],t=!0)},p(l,o){n=l},d(l){l&&S(e),t=!1,Re(i)}}}function Oc(n){let e,t,i,s,l,o;const r=[IS,AS],a=[];function u(c,d){return c[7]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&Tc(n);return{c(){e=v("div"),i.c(),s=O(),f&&f.c(),l=O(),p(e,"class","option")},m(c,d){$(c,e,d),a[t].m(e,null),_(e,s),f&&f.m(e,null),_(e,l),o=!0},p(c,d){let h=t;t=u(c),t===h?a[t].p(c,d):(be(),I(a[h],1,1,()=>{a[h]=null}),ve(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),E(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=Tc(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(E(i),o=!0)},o(c){I(i),o=!1},d(c){c&&S(e),a[t].d(),f&&f.d()}}}function Dc(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[17],$$slots:{default:[NS]},$$scope:{ctx:n}};return e=new Zn({props:i}),n[38](e),e.$on("show",n[23]),e.$on("hide",n[39]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,l){const o={};l[0]&131072&&(o.trigger=s[17]),l[0]&806410|l[1]&1024&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[38](null),H(e,s)}}}function Ec(n){let e,t,i,s,l,o,r,a,u=n[14].length&&Ac(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=O(),l=v("input"),o=O(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){$(f,e,c),_(e,t),_(t,i),_(t,s),_(t,l),pe(l,n[14]),_(t,o),u&&u.m(t,null),l.focus(),r||(a=W(l,"input",n[35]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&16384&&l.value!==f[14]&&pe(l,f[14]),f[14].length?u?u.p(f,c):(u=Ac(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&S(e),u&&u.d(),r=!1,a()}}}function Ac(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-secondary clear"),p(e,"class","addon suffix p-r-5")},m(l,o){$(l,e,o),_(e,t),i||(s=W(t,"click",Yn(ut(n[20]))),i=!0)},p:x,d(l){l&&S(e),i=!1,s()}}}function Ic(n){let e,t=n[1]&&Pc(n);return{c(){t&&t.c(),e=Fe()},m(i,s){t&&t.m(i,s),$(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=Pc(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&S(e)}}}function Pc(n){let e,t;return{c(){e=v("div"),t=z(n[1]),p(e,"class","txt-missing")},m(i,s){$(i,e,s),_(e,t)},p(i,s){s[0]&2&&ue(t,i[1])},d(i){i&&S(e)}}}function PS(n){let e=n[45]+"",t;return{c(){t=z(e)},m(i,s){$(i,t,s)},p(i,s){s[0]&524288&&e!==(e=i[45]+"")&&ue(t,e)},i:x,o:x,d(i){i&&S(t)}}}function LS(n){let e,t,i;const s=[{item:n[45]},n[10]];var l=n[9];function o(r){let a={};for(let u=0;u{H(f,1)}),ve()}l?(e=jt(l,o()),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&S(t),e&&H(e,r)}}}function Lc(n){let e,t,i,s,l,o,r;const a=[LS,PS],u=[];function f(h,m){return h[9]?0:1}t=f(n),i=u[t]=a[t](n);function c(...h){return n[36](n[45],...h)}function d(...h){return n[37](n[45],...h)}return{c(){e=v("div"),i.c(),s=O(),p(e,"tabindex","0"),p(e,"class","dropdown-item option closable"),ee(e,"selected",n[18](n[45]))},m(h,m){$(h,e,m),u[t].m(e,null),_(e,s),l=!0,o||(r=[W(e,"click",c),W(e,"keydown",d)],o=!0)},p(h,m){n=h;let b=t;t=f(n),t===b?u[t].p(n,m):(be(),I(u[b],1,1,()=>{u[b]=null}),ve(),i=u[t],i?i.p(n,m):(i=u[t]=a[t](n),i.c()),E(i,1),i.m(e,s)),(!l||m[0]&786432)&&ee(e,"selected",n[18](n[45]))},i(h){l||(E(i),l=!0)},o(h){I(i),l=!1},d(h){h&&S(e),u[t].d(),o=!1,Re(r)}}}function NS(n){let e,t,i,s,l,o=n[11]&&Ec(n);const r=n[32].beforeOptions,a=Ot(r,n,n[41],$c);let u=n[19],f=[];for(let b=0;bI(f[b],1,1,()=>{f[b]=null});let d=null;u.length||(d=Ic(n));const h=n[32].afterOptions,m=Ot(h,n,n[41],wc);return{c(){o&&o.c(),e=O(),a&&a.c(),t=O(),i=v("div");for(let b=0;bI(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=Mc(n));let c=!n[5]&&Dc(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),ve()):c?(c.p(d,h),h[0]&32&&E(c,1)):(c=Dc(d),c.c(),E(c,1),c.m(e,null)),(!o||h[0]&4096&&l!==(l="select "+d[12]))&&p(e,"class",l),(!o||h[0]&4112)&&ee(e,"multiple",d[4]),(!o||h[0]&4128)&&ee(e,"disabled",d[5])},i(d){if(!o){for(let h=0;hne(Ee,te))||[]}function fe(se,te){se.preventDefault(),b&&d?U(te):F(te)}function Y(se,te){(se.code==="Enter"||se.code==="Space")&&fe(se,te)}function re(){ie(),setTimeout(()=>{const se=P==null?void 0:P.querySelector(".dropdown-item.option.selected");se&&(se.focus(),se.scrollIntoView({block:"nearest"}))},0)}function Oe(se){se.stopPropagation(),!h&&(D==null||D.toggle())}un(()=>{const se=document.querySelectorAll(`label[for="${r}"]`);for(const te of se)te.addEventListener("click",Oe);return()=>{for(const te of se)te.removeEventListener("click",Oe)}});const ge=se=>V(se);function ae(se){le[se?"unshift":"push"](()=>{L=se,t(17,L)})}function he(){A=this.value,t(14,A)}const de=(se,te)=>fe(te,se),Se=(se,te)=>Y(te,se);function we(se){le[se?"unshift":"push"](()=>{D=se,t(15,D)})}function Ue(se){Ve.call(this,n,se)}function ce(se){le[se?"unshift":"push"](()=>{P=se,t(16,P)})}return n.$$set=se=>{"id"in se&&t(24,r=se.id),"noOptionsText"in se&&t(1,a=se.noOptionsText),"selectPlaceholder"in se&&t(2,u=se.selectPlaceholder),"searchPlaceholder"in se&&t(3,f=se.searchPlaceholder),"items"in se&&t(25,c=se.items),"multiple"in se&&t(4,d=se.multiple),"disabled"in se&&t(5,h=se.disabled),"selected"in se&&t(0,m=se.selected),"toggle"in se&&t(6,b=se.toggle),"labelComponent"in se&&t(7,g=se.labelComponent),"labelComponentProps"in se&&t(8,y=se.labelComponentProps),"optionComponent"in se&&t(9,k=se.optionComponent),"optionComponentProps"in se&&t(10,w=se.optionComponentProps),"searchable"in se&&t(11,C=se.searchable),"searchFunc"in se&&t(26,M=se.searchFunc),"class"in se&&t(12,T=se.class),"$$scope"in se&&t(41,o=se.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&33554432&&c&&(Z(),ie()),n.$$.dirty[0]&33570816&&t(19,i=J(c,A)),n.$$.dirty[0]&1&&t(18,s=function(se){const te=B.toArray(m);return B.inArray(te,se)})},[m,a,u,f,d,h,b,g,y,k,w,C,T,V,A,D,P,L,s,i,ie,fe,Y,re,r,c,M,F,U,G,K,X,l,ge,ae,he,de,Se,we,Ue,ce,o]}class $_ extends Ce{constructor(e){super(),$e(this,e,HS,FS,ke,{id:24,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:25,multiple:4,disabled:5,selected:0,toggle:6,labelComponent:7,labelComponentProps:8,optionComponent:9,optionComponentProps:10,searchable:11,searchFunc:26,class:12,deselectItem:13,selectItem:27,toggleItem:28,reset:29,showDropdown:30,hideDropdown:31},null,[-1,-1])}get deselectItem(){return this.$$.ctx[13]}get selectItem(){return this.$$.ctx[27]}get toggleItem(){return this.$$.ctx[28]}get reset(){return this.$$.ctx[29]}get showDropdown(){return this.$$.ctx[30]}get hideDropdown(){return this.$$.ctx[31]}}function Nc(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){$(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&S(e)}}}function jS(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&&Nc(n);return{c(){l&&l.c(),e=O(),t=v("span"),s=z(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),$(o,e,r),$(o,t,r),_(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=Nc(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)+"")&&ue(s,i)},i:x,o:x,d(o){l&&l.d(o),o&&S(e),o&&S(t)}}}function qS(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Fc extends Ce{constructor(e){super(),$e(this,e,qS,jS,ke,{item:0})}}const VS=n=>({}),Rc=n=>({});function zS(n){let e;const t=n[8].afterOptions,i=Ot(t,n,n[12],Rc);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&Et(i,t,s,s[12],e?Dt(t,s[12],l,VS):At(s[12]),Rc)},i(s){e||(E(i,s),e=!0)},o(s){I(i,s),e=!1},d(s){i&&i.d(s)}}}function BS(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:[zS]},$$scope:{ctx:n}};for(let r=0;rye(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){j(e.$$.fragment)},m(r,a){R(e,r,a),i=!0},p(r,[a]){const u=a&62?Yt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Kn(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],Me(()=>t=!1)),e.$set(u)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function US(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=wt(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=Fc}=e,{optionComponent:c=Fc}=e,{selectionKey:d="value"}=e,{keyOfSelected:h=a?[]:void 0}=e;function m(w){w=B.toArray(w,!0);let C=[];for(let M of w){const T=B.findByKey(r,d,M);T&&C.push(T)}w.length&&!C.length||t(0,u=a?C:C[0])}async function b(w){let C=B.toArray(w,!0).map(M=>M[d]);!r.length||t(6,h=a?C:C[0])}function g(w){u=w,t(0,u)}function y(w){Ve.call(this,n,w)}function k(w){Ve.call(this,n,w)}return n.$$set=w=>{e=Ye(Ye({},e),Wn(w)),t(5,s=wt(e,i)),"items"in w&&t(1,r=w.items),"multiple"in w&&t(2,a=w.multiple),"selected"in w&&t(0,u=w.selected),"labelComponent"in w&&t(3,f=w.labelComponent),"optionComponent"in w&&t(4,c=w.optionComponent),"selectionKey"in w&&t(7,d=w.selectionKey),"keyOfSelected"in w&&t(6,h=w.keyOfSelected),"$$scope"in w&&t(12,o=w.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&m(h),n.$$.dirty&1&&b(u)},[u,r,a,f,c,s,h,d,l,g,y,k,o]}class Es extends Ce{constructor(e){super(),$e(this,e,US,BS,ke,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function WS(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{items:n[2]},n[3]];function l(r){n[4](r)}let o={};for(let r=0;rye(e,"keyOfSelected",l)),{c(){j(e.$$.fragment)},m(r,a){R(e,r,a),i=!0},p(r,[a]){const u=a&14?Yt(s,[a&2&&{class:"field-type-select "+r[1]},a&4&&{items:r[2]},a&8&&Kn(r[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=r[0],Me(()=>t=!1)),e.$set(u)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function YS(n,e,t){const i=["value","class"];let s=wt(e,i),{value:l="text"}=e,{class:o=""}=e;const r=[{label:"Text",value:"text",icon:B.getFieldTypeIcon("text")},{label:"Number",value:"number",icon:B.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:B.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:B.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:B.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:B.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:B.getFieldTypeIcon("select")},{label:"JSON",value:"json",icon:B.getFieldTypeIcon("json")},{label:"File",value:"file",icon:B.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:B.getFieldTypeIcon("relation")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=Ye(Ye({},e),Wn(u)),t(3,s=wt(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,o=u.class)},[l,o,r,s,a]}class KS extends Ce{constructor(e){super(),$e(this,e,YS,WS,ke,{value:0,class:1})}}function JS(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Min length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].min),r||(a=W(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&&rt(l.value)!==u[0].min&&pe(l,u[0].min)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function ZS(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=z("Max length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min",r=n[0].min||0)},m(f,c){$(f,e,c),_(e,t),$(f,s,c),$(f,l,c),pe(l,n[0].max),a||(u=W(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&o!==(o=f[5])&&p(l,"id",o),c&1&&r!==(r=f[0].min||0)&&p(l,"min",r),c&1&&rt(l.value)!==f[0].max&&pe(l,f[0].max)},d(f){f&&S(e),f&&S(s),f&&S(l),a=!1,u()}}}function GS(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Regex pattern"),s=O(),l=v("input"),r=O(),a=v("div"),a.innerHTML="Valid Go regular expression, eg. ^\\w+$.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),p(a,"class","help-block")},m(c,d){$(c,e,d),_(e,t),$(c,s,d),$(c,l,d),pe(l,n[0].pattern),$(c,r,d),$(c,a,d),u||(f=W(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].pattern&&pe(l,c[0].pattern)},d(c){c&&S(e),c&&S(s),c&&S(l),c&&S(r),c&&S(a),u=!1,f()}}}function XS(n){let e,t,i,s,l,o,r,a,u,f;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[JS,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[ZS,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[GS,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){$(c,e,d),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),f=!0},p(c,[d]){const h={};d&2&&(h.name="schema."+c[1]+".options.min"),d&97&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const m={};d&2&&(m.name="schema."+c[1]+".options.max"),d&97&&(m.$$scope={dirty:d,ctx:c}),o.$set(m);const b={};d&2&&(b.name="schema."+c[1]+".options.pattern"),d&97&&(b.$$scope={dirty:d,ctx:c}),u.$set(b)},i(c){f||(E(i.$$.fragment,c),E(o.$$.fragment,c),E(u.$$.fragment,c),f=!0)},o(c){I(i.$$.fragment,c),I(o.$$.fragment,c),I(u.$$.fragment,c),f=!1},d(c){c&&S(e),H(i),H(o),H(u)}}}function QS(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=rt(this.value),t(0,s)}function o(){s.max=rt(this.value),t(0,s)}function r(){s.pattern=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"options"in a&&t(0,s=a.options)},[s,i,l,o,r]}class xS extends Ce{constructor(e){super(),$e(this,e,QS,XS,ke,{key:1,options:0})}}function e$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Min"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4])},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].min),r||(a=W(l,"input",n[2]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].min&&pe(l,u[0].min)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function t$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=z("Max"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"min",r=n[0].min)},m(f,c){$(f,e,c),_(e,t),$(f,s,c),$(f,l,c),pe(l,n[0].max),a||(u=W(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&o!==(o=f[4])&&p(l,"id",o),c&1&&r!==(r=f[0].min)&&p(l,"min",r),c&1&&rt(l.value)!==f[0].max&&pe(l,f[0].max)},d(f){f&&S(e),f&&S(s),f&&S(l),a=!1,u()}}}function n$(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[e$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[t$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){$(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&S(e),H(i),H(o)}}}function i$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=rt(this.value),t(0,s)}function o(){s.max=rt(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class s$ extends Ce{constructor(e){super(),$e(this,e,i$,n$,ke,{key:1,options:0})}}function l$(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class o$ extends Ce{constructor(e){super(),$e(this,e,l$,null,ke,{key:0,options:1})}}function r$(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],o={};for(let r=0;r{t(0,o=B.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=Ye(Ye({},e),Wn(u)),t(3,l=wt(e,s)),"value"in u&&t(0,o=u.value),"separator"in u&&t(1,r=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(o||[]).join(", "))},[o,r,i,l,a]}class xi extends Ce{constructor(e){super(),$e(this,e,a$,r$,ke,{value:0,separator:1})}}function u$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[2](g)}let b={id:n[4],disabled:!B.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(b.value=n[0].exceptDomains),r=new xi({props:b}),le.push(()=>ye(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(g,y){$(g,e,y),_(e,t),_(e,i),_(e,s),$(g,o,y),R(r,g,y),$(g,u,y),$(g,f,y),c=!0,d||(h=Le(Be.call(null,s,{text:`List of domains that are NOT allowed. - This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&16&&l!==(l=g[4]))&&p(e,"for",l);const k={};y&16&&(k.id=g[4]),y&1&&(k.disabled=!B.isEmpty(g[0].onlyDomains)),!a&&y&1&&(a=!0,k.value=g[0].exceptDomains,Me(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){I(r.$$.fragment,g),c=!1},d(g){g&&S(e),g&&S(o),H(r,g),g&&S(u),g&&S(f),d=!1,h()}}}function f$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[3](g)}let b={id:n[4]+".options.onlyDomains",disabled:!B.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(b.value=n[0].onlyDomains),r=new xi({props:b}),le.push(()=>ye(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(g,y){$(g,e,y),_(e,t),_(e,i),_(e,s),$(g,o,y),R(r,g,y),$(g,u,y),$(g,f,y),c=!0,d||(h=Le(Be.call(null,s,{text:`List of domains that are ONLY allowed. - This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&16&&l!==(l=g[4]+".options.onlyDomains"))&&p(e,"for",l);const k={};y&16&&(k.id=g[4]+".options.onlyDomains"),y&1&&(k.disabled=!B.isEmpty(g[0].exceptDomains)),!a&&y&1&&(a=!0,k.value=g[0].onlyDomains,Me(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){I(r.$$.fragment,g),c=!1},d(g){g&&S(e),g&&S(o),H(r,g),g&&S(u),g&&S(f),d=!1,h()}}}function c$(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[u$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[f$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){$(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&S(e),H(i),H(o)}}}function d$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class C_ extends Ce{constructor(e){super(),$e(this,e,d$,c$,ke,{key:1,options:0})}}function p$(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new C_({props:r}),le.push(()=>ye(e,"key",l)),le.push(()=>ye(e,"options",o)),{c(){j(e.$$.fragment)},m(a,u){R(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],Me(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],Me(()=>i=!1)),e.$set(f)},i(a){s||(E(e.$$.fragment,a),s=!0)},o(a){I(e.$$.fragment,a),s=!1},d(a){H(e,a)}}}function h$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class m$ extends Ce{constructor(e){super(),$e(this,e,h$,p$,ke,{key:0,options:1})}}var br=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],bs={_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},hl={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},Zt=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},mn=function(n){return n===!0?1:0};function Hc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var vr=function(n){return n instanceof Array?n:[n]};function Vt(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function tt(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 eo(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function M_(n,e){if(e(n))return n;if(n.parentNode)return M_(n.parentNode,e)}function to(n,e){var t=tt("div","numInputWrapper"),i=tt("input","numInput "+n),s=tt("span","arrowUp"),l=tt("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 sn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var yr=function(){},Ao=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},g$={D:yr,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*mn(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:yr,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:yr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},ji={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})"},il={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[il.w(n,e,t)]},F:function(n,e,t){return Ao(il.n(n,e,t)-1,!1,e)},G:function(n,e,t){return Zt(il.h(n,e,t))},H:function(n){return Zt(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[mn(n.getHours()>11)]},M:function(n,e){return Ao(n.getMonth(),!0,e)},S:function(n){return Zt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return Zt(n.getFullYear(),4)},d:function(n){return Zt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return Zt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return Zt(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)}},T_=function(n){var e=n.config,t=e===void 0?bs:e,i=n.l10n,s=i===void 0?hl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,h){return il[c]&&h[d-1]!=="\\"?il[c](r,f,t):c!=="\\"?c:""}).join("")}},ia=function(n){var e=n.config,t=e===void 0?bs:e,i=n.l10n,s=i===void 0?hl: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||bs).dateFormat,h=String(l).trim();if(h==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(h)||/GMT$/.test(h))f=new Date(l);else{for(var m=void 0,b=[],g=0,y=0,k="";gMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),Q=wr(t.config);q.setHours(Q.hours,Q.minutes,Q.seconds,q.getMilliseconds()),t.selectedDates=[q],t.latestSelectedDateObj=q}N!==void 0&&N.type!=="blur"&&Il(N);var oe=t._input.value;c(),Pt(),t._input.value!==oe&&t._debouncedChange()}function u(N,q){return N%12+12*mn(q===t.l10n.amPM[1])}function f(N){switch(N%24){case 0:case 12:return 12;default:return N%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var N=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,q=(parseInt(t.minuteElement.value,10)||0)%60,Q=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(N=u(N,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&ln(t.latestSelectedDateObj,t.config.minDate,!0)===0,Te=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&ln(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=kr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Pe=kr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),De=kr(N,q,Q);if(De>Pe&&De=12)]),t.secondElement!==void 0&&(t.secondElement.value=Zt(Q)))}function m(N){var q=sn(N),Q=parseInt(q.value)+(N.delta||0);(Q/1e3>1||N.key==="Enter"&&!/[^\d]/.test(Q.toString()))&&de(Q)}function b(N,q,Q,oe){if(q instanceof Array)return q.forEach(function(Te){return b(N,Te,Q,oe)});if(N instanceof Array)return N.forEach(function(Te){return b(Te,q,Q,oe)});N.addEventListener(q,Q,oe),t._handlers.push({remove:function(){return N.removeEventListener(q,Q,oe)}})}function g(){Ke("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(Q){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+Q+"]"),function(oe){return b(oe,"click",t[Q])})}),t.isMobile){is();return}var N=Hc(te,50);if(t._debouncedChange=Hc(g,y$),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&b(t.daysContainer,"mouseover",function(Q){t.config.mode==="range"&&se(sn(Q))}),b(t._input,"keydown",ce),t.calendarContainer!==void 0&&b(t.calendarContainer,"keydown",ce),!t.config.inline&&!t.config.static&&b(window,"resize",N),window.ontouchstart!==void 0?b(window.document,"touchstart",he):b(window.document,"mousedown",he),b(window.document,"focus",he,{capture:!0}),t.config.clickOpens===!0&&(b(t._input,"focus",t.open),b(t._input,"click",t.open)),t.daysContainer!==void 0&&(b(t.monthNav,"click",qt),b(t.monthNav,["keyup","increment"],m),b(t.daysContainer,"click",As)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var q=function(Q){return sn(Q).select()};b(t.timeContainer,["increment"],a),b(t.timeContainer,"blur",a,{capture:!0}),b(t.timeContainer,"click",w),b([t.hourElement,t.minuteElement],["focus","click"],q),t.secondElement!==void 0&&b(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&b(t.amPM,"click",function(Q){a(Q)})}t.config.allowInput&&b(t._input,"blur",Ue)}function k(N,q){var Q=N!==void 0?t.parseDate(N):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(N);var Te=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Te&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Ie=tt("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 T(N,q,Q,oe){var Te=Se(q,!0),Ie=tt("span",N,q.getDate().toString());return Ie.dateObj=q,Ie.$i=oe,Ie.setAttribute("aria-label",t.formatDate(q,t.config.ariaDateFormat)),N.indexOf("hidden")===-1&&ln(q,t.now)===0&&(t.todayDateElem=Ie,Ie.classList.add("today"),Ie.setAttribute("aria-current","date")),Te?(Ie.tabIndex=-1,Xn(q)&&(Ie.classList.add("selected"),t.selectedDateElem=Ie,t.config.mode==="range"&&(Vt(Ie,"startRange",t.selectedDates[0]&&ln(q,t.selectedDates[0],!0)===0),Vt(Ie,"endRange",t.selectedDates[1]&&ln(q,t.selectedDates[1],!0)===0),N==="nextMonthDay"&&Ie.classList.add("inRange")))):Ie.classList.add("flatpickr-disabled"),t.config.mode==="range"&&ls(q)&&!Xn(q)&&Ie.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&N!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(q)+""),Ke("onDayCreate",Ie),Ie}function D(N){N.focus(),t.config.mode==="range"&&se(N)}function A(N){for(var q=N>0?0:t.config.showMonths-1,Q=N>0?t.config.showMonths:-1,oe=q;oe!=Q;oe+=N)for(var Te=t.daysContainer.children[oe],Ie=N>0?0:Te.children.length-1,Pe=N>0?Te.children.length:-1,De=Ie;De!=Pe;De+=N){var ze=Te.children[De];if(ze.className.indexOf("hidden")===-1&&Se(ze.dateObj))return ze}}function P(N,q){for(var Q=N.className.indexOf("Month")===-1?N.dateObj.getMonth():t.currentMonth,oe=q>0?t.config.showMonths:-1,Te=q>0?1:-1,Ie=Q-t.currentMonth;Ie!=oe;Ie+=Te)for(var Pe=t.daysContainer.children[Ie],De=Q-t.currentMonth===Ie?N.$i+q:q<0?Pe.children.length-1:0,ze=Pe.children.length,Ne=De;Ne>=0&&Ne0?ze:-1);Ne+=Te){var qe=Pe.children[Ne];if(qe.className.indexOf("hidden")===-1&&Se(qe.dateObj)&&Math.abs(N.$i-Ne)>=Math.abs(q))return D(qe)}t.changeMonth(Te),L(A(Te),0)}function L(N,q){var Q=l(),oe=we(Q||document.body),Te=N!==void 0?N:oe?Q:t.selectedDateElem!==void 0&&we(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&we(t.todayDateElem)?t.todayDateElem:A(q>0?1:-1);Te===void 0?t._input.focus():oe?P(Te,q):D(Te)}function V(N,q){for(var Q=(new Date(N,q,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((q-1+12)%12,N),Te=t.utils.getDaysInMonth(q,N),Ie=window.document.createDocumentFragment(),Pe=t.config.showMonths>1,De=Pe?"prevMonthDay hidden":"prevMonthDay",ze=Pe?"nextMonthDay hidden":"nextMonthDay",Ne=oe+1-Q,qe=0;Ne<=oe;Ne++,qe++)Ie.appendChild(T("flatpickr-day "+De,new Date(N,q-1,Ne),Ne,qe));for(Ne=1;Ne<=Te;Ne++,qe++)Ie.appendChild(T("flatpickr-day",new Date(N,q,Ne),Ne,qe));for(var at=Te+1;at<=42-Q&&(t.config.showMonths===1||qe%7!==0);at++,qe++)Ie.appendChild(T("flatpickr-day "+ze,new Date(N,q+1,at%Te),at,qe));var Hn=tt("div","dayContainer");return Hn.appendChild(Ie),Hn}function F(){if(t.daysContainer!==void 0){eo(t.daysContainer),t.weekNumbers&&eo(t.weekNumbers);for(var N=document.createDocumentFragment(),q=0;q1||t.config.monthSelectorType!=="dropdown")){var N=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 q=0;q<12;q++)if(!!N(q)){var Q=tt("option","flatpickr-monthDropdown-month");Q.value=new Date(t.currentYear,q).getMonth().toString(),Q.textContent=Ao(q,t.config.shorthandCurrentMonth,t.l10n),Q.tabIndex=-1,t.currentMonth===q&&(Q.selected=!0),t.monthsDropdownContainer.appendChild(Q)}}}function G(){var N=tt("div","flatpickr-month"),q=window.document.createDocumentFragment(),Q;t.config.showMonths>1||t.config.monthSelectorType==="static"?Q=tt("span","cur-month"):(t.monthsDropdownContainer=tt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),b(t.monthsDropdownContainer,"change",function(Pe){var De=sn(Pe),ze=parseInt(De.value,10);t.changeMonth(ze-t.currentMonth),Ke("onMonthChange")}),U(),Q=t.monthsDropdownContainer);var oe=to("cur-year",{tabindex:"-1"}),Te=oe.getElementsByTagName("input")[0];Te.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Te.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Te.setAttribute("max",t.config.maxDate.getFullYear().toString()),Te.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Ie=tt("div","flatpickr-current-month");return Ie.appendChild(Q),Ie.appendChild(oe),q.appendChild(Ie),N.appendChild(q),{container:N,yearElement:Te,monthElement:Q}}function K(){eo(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var N=t.config.showMonths;N--;){var q=G();t.yearElements.push(q.yearElement),t.monthElements.push(q.monthElement),t.monthNav.appendChild(q.container)}t.monthNav.appendChild(t.nextMonthNav)}function X(){return t.monthNav=tt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=tt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=tt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,K(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(N){t.__hidePrevMonthArrow!==N&&(Vt(t.prevMonthNav,"flatpickr-disabled",N),t.__hidePrevMonthArrow=N)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(N){t.__hideNextMonthArrow!==N&&(Vt(t.nextMonthNav,"flatpickr-disabled",N),t.__hideNextMonthArrow=N)}}),t.currentYearElement=t.yearElements[0],Oi(),t.monthNav}function Z(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var N=wr(t.config);t.timeContainer=tt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var q=tt("span","flatpickr-time-separator",":"),Q=to("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=Q.getElementsByTagName("input")[0];var oe=to("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=Zt(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?N.hours:f(N.hours)),t.minuteElement.value=Zt(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():N.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Q),t.timeContainer.appendChild(q),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Te=to("flatpickr-second");t.secondElement=Te.getElementsByTagName("input")[0],t.secondElement.value=Zt(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():N.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(tt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Te)}return t.config.time_24hr||(t.amPM=tt("span","flatpickr-am-pm",t.l10n.amPM[mn((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 ie(){t.weekdayContainer?eo(t.weekdayContainer):t.weekdayContainer=tt("div","flatpickr-weekdays");for(var N=t.config.showMonths;N--;){var q=tt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(q)}return J(),t.weekdayContainer}function J(){if(!!t.weekdayContainer){var N=t.l10n.firstDayOfWeek,q=jc(t.l10n.weekdays.shorthand);N>0&&N>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),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 eS(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),_(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:x,o:x,d(s){s&&w(e)}}}function tS(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=Us.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Us.highlight(a,Us.languages[l]||Us.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 Us<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class w_ extends Ce{constructor(e){super(),$e(this,e,tS,eS,ke,{class:0,content:2,language:3})}}const nS=n=>({}),fc=n=>({}),iS=n=>({}),cc=n=>({});function dc(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$=n[4]&&!n[2]&&pc(n);const C=n[18].header,M=Ot(C,n,n[17],cc);let T=n[4]&&n[2]&&hc(n);const D=n[18].default,A=Ot(D,n,n[17],null),P=n[18].footer,L=Ot(P,n,n[17],fc);return{c(){e=v("div"),t=v("div"),s=O(),l=v("div"),o=v("div"),$&&$.c(),r=O(),M&&M.c(),a=O(),T&&T.c(),u=O(),f=v("div"),A&&A.c(),c=O(),d=v("div"),L&&L.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",h="overlay-panel "+n[1]+" "+n[8]),ee(l,"popup",n[2]),p(e,"class","overlay-panel-container"),ee(e,"padded",n[2]),ee(e,"active",n[0])},m(V,F){S(V,e,F),_(e,t),_(e,s),_(e,l),_(l,o),$&&$.m(o,null),_(o,r),M&&M.m(o,null),_(o,a),T&&T.m(o,null),_(l,u),_(l,f),A&&A.m(f,null),n[20](f),_(l,c),_(l,d),L&&L.m(d,null),g=!0,y||(k=[W(t,"click",ut(n[19])),W(f,"scroll",n[21])],y=!0)},p(V,F){n=V,n[4]&&!n[2]?$?$.p(n,F):($=pc(n),$.c(),$.m(o,r)):$&&($.d(1),$=null),M&&M.p&&(!g||F&131072)&&Et(M,C,n,n[17],g?Dt(C,n[17],F,iS):At(n[17]),cc),n[4]&&n[2]?T?T.p(n,F):(T=hc(n),T.c(),T.m(o,null)):T&&(T.d(1),T=null),A&&A.p&&(!g||F&131072)&&Et(A,D,n,n[17],g?Dt(D,n[17],F,null):At(n[17]),null),L&&L.p&&(!g||F&131072)&&Et(L,P,n,n[17],g?Dt(P,n[17],F,nS):At(n[17]),fc),(!g||F&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),(!g||F&262)&&ee(l,"popup",n[2]),(!g||F&4)&&ee(e,"padded",n[2]),(!g||F&1)&&ee(e,"active",n[0])},i(V){g||(Qe(()=>{i||(i=je(t,bo,{duration:cs,opacity:0},!0)),i.run(1)}),E(M,V),E(A,V),E(L,V),Qe(()=>{b&&b.end(1),m=dm(l,kn,n[2]?{duration:cs,y:-10}:{duration:cs,x:50}),m.start()}),g=!0)},o(V){i||(i=je(t,bo,{duration:cs,opacity:0},!1)),i.run(0),I(M,V),I(A,V),I(L,V),m&&m.invalidate(),b=pm(l,kn,n[2]?{duration:cs,y:10}:{duration:cs,x:50}),g=!1},d(V){V&&w(e),V&&i&&i.end(),$&&$.d(),M&&M.d(V),T&&T.d(),A&&A.d(V),n[20](null),L&&L.d(V),V&&b&&b.end(),y=!1,Re(k)}}}function pc(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=W(e,"click",ut(n[5])),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}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-secondary btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=W(e,"click",ut(n[5])),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function sS(n){let e,t,i,s,l=n[0]&&dc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(o,r){S(o,e,r),l&&l.m(e,null),n[22](e),t=!0,i||(s=[W(window,"resize",n[10]),W(window,"keydown",n[9])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&E(l,1)):(l=dc(o),l.c(),E(l,1),l.m(e,null)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){t||(E(l),t=!0)},o(o){I(l),t=!1},d(o){o&&w(e),l&&l.d(),n[22](null),i=!1,Re(s)}}}let Ni;function S_(){return Ni=Ni||document.querySelector(".overlays"),Ni||(Ni=document.createElement("div"),Ni.classList.add("overlays"),document.body.appendChild(Ni)),Ni}let cs=150;function mc(){return 1e3+S_().querySelectorAll(".overlay-panel-container.active").length}function lS(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const h=It();let m,b,g,y,k="";function $(){typeof c=="function"&&c()===!1||t(0,o=!0)}function C(){typeof d=="function"&&d()===!1||t(0,o=!1)}function M(){return o}async function T(K){K?(g=document.activeElement,m==null||m.focus(),h("show"),document.body.classList.add("overlay-active")):(clearTimeout(y),g==null||g.focus(),h("hide"),document.body.classList.remove("overlay-active")),await $n(),D()}function D(){!m||(o?t(6,m.style.zIndex=mc(),m):t(6,m.style="",m))}function A(K){o&&f&&K.code=="Escape"&&!B.isInput(K.target)&&m&&m.style.zIndex==mc()&&(K.preventDefault(),C())}function P(K){o&&L(b)}function L(K,X){X&&t(8,k=""),K&&(y||(y=setTimeout(()=>{if(clearTimeout(y),y=null,!K)return;if(K.scrollHeight-K.offsetHeight>0)t(8,k="scrollable");else{t(8,k="");return}K.scrollTop==0?t(8,k+=" scroll-top-reached"):K.scrollTop+K.offsetHeight==K.scrollHeight&&t(8,k+=" scroll-bottom-reached")},100)))}un(()=>(S_().appendChild(m),()=>{var K;clearTimeout(y),(K=m==null?void 0:m.classList)==null||K.add("hidden"),setTimeout(()=>{m==null||m.remove()},0)}));const V=()=>a?C():!0;function F(K){le[K?"unshift":"push"](()=>{b=K,t(7,b)})}const U=K=>L(K.target);function G(K){le[K?"unshift":"push"](()=>{m=K,t(6,m)})}return n.$$set=K=>{"class"in K&&t(1,l=K.class),"active"in K&&t(0,o=K.active),"popup"in K&&t(2,r=K.popup),"overlayClose"in K&&t(3,a=K.overlayClose),"btnClose"in K&&t(4,u=K.btnClose),"escClose"in K&&t(12,f=K.escClose),"beforeOpen"in K&&t(13,c=K.beforeOpen),"beforeHide"in K&&t(14,d=K.beforeHide),"$$scope"in K&&t(17,s=K.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&T(o),n.$$.dirty&128&&L(b,!0),n.$$.dirty&64&&m&&D()},[o,l,r,a,u,C,m,b,k,A,P,L,f,c,d,$,M,s,i,V,F,U,G]}class Jn extends Ce{constructor(e){super(),$e(this,e,lS,sS,ke,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16})}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function oS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function rS(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=z(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&ue(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&w(e)}}}function aS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:x,i:x,o:x,d(t){t&&w(e)}}}function uS(n){let e,t;return e=new w_({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.content=JSON.stringify(i[2].meta,null,2)),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function fS(n){var Ie;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,h,m,b=n[2].status+"",g,y,k,$,C,M,T=((Ie=n[2].method)==null?void 0:Ie.toUpperCase())+"",D,A,P,L,V,F,U=n[2].auth+"",G,K,X,Z,ie,J,fe=n[2].url+"",Y,re,Oe,ge,ae,he,de,Se,we,Ue,ce,se=n[2].remoteIp+"",te,ne,Ee,it,en,Kt,tn=n[2].userIp+"",Gn,Mi,oi,ri,As,ai,es=n[2].userAgent+"",ts,El,ui,ns,Al,Ti,is,Jt,Ke,ss,Xn,ls,Oi,Di,Pt,qt;function Il(Pe,De){return Pe[2].referer?rS:oS}let N=Il(n),q=N(n);const Q=[uS,aS],oe=[];function Te(Pe,De){return De&4&&(is=null),is==null&&(is=!B.isEmpty(Pe[2].meta)),is?0:1}return Jt=Te(n,-1),Ke=oe[Jt]=Q[Jt](n),Pt=new Ki({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=O(),o=v("td"),a=z(r),u=O(),f=v("tr"),c=v("td"),c.textContent="Status",d=O(),h=v("td"),m=v("span"),g=z(b),y=O(),k=v("tr"),$=v("td"),$.textContent="Method",C=O(),M=v("td"),D=z(T),A=O(),P=v("tr"),L=v("td"),L.textContent="Auth",V=O(),F=v("td"),G=z(U),K=O(),X=v("tr"),Z=v("td"),Z.textContent="URL",ie=O(),J=v("td"),Y=z(fe),re=O(),Oe=v("tr"),ge=v("td"),ge.textContent="Referer",ae=O(),he=v("td"),q.c(),de=O(),Se=v("tr"),we=v("td"),we.textContent="Remote IP",Ue=O(),ce=v("td"),te=z(se),ne=O(),Ee=v("tr"),it=v("td"),it.textContent="User IP",en=O(),Kt=v("td"),Gn=z(tn),Mi=O(),oi=v("tr"),ri=v("td"),ri.textContent="UserAgent",As=O(),ai=v("td"),ts=z(es),El=O(),ui=v("tr"),ns=v("td"),ns.textContent="Meta",Al=O(),Ti=v("td"),Ke.c(),ss=O(),Xn=v("tr"),ls=v("td"),ls.textContent="Created",Oi=O(),Di=v("td"),j(Pt.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(m,"class","label"),ee(m,"label-danger",n[2].status>=400),p($,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(Z,"class","min-width txt-hint txt-bold"),p(ge,"class","min-width txt-hint txt-bold"),p(we,"class","min-width txt-hint txt-bold"),p(it,"class","min-width txt-hint txt-bold"),p(ri,"class","min-width txt-hint txt-bold"),p(ns,"class","min-width txt-hint txt-bold"),p(ls,"class","min-width txt-hint txt-bold"),p(e,"class","table-compact table-border")},m(Pe,De){S(Pe,e,De),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,a),_(t,u),_(t,f),_(f,c),_(f,d),_(f,h),_(h,m),_(m,g),_(t,y),_(t,k),_(k,$),_(k,C),_(k,M),_(M,D),_(t,A),_(t,P),_(P,L),_(P,V),_(P,F),_(F,G),_(t,K),_(t,X),_(X,Z),_(X,ie),_(X,J),_(J,Y),_(t,re),_(t,Oe),_(Oe,ge),_(Oe,ae),_(Oe,he),q.m(he,null),_(t,de),_(t,Se),_(Se,we),_(Se,Ue),_(Se,ce),_(ce,te),_(t,ne),_(t,Ee),_(Ee,it),_(Ee,en),_(Ee,Kt),_(Kt,Gn),_(t,Mi),_(t,oi),_(oi,ri),_(oi,As),_(oi,ai),_(ai,ts),_(t,El),_(t,ui),_(ui,ns),_(ui,Al),_(ui,Ti),oe[Jt].m(Ti,null),_(t,ss),_(t,Xn),_(Xn,ls),_(Xn,Oi),_(Xn,Di),R(Pt,Di,null),qt=!0},p(Pe,De){var qe;(!qt||De&4)&&r!==(r=Pe[2].id+"")&&ue(a,r),(!qt||De&4)&&b!==(b=Pe[2].status+"")&&ue(g,b),(!qt||De&4)&&ee(m,"label-danger",Pe[2].status>=400),(!qt||De&4)&&T!==(T=((qe=Pe[2].method)==null?void 0:qe.toUpperCase())+"")&&ue(D,T),(!qt||De&4)&&U!==(U=Pe[2].auth+"")&&ue(G,U),(!qt||De&4)&&fe!==(fe=Pe[2].url+"")&&ue(Y,fe),N===(N=Il(Pe))&&q?q.p(Pe,De):(q.d(1),q=N(Pe),q&&(q.c(),q.m(he,null))),(!qt||De&4)&&se!==(se=Pe[2].remoteIp+"")&&ue(te,se),(!qt||De&4)&&tn!==(tn=Pe[2].userIp+"")&&ue(Gn,tn),(!qt||De&4)&&es!==(es=Pe[2].userAgent+"")&&ue(ts,es);let ze=Jt;Jt=Te(Pe,De),Jt===ze?oe[Jt].p(Pe,De):(be(),I(oe[ze],1,1,()=>{oe[ze]=null}),ve(),Ke=oe[Jt],Ke?Ke.p(Pe,De):(Ke=oe[Jt]=Q[Jt](Pe),Ke.c()),E(Ke,1),Ke.m(Ti,null));const Ne={};De&4&&(Ne.date=Pe[2].created),Pt.$set(Ne)},i(Pe){qt||(E(Ke),E(Pt.$$.fragment,Pe),qt=!0)},o(Pe){I(Ke),I(Pt.$$.fragment,Pe),qt=!1},d(Pe){Pe&&w(e),q.d(),oe[Jt].d(),H(Pt)}}}function cS(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function dS(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[4]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function pS(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[dS],header:[cS],default:[fS]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[5](null),H(e,s)}}}function hS(n,e,t){let i,s=new Ar;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){le[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){Ve.call(this,n,c)}function f(c){Ve.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class mS extends Ce{constructor(e){super(),$e(this,e,hS,pS,ke,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function gS(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[0],S(u,i,f),S(u,s,f),_(s,l),r||(a=W(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function gc(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new Qw({props:l}),le.push(()=>ye(e,"filter",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function _c(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new _v({props:l}),le.push(()=>ye(e,"filter",s)),e.$on("select",n[12]),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function _S(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k=n[3],$,C=n[3],M,T;r=new wa({}),r.$on("refresh",n[7]),d=new _e({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[gS,({uniqueId:P})=>({14:P}),({uniqueId:P})=>P?16384:0]},$$scope:{ctx:n}}}),m=new ka({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),m.$on("submit",n[9]);let D=gc(n),A=_c(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=z(n[5]),o=O(),j(r.$$.fragment),a=O(),u=v("div"),f=O(),c=v("div"),j(d.$$.fragment),h=O(),j(m.$$.fragment),b=O(),g=v("div"),y=O(),D.c(),$=O(),A.c(),M=Fe(),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(g,"class","clearfix m-b-xs"),p(e,"class","page-header-wrapper m-b-0")},m(P,L){S(P,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(t,o),R(r,t,null),_(t,a),_(t,u),_(t,f),_(t,c),R(d,c,null),_(e,h),R(m,e,null),_(e,b),_(e,g),_(e,y),D.m(e,null),S(P,$,L),A.m(P,L),S(P,M,L),T=!0},p(P,L){(!T||L&32)&&ue(l,P[5]);const V={};L&49153&&(V.$$scope={dirty:L,ctx:P}),d.$set(V);const F={};L&4&&(F.value=P[2]),m.$set(F),L&8&&ke(k,k=P[3])?(be(),I(D,1,1,x),ve(),D=gc(P),D.c(),E(D,1),D.m(e,null)):D.p(P,L),L&8&&ke(C,C=P[3])?(be(),I(A,1,1,x),ve(),A=_c(P),A.c(),E(A,1),A.m(M.parentNode,M)):A.p(P,L)},i(P){T||(E(r.$$.fragment,P),E(d.$$.fragment,P),E(m.$$.fragment,P),E(D),E(A),T=!0)},o(P){I(r.$$.fragment,P),I(d.$$.fragment,P),I(m.$$.fragment,P),I(D),I(A),T=!1},d(P){P&&w(e),H(r),H(d),H(m),D.d(P),P&&w($),P&&w(M),A.d(P)}}}function bS(n){let e,t,i,s;e=new cn({props:{$$slots:{default:[_S]},$$scope:{ctx:n}}});let l={};return i=new mS({props:l}),n[13](i),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(o,r){R(e,o,r),S(o,t,r),R(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(E(e.$$.fragment,o),E(i.$$.fragment,o),s=!0)},o(o){I(e.$$.fragment,o),I(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&w(t),n[13](null),H(i,o)}}}const bc="includeAdminLogs";function vS(n,e,t){var y;let i,s;Je(n,mt,k=>t(5,s=k)),Ht(mt,s="Request logs",s);let l,o="",r=((y=window.localStorage)==null?void 0:y.getItem(bc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function c(){r=this.checked,t(0,r)}const d=k=>t(2,o=k.detail);function h(k){o=k,t(2,o)}function m(k){o=k,t(2,o)}const b=k=>l==null?void 0:l.show(k==null?void 0:k.detail);function g(k){le[k?"unshift":"push"](()=>{l=k,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(bc,r<<0)},[r,l,o,a,i,s,u,f,c,d,h,m,b,g]}class yS extends Ce{constructor(e){super(),$e(this,e,vS,bS,ke,{})}}const Zi=Cn([]),Bn=Cn({}),na=Cn(!1);function kS(n){Zi.update(e=>{const t=B.findByKey(e,"id",n);return t?Bn.set(t):e.length&&Bn.set(e[0]),e})}function wS(n){Bn.update(e=>B.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),Zi.update(e=>(B.pushOrReplaceByKey(e,n,"id"),B.sortCollections(e)))}function SS(n){Zi.update(e=>(B.removeByKey(e,"id",n.id),Bn.update(t=>t.id===n.id?e[0]:t),e))}async function $S(n=null){return na.set(!0),Bn.set({}),Zi.set([]),me.collections.getFullList(200,{sort:"+created"}).then(e=>{Zi.set(B.sortCollections(e));const t=n&&B.findByKey(e,"id",n);t?Bn.set(t):e.length&&Bn.set(e[0])}).catch(e=>{me.errorResponseHandler(e)}).finally(()=>{na.set(!1)})}const Ya=Cn({});function yn(n,e,t){Ya.set({text:n,yesCallback:e,noCallback:t})}function $_(){Ya.set({})}function vc(n){let e,t,i,s;const l=n[14].default,o=Ot(l,n,n[13],null);return{c(){e=v("div"),o&&o.c(),p(e,"class",n[1]),ee(e,"active",n[0])},m(r,a){S(r,e,a),o&&o.m(e,null),s=!0},p(r,a){o&&o.p&&(!s||a&8192)&&Et(o,l,r,r[13],s?Dt(l,r[13],a,null):At(r[13]),null),(!s||a&2)&&p(e,"class",r[1]),(!s||a&3)&&ee(e,"active",r[0])},i(r){s||(E(o,r),r&&Qe(()=>{i&&i.end(1),t=dm(e,kn,{duration:150,y:-5}),t.start()}),s=!0)},o(r){I(o,r),t&&t.invalidate(),r&&(i=pm(e,kn,{duration:150,y:2})),s=!1},d(r){r&&w(e),o&&o.d(r),r&&i&&i.end()}}}function CS(n){let e,t,i,s,l=n[0]&&vc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container")},m(o,r){S(o,e,r),l&&l.m(e,null),n[15](e),t=!0,i||(s=[W(window,"click",n[3]),W(window,"keydown",n[4]),W(window,"focusin",n[5])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&E(l,1)):(l=vc(o),l.c(),E(l,1),l.m(e,null)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){t||(E(l),t=!0)},o(o){I(l),t=!1},d(o){o&&w(e),l&&l.d(),n[15](null),i=!1,Re(s)}}}function MS(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f,c;const d=It();function h(){t(0,o=!1)}function m(){t(0,o=!0)}function b(){o?h():m()}function g(P){return!f||P.classList.contains(a)||(c==null?void 0:c.contains(P))&&!f.contains(P)||f.contains(P)&&P.closest&&P.closest("."+a)}function y(P){(!o||g(P.target))&&(P.preventDefault(),P.stopPropagation(),b())}function k(P){(P.code==="Enter"||P.code==="Space")&&(!o||g(P.target))&&(P.preventDefault(),P.stopPropagation(),b())}function $(P){o&&!(f!=null&&f.contains(P.target))&&!(c!=null&&c.contains(P.target))&&h()}function C(P){o&&r&&P.code==="Escape"&&(P.preventDefault(),h())}function M(P){return $(P)}function T(P){D(),t(12,c=P||(f==null?void 0:f.parentNode)),c&&(f==null||f.addEventListener("click",y),c.addEventListener("click",y),c.addEventListener("keydown",k))}function D(){!c||(f==null||f.removeEventListener("click",y),c.removeEventListener("click",y),c.removeEventListener("keydown",k))}un(()=>(T(),()=>D()));function A(P){le[P?"unshift":"push"](()=>{f=P,t(2,f)})}return n.$$set=P=>{"trigger"in P&&t(6,l=P.trigger),"active"in P&&t(0,o=P.active),"escClose"in P&&t(7,r=P.escClose),"closableClass"in P&&t(8,a=P.closableClass),"class"in P&&t(1,u=P.class),"$$scope"in P&&t(13,s=P.$$scope)},n.$$.update=()=>{var P,L;n.$$.dirty&68&&f&&T(l),n.$$.dirty&4097&&(o?((P=c==null?void 0:c.classList)==null||P.add("active"),d("show")):((L=c==null?void 0:c.classList)==null||L.remove("active"),d("hide")))},[o,u,f,$,C,M,l,r,a,h,m,b,c,s,i,A]}class Zn extends Ce{constructor(e){super(),$e(this,e,MS,CS,ke,{trigger:6,active:0,escClose:7,closableClass:8,class:1,hide:9,show:10,toggle:11})}get hide(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}get toggle(){return this.$$.ctx[11]}}const TS=n=>({active:n&1}),yc=n=>({active:n[0]});function kc(n){let e,t,i;const s=n[15].default,l=Ot(s,n,n[14],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&16384)&&Et(l,s,o,o[14],i?Dt(s,o[14],r,null):At(o[14]),null)},i(o){i||(E(l,o),o&&Qe(()=>{t||(t=je(e,St,{duration:150},!0)),t.run(1)}),i=!0)},o(o){I(l,o),o&&(t||(t=je(e,St,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function OS(n){let e,t,i,s,l,o,r,a;const u=n[15].header,f=Ot(u,n,n[14],yc);let c=n[0]&&kc(n);return{c(){e=v("div"),t=v("header"),f&&f.c(),i=O(),c&&c.c(),p(t,"class","accordion-header"),p(t,"draggable",n[2]),ee(t,"interactive",n[3]),p(e,"tabindex",s=n[3]?0:-1),p(e,"class",l="accordion "+(n[7]?"drag-over":"")+" "+n[1]),ee(e,"active",n[0])},m(d,h){S(d,e,h),_(e,t),f&&f.m(t,null),_(e,i),c&&c.m(e,null),n[22](e),o=!0,r||(a=[W(t,"click",ut(n[17])),W(t,"drop",ut(n[18])),W(t,"dragstart",n[19]),W(t,"dragenter",n[20]),W(t,"dragleave",n[21]),W(t,"dragover",ut(n[16])),W(e,"keydown",U_(n[9]))],r=!0)},p(d,[h]){f&&f.p&&(!o||h&16385)&&Et(f,u,d,d[14],o?Dt(u,d[14],h,TS):At(d[14]),yc),(!o||h&4)&&p(t,"draggable",d[2]),(!o||h&8)&&ee(t,"interactive",d[3]),d[0]?c?(c.p(d,h),h&1&&E(c,1)):(c=kc(d),c.c(),E(c,1),c.m(e,null)):c&&(be(),I(c,1,1,()=>{c=null}),ve()),(!o||h&8&&s!==(s=d[3]?0:-1))&&p(e,"tabindex",s),(!o||h&130&&l!==(l="accordion "+(d[7]?"drag-over":"")+" "+d[1]))&&p(e,"class",l),(!o||h&131)&&ee(e,"active",d[0])},i(d){o||(E(f,d),E(c),o=!0)},o(d){I(f,d),I(c),o=!1},d(d){d&&w(e),f&&f.d(d),c&&c.d(),n[22](null),r=!1,Re(a)}}}function DS(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=It();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,h=!1;function m(){y(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function g(){l("toggle"),f?b():m()}function y(){if(d&&o.closest(".accordions")){const L=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const V of L)V.click()}}function k(L){!c||(L.code==="Enter"||L.code==="Space")&&(L.preventDefault(),g())}un(()=>()=>clearTimeout(r));function $(L){Ve.call(this,n,L)}const C=()=>c&&g(),M=L=>{u&&(t(7,h=!1),y(),l("drop",L))},T=L=>u&&l("dragstart",L),D=L=>{u&&(t(7,h=!0),l("dragenter",L))},A=L=>{u&&(t(7,h=!1),l("dragleave",L))};function P(L){le[L?"unshift":"push"](()=>{o=L,t(6,o)})}return n.$$set=L=>{"class"in L&&t(1,a=L.class),"draggable"in L&&t(2,u=L.draggable),"active"in L&&t(0,f=L.active),"interactive"in L&&t(3,c=L.interactive),"single"in L&&t(10,d=L.single),"$$scope"in L&&t(14,s=L.$$scope)},n.$$.update=()=>{n.$$.dirty&8257&&f&&(clearTimeout(r),t(13,r=setTimeout(()=>{o!=null&&o.scrollIntoView&&o.scrollIntoView({behavior:"smooth",block:"nearest"})},250)))},[f,a,u,c,g,y,o,h,l,k,d,m,b,r,s,i,$,C,M,T,D,A,P]}class _s extends Ce{constructor(e){super(),$e(this,e,DS,OS,ke,{class:1,draggable:2,active:0,interactive:3,single:10,expand:11,collapse:12,toggle:4,collapseSiblings:5})}get expand(){return this.$$.ctx[11]}get collapse(){return this.$$.ctx[12]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}const ES=n=>({}),wc=n=>({});function Sc(n,e,t){const i=n.slice();return i[45]=e[t],i}const AS=n=>({}),$c=n=>({});function Cc(n,e,t){const i=n.slice();return i[45]=e[t],i}function Mc(n){let e,t,i;return{c(){e=v("div"),t=z(n[2]),i=O(),p(e,"class","block txt-placeholder"),ee(e,"link-hint",!n[5])},m(s,l){S(s,e,l),_(e,t),_(e,i)},p(s,l){l[0]&4&&ue(t,s[2]),l[0]&32&&ee(e,"link-hint",!s[5])},d(s){s&&w(e)}}}function IS(n){let e,t=n[45]+"",i;return{c(){e=v("span"),i=z(t),p(e,"class","txt")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=s[45]+"")&&ue(i,t)},i:x,o:x,d(s){s&&w(e)}}}function PS(n){let e,t,i;const s=[{item:n[45]},n[8]];var l=n[7];function o(r){let a={};for(let u=0;u{H(f,1)}),ve()}l?(e=jt(l,o()),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Tc(n){let e,t,i;function s(){return n[33](n[45])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[Le(Be.call(null,e,"Clear")),W(e,"click",Yn(ut(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Re(i)}}}function Oc(n){let e,t,i,s,l,o;const r=[PS,IS],a=[];function u(c,d){return c[7]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&Tc(n);return{c(){e=v("div"),i.c(),s=O(),f&&f.c(),l=O(),p(e,"class","option")},m(c,d){S(c,e,d),a[t].m(e,null),_(e,s),f&&f.m(e,null),_(e,l),o=!0},p(c,d){let h=t;t=u(c),t===h?a[t].p(c,d):(be(),I(a[h],1,1,()=>{a[h]=null}),ve(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),E(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=Tc(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(E(i),o=!0)},o(c){I(i),o=!1},d(c){c&&w(e),a[t].d(),f&&f.d()}}}function Dc(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[17],$$slots:{default:[FS]},$$scope:{ctx:n}};return e=new Zn({props:i}),n[38](e),e.$on("show",n[23]),e.$on("hide",n[39]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,l){const o={};l[0]&131072&&(o.trigger=s[17]),l[0]&806410|l[1]&1024&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[38](null),H(e,s)}}}function Ec(n){let e,t,i,s,l,o,r,a,u=n[14].length&&Ac(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=O(),l=v("input"),o=O(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){S(f,e,c),_(e,t),_(t,i),_(t,s),_(t,l),pe(l,n[14]),_(t,o),u&&u.m(t,null),l.focus(),r||(a=W(l,"input",n[35]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&16384&&l.value!==f[14]&&pe(l,f[14]),f[14].length?u?u.p(f,c):(u=Ac(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&w(e),u&&u.d(),r=!1,a()}}}function Ac(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-secondary clear"),p(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),_(e,t),i||(s=W(t,"click",Yn(ut(n[20]))),i=!0)},p:x,d(l){l&&w(e),i=!1,s()}}}function Ic(n){let e,t=n[1]&&Pc(n);return{c(){t&&t.c(),e=Fe()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=Pc(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Pc(n){let e,t;return{c(){e=v("div"),t=z(n[1]),p(e,"class","txt-missing")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s[0]&2&&ue(t,i[1])},d(i){i&&w(e)}}}function LS(n){let e=n[45]+"",t;return{c(){t=z(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&524288&&e!==(e=i[45]+"")&&ue(t,e)},i:x,o:x,d(i){i&&w(t)}}}function NS(n){let e,t,i;const s=[{item:n[45]},n[10]];var l=n[9];function o(r){let a={};for(let u=0;u{H(f,1)}),ve()}l?(e=jt(l,o()),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&I(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Lc(n){let e,t,i,s,l,o,r;const a=[NS,LS],u=[];function f(h,m){return h[9]?0:1}t=f(n),i=u[t]=a[t](n);function c(...h){return n[36](n[45],...h)}function d(...h){return n[37](n[45],...h)}return{c(){e=v("div"),i.c(),s=O(),p(e,"tabindex","0"),p(e,"class","dropdown-item option closable"),ee(e,"selected",n[18](n[45]))},m(h,m){S(h,e,m),u[t].m(e,null),_(e,s),l=!0,o||(r=[W(e,"click",c),W(e,"keydown",d)],o=!0)},p(h,m){n=h;let b=t;t=f(n),t===b?u[t].p(n,m):(be(),I(u[b],1,1,()=>{u[b]=null}),ve(),i=u[t],i?i.p(n,m):(i=u[t]=a[t](n),i.c()),E(i,1),i.m(e,s)),(!l||m[0]&786432)&&ee(e,"selected",n[18](n[45]))},i(h){l||(E(i),l=!0)},o(h){I(i),l=!1},d(h){h&&w(e),u[t].d(),o=!1,Re(r)}}}function FS(n){let e,t,i,s,l,o=n[11]&&Ec(n);const r=n[32].beforeOptions,a=Ot(r,n,n[41],$c);let u=n[19],f=[];for(let b=0;bI(f[b],1,1,()=>{f[b]=null});let d=null;u.length||(d=Ic(n));const h=n[32].afterOptions,m=Ot(h,n,n[41],wc);return{c(){o&&o.c(),e=O(),a&&a.c(),t=O(),i=v("div");for(let b=0;bI(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=Mc(n));let c=!n[5]&&Dc(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),ve()):c?(c.p(d,h),h[0]&32&&E(c,1)):(c=Dc(d),c.c(),E(c,1),c.m(e,null)),(!o||h[0]&4096&&l!==(l="select "+d[12]))&&p(e,"class",l),(!o||h[0]&4112)&&ee(e,"multiple",d[4]),(!o||h[0]&4128)&&ee(e,"disabled",d[5])},i(d){if(!o){for(let h=0;hne(Ee,te))||[]}function fe(se,te){se.preventDefault(),b&&d?U(te):F(te)}function Y(se,te){(se.code==="Enter"||se.code==="Space")&&fe(se,te)}function re(){ie(),setTimeout(()=>{const se=P==null?void 0:P.querySelector(".dropdown-item.option.selected");se&&(se.focus(),se.scrollIntoView({block:"nearest"}))},0)}function Oe(se){se.stopPropagation(),!h&&(D==null||D.toggle())}un(()=>{const se=document.querySelectorAll(`label[for="${r}"]`);for(const te of se)te.addEventListener("click",Oe);return()=>{for(const te of se)te.removeEventListener("click",Oe)}});const ge=se=>V(se);function ae(se){le[se?"unshift":"push"](()=>{L=se,t(17,L)})}function he(){A=this.value,t(14,A)}const de=(se,te)=>fe(te,se),Se=(se,te)=>Y(te,se);function we(se){le[se?"unshift":"push"](()=>{D=se,t(15,D)})}function Ue(se){Ve.call(this,n,se)}function ce(se){le[se?"unshift":"push"](()=>{P=se,t(16,P)})}return n.$$set=se=>{"id"in se&&t(24,r=se.id),"noOptionsText"in se&&t(1,a=se.noOptionsText),"selectPlaceholder"in se&&t(2,u=se.selectPlaceholder),"searchPlaceholder"in se&&t(3,f=se.searchPlaceholder),"items"in se&&t(25,c=se.items),"multiple"in se&&t(4,d=se.multiple),"disabled"in se&&t(5,h=se.disabled),"selected"in se&&t(0,m=se.selected),"toggle"in se&&t(6,b=se.toggle),"labelComponent"in se&&t(7,g=se.labelComponent),"labelComponentProps"in se&&t(8,y=se.labelComponentProps),"optionComponent"in se&&t(9,k=se.optionComponent),"optionComponentProps"in se&&t(10,$=se.optionComponentProps),"searchable"in se&&t(11,C=se.searchable),"searchFunc"in se&&t(26,M=se.searchFunc),"class"in se&&t(12,T=se.class),"$$scope"in se&&t(41,o=se.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&33554432&&c&&(Z(),ie()),n.$$.dirty[0]&33570816&&t(19,i=J(c,A)),n.$$.dirty[0]&1&&t(18,s=function(se){const te=B.toArray(m);return B.inArray(te,se)})},[m,a,u,f,d,h,b,g,y,k,$,C,T,V,A,D,P,L,s,i,ie,fe,Y,re,r,c,M,F,U,G,K,X,l,ge,ae,he,de,Se,we,Ue,ce,o]}class C_ extends Ce{constructor(e){super(),$e(this,e,jS,RS,ke,{id:24,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:25,multiple:4,disabled:5,selected:0,toggle:6,labelComponent:7,labelComponentProps:8,optionComponent:9,optionComponentProps:10,searchable:11,searchFunc:26,class:12,deselectItem:13,selectItem:27,toggleItem:28,reset:29,showDropdown:30,hideDropdown:31},null,[-1,-1])}get deselectItem(){return this.$$.ctx[13]}get selectItem(){return this.$$.ctx[27]}get toggleItem(){return this.$$.ctx[28]}get reset(){return this.$$.ctx[29]}get showDropdown(){return this.$$.ctx[30]}get hideDropdown(){return this.$$.ctx[31]}}function Nc(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&w(e)}}}function qS(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&&Nc(n);return{c(){l&&l.c(),e=O(),t=v("span"),s=z(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),_(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=Nc(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)+"")&&ue(s,i)},i:x,o:x,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function VS(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Fc extends Ce{constructor(e){super(),$e(this,e,VS,qS,ke,{item:0})}}const zS=n=>({}),Rc=n=>({});function BS(n){let e;const t=n[8].afterOptions,i=Ot(t,n,n[12],Rc);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&Et(i,t,s,s[12],e?Dt(t,s[12],l,zS):At(s[12]),Rc)},i(s){e||(E(i,s),e=!0)},o(s){I(i,s),e=!1},d(s){i&&i.d(s)}}}function US(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:[BS]},$$scope:{ctx:n}};for(let r=0;rye(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){j(e.$$.fragment)},m(r,a){R(e,r,a),i=!0},p(r,[a]){const u=a&62?Yt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Kn(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],Me(()=>t=!1)),e.$set(u)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function WS(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=wt(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=Fc}=e,{optionComponent:c=Fc}=e,{selectionKey:d="value"}=e,{keyOfSelected:h=a?[]:void 0}=e;function m($){$=B.toArray($,!0);let C=[];for(let M of $){const T=B.findByKey(r,d,M);T&&C.push(T)}$.length&&!C.length||t(0,u=a?C:C[0])}async function b($){let C=B.toArray($,!0).map(M=>M[d]);!r.length||t(6,h=a?C:C[0])}function g($){u=$,t(0,u)}function y($){Ve.call(this,n,$)}function k($){Ve.call(this,n,$)}return n.$$set=$=>{e=Ye(Ye({},e),Wn($)),t(5,s=wt(e,i)),"items"in $&&t(1,r=$.items),"multiple"in $&&t(2,a=$.multiple),"selected"in $&&t(0,u=$.selected),"labelComponent"in $&&t(3,f=$.labelComponent),"optionComponent"in $&&t(4,c=$.optionComponent),"selectionKey"in $&&t(7,d=$.selectionKey),"keyOfSelected"in $&&t(6,h=$.keyOfSelected),"$$scope"in $&&t(12,o=$.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&m(h),n.$$.dirty&1&&b(u)},[u,r,a,f,c,s,h,d,l,g,y,k,o]}class Es extends Ce{constructor(e){super(),$e(this,e,WS,US,ke,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function YS(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{items:n[2]},n[3]];function l(r){n[4](r)}let o={};for(let r=0;rye(e,"keyOfSelected",l)),{c(){j(e.$$.fragment)},m(r,a){R(e,r,a),i=!0},p(r,[a]){const u=a&14?Yt(s,[a&2&&{class:"field-type-select "+r[1]},a&4&&{items:r[2]},a&8&&Kn(r[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=r[0],Me(()=>t=!1)),e.$set(u)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){I(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function KS(n,e,t){const i=["value","class"];let s=wt(e,i),{value:l="text"}=e,{class:o=""}=e;const r=[{label:"Text",value:"text",icon:B.getFieldTypeIcon("text")},{label:"Number",value:"number",icon:B.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:B.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:B.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:B.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:B.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:B.getFieldTypeIcon("select")},{label:"JSON",value:"json",icon:B.getFieldTypeIcon("json")},{label:"File",value:"file",icon:B.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:B.getFieldTypeIcon("relation")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=Ye(Ye({},e),Wn(u)),t(3,s=wt(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,o=u.class)},[l,o,r,s,a]}class JS extends Ce{constructor(e){super(),$e(this,e,KS,YS,ke,{value:0,class:1})}}function ZS(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Min length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].min),r||(a=W(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&&rt(l.value)!==u[0].min&&pe(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function GS(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=z("Max length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min",r=n[0].min||0)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),pe(l,n[0].max),a||(u=W(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&o!==(o=f[5])&&p(l,"id",o),c&1&&r!==(r=f[0].min||0)&&p(l,"min",r),c&1&&rt(l.value)!==f[0].max&&pe(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function XS(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Regex pattern"),s=O(),l=v("input"),r=O(),a=v("div"),a.innerHTML="Valid Go regular expression, eg. ^\\w+$.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),pe(l,n[0].pattern),S(c,r,d),S(c,a,d),u||(f=W(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].pattern&&pe(l,c[0].pattern)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function QS(n){let e,t,i,s,l,o,r,a,u,f;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[ZS,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[GS,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[XS,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){S(c,e,d),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),f=!0},p(c,[d]){const h={};d&2&&(h.name="schema."+c[1]+".options.min"),d&97&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const m={};d&2&&(m.name="schema."+c[1]+".options.max"),d&97&&(m.$$scope={dirty:d,ctx:c}),o.$set(m);const b={};d&2&&(b.name="schema."+c[1]+".options.pattern"),d&97&&(b.$$scope={dirty:d,ctx:c}),u.$set(b)},i(c){f||(E(i.$$.fragment,c),E(o.$$.fragment,c),E(u.$$.fragment,c),f=!0)},o(c){I(i.$$.fragment,c),I(o.$$.fragment,c),I(u.$$.fragment,c),f=!1},d(c){c&&w(e),H(i),H(o),H(u)}}}function xS(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=rt(this.value),t(0,s)}function o(){s.max=rt(this.value),t(0,s)}function r(){s.pattern=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"options"in a&&t(0,s=a.options)},[s,i,l,o,r]}class e$ extends Ce{constructor(e){super(),$e(this,e,xS,QS,ke,{key:1,options:0})}}function t$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Min"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].min),r||(a=W(l,"input",n[2]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].min&&pe(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function n$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=z("Max"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"min",r=n[0].min)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),pe(l,n[0].max),a||(u=W(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&o!==(o=f[4])&&p(l,"id",o),c&1&&r!==(r=f[0].min)&&p(l,"min",r),c&1&&rt(l.value)!==f[0].max&&pe(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function i$(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[t$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[n$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function s$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=rt(this.value),t(0,s)}function o(){s.max=rt(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class l$ extends Ce{constructor(e){super(),$e(this,e,s$,i$,ke,{key:1,options:0})}}function o$(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class r$ extends Ce{constructor(e){super(),$e(this,e,o$,null,ke,{key:0,options:1})}}function a$(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],o={};for(let r=0;r{t(0,o=B.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=Ye(Ye({},e),Wn(u)),t(3,l=wt(e,s)),"value"in u&&t(0,o=u.value),"separator"in u&&t(1,r=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(o||[]).join(", "))},[o,r,i,l,a]}class xi extends Ce{constructor(e){super(),$e(this,e,u$,a$,ke,{value:0,separator:1})}}function f$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[2](g)}let b={id:n[4],disabled:!B.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(b.value=n[0].exceptDomains),r=new xi({props:b}),le.push(()=>ye(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),R(r,g,y),S(g,u,y),S(g,f,y),c=!0,d||(h=Le(Be.call(null,s,{text:`List of domains that are NOT allowed. + This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&16&&l!==(l=g[4]))&&p(e,"for",l);const k={};y&16&&(k.id=g[4]),y&1&&(k.disabled=!B.isEmpty(g[0].onlyDomains)),!a&&y&1&&(a=!0,k.value=g[0].exceptDomains,Me(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){I(r.$$.fragment,g),c=!1},d(g){g&&w(e),g&&w(o),H(r,g),g&&w(u),g&&w(f),d=!1,h()}}}function c$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[3](g)}let b={id:n[4]+".options.onlyDomains",disabled:!B.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(b.value=n[0].onlyDomains),r=new xi({props:b}),le.push(()=>ye(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),R(r,g,y),S(g,u,y),S(g,f,y),c=!0,d||(h=Le(Be.call(null,s,{text:`List of domains that are ONLY allowed. + This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&16&&l!==(l=g[4]+".options.onlyDomains"))&&p(e,"for",l);const k={};y&16&&(k.id=g[4]+".options.onlyDomains"),y&1&&(k.disabled=!B.isEmpty(g[0].exceptDomains)),!a&&y&1&&(a=!0,k.value=g[0].onlyDomains,Me(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){I(r.$$.fragment,g),c=!1},d(g){g&&w(e),g&&w(o),H(r,g),g&&w(u),g&&w(f),d=!1,h()}}}function d$(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[f$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[c$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function p$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class M_ extends Ce{constructor(e){super(),$e(this,e,p$,d$,ke,{key:1,options:0})}}function h$(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new M_({props:r}),le.push(()=>ye(e,"key",l)),le.push(()=>ye(e,"options",o)),{c(){j(e.$$.fragment)},m(a,u){R(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],Me(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],Me(()=>i=!1)),e.$set(f)},i(a){s||(E(e.$$.fragment,a),s=!0)},o(a){I(e.$$.fragment,a),s=!1},d(a){H(e,a)}}}function m$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class g$ extends Ce{constructor(e){super(),$e(this,e,m$,h$,ke,{key:0,options:1})}}var br=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],bs={_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},hl={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},Zt=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},mn=function(n){return n===!0?1:0};function Hc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var vr=function(n){return n instanceof Array?n:[n]};function Vt(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function tt(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 eo(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function T_(n,e){if(e(n))return n;if(n.parentNode)return T_(n.parentNode,e)}function to(n,e){var t=tt("div","numInputWrapper"),i=tt("input","numInput "+n),s=tt("span","arrowUp"),l=tt("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 sn(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var yr=function(){},Ao=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},_$={D:yr,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*mn(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:yr,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:yr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},ji={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})"},il={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[il.w(n,e,t)]},F:function(n,e,t){return Ao(il.n(n,e,t)-1,!1,e)},G:function(n,e,t){return Zt(il.h(n,e,t))},H:function(n){return Zt(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[mn(n.getHours()>11)]},M:function(n,e){return Ao(n.getMonth(),!0,e)},S:function(n){return Zt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return Zt(n.getFullYear(),4)},d:function(n){return Zt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return Zt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return Zt(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)}},O_=function(n){var e=n.config,t=e===void 0?bs:e,i=n.l10n,s=i===void 0?hl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,h){return il[c]&&h[d-1]!=="\\"?il[c](r,f,t):c!=="\\"?c:""}).join("")}},ia=function(n){var e=n.config,t=e===void 0?bs:e,i=n.l10n,s=i===void 0?hl: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||bs).dateFormat,h=String(l).trim();if(h==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(h)||/GMT$/.test(h))f=new Date(l);else{for(var m=void 0,b=[],g=0,y=0,k="";gMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),Q=wr(t.config);q.setHours(Q.hours,Q.minutes,Q.seconds,q.getMilliseconds()),t.selectedDates=[q],t.latestSelectedDateObj=q}N!==void 0&&N.type!=="blur"&&Il(N);var oe=t._input.value;c(),Pt(),t._input.value!==oe&&t._debouncedChange()}function u(N,q){return N%12+12*mn(q===t.l10n.amPM[1])}function f(N){switch(N%24){case 0:case 12:return 12;default:return N%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var N=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,q=(parseInt(t.minuteElement.value,10)||0)%60,Q=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(N=u(N,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&ln(t.latestSelectedDateObj,t.config.minDate,!0)===0,Te=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&ln(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=kr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Pe=kr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),De=kr(N,q,Q);if(De>Pe&&De=12)]),t.secondElement!==void 0&&(t.secondElement.value=Zt(Q)))}function m(N){var q=sn(N),Q=parseInt(q.value)+(N.delta||0);(Q/1e3>1||N.key==="Enter"&&!/[^\d]/.test(Q.toString()))&&de(Q)}function b(N,q,Q,oe){if(q instanceof Array)return q.forEach(function(Te){return b(N,Te,Q,oe)});if(N instanceof Array)return N.forEach(function(Te){return b(Te,q,Q,oe)});N.addEventListener(q,Q,oe),t._handlers.push({remove:function(){return N.removeEventListener(q,Q,oe)}})}function g(){Ke("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(Q){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+Q+"]"),function(oe){return b(oe,"click",t[Q])})}),t.isMobile){is();return}var N=Hc(te,50);if(t._debouncedChange=Hc(g,k$),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&b(t.daysContainer,"mouseover",function(Q){t.config.mode==="range"&&se(sn(Q))}),b(t._input,"keydown",ce),t.calendarContainer!==void 0&&b(t.calendarContainer,"keydown",ce),!t.config.inline&&!t.config.static&&b(window,"resize",N),window.ontouchstart!==void 0?b(window.document,"touchstart",he):b(window.document,"mousedown",he),b(window.document,"focus",he,{capture:!0}),t.config.clickOpens===!0&&(b(t._input,"focus",t.open),b(t._input,"click",t.open)),t.daysContainer!==void 0&&(b(t.monthNav,"click",qt),b(t.monthNav,["keyup","increment"],m),b(t.daysContainer,"click",As)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var q=function(Q){return sn(Q).select()};b(t.timeContainer,["increment"],a),b(t.timeContainer,"blur",a,{capture:!0}),b(t.timeContainer,"click",$),b([t.hourElement,t.minuteElement],["focus","click"],q),t.secondElement!==void 0&&b(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&b(t.amPM,"click",function(Q){a(Q)})}t.config.allowInput&&b(t._input,"blur",Ue)}function k(N,q){var Q=N!==void 0?t.parseDate(N):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(N);var Te=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!Te&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Ie=tt("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 T(N,q,Q,oe){var Te=Se(q,!0),Ie=tt("span",N,q.getDate().toString());return Ie.dateObj=q,Ie.$i=oe,Ie.setAttribute("aria-label",t.formatDate(q,t.config.ariaDateFormat)),N.indexOf("hidden")===-1&&ln(q,t.now)===0&&(t.todayDateElem=Ie,Ie.classList.add("today"),Ie.setAttribute("aria-current","date")),Te?(Ie.tabIndex=-1,Xn(q)&&(Ie.classList.add("selected"),t.selectedDateElem=Ie,t.config.mode==="range"&&(Vt(Ie,"startRange",t.selectedDates[0]&&ln(q,t.selectedDates[0],!0)===0),Vt(Ie,"endRange",t.selectedDates[1]&&ln(q,t.selectedDates[1],!0)===0),N==="nextMonthDay"&&Ie.classList.add("inRange")))):Ie.classList.add("flatpickr-disabled"),t.config.mode==="range"&&ls(q)&&!Xn(q)&&Ie.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&N!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(q)+""),Ke("onDayCreate",Ie),Ie}function D(N){N.focus(),t.config.mode==="range"&&se(N)}function A(N){for(var q=N>0?0:t.config.showMonths-1,Q=N>0?t.config.showMonths:-1,oe=q;oe!=Q;oe+=N)for(var Te=t.daysContainer.children[oe],Ie=N>0?0:Te.children.length-1,Pe=N>0?Te.children.length:-1,De=Ie;De!=Pe;De+=N){var ze=Te.children[De];if(ze.className.indexOf("hidden")===-1&&Se(ze.dateObj))return ze}}function P(N,q){for(var Q=N.className.indexOf("Month")===-1?N.dateObj.getMonth():t.currentMonth,oe=q>0?t.config.showMonths:-1,Te=q>0?1:-1,Ie=Q-t.currentMonth;Ie!=oe;Ie+=Te)for(var Pe=t.daysContainer.children[Ie],De=Q-t.currentMonth===Ie?N.$i+q:q<0?Pe.children.length-1:0,ze=Pe.children.length,Ne=De;Ne>=0&&Ne0?ze:-1);Ne+=Te){var qe=Pe.children[Ne];if(qe.className.indexOf("hidden")===-1&&Se(qe.dateObj)&&Math.abs(N.$i-Ne)>=Math.abs(q))return D(qe)}t.changeMonth(Te),L(A(Te),0)}function L(N,q){var Q=l(),oe=we(Q||document.body),Te=N!==void 0?N:oe?Q:t.selectedDateElem!==void 0&&we(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&we(t.todayDateElem)?t.todayDateElem:A(q>0?1:-1);Te===void 0?t._input.focus():oe?P(Te,q):D(Te)}function V(N,q){for(var Q=(new Date(N,q,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((q-1+12)%12,N),Te=t.utils.getDaysInMonth(q,N),Ie=window.document.createDocumentFragment(),Pe=t.config.showMonths>1,De=Pe?"prevMonthDay hidden":"prevMonthDay",ze=Pe?"nextMonthDay hidden":"nextMonthDay",Ne=oe+1-Q,qe=0;Ne<=oe;Ne++,qe++)Ie.appendChild(T("flatpickr-day "+De,new Date(N,q-1,Ne),Ne,qe));for(Ne=1;Ne<=Te;Ne++,qe++)Ie.appendChild(T("flatpickr-day",new Date(N,q,Ne),Ne,qe));for(var at=Te+1;at<=42-Q&&(t.config.showMonths===1||qe%7!==0);at++,qe++)Ie.appendChild(T("flatpickr-day "+ze,new Date(N,q+1,at%Te),at,qe));var Hn=tt("div","dayContainer");return Hn.appendChild(Ie),Hn}function F(){if(t.daysContainer!==void 0){eo(t.daysContainer),t.weekNumbers&&eo(t.weekNumbers);for(var N=document.createDocumentFragment(),q=0;q1||t.config.monthSelectorType!=="dropdown")){var N=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 q=0;q<12;q++)if(!!N(q)){var Q=tt("option","flatpickr-monthDropdown-month");Q.value=new Date(t.currentYear,q).getMonth().toString(),Q.textContent=Ao(q,t.config.shorthandCurrentMonth,t.l10n),Q.tabIndex=-1,t.currentMonth===q&&(Q.selected=!0),t.monthsDropdownContainer.appendChild(Q)}}}function G(){var N=tt("div","flatpickr-month"),q=window.document.createDocumentFragment(),Q;t.config.showMonths>1||t.config.monthSelectorType==="static"?Q=tt("span","cur-month"):(t.monthsDropdownContainer=tt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),b(t.monthsDropdownContainer,"change",function(Pe){var De=sn(Pe),ze=parseInt(De.value,10);t.changeMonth(ze-t.currentMonth),Ke("onMonthChange")}),U(),Q=t.monthsDropdownContainer);var oe=to("cur-year",{tabindex:"-1"}),Te=oe.getElementsByTagName("input")[0];Te.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&Te.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(Te.setAttribute("max",t.config.maxDate.getFullYear().toString()),Te.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Ie=tt("div","flatpickr-current-month");return Ie.appendChild(Q),Ie.appendChild(oe),q.appendChild(Ie),N.appendChild(q),{container:N,yearElement:Te,monthElement:Q}}function K(){eo(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var N=t.config.showMonths;N--;){var q=G();t.yearElements.push(q.yearElement),t.monthElements.push(q.monthElement),t.monthNav.appendChild(q.container)}t.monthNav.appendChild(t.nextMonthNav)}function X(){return t.monthNav=tt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=tt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=tt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,K(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(N){t.__hidePrevMonthArrow!==N&&(Vt(t.prevMonthNav,"flatpickr-disabled",N),t.__hidePrevMonthArrow=N)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(N){t.__hideNextMonthArrow!==N&&(Vt(t.nextMonthNav,"flatpickr-disabled",N),t.__hideNextMonthArrow=N)}}),t.currentYearElement=t.yearElements[0],Oi(),t.monthNav}function Z(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var N=wr(t.config);t.timeContainer=tt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var q=tt("span","flatpickr-time-separator",":"),Q=to("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=Q.getElementsByTagName("input")[0];var oe=to("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=Zt(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?N.hours:f(N.hours)),t.minuteElement.value=Zt(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():N.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Q),t.timeContainer.appendChild(q),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var Te=to("flatpickr-second");t.secondElement=Te.getElementsByTagName("input")[0],t.secondElement.value=Zt(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():N.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(tt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(Te)}return t.config.time_24hr||(t.amPM=tt("span","flatpickr-am-pm",t.l10n.amPM[mn((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 ie(){t.weekdayContainer?eo(t.weekdayContainer):t.weekdayContainer=tt("div","flatpickr-weekdays");for(var N=t.config.showMonths;N--;){var q=tt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(q)}return J(),t.weekdayContainer}function J(){if(!!t.weekdayContainer){var N=t.l10n.firstDayOfWeek,q=jc(t.l10n.weekdays.shorthand);N>0&&N `+q.join("")+` - `}}function fe(){t.calendarContainer.classList.add("hasWeeks");var N=tt("div","flatpickr-weekwrapper");N.appendChild(tt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var q=tt("div","flatpickr-weeks");return N.appendChild(q),{weekWrapper:N,weekNumbers:q}}function Y(N,q){q===void 0&&(q=!0);var Q=q?N:N-t.currentMonth;Q<0&&t._hidePrevMonthArrow===!0||Q>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=Q,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ke("onYearChange"),U()),F(),Ke("onMonthChange"),Oi())}function re(N,q){if(N===void 0&&(N=!0),q===void 0&&(q=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,q===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var Q=wr(t.config),oe=Q.hours,Te=Q.minutes,Ie=Q.seconds;h(oe,Te,Ie)}t.redraw(),N&&Ke("onChange")}function Oe(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ke("onClose")}function ge(){t.config!==void 0&&Ke("onDestroy");for(var N=t._handlers.length;N--;)t._handlers[N].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 q=t.calendarContainer.parentNode;if(q.lastChild&&q.removeChild(q.lastChild),q.parentNode){for(;q.firstChild;)q.parentNode.insertBefore(q.firstChild,q);q.parentNode.removeChild(q)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(Q){try{delete t[Q]}catch{}})}function ae(N){return t.calendarContainer.contains(N)}function he(N){if(t.isOpen&&!t.config.inline){var q=sn(N),Q=ae(q),oe=q===t.input||q===t.altInput||t.element.contains(q)||N.path&&N.path.indexOf&&(~N.path.indexOf(t.input)||~N.path.indexOf(t.altInput)),Te=!oe&&!Q&&!ae(N.relatedTarget),Ie=!t.config.ignoredFocusElements.some(function(Pe){return Pe.contains(q)});Te&&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 de(N){if(!(!N||t.config.minDate&&Nt.config.maxDate.getFullYear())){var q=N,Q=t.currentYear!==q;t.currentYear=q||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),Q&&(t.redraw(),Ke("onYearChange"),U())}}function Se(N,q){var Q;q===void 0&&(q=!0);var oe=t.parseDate(N,void 0,q);if(t.config.minDate&&oe&&ln(oe,t.config.minDate,q!==void 0?q:!t.minDateHasTime)<0||t.config.maxDate&&oe&&ln(oe,t.config.maxDate,q!==void 0?q:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var Te=!!t.config.enable,Ie=(Q=t.config.enable)!==null&&Q!==void 0?Q:t.config.disable,Pe=0,De=void 0;Pe=De.from.getTime()&&oe.getTime()<=De.to.getTime())return Te}return!Te}function we(N){return t.daysContainer!==void 0?N.className.indexOf("hidden")===-1&&N.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(N):!1}function Ue(N){var q=N.target===t._input,Q=t._input.value.trimEnd()!==Di();q&&Q&&!(N.relatedTarget&&ae(N.relatedTarget))&&t.setDate(t._input.value,!0,N.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ce(N){var q=sn(N),Q=t.config.wrap?n.contains(q):q===t._input,oe=t.config.allowInput,Te=t.isOpen&&(!oe||!Q),Ie=t.config.inline&&Q&&!oe;if(N.keyCode===13&&Q){if(oe)return t.setDate(t._input.value,!0,q===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),q.blur();t.open()}else if(ae(q)||Te||Ie){var Pe=!!t.timeContainer&&t.timeContainer.contains(q);switch(N.keyCode){case 13:Pe?(N.preventDefault(),a(),ri()):As(N);break;case 27:N.preventDefault(),ri();break;case 8:case 46:Q&&!t.config.allowInput&&(N.preventDefault(),t.clear());break;case 37:case 39:if(!Pe&&!Q){N.preventDefault();var De=l();if(t.daysContainer!==void 0&&(oe===!1||De&&we(De))){var ze=N.keyCode===39?1:-1;N.ctrlKey?(N.stopPropagation(),Y(ze),L(A(1),0)):L(void 0,ze)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:N.preventDefault();var Ne=N.keyCode===40?1:-1;t.daysContainer&&q.$i!==void 0||q===t.input||q===t.altInput?N.ctrlKey?(N.stopPropagation(),de(t.currentYear-Ne),L(A(1),0)):Pe||L(void 0,Ne*7):q===t.currentYearElement?de(t.currentYear-Ne):t.config.enableTime&&(!Pe&&t.hourElement&&t.hourElement.focus(),a(N),t._debouncedChange());break;case 9:if(Pe){var qe=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(nn){return nn}),at=qe.indexOf(q);if(at!==-1){var Hn=qe[at+(N.shiftKey?-1:1)];N.preventDefault(),(Hn||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(q)&&N.shiftKey&&(N.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&q===t.amPM)switch(N.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),Pt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),Pt();break}(Q||ae(q))&&Ke("onKeyDown",N)}function se(N,q){if(q===void 0&&(q="flatpickr-day"),!(t.selectedDates.length!==1||N&&(!N.classList.contains(q)||N.classList.contains("flatpickr-disabled")))){for(var Q=N?N.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),oe=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Te=Math.min(Q,t.selectedDates[0].getTime()),Ie=Math.max(Q,t.selectedDates[0].getTime()),Pe=!1,De=0,ze=0,Ne=Te;NeTe&&NeDe)?De=Ne:Ne>oe&&(!ze||Ne ."+q));qe.forEach(function(at){var Hn=at.dateObj,nn=Hn.getTime(),Is=De>0&&nn0&&nn>ze;if(Is){at.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(os){at.classList.remove(os)});return}else if(Pe&&!Is)return;["startRange","inRange","endRange","notAllowed"].forEach(function(os){at.classList.remove(os)}),N!==void 0&&(N.classList.add(Q<=t.selectedDates[0].getTime()?"startRange":"endRange"),oeQ&&nn===oe&&at.classList.add("endRange"),nn>=De&&(ze===0||nn<=ze)&&_$(nn,oe,Q)&&at.classList.add("inRange"))})}}function te(){t.isOpen&&!t.config.static&&!t.config.inline&&tn()}function ne(N,q){if(q===void 0&&(q=t._positionElement),t.isMobile===!0){if(N){N.preventDefault();var Q=sn(N);Q&&Q.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Ke("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"),Ke("onOpen"),tn(q)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(N===void 0||!t.timeContainer.contains(N.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function Ee(N){return function(q){var Q=t.config["_"+N+"Date"]=t.parseDate(q,t.config.dateFormat),oe=t.config["_"+(N==="min"?"max":"min")+"Date"];Q!==void 0&&(t[N==="min"?"minDateHasTime":"maxDateHasTime"]=Q.getHours()>0||Q.getMinutes()>0||Q.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Te){return Se(Te)}),!t.selectedDates.length&&N==="min"&&d(Q),Pt()),t.daysContainer&&(oi(),Q!==void 0?t.currentYearElement[N]=Q.getFullYear().toString():t.currentYearElement.removeAttribute(N),t.currentYearElement.disabled=!!oe&&Q!==void 0&&oe.getFullYear()===Q.getFullYear())}}function it(){var N=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],q=Nt(Nt({},JSON.parse(JSON.stringify(n.dataset||{}))),e),Q={};t.config.parseDate=q.parseDate,t.config.formatDate=q.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(qe){t.config._enable=ui(qe)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(qe){t.config._disable=ui(qe)}});var oe=q.mode==="time";if(!q.dateFormat&&(q.enableTime||oe)){var Te=kt.defaultConfig.dateFormat||bs.dateFormat;Q.dateFormat=q.noCalendar||oe?"H:i"+(q.enableSeconds?":S":""):Te+" H:i"+(q.enableSeconds?":S":"")}if(q.altInput&&(q.enableTime||oe)&&!q.altFormat){var Ie=kt.defaultConfig.altFormat||bs.altFormat;Q.altFormat=q.noCalendar||oe?"h:i"+(q.enableSeconds?":S K":" K"):Ie+(" h:i"+(q.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:Ee("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:Ee("max")});var Pe=function(qe){return function(at){t.config[qe==="min"?"_minTime":"_maxTime"]=t.parseDate(at,"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")}),q.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,Q,q);for(var De=0;De-1?t.config[Ne]=vr(ze[Ne]).map(o).concat(t.config[Ne]):typeof q[Ne]>"u"&&(t.config[Ne]=ze[Ne])}q.altInputClass||(t.config.altInputClass=en().className+" "+t.config.altInputClass),Ke("onParseConfig")}function en(){return t.config.wrap?n.querySelector("[data-input]"):n}function Kt(){typeof t.config.locale!="object"&&typeof kt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Nt(Nt({},kt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?kt.l10ns[t.config.locale]:void 0),ji.D="("+t.l10n.weekdays.shorthand.join("|")+")",ji.l="("+t.l10n.weekdays.longhand.join("|")+")",ji.M="("+t.l10n.months.shorthand.join("|")+")",ji.F="("+t.l10n.months.longhand.join("|")+")",ji.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var N=Nt(Nt({},e),JSON.parse(JSON.stringify(n.dataset||{})));N.time_24hr===void 0&&kt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=T_(t),t.parseDate=ia({config:t.config,l10n:t.l10n})}function tn(N){if(typeof t.config.position=="function")return void t.config.position(t,N);if(t.calendarContainer!==void 0){Ke("onPreCalendarPosition");var q=N||t._positionElement,Q=Array.prototype.reduce.call(t.calendarContainer.children,function(R_,H_){return R_+H_.offsetHeight},0),oe=t.calendarContainer.offsetWidth,Te=t.config.position.split(" "),Ie=Te[0],Pe=Te.length>1?Te[1]:null,De=q.getBoundingClientRect(),ze=window.innerHeight-De.bottom,Ne=Ie==="above"||Ie!=="below"&&zeQ,qe=window.pageYOffset+De.top+(Ne?-Q-2:q.offsetHeight+2);if(Vt(t.calendarContainer,"arrowTop",!Ne),Vt(t.calendarContainer,"arrowBottom",Ne),!t.config.inline){var at=window.pageXOffset+De.left,Hn=!1,nn=!1;Pe==="center"?(at-=(oe-De.width)/2,Hn=!0):Pe==="right"&&(at-=oe-De.width,nn=!0),Vt(t.calendarContainer,"arrowLeft",!Hn&&!nn),Vt(t.calendarContainer,"arrowCenter",Hn),Vt(t.calendarContainer,"arrowRight",nn);var Is=window.document.body.offsetWidth-(window.pageXOffset+De.right),os=at+oe>window.document.body.offsetWidth,E_=Is+oe>window.document.body.offsetWidth;if(Vt(t.calendarContainer,"rightMost",os),!t.config.static)if(t.calendarContainer.style.top=qe+"px",!os)t.calendarContainer.style.left=at+"px",t.calendarContainer.style.right="auto";else if(!E_)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Is+"px";else{var Jo=Gn();if(Jo===void 0)return;var A_=window.document.body.offsetWidth,I_=Math.max(0,A_/2-oe/2),P_=".flatpickr-calendar.centerMost:before",L_=".flatpickr-calendar.centerMost:after",N_=Jo.cssRules.length,F_="{left:"+De.left+"px;right:auto;}";Vt(t.calendarContainer,"rightMost",!1),Vt(t.calendarContainer,"centerMost",!0),Jo.insertRule(P_+","+L_+F_,N_),t.calendarContainer.style.left=I_+"px",t.calendarContainer.style.right="auto"}}}}function Gn(){for(var N=null,q=0;qt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=oe,t.config.mode==="single")t.selectedDates=[Te];else if(t.config.mode==="multiple"){var Pe=Xn(Te);Pe?t.selectedDates.splice(parseInt(Pe),1):t.selectedDates.push(Te)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Te,t.selectedDates.push(Te),ln(Te,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(qe,at){return qe.getTime()-at.getTime()}));if(c(),Ie){var De=t.currentYear!==Te.getFullYear();t.currentYear=Te.getFullYear(),t.currentMonth=Te.getMonth(),De&&(Ke("onYearChange"),U()),Ke("onMonthChange")}if(Oi(),F(),Pt(),!Ie&&t.config.mode!=="range"&&t.config.showMonths===1?D(oe):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var ze=t.config.mode==="single"&&!t.config.enableTime,Ne=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(ze||Ne)&&ri()}g()}}var ai={locale:[Kt,J],showMonths:[K,r,ie],minDate:[k],maxDate:[k],positionElement:[Ti],clickOpens:[function(){t.config.clickOpens===!0?(b(t._input,"focus",t.open),b(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function es(N,q){if(N!==null&&typeof N=="object"){Object.assign(t.config,N);for(var Q in N)ai[Q]!==void 0&&ai[Q].forEach(function(oe){return oe()})}else t.config[N]=q,ai[N]!==void 0?ai[N].forEach(function(oe){return oe()}):br.indexOf(N)>-1&&(t.config[N]=vr(q));t.redraw(),Pt(!0)}function ts(N,q){var Q=[];if(N instanceof Array)Q=N.map(function(oe){return t.parseDate(oe,q)});else if(N instanceof Date||typeof N=="number")Q=[t.parseDate(N,q)];else if(typeof N=="string")switch(t.config.mode){case"single":case"time":Q=[t.parseDate(N,q)];break;case"multiple":Q=N.split(t.config.conjunction).map(function(oe){return t.parseDate(oe,q)});break;case"range":Q=N.split(t.l10n.rangeSeparator).map(function(oe){return t.parseDate(oe,q)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(N)));t.selectedDates=t.config.allowInvalidPreload?Q:Q.filter(function(oe){return oe instanceof Date&&Se(oe,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(oe,Te){return oe.getTime()-Te.getTime()})}function El(N,q,Q){if(q===void 0&&(q=!1),Q===void 0&&(Q=t.config.dateFormat),N!==0&&!N||N instanceof Array&&N.length===0)return t.clear(q);ts(N,Q),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),k(void 0,q),d(),t.selectedDates.length===0&&t.clear(!1),Pt(q),q&&Ke("onChange")}function ui(N){return N.slice().map(function(q){return typeof q=="string"||typeof q=="number"||q instanceof Date?t.parseDate(q,void 0,!0):q&&typeof q=="object"&&q.from&&q.to?{from:t.parseDate(q.from,void 0),to:t.parseDate(q.to,void 0)}:q}).filter(function(q){return q})}function ns(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var N=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);N&&ts(N,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 Al(){if(t.input=en(),!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=tt(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"),Ti()}function Ti(){t._positionElement=t.config.positionElement||t._input}function is(){var N=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=tt("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=N,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=N==="datetime-local"?"Y-m-d\\TH:i:S":N==="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{}b(t.mobileInput,"change",function(q){t.setDate(sn(q).value,!1,t.mobileFormatStr),Ke("onChange"),Ke("onClose")})}function Jt(N){if(t.isOpen===!0)return t.close();t.open(N)}function Ke(N,q){if(t.config!==void 0){var Q=t.config[N];if(Q!==void 0&&Q.length>0)for(var oe=0;Q[oe]&&oe=0&&ln(N,t.selectedDates[1])<=0}function Oi(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(N,q){var Q=new Date(t.currentYear,t.currentMonth,1);Q.setMonth(t.currentMonth+q),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[q].textContent=Ao(Q.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=Q.getMonth().toString(),N.value=Q.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Di(N){var q=N||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(Q){return t.formatDate(Q,q)}).filter(function(Q,oe,Te){return t.config.mode!=="range"||t.config.enableTime||Te.indexOf(Q)===oe}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Pt(N){N===void 0&&(N=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Di(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Di(t.config.altFormat)),N!==!1&&Ke("onValueUpdate")}function qt(N){var q=sn(N),Q=t.prevMonthNav.contains(q),oe=t.nextMonthNav.contains(q);Q||oe?Y(Q?-1:1):t.yearElements.indexOf(q)>=0?q.select():q.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):q.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Il(N){N.preventDefault();var q=N.type==="keydown",Q=sn(N),oe=Q;t.amPM!==void 0&&Q===t.amPM&&(t.amPM.textContent=t.l10n.amPM[mn(t.amPM.textContent===t.l10n.amPM[0])]);var Te=parseFloat(oe.getAttribute("min")),Ie=parseFloat(oe.getAttribute("max")),Pe=parseFloat(oe.getAttribute("step")),De=parseInt(oe.value,10),ze=N.delta||(q?N.which===38?1:-1:0),Ne=De+Pe*ze;if(typeof oe.value<"u"&&oe.value.length===2){var qe=oe===t.hourElement,at=oe===t.minuteElement;NeIe&&(Ne=oe===t.hourElement?Ne-Ie-mn(!t.amPM):Te,at&&C(void 0,1,t.hourElement)),t.amPM&&qe&&(Pe===1?Ne+De===23:Math.abs(Ne-De)>Pe)&&(t.amPM.textContent=t.l10n.amPM[mn(t.amPM.textContent===t.l10n.amPM[0])]),oe.value=Zt(Ne)}}return s(),t}function vs(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;s{const C=f||m,M=y(d);return M.onReady.push(()=>{t(8,h=!0)}),t(3,b=kt(C,Object.assign(M,f?{wrap:!0}:{}))),()=>{b.destroy()}});const g=It();function y(C={}){C=Object.assign({},C);for(const M of r){const T=(D,A,P)=>{g($$(M),[D,A,P])};M in C?(Array.isArray(C[M])||(C[M]=[C[M]]),C[M].push(T)):C[M]=[T]}return C.onChange&&!C.onChange.includes(k)&&C.onChange.push(k),C}function k(C,M,T){var A,P;const D=(P=(A=T==null?void 0:T.config)==null?void 0:A.mode)!=null?P:"single";t(2,a=D==="single"?C[0]:C),t(4,u=M)}function w(C){le[C?"unshift":"push"](()=>{m=C,t(0,m)})}return n.$$set=C=>{e=Ye(Ye({},e),Wn(C)),t(1,s=wt(e,i)),"value"in C&&t(2,a=C.value),"formattedValue"in C&&t(4,u=C.formattedValue),"element"in C&&t(5,f=C.element),"dateFormat"in C&&t(6,c=C.dateFormat),"options"in C&&t(7,d=C.options),"input"in C&&t(0,m=C.input),"flatpickr"in C&&t(3,b=C.flatpickr),"$$scope"in C&&t(9,o=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&b&&h&&b.setDate(a,!1,c),n.$$.dirty&392&&b&&h)for(const[C,M]of Object.entries(y(d)))b.set(C,M)},[m,s,a,b,u,f,c,d,h,o,l,w]}class Ka extends Ce{constructor(e){super(),$e(this,e,C$,S$,ke,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function M$(n){let e,t,i,s,l,o,r;function a(f){n[2](f)}let u={id:n[4],options:B.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new Ka({props:u}),le.push(()=>ye(l,"formattedValue",a)),{c(){e=v("label"),t=z("Min date (UTC)"),s=O(),j(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].min),!o&&c&1&&(o=!0,d.formattedValue=f[0].min,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function T$(n){let e,t,i,s,l,o,r;function a(f){n[3](f)}let u={id:n[4],options:B.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new Ka({props:u}),le.push(()=>ye(l,"formattedValue",a)),{c(){e=v("label"),t=z("Max date (UTC)"),s=O(),j(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].max),!o&&c&1&&(o=!0,d.formattedValue=f[0].max,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function O$(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[M$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[T$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){$(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&S(e),H(i),H(o)}}}function D$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.min,r)&&(s.min=r,t(0,s))}function o(r){n.$$.not_equal(s.max,r)&&(s.max=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class E$ extends Ce{constructor(e){super(),$e(this,e,D$,O$,ke,{key:1,options:0})}}function A$(n){let e,t,i,s,l,o,r,a,u;function f(d){n[2](d)}let c={id:n[4],placeholder:"eg. optionA, optionB",required:!0};return n[0].values!==void 0&&(c.value=n[0].values),l=new xi({props:c}),le.push(()=>ye(l,"value",f)),{c(){e=v("label"),t=z("Choices"),s=O(),j(l.$$.fragment),r=O(),a=v("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,h){$(d,e,h),_(e,t),$(d,s,h),R(l,d,h),$(d,r,h),$(d,a,h),u=!0},p(d,h){(!u||h&16&&i!==(i=d[4]))&&p(e,"for",i);const m={};h&16&&(m.id=d[4]),!o&&h&1&&(o=!0,m.value=d[0].values,Me(()=>o=!1)),l.$set(m)},i(d){u||(E(l.$$.fragment,d),u=!0)},o(d){I(l.$$.fragment,d),u=!1},d(d){d&&S(e),d&&S(s),H(l,d),d&&S(r),d&&S(a)}}}function I$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max select"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].maxSelect),r||(a=W(l,"input",n[3]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&pe(l,u[0].maxSelect)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function P$(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[A$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[I$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){$(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.values"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.maxSelect"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&S(e),H(i),H(o)}}}function L$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.values,r)&&(s.values=r,t(0,s))}function o(){s.maxSelect=rt(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,o]}class N$ extends Ce{constructor(e){super(),$e(this,e,L$,P$,ke,{key:1,options:0})}}function F$(n,e,t){return["",{}]}class R$ extends Ce{constructor(e){super(),$e(this,e,F$,null,ke,{key:0,options:1})}get key(){return this.$$.ctx[0]}get options(){return this.$$.ctx[1]}}function H$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max file size (bytes)"),s=O(),l=v("input"),p(e,"for",i=n[10]),p(l,"type","number"),p(l,"id",o=n[10]),p(l,"step","1"),p(l,"min","0")},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].maxSize),r||(a=W(l,"input",n[2]),r=!0)},p(u,f){f&1024&&i!==(i=u[10])&&p(e,"for",i),f&1024&&o!==(o=u[10])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSize&&pe(l,u[0].maxSize)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function j$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max files"),s=O(),l=v("input"),p(e,"for",i=n[10]),p(l,"type","number"),p(l,"id",o=n[10]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].maxSelect),r||(a=W(l,"input",n[3]),r=!0)},p(u,f){f&1024&&i!==(i=u[10])&&p(e,"for",i),f&1024&&o!==(o=u[10])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&pe(l,u[0].maxSelect)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function q$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("div"),e.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',t=O(),i=v("div"),i.innerHTML='Images (jpg, png, svg, gif)',s=O(),l=v("div"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=O(),r=v("div"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"tabindex","0"),p(e,"class","dropdown-item closable"),p(i,"tabindex","0"),p(i,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable"),p(r,"tabindex","0"),p(r,"class","dropdown-item closable")},m(f,c){$(f,e,c),$(f,t,c),$(f,i,c),$(f,s,c),$(f,l,c),$(f,o,c),$(f,r,c),a||(u=[W(e,"click",n[5]),W(i,"click",n[6]),W(l,"click",n[7]),W(r,"click",n[8])],a=!0)},p:x,d(f){f&&S(e),f&&S(t),f&&S(i),f&&S(s),f&&S(l),f&&S(o),f&&S(r),a=!1,Re(u)}}}function V$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M;function T(A){n[4](A)}let D={id:n[10],placeholder:"eg. image/png, application/pdf..."};return n[0].mimeTypes!==void 0&&(D.value=n[0].mimeTypes),r=new xi({props:D}),le.push(()=>ye(r,"value",T)),k=new Zn({props:{class:"dropdown dropdown-sm dropdown-nowrap",$$slots:{default:[q$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Mime types",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),h=v("button"),m=v("span"),m.textContent="Choose presets",b=O(),g=v("i"),y=O(),j(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(m,"class","txt link-primary"),p(g,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(A,P){$(A,e,P),_(e,t),_(e,i),_(e,s),$(A,o,P),R(r,A,P),$(A,u,P),$(A,f,P),_(f,c),_(f,d),_(f,h),_(h,m),_(h,b),_(h,g),_(h,y),R(k,h,null),w=!0,C||(M=Le(Be.call(null,s,{text:`Allow files ONLY with the listed mime types. - Leave empty for no restriction.`,position:"top"})),C=!0)},p(A,P){(!w||P&1024&&l!==(l=A[10]))&&p(e,"for",l);const L={};P&1024&&(L.id=A[10]),!a&&P&1&&(a=!0,L.value=A[0].mimeTypes,Me(()=>a=!1)),r.$set(L);const V={};P&2049&&(V.$$scope={dirty:P,ctx:A}),k.$set(V)},i(A){w||(E(r.$$.fragment,A),E(k.$$.fragment,A),w=!0)},o(A){I(r.$$.fragment,A),I(k.$$.fragment,A),w=!1},d(A){A&&S(e),A&&S(o),H(r,A),A&&S(u),A&&S(f),H(k),C=!1,M()}}}function z$(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH + `}}function fe(){t.calendarContainer.classList.add("hasWeeks");var N=tt("div","flatpickr-weekwrapper");N.appendChild(tt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var q=tt("div","flatpickr-weeks");return N.appendChild(q),{weekWrapper:N,weekNumbers:q}}function Y(N,q){q===void 0&&(q=!0);var Q=q?N:N-t.currentMonth;Q<0&&t._hidePrevMonthArrow===!0||Q>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=Q,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ke("onYearChange"),U()),F(),Ke("onMonthChange"),Oi())}function re(N,q){if(N===void 0&&(N=!0),q===void 0&&(q=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,q===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var Q=wr(t.config),oe=Q.hours,Te=Q.minutes,Ie=Q.seconds;h(oe,Te,Ie)}t.redraw(),N&&Ke("onChange")}function Oe(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ke("onClose")}function ge(){t.config!==void 0&&Ke("onDestroy");for(var N=t._handlers.length;N--;)t._handlers[N].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 q=t.calendarContainer.parentNode;if(q.lastChild&&q.removeChild(q.lastChild),q.parentNode){for(;q.firstChild;)q.parentNode.insertBefore(q.firstChild,q);q.parentNode.removeChild(q)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(Q){try{delete t[Q]}catch{}})}function ae(N){return t.calendarContainer.contains(N)}function he(N){if(t.isOpen&&!t.config.inline){var q=sn(N),Q=ae(q),oe=q===t.input||q===t.altInput||t.element.contains(q)||N.path&&N.path.indexOf&&(~N.path.indexOf(t.input)||~N.path.indexOf(t.altInput)),Te=!oe&&!Q&&!ae(N.relatedTarget),Ie=!t.config.ignoredFocusElements.some(function(Pe){return Pe.contains(q)});Te&&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 de(N){if(!(!N||t.config.minDate&&Nt.config.maxDate.getFullYear())){var q=N,Q=t.currentYear!==q;t.currentYear=q||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),Q&&(t.redraw(),Ke("onYearChange"),U())}}function Se(N,q){var Q;q===void 0&&(q=!0);var oe=t.parseDate(N,void 0,q);if(t.config.minDate&&oe&&ln(oe,t.config.minDate,q!==void 0?q:!t.minDateHasTime)<0||t.config.maxDate&&oe&&ln(oe,t.config.maxDate,q!==void 0?q:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var Te=!!t.config.enable,Ie=(Q=t.config.enable)!==null&&Q!==void 0?Q:t.config.disable,Pe=0,De=void 0;Pe=De.from.getTime()&&oe.getTime()<=De.to.getTime())return Te}return!Te}function we(N){return t.daysContainer!==void 0?N.className.indexOf("hidden")===-1&&N.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(N):!1}function Ue(N){var q=N.target===t._input,Q=t._input.value.trimEnd()!==Di();q&&Q&&!(N.relatedTarget&&ae(N.relatedTarget))&&t.setDate(t._input.value,!0,N.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ce(N){var q=sn(N),Q=t.config.wrap?n.contains(q):q===t._input,oe=t.config.allowInput,Te=t.isOpen&&(!oe||!Q),Ie=t.config.inline&&Q&&!oe;if(N.keyCode===13&&Q){if(oe)return t.setDate(t._input.value,!0,q===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),q.blur();t.open()}else if(ae(q)||Te||Ie){var Pe=!!t.timeContainer&&t.timeContainer.contains(q);switch(N.keyCode){case 13:Pe?(N.preventDefault(),a(),ri()):As(N);break;case 27:N.preventDefault(),ri();break;case 8:case 46:Q&&!t.config.allowInput&&(N.preventDefault(),t.clear());break;case 37:case 39:if(!Pe&&!Q){N.preventDefault();var De=l();if(t.daysContainer!==void 0&&(oe===!1||De&&we(De))){var ze=N.keyCode===39?1:-1;N.ctrlKey?(N.stopPropagation(),Y(ze),L(A(1),0)):L(void 0,ze)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:N.preventDefault();var Ne=N.keyCode===40?1:-1;t.daysContainer&&q.$i!==void 0||q===t.input||q===t.altInput?N.ctrlKey?(N.stopPropagation(),de(t.currentYear-Ne),L(A(1),0)):Pe||L(void 0,Ne*7):q===t.currentYearElement?de(t.currentYear-Ne):t.config.enableTime&&(!Pe&&t.hourElement&&t.hourElement.focus(),a(N),t._debouncedChange());break;case 9:if(Pe){var qe=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(nn){return nn}),at=qe.indexOf(q);if(at!==-1){var Hn=qe[at+(N.shiftKey?-1:1)];N.preventDefault(),(Hn||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(q)&&N.shiftKey&&(N.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&q===t.amPM)switch(N.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),Pt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),Pt();break}(Q||ae(q))&&Ke("onKeyDown",N)}function se(N,q){if(q===void 0&&(q="flatpickr-day"),!(t.selectedDates.length!==1||N&&(!N.classList.contains(q)||N.classList.contains("flatpickr-disabled")))){for(var Q=N?N.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),oe=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Te=Math.min(Q,t.selectedDates[0].getTime()),Ie=Math.max(Q,t.selectedDates[0].getTime()),Pe=!1,De=0,ze=0,Ne=Te;NeTe&&NeDe)?De=Ne:Ne>oe&&(!ze||Ne ."+q));qe.forEach(function(at){var Hn=at.dateObj,nn=Hn.getTime(),Is=De>0&&nn0&&nn>ze;if(Is){at.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(os){at.classList.remove(os)});return}else if(Pe&&!Is)return;["startRange","inRange","endRange","notAllowed"].forEach(function(os){at.classList.remove(os)}),N!==void 0&&(N.classList.add(Q<=t.selectedDates[0].getTime()?"startRange":"endRange"),oeQ&&nn===oe&&at.classList.add("endRange"),nn>=De&&(ze===0||nn<=ze)&&b$(nn,oe,Q)&&at.classList.add("inRange"))})}}function te(){t.isOpen&&!t.config.static&&!t.config.inline&&tn()}function ne(N,q){if(q===void 0&&(q=t._positionElement),t.isMobile===!0){if(N){N.preventDefault();var Q=sn(N);Q&&Q.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Ke("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"),Ke("onOpen"),tn(q)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(N===void 0||!t.timeContainer.contains(N.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function Ee(N){return function(q){var Q=t.config["_"+N+"Date"]=t.parseDate(q,t.config.dateFormat),oe=t.config["_"+(N==="min"?"max":"min")+"Date"];Q!==void 0&&(t[N==="min"?"minDateHasTime":"maxDateHasTime"]=Q.getHours()>0||Q.getMinutes()>0||Q.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Te){return Se(Te)}),!t.selectedDates.length&&N==="min"&&d(Q),Pt()),t.daysContainer&&(oi(),Q!==void 0?t.currentYearElement[N]=Q.getFullYear().toString():t.currentYearElement.removeAttribute(N),t.currentYearElement.disabled=!!oe&&Q!==void 0&&oe.getFullYear()===Q.getFullYear())}}function it(){var N=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],q=Nt(Nt({},JSON.parse(JSON.stringify(n.dataset||{}))),e),Q={};t.config.parseDate=q.parseDate,t.config.formatDate=q.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(qe){t.config._enable=ui(qe)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(qe){t.config._disable=ui(qe)}});var oe=q.mode==="time";if(!q.dateFormat&&(q.enableTime||oe)){var Te=kt.defaultConfig.dateFormat||bs.dateFormat;Q.dateFormat=q.noCalendar||oe?"H:i"+(q.enableSeconds?":S":""):Te+" H:i"+(q.enableSeconds?":S":"")}if(q.altInput&&(q.enableTime||oe)&&!q.altFormat){var Ie=kt.defaultConfig.altFormat||bs.altFormat;Q.altFormat=q.noCalendar||oe?"h:i"+(q.enableSeconds?":S K":" K"):Ie+(" h:i"+(q.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:Ee("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:Ee("max")});var Pe=function(qe){return function(at){t.config[qe==="min"?"_minTime":"_maxTime"]=t.parseDate(at,"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")}),q.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,Q,q);for(var De=0;De-1?t.config[Ne]=vr(ze[Ne]).map(o).concat(t.config[Ne]):typeof q[Ne]>"u"&&(t.config[Ne]=ze[Ne])}q.altInputClass||(t.config.altInputClass=en().className+" "+t.config.altInputClass),Ke("onParseConfig")}function en(){return t.config.wrap?n.querySelector("[data-input]"):n}function Kt(){typeof t.config.locale!="object"&&typeof kt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Nt(Nt({},kt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?kt.l10ns[t.config.locale]:void 0),ji.D="("+t.l10n.weekdays.shorthand.join("|")+")",ji.l="("+t.l10n.weekdays.longhand.join("|")+")",ji.M="("+t.l10n.months.shorthand.join("|")+")",ji.F="("+t.l10n.months.longhand.join("|")+")",ji.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var N=Nt(Nt({},e),JSON.parse(JSON.stringify(n.dataset||{})));N.time_24hr===void 0&&kt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=O_(t),t.parseDate=ia({config:t.config,l10n:t.l10n})}function tn(N){if(typeof t.config.position=="function")return void t.config.position(t,N);if(t.calendarContainer!==void 0){Ke("onPreCalendarPosition");var q=N||t._positionElement,Q=Array.prototype.reduce.call(t.calendarContainer.children,function(H_,j_){return H_+j_.offsetHeight},0),oe=t.calendarContainer.offsetWidth,Te=t.config.position.split(" "),Ie=Te[0],Pe=Te.length>1?Te[1]:null,De=q.getBoundingClientRect(),ze=window.innerHeight-De.bottom,Ne=Ie==="above"||Ie!=="below"&&zeQ,qe=window.pageYOffset+De.top+(Ne?-Q-2:q.offsetHeight+2);if(Vt(t.calendarContainer,"arrowTop",!Ne),Vt(t.calendarContainer,"arrowBottom",Ne),!t.config.inline){var at=window.pageXOffset+De.left,Hn=!1,nn=!1;Pe==="center"?(at-=(oe-De.width)/2,Hn=!0):Pe==="right"&&(at-=oe-De.width,nn=!0),Vt(t.calendarContainer,"arrowLeft",!Hn&&!nn),Vt(t.calendarContainer,"arrowCenter",Hn),Vt(t.calendarContainer,"arrowRight",nn);var Is=window.document.body.offsetWidth-(window.pageXOffset+De.right),os=at+oe>window.document.body.offsetWidth,A_=Is+oe>window.document.body.offsetWidth;if(Vt(t.calendarContainer,"rightMost",os),!t.config.static)if(t.calendarContainer.style.top=qe+"px",!os)t.calendarContainer.style.left=at+"px",t.calendarContainer.style.right="auto";else if(!A_)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Is+"px";else{var Jo=Gn();if(Jo===void 0)return;var I_=window.document.body.offsetWidth,P_=Math.max(0,I_/2-oe/2),L_=".flatpickr-calendar.centerMost:before",N_=".flatpickr-calendar.centerMost:after",F_=Jo.cssRules.length,R_="{left:"+De.left+"px;right:auto;}";Vt(t.calendarContainer,"rightMost",!1),Vt(t.calendarContainer,"centerMost",!0),Jo.insertRule(L_+","+N_+R_,F_),t.calendarContainer.style.left=P_+"px",t.calendarContainer.style.right="auto"}}}}function Gn(){for(var N=null,q=0;qt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=oe,t.config.mode==="single")t.selectedDates=[Te];else if(t.config.mode==="multiple"){var Pe=Xn(Te);Pe?t.selectedDates.splice(parseInt(Pe),1):t.selectedDates.push(Te)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Te,t.selectedDates.push(Te),ln(Te,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(qe,at){return qe.getTime()-at.getTime()}));if(c(),Ie){var De=t.currentYear!==Te.getFullYear();t.currentYear=Te.getFullYear(),t.currentMonth=Te.getMonth(),De&&(Ke("onYearChange"),U()),Ke("onMonthChange")}if(Oi(),F(),Pt(),!Ie&&t.config.mode!=="range"&&t.config.showMonths===1?D(oe):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var ze=t.config.mode==="single"&&!t.config.enableTime,Ne=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(ze||Ne)&&ri()}g()}}var ai={locale:[Kt,J],showMonths:[K,r,ie],minDate:[k],maxDate:[k],positionElement:[Ti],clickOpens:[function(){t.config.clickOpens===!0?(b(t._input,"focus",t.open),b(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function es(N,q){if(N!==null&&typeof N=="object"){Object.assign(t.config,N);for(var Q in N)ai[Q]!==void 0&&ai[Q].forEach(function(oe){return oe()})}else t.config[N]=q,ai[N]!==void 0?ai[N].forEach(function(oe){return oe()}):br.indexOf(N)>-1&&(t.config[N]=vr(q));t.redraw(),Pt(!0)}function ts(N,q){var Q=[];if(N instanceof Array)Q=N.map(function(oe){return t.parseDate(oe,q)});else if(N instanceof Date||typeof N=="number")Q=[t.parseDate(N,q)];else if(typeof N=="string")switch(t.config.mode){case"single":case"time":Q=[t.parseDate(N,q)];break;case"multiple":Q=N.split(t.config.conjunction).map(function(oe){return t.parseDate(oe,q)});break;case"range":Q=N.split(t.l10n.rangeSeparator).map(function(oe){return t.parseDate(oe,q)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(N)));t.selectedDates=t.config.allowInvalidPreload?Q:Q.filter(function(oe){return oe instanceof Date&&Se(oe,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(oe,Te){return oe.getTime()-Te.getTime()})}function El(N,q,Q){if(q===void 0&&(q=!1),Q===void 0&&(Q=t.config.dateFormat),N!==0&&!N||N instanceof Array&&N.length===0)return t.clear(q);ts(N,Q),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),k(void 0,q),d(),t.selectedDates.length===0&&t.clear(!1),Pt(q),q&&Ke("onChange")}function ui(N){return N.slice().map(function(q){return typeof q=="string"||typeof q=="number"||q instanceof Date?t.parseDate(q,void 0,!0):q&&typeof q=="object"&&q.from&&q.to?{from:t.parseDate(q.from,void 0),to:t.parseDate(q.to,void 0)}:q}).filter(function(q){return q})}function ns(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var N=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);N&&ts(N,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 Al(){if(t.input=en(),!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=tt(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"),Ti()}function Ti(){t._positionElement=t.config.positionElement||t._input}function is(){var N=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=tt("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=N,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=N==="datetime-local"?"Y-m-d\\TH:i:S":N==="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{}b(t.mobileInput,"change",function(q){t.setDate(sn(q).value,!1,t.mobileFormatStr),Ke("onChange"),Ke("onClose")})}function Jt(N){if(t.isOpen===!0)return t.close();t.open(N)}function Ke(N,q){if(t.config!==void 0){var Q=t.config[N];if(Q!==void 0&&Q.length>0)for(var oe=0;Q[oe]&&oe=0&&ln(N,t.selectedDates[1])<=0}function Oi(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(N,q){var Q=new Date(t.currentYear,t.currentMonth,1);Q.setMonth(t.currentMonth+q),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[q].textContent=Ao(Q.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=Q.getMonth().toString(),N.value=Q.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Di(N){var q=N||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(Q){return t.formatDate(Q,q)}).filter(function(Q,oe,Te){return t.config.mode!=="range"||t.config.enableTime||Te.indexOf(Q)===oe}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Pt(N){N===void 0&&(N=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Di(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Di(t.config.altFormat)),N!==!1&&Ke("onValueUpdate")}function qt(N){var q=sn(N),Q=t.prevMonthNav.contains(q),oe=t.nextMonthNav.contains(q);Q||oe?Y(Q?-1:1):t.yearElements.indexOf(q)>=0?q.select():q.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):q.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Il(N){N.preventDefault();var q=N.type==="keydown",Q=sn(N),oe=Q;t.amPM!==void 0&&Q===t.amPM&&(t.amPM.textContent=t.l10n.amPM[mn(t.amPM.textContent===t.l10n.amPM[0])]);var Te=parseFloat(oe.getAttribute("min")),Ie=parseFloat(oe.getAttribute("max")),Pe=parseFloat(oe.getAttribute("step")),De=parseInt(oe.value,10),ze=N.delta||(q?N.which===38?1:-1:0),Ne=De+Pe*ze;if(typeof oe.value<"u"&&oe.value.length===2){var qe=oe===t.hourElement,at=oe===t.minuteElement;NeIe&&(Ne=oe===t.hourElement?Ne-Ie-mn(!t.amPM):Te,at&&C(void 0,1,t.hourElement)),t.amPM&&qe&&(Pe===1?Ne+De===23:Math.abs(Ne-De)>Pe)&&(t.amPM.textContent=t.l10n.amPM[mn(t.amPM.textContent===t.l10n.amPM[0])]),oe.value=Zt(Ne)}}return s(),t}function vs(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;s{const C=f||m,M=y(d);return M.onReady.push(()=>{t(8,h=!0)}),t(3,b=kt(C,Object.assign(M,f?{wrap:!0}:{}))),()=>{b.destroy()}});const g=It();function y(C={}){C=Object.assign({},C);for(const M of r){const T=(D,A,P)=>{g(C$(M),[D,A,P])};M in C?(Array.isArray(C[M])||(C[M]=[C[M]]),C[M].push(T)):C[M]=[T]}return C.onChange&&!C.onChange.includes(k)&&C.onChange.push(k),C}function k(C,M,T){var A,P;const D=(P=(A=T==null?void 0:T.config)==null?void 0:A.mode)!=null?P:"single";t(2,a=D==="single"?C[0]:C),t(4,u=M)}function $(C){le[C?"unshift":"push"](()=>{m=C,t(0,m)})}return n.$$set=C=>{e=Ye(Ye({},e),Wn(C)),t(1,s=wt(e,i)),"value"in C&&t(2,a=C.value),"formattedValue"in C&&t(4,u=C.formattedValue),"element"in C&&t(5,f=C.element),"dateFormat"in C&&t(6,c=C.dateFormat),"options"in C&&t(7,d=C.options),"input"in C&&t(0,m=C.input),"flatpickr"in C&&t(3,b=C.flatpickr),"$$scope"in C&&t(9,o=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&b&&h&&b.setDate(a,!1,c),n.$$.dirty&392&&b&&h)for(const[C,M]of Object.entries(y(d)))b.set(C,M)},[m,s,a,b,u,f,c,d,h,o,l,$]}class Ka extends Ce{constructor(e){super(),$e(this,e,M$,$$,ke,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function T$(n){let e,t,i,s,l,o,r;function a(f){n[2](f)}let u={id:n[4],options:B.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new Ka({props:u}),le.push(()=>ye(l,"formattedValue",a)),{c(){e=v("label"),t=z("Min date (UTC)"),s=O(),j(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].min),!o&&c&1&&(o=!0,d.formattedValue=f[0].min,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function O$(n){let e,t,i,s,l,o,r;function a(f){n[3](f)}let u={id:n[4],options:B.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new Ka({props:u}),le.push(()=>ye(l,"formattedValue",a)),{c(){e=v("label"),t=z("Max date (UTC)"),s=O(),j(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].max),!o&&c&1&&(o=!0,d.formattedValue=f[0].max,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function D$(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[T$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[O$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function E$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.min,r)&&(s.min=r,t(0,s))}function o(r){n.$$.not_equal(s.max,r)&&(s.max=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class A$ extends Ce{constructor(e){super(),$e(this,e,E$,D$,ke,{key:1,options:0})}}function I$(n){let e,t,i,s,l,o,r,a,u;function f(d){n[2](d)}let c={id:n[4],placeholder:"eg. optionA, optionB",required:!0};return n[0].values!==void 0&&(c.value=n[0].values),l=new xi({props:c}),le.push(()=>ye(l,"value",f)),{c(){e=v("label"),t=z("Choices"),s=O(),j(l.$$.fragment),r=O(),a=v("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,h){S(d,e,h),_(e,t),S(d,s,h),R(l,d,h),S(d,r,h),S(d,a,h),u=!0},p(d,h){(!u||h&16&&i!==(i=d[4]))&&p(e,"for",i);const m={};h&16&&(m.id=d[4]),!o&&h&1&&(o=!0,m.value=d[0].values,Me(()=>o=!1)),l.$set(m)},i(d){u||(E(l.$$.fragment,d),u=!0)},o(d){I(l.$$.fragment,d),u=!1},d(d){d&&w(e),d&&w(s),H(l,d),d&&w(r),d&&w(a)}}}function P$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max select"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].maxSelect),r||(a=W(l,"input",n[3]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&pe(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function L$(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[I$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[P$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.values"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.maxSelect"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function N$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.values,r)&&(s.values=r,t(0,s))}function o(){s.maxSelect=rt(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,o]}class F$ extends Ce{constructor(e){super(),$e(this,e,N$,L$,ke,{key:1,options:0})}}function R$(n,e,t){return["",{}]}class H$ extends Ce{constructor(e){super(),$e(this,e,R$,null,ke,{key:0,options:1})}get key(){return this.$$.ctx[0]}get options(){return this.$$.ctx[1]}}function j$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max file size (bytes)"),s=O(),l=v("input"),p(e,"for",i=n[10]),p(l,"type","number"),p(l,"id",o=n[10]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].maxSize),r||(a=W(l,"input",n[2]),r=!0)},p(u,f){f&1024&&i!==(i=u[10])&&p(e,"for",i),f&1024&&o!==(o=u[10])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSize&&pe(l,u[0].maxSize)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function q$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max files"),s=O(),l=v("input"),p(e,"for",i=n[10]),p(l,"type","number"),p(l,"id",o=n[10]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].maxSelect),r||(a=W(l,"input",n[3]),r=!0)},p(u,f){f&1024&&i!==(i=u[10])&&p(e,"for",i),f&1024&&o!==(o=u[10])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&pe(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function V$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("div"),e.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',t=O(),i=v("div"),i.innerHTML='Images (jpg, png, svg, gif)',s=O(),l=v("div"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=O(),r=v("div"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"tabindex","0"),p(e,"class","dropdown-item closable"),p(i,"tabindex","0"),p(i,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable"),p(r,"tabindex","0"),p(r,"class","dropdown-item closable")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=[W(e,"click",n[5]),W(i,"click",n[6]),W(l,"click",n[7]),W(r,"click",n[8])],a=!0)},p:x,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,Re(u)}}}function z$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M;function T(A){n[4](A)}let D={id:n[10],placeholder:"eg. image/png, application/pdf..."};return n[0].mimeTypes!==void 0&&(D.value=n[0].mimeTypes),r=new xi({props:D}),le.push(()=>ye(r,"value",T)),k=new Zn({props:{class:"dropdown dropdown-sm dropdown-nowrap",$$slots:{default:[V$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Mime types",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),h=v("button"),m=v("span"),m.textContent="Choose presets",b=O(),g=v("i"),y=O(),j(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(m,"class","txt link-primary"),p(g,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(A,P){S(A,e,P),_(e,t),_(e,i),_(e,s),S(A,o,P),R(r,A,P),S(A,u,P),S(A,f,P),_(f,c),_(f,d),_(f,h),_(h,m),_(h,b),_(h,g),_(h,y),R(k,h,null),$=!0,C||(M=Le(Be.call(null,s,{text:`Allow files ONLY with the listed mime types. + Leave empty for no restriction.`,position:"top"})),C=!0)},p(A,P){(!$||P&1024&&l!==(l=A[10]))&&p(e,"for",l);const L={};P&1024&&(L.id=A[10]),!a&&P&1&&(a=!0,L.value=A[0].mimeTypes,Me(()=>a=!1)),r.$set(L);const V={};P&2049&&(V.$$scope={dirty:P,ctx:A}),k.$set(V)},i(A){$||(E(r.$$.fragment,A),E(k.$$.fragment,A),$=!0)},o(A){I(r.$$.fragment,A),I(k.$$.fragment,A),$=!1},d(A){A&&w(e),A&&w(o),H(r,A),A&&w(u),A&&w(f),H(k),C=!1,M()}}}function B$(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)
  • @@ -61,84 +61,84 @@
  • 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){$(t,e,i)},p:x,d(t){t&&S(e)}}}function B$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M;function T(A){n[9](A)}let D={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(D.value=n[0].thumbs),r=new xi({props:D}),le.push(()=>ye(r,"value",T)),k=new Zn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[z$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),h=v("button"),m=v("span"),m.textContent="Supported formats",b=O(),g=v("i"),y=O(),j(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(m,"class","txt link-primary"),p(g,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(A,P){$(A,e,P),_(e,t),_(e,i),_(e,s),$(A,o,P),R(r,A,P),$(A,u,P),$(A,f,P),_(f,c),_(f,d),_(f,h),_(h,m),_(h,b),_(h,g),_(h,y),R(k,h,null),w=!0,C||(M=Le(Be.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),C=!0)},p(A,P){(!w||P&1024&&l!==(l=A[10]))&&p(e,"for",l);const L={};P&1024&&(L.id=A[10]),!a&&P&1&&(a=!0,L.value=A[0].thumbs,Me(()=>a=!1)),r.$set(L);const V={};P&2048&&(V.$$scope={dirty:P,ctx:A}),k.$set(V)},i(A){w||(E(r.$$.fragment,A),E(k.$$.fragment,A),w=!0)},o(A){I(r.$$.fragment,A),I(k.$$.fragment,A),w=!1},d(A){A&&S(e),A&&S(o),H(r,A),A&&S(u),A&&S(f),H(k),C=!1,M()}}}function U$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[H$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[j$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[V$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[B$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(m,b){$(m,e,b),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(m,[b]){const g={};b&2&&(g.name="schema."+m[1]+".options.maxSize"),b&3073&&(g.$$scope={dirty:b,ctx:m}),i.$set(g);const y={};b&2&&(y.name="schema."+m[1]+".options.maxSelect"),b&3073&&(y.$$scope={dirty:b,ctx:m}),o.$set(y);const k={};b&2&&(k.name="schema."+m[1]+".options.mimeTypes"),b&3073&&(k.$$scope={dirty:b,ctx:m}),u.$set(k);const w={};b&2&&(w.name="schema."+m[1]+".options.thumbs"),b&3073&&(w.$$scope={dirty:b,ctx:m}),d.$set(w)},i(m){h||(E(i.$$.fragment,m),E(o.$$.fragment,m),E(u.$$.fragment,m),E(d.$$.fragment,m),h=!0)},o(m){I(i.$$.fragment,m),I(o.$$.fragment,m),I(u.$$.fragment,m),I(d.$$.fragment,m),h=!1},d(m){m&&S(e),H(i),H(o),H(u),H(d)}}}function W$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=rt(this.value),t(0,s)}function o(){s.maxSelect=rt(this.value),t(0,s)}function r(h){n.$$.not_equal(s.mimeTypes,h)&&(s.mimeTypes=h,t(0,s))}const a=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(h){n.$$.not_equal(s.thumbs,h)&&(s.thumbs=h,t(0,s))}return n.$$set=h=>{"key"in h&&t(1,i=h.key),"options"in h&&t(0,s=h.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class Y$ extends Ce{constructor(e){super(),$e(this,e,W$,U$,ke,{key:1,options:0})}}function K$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='New collection',p(e,"type","button"),p(e,"class","btn btn-warning btn-block btn-sm m-t-5")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[7]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function J$(n){let e,t,i,s,l,o,r;function a(f){n[8](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3],$$slots:{afterOptions:[K$]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new Es({props:u}),le.push(()=>ye(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Collection"),s=O(),j(l.$$.fragment),p(e,"for",i=n[13])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&8192&&i!==(i=f[13]))&&p(e,"for",i);const d={};c&8&&(d.searchable=f[3].length>5),c&4&&(d.selectPlaceholder=f[2]?"Loading...":"Select collection"),c&8&&(d.items=f[3]),c&16400&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function Z$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=O(),s=v("i"),o=O(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[13]),p(r,"type","number"),p(r,"id",a=n[13]),p(r,"step","1"),p(r,"min","1")},m(c,d){$(c,e,d),_(e,t),_(e,i),_(e,s),$(c,o,d),$(c,r,d),pe(r,n[0].maxSelect),u||(f=[Le(Be.call(null,s,{text:"Leave empty for no limit.",position:"top"})),W(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&&rt(r.value)!==c[0].maxSelect&&pe(r,c[0].maxSelect)},d(c){c&&S(e),c&&S(o),c&&S(r),u=!1,Re(f)}}}function G$(n){let e,t,i,s,l,o,r;function a(f){n[10](f)}let u={id:n[13],items:n[5]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Es({props:u}),le.push(()=>ye(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Delete record on relation delete"),s=O(),j(l.$$.fragment),p(e,"for",i=n[13])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&8192&&i!==(i=f[13]))&&p(e,"for",i);const d={};c&8192&&(d.id=f[13]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function X$(n){let e,t,i,s,l,o,r,a,u,f,c,d;i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[J$,({uniqueId:m})=>({13:m}),({uniqueId:m})=>m?8192:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[Z$,({uniqueId:m})=>({13:m}),({uniqueId:m})=>m?8192:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[G$,({uniqueId:m})=>({13:m}),({uniqueId:m})=>m?8192:0]},$$scope:{ctx:n}}});let h={};return c=new Ja({props:h}),n[11](c),c.$on("save",n[12]),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),j(c.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(m,b){$(m,e,b),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),$(m,f,b),R(c,m,b),d=!0},p(m,[b]){const g={};b&2&&(g.name="schema."+m[1]+".options.collectionId"),b&24605&&(g.$$scope={dirty:b,ctx:m}),i.$set(g);const y={};b&2&&(y.name="schema."+m[1]+".options.maxSelect"),b&24577&&(y.$$scope={dirty:b,ctx:m}),o.$set(y);const k={};b&2&&(k.name="schema."+m[1]+".options.cascadeDelete"),b&24577&&(k.$$scope={dirty:b,ctx:m}),u.$set(k);const w={};c.$set(w)},i(m){d||(E(i.$$.fragment,m),E(o.$$.fragment,m),E(u.$$.fragment,m),E(c.$$.fragment,m),d=!0)},o(m){I(i.$$.fragment,m),I(o.$$.fragment,m),I(u.$$.fragment,m),I(c.$$.fragment,m),d=!1},d(m){m&&S(e),H(i),H(o),H(u),m&&S(f),n[11](null),H(c,m)}}}function Q$(n,e,t){let{key:i=""}=e,{options:s={}}=e;const l=[{label:"False",value:!1},{label:"True",value:!0}];let o=!1,r=[],a=null;u();async function u(){t(2,o=!0);try{const g=await me.collections.getFullList(200,{sort:"created"});t(3,r=B.sortCollections(g))}catch(g){me.errorResponseHandler(g)}t(2,o=!1)}const f=()=>a==null?void 0:a.show();function c(g){n.$$.not_equal(s.collectionId,g)&&(s.collectionId=g,t(0,s))}function d(){s.maxSelect=rt(this.value),t(0,s)}function h(g){n.$$.not_equal(s.cascadeDelete,g)&&(s.cascadeDelete=g,t(0,s))}function m(g){le[g?"unshift":"push"](()=>{a=g,t(4,a)})}const b=g=>{var y,k;(k=(y=g==null?void 0:g.detail)==null?void 0:y.collection)!=null&&k.id&&t(0,s.collectionId=g.detail.collection.id,s),u()};return n.$$set=g=>{"key"in g&&t(1,i=g.key),"options"in g&&t(0,s=g.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(s)&&t(0,s={maxSelect:1,collectionId:null,cascadeDelete:!1})},[s,i,o,r,a,l,u,f,c,d,h,m,b]}class x$ extends Ce{constructor(e){super(),$e(this,e,Q$,X$,ke,{key:1,options:0})}}function eC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max select"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].maxSelect),r||(a=W(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&&rt(l.value)!==u[0].maxSelect&&pe(l,u[0].maxSelect)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function tC(n){let e,t,i,s,l,o,r;function a(f){n[4](f)}let u={id:n[5],items:n[2]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Es({props:u}),le.push(()=>ye(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Delete record on user delete"),s=O(),j(l.$$.fragment),p(e,"for",i=n[5])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&32&&i!==(i=f[5]))&&p(e,"for",i);const d={};c&32&&(d.id=f[5]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function nC(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[eC,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[tC,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){$(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.maxSelect"),u&97&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.cascadeDelete"),u&97&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&S(e),H(i),H(o)}}}function iC(n,e,t){const i=[{label:"False",value:!1},{label:"True",value:!0}];let{key:s=""}=e,{options:l={}}=e;function o(){l.maxSelect=rt(this.value),t(0,l)}function r(a){n.$$.not_equal(l.cascadeDelete,a)&&(l.cascadeDelete=a,t(0,l))}return n.$$set=a=>{"key"in a&&t(1,s=a.key),"options"in a&&t(0,l=a.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(l)&&t(0,l={maxSelect:1,cascadeDelete:!1})},[l,s,i,o,r]}class sC extends Ce{constructor(e){super(),$e(this,e,iC,nC,ke,{key:1,options:0})}}function lC(n){let e,t,i,s,l,o,r;function a(f){n[17](f)}let u={id:n[43],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new KS({props:u}),le.push(()=>ye(l,"value",a)),{c(){e=v("label"),t=z("Type"),s=O(),j(l.$$.fragment),p(e,"for",i=n[43])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&4096&&i!==(i=f[43]))&&p(e,"for",i);const d={};c[1]&4096&&(d.id=f[43]),c[0]&1&&(d.disabled=f[0].id),!o&&c[0]&1&&(o=!0,d.value=f[0].type,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function qc(n){let e,t,i;return{c(){e=v("span"),e.textContent="Duplicated or invalid name",p(e,"class","txt invalid-name-note svelte-1tpxlm5")},m(s,l){$(s,e,l),i=!0},i(s){i||(Qe(()=>{t||(t=je(e,kn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=je(e,kn,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&S(e),s&&t&&t.end()}}}function oC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m=!n[5]&&qc();return{c(){e=v("label"),t=v("span"),t.textContent="Name",i=O(),m&&m.c(),l=O(),o=v("input"),p(t,"class","txt"),p(e,"for",s=n[43]),p(o,"type","text"),p(o,"id",r=n[43]),o.required=!0,o.disabled=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,o.value=f=n[0].name},m(b,g){$(b,e,g),_(e,t),_(e,i),m&&m.m(e,null),$(b,l,g),$(b,o,g),c=!0,n[0].id||o.focus(),d||(h=W(o,"input",n[18]),d=!0)},p(b,g){b[5]?m&&(be(),I(m,1,1,()=>{m=null}),ve()):m?g[0]&32&&E(m,1):(m=qc(),m.c(),E(m,1),m.m(e,null)),(!c||g[1]&4096&&s!==(s=b[43]))&&p(e,"for",s),(!c||g[1]&4096&&r!==(r=b[43]))&&p(o,"id",r),(!c||g[0]&1&&a!==(a=b[0].id&&b[0].system))&&(o.disabled=a),(!c||g[0]&1&&u!==(u=!b[0].id))&&(o.autofocus=u),(!c||g[0]&1&&f!==(f=b[0].name)&&o.value!==f)&&(o.value=f)},i(b){c||(E(m),c=!0)},o(b){I(m),c=!1},d(b){b&&S(e),m&&m.d(),b&&S(l),b&&S(o),d=!1,h()}}}function rC(n){let e,t,i;function s(o){n[29](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new sC({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function aC(n){let e,t,i;function s(o){n[28](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new x$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function uC(n){let e,t,i;function s(o){n[27](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new Y$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function fC(n){let e,t,i;function s(o){n[26](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new R$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function cC(n){let e,t,i;function s(o){n[25](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new N$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function dC(n){let e,t,i;function s(o){n[24](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new E$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function pC(n){let e,t,i;function s(o){n[23](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new m$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function hC(n){let e,t,i;function s(o){n[22](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new C_({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function mC(n){let e,t,i;function s(o){n[21](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new o$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function gC(n){let e,t,i;function s(o){n[20](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new s$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function _C(n){let e,t,i;function s(o){n[19](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new xS({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function bC(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Nonempty",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",u=n[43])},m(d,h){$(d,e,h),e.checked=n[0].required,$(d,i,h),$(d,s,h),_(s,l),_(s,o),_(s,r),f||(c=[W(e,"change",n[30]),Le(a=Be.call(null,r,{text:`Requires the field value to be nonempty + (eg. 100x0) - resize to W width preserving the aspect ratio`,p(e,"class","m-0")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function U$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M;function T(A){n[9](A)}let D={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(D.value=n[0].thumbs),r=new xi({props:D}),le.push(()=>ye(r,"value",T)),k=new Zn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[B$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),h=v("button"),m=v("span"),m.textContent="Supported formats",b=O(),g=v("i"),y=O(),j(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(m,"class","txt link-primary"),p(g,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(A,P){S(A,e,P),_(e,t),_(e,i),_(e,s),S(A,o,P),R(r,A,P),S(A,u,P),S(A,f,P),_(f,c),_(f,d),_(f,h),_(h,m),_(h,b),_(h,g),_(h,y),R(k,h,null),$=!0,C||(M=Le(Be.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),C=!0)},p(A,P){(!$||P&1024&&l!==(l=A[10]))&&p(e,"for",l);const L={};P&1024&&(L.id=A[10]),!a&&P&1&&(a=!0,L.value=A[0].thumbs,Me(()=>a=!1)),r.$set(L);const V={};P&2048&&(V.$$scope={dirty:P,ctx:A}),k.$set(V)},i(A){$||(E(r.$$.fragment,A),E(k.$$.fragment,A),$=!0)},o(A){I(r.$$.fragment,A),I(k.$$.fragment,A),$=!1},d(A){A&&w(e),A&&w(o),H(r,A),A&&w(u),A&&w(f),H(k),C=!1,M()}}}function W$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[j$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[q$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[z$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[U$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(m,b){S(m,e,b),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(m,[b]){const g={};b&2&&(g.name="schema."+m[1]+".options.maxSize"),b&3073&&(g.$$scope={dirty:b,ctx:m}),i.$set(g);const y={};b&2&&(y.name="schema."+m[1]+".options.maxSelect"),b&3073&&(y.$$scope={dirty:b,ctx:m}),o.$set(y);const k={};b&2&&(k.name="schema."+m[1]+".options.mimeTypes"),b&3073&&(k.$$scope={dirty:b,ctx:m}),u.$set(k);const $={};b&2&&($.name="schema."+m[1]+".options.thumbs"),b&3073&&($.$$scope={dirty:b,ctx:m}),d.$set($)},i(m){h||(E(i.$$.fragment,m),E(o.$$.fragment,m),E(u.$$.fragment,m),E(d.$$.fragment,m),h=!0)},o(m){I(i.$$.fragment,m),I(o.$$.fragment,m),I(u.$$.fragment,m),I(d.$$.fragment,m),h=!1},d(m){m&&w(e),H(i),H(o),H(u),H(d)}}}function Y$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=rt(this.value),t(0,s)}function o(){s.maxSelect=rt(this.value),t(0,s)}function r(h){n.$$.not_equal(s.mimeTypes,h)&&(s.mimeTypes=h,t(0,s))}const a=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(h){n.$$.not_equal(s.thumbs,h)&&(s.thumbs=h,t(0,s))}return n.$$set=h=>{"key"in h&&t(1,i=h.key),"options"in h&&t(0,s=h.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class K$ extends Ce{constructor(e){super(),$e(this,e,Y$,W$,ke,{key:1,options:0})}}function J$(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='New collection',p(e,"type","button"),p(e,"class","btn btn-warning btn-block btn-sm m-t-5")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[7]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function Z$(n){let e,t,i,s,l,o,r;function a(f){n[8](f)}let u={searchable:n[3].length>5,selectPlaceholder:n[2]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[3],$$slots:{afterOptions:[J$]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new Es({props:u}),le.push(()=>ye(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Collection"),s=O(),j(l.$$.fragment),p(e,"for",i=n[13])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&8192&&i!==(i=f[13]))&&p(e,"for",i);const d={};c&8&&(d.searchable=f[3].length>5),c&4&&(d.selectPlaceholder=f[2]?"Loading...":"Select collection"),c&8&&(d.items=f[3]),c&16400&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function G$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=O(),s=v("i"),o=O(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[13]),p(r,"type","number"),p(r,"id",a=n[13]),p(r,"step","1"),p(r,"min","1")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),pe(r,n[0].maxSelect),u||(f=[Le(Be.call(null,s,{text:"Leave empty for no limit.",position:"top"})),W(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&&rt(r.value)!==c[0].maxSelect&&pe(r,c[0].maxSelect)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,Re(f)}}}function X$(n){let e,t,i,s,l,o,r;function a(f){n[10](f)}let u={id:n[13],items:n[5]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Es({props:u}),le.push(()=>ye(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Delete record on relation delete"),s=O(),j(l.$$.fragment),p(e,"for",i=n[13])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&8192&&i!==(i=f[13]))&&p(e,"for",i);const d={};c&8192&&(d.id=f[13]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function Q$(n){let e,t,i,s,l,o,r,a,u,f,c,d;i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[Z$,({uniqueId:m})=>({13:m}),({uniqueId:m})=>m?8192:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[G$,({uniqueId:m})=>({13:m}),({uniqueId:m})=>m?8192:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[X$,({uniqueId:m})=>({13:m}),({uniqueId:m})=>m?8192:0]},$$scope:{ctx:n}}});let h={};return c=new Ja({props:h}),n[11](c),c.$on("save",n[12]),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),j(c.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(m,b){S(m,e,b),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),S(m,f,b),R(c,m,b),d=!0},p(m,[b]){const g={};b&2&&(g.name="schema."+m[1]+".options.collectionId"),b&24605&&(g.$$scope={dirty:b,ctx:m}),i.$set(g);const y={};b&2&&(y.name="schema."+m[1]+".options.maxSelect"),b&24577&&(y.$$scope={dirty:b,ctx:m}),o.$set(y);const k={};b&2&&(k.name="schema."+m[1]+".options.cascadeDelete"),b&24577&&(k.$$scope={dirty:b,ctx:m}),u.$set(k);const $={};c.$set($)},i(m){d||(E(i.$$.fragment,m),E(o.$$.fragment,m),E(u.$$.fragment,m),E(c.$$.fragment,m),d=!0)},o(m){I(i.$$.fragment,m),I(o.$$.fragment,m),I(u.$$.fragment,m),I(c.$$.fragment,m),d=!1},d(m){m&&w(e),H(i),H(o),H(u),m&&w(f),n[11](null),H(c,m)}}}function x$(n,e,t){let{key:i=""}=e,{options:s={}}=e;const l=[{label:"False",value:!1},{label:"True",value:!0}];let o=!1,r=[],a=null;u();async function u(){t(2,o=!0);try{const g=await me.collections.getFullList(200,{sort:"created"});t(3,r=B.sortCollections(g))}catch(g){me.errorResponseHandler(g)}t(2,o=!1)}const f=()=>a==null?void 0:a.show();function c(g){n.$$.not_equal(s.collectionId,g)&&(s.collectionId=g,t(0,s))}function d(){s.maxSelect=rt(this.value),t(0,s)}function h(g){n.$$.not_equal(s.cascadeDelete,g)&&(s.cascadeDelete=g,t(0,s))}function m(g){le[g?"unshift":"push"](()=>{a=g,t(4,a)})}const b=g=>{var y,k;(k=(y=g==null?void 0:g.detail)==null?void 0:y.collection)!=null&&k.id&&t(0,s.collectionId=g.detail.collection.id,s),u()};return n.$$set=g=>{"key"in g&&t(1,i=g.key),"options"in g&&t(0,s=g.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(s)&&t(0,s={maxSelect:1,collectionId:null,cascadeDelete:!1})},[s,i,o,r,a,l,u,f,c,d,h,m,b]}class eC extends Ce{constructor(e){super(),$e(this,e,x$,Q$,ke,{key:1,options:0})}}function tC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Max select"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].maxSelect),r||(a=W(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&&rt(l.value)!==u[0].maxSelect&&pe(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function nC(n){let e,t,i,s,l,o,r;function a(f){n[4](f)}let u={id:n[5],items:n[2]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new Es({props:u}),le.push(()=>ye(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("Delete record on user delete"),s=O(),j(l.$$.fragment),p(e,"for",i=n[5])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&32&&i!==(i=f[5]))&&p(e,"for",i);const d={};c&32&&(d.id=f[5]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function iC(n){let e,t,i,s,l,o,r;return i=new _e({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[tC,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[nC,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.maxSelect"),u&97&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.cascadeDelete"),u&97&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){I(i.$$.fragment,a),I(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function sC(n,e,t){const i=[{label:"False",value:!1},{label:"True",value:!0}];let{key:s=""}=e,{options:l={}}=e;function o(){l.maxSelect=rt(this.value),t(0,l)}function r(a){n.$$.not_equal(l.cascadeDelete,a)&&(l.cascadeDelete=a,t(0,l))}return n.$$set=a=>{"key"in a&&t(1,s=a.key),"options"in a&&t(0,l=a.options)},n.$$.update=()=>{n.$$.dirty&1&&B.isEmpty(l)&&t(0,l={maxSelect:1,cascadeDelete:!1})},[l,s,i,o,r]}class lC extends Ce{constructor(e){super(),$e(this,e,sC,iC,ke,{key:1,options:0})}}function oC(n){let e,t,i,s,l,o,r;function a(f){n[17](f)}let u={id:n[43],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new JS({props:u}),le.push(()=>ye(l,"value",a)),{c(){e=v("label"),t=z("Type"),s=O(),j(l.$$.fragment),p(e,"for",i=n[43])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&4096&&i!==(i=f[43]))&&p(e,"for",i);const d={};c[1]&4096&&(d.id=f[43]),c[0]&1&&(d.disabled=f[0].id),!o&&c[0]&1&&(o=!0,d.value=f[0].type,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function qc(n){let e,t,i;return{c(){e=v("span"),e.textContent="Duplicated or invalid name",p(e,"class","txt invalid-name-note svelte-1tpxlm5")},m(s,l){S(s,e,l),i=!0},i(s){i||(Qe(()=>{t||(t=je(e,kn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=je(e,kn,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function rC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m=!n[5]&&qc();return{c(){e=v("label"),t=v("span"),t.textContent="Name",i=O(),m&&m.c(),l=O(),o=v("input"),p(t,"class","txt"),p(e,"for",s=n[43]),p(o,"type","text"),p(o,"id",r=n[43]),o.required=!0,o.disabled=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,o.value=f=n[0].name},m(b,g){S(b,e,g),_(e,t),_(e,i),m&&m.m(e,null),S(b,l,g),S(b,o,g),c=!0,n[0].id||o.focus(),d||(h=W(o,"input",n[18]),d=!0)},p(b,g){b[5]?m&&(be(),I(m,1,1,()=>{m=null}),ve()):m?g[0]&32&&E(m,1):(m=qc(),m.c(),E(m,1),m.m(e,null)),(!c||g[1]&4096&&s!==(s=b[43]))&&p(e,"for",s),(!c||g[1]&4096&&r!==(r=b[43]))&&p(o,"id",r),(!c||g[0]&1&&a!==(a=b[0].id&&b[0].system))&&(o.disabled=a),(!c||g[0]&1&&u!==(u=!b[0].id))&&(o.autofocus=u),(!c||g[0]&1&&f!==(f=b[0].name)&&o.value!==f)&&(o.value=f)},i(b){c||(E(m),c=!0)},o(b){I(m),c=!1},d(b){b&&w(e),m&&m.d(),b&&w(l),b&&w(o),d=!1,h()}}}function aC(n){let e,t,i;function s(o){n[29](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new lC({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function uC(n){let e,t,i;function s(o){n[28](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new eC({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function fC(n){let e,t,i;function s(o){n[27](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new K$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function cC(n){let e,t,i;function s(o){n[26](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new H$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function dC(n){let e,t,i;function s(o){n[25](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new F$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function pC(n){let e,t,i;function s(o){n[24](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new A$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function hC(n){let e,t,i;function s(o){n[23](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new g$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function mC(n){let e,t,i;function s(o){n[22](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new M_({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function gC(n){let e,t,i;function s(o){n[21](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new r$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function _C(n){let e,t,i;function s(o){n[20](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new l$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function bC(n){let e,t,i;function s(o){n[19](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new e$({props:l}),le.push(()=>ye(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function vC(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Nonempty",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",u=n[43])},m(d,h){S(d,e,h),e.checked=n[0].required,S(d,i,h),S(d,s,h),_(s,l),_(s,o),_(s,r),f||(c=[W(e,"change",n[30]),Le(a=Be.call(null,r,{text:`Requires the field value to be nonempty (aka. not ${B.zeroDefaultStr(n[0])}).`,position:"right"}))],f=!0)},p(d,h){h[1]&4096&&t!==(t=d[43])&&p(e,"id",t),h[0]&1&&(e.checked=d[0].required),a&&Wt(a.update)&&h[0]&1&&a.update.call(null,{text:`Requires the field value to be nonempty -(aka. not ${B.zeroDefaultStr(d[0])}).`,position:"right"}),h[1]&4096&&u!==(u=d[43])&&p(s,"for",u)},d(d){d&&S(e),d&&S(i),d&&S(s),f=!1,Re(c)}}}function Vc(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[vC,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function vC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(s,"for",o=n[43])},m(u,f){$(u,e,f),e.checked=n[0].unique,$(u,i,f),$(u,s,f),_(s,l),r||(a=W(e,"change",n[31]),r=!0)},p(u,f){f[1]&4096&&t!==(t=u[43])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&4096&&o!==(o=u[43])&&p(s,"for",o)},d(u){u&&S(e),u&&S(i),u&&S(s),r=!1,a()}}}function zc(n){let e,t,i,s,l,o,r,a,u,f;a=new Zn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[yC]},$$scope:{ctx:n}}});let c=n[8]&&Bc(n);return{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),l=v("button"),o=v("i"),r=O(),j(a.$$.fragment),u=O(),c&&c.c(),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"class","btn btn-circle btn-sm btn-secondary"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 txt-right")},m(d,h){$(d,e,h),_(e,t),_(e,i),_(e,s),_(s,l),_(l,o),_(l,r),R(a,l,null),_(s,u),c&&c.m(s,null),f=!0},p(d,h){const m={};h[1]&8192&&(m.$$scope={dirty:h,ctx:d}),a.$set(m),d[8]?c?c.p(d,h):(c=Bc(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i(d){f||(E(a.$$.fragment,d),f=!0)},o(d){I(a.$$.fragment,d),f=!1},d(d){d&&S(e),H(a),c&&c.d()}}}function yC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[9]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function Bc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Done',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){$(s,e,l),t||(i=W(e,"click",Yn(n[3])),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function kC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M,T;s=new _e({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[lC,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:` +(aka. not ${B.zeroDefaultStr(d[0])}).`,position:"right"}),h[1]&4096&&u!==(u=d[43])&&p(s,"for",u)},d(d){d&&w(e),d&&w(i),d&&w(s),f=!1,Re(c)}}}function Vc(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[yC,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function yC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(s,"for",o=n[43])},m(u,f){S(u,e,f),e.checked=n[0].unique,S(u,i,f),S(u,s,f),_(s,l),r||(a=W(e,"change",n[31]),r=!0)},p(u,f){f[1]&4096&&t!==(t=u[43])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&4096&&o!==(o=u[43])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function zc(n){let e,t,i,s,l,o,r,a,u,f;a=new Zn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[kC]},$$scope:{ctx:n}}});let c=n[8]&&Bc(n);return{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),l=v("button"),o=v("i"),r=O(),j(a.$$.fragment),u=O(),c&&c.c(),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"class","btn btn-circle btn-sm btn-secondary"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 txt-right")},m(d,h){S(d,e,h),_(e,t),_(e,i),_(e,s),_(s,l),_(l,o),_(l,r),R(a,l,null),_(s,u),c&&c.m(s,null),f=!0},p(d,h){const m={};h[1]&8192&&(m.$$scope={dirty:h,ctx:d}),a.$set(m),d[8]?c?c.p(d,h):(c=Bc(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i(d){f||(E(a.$$.fragment,d),f=!0)},o(d){I(a.$$.fragment,d),f=!1},d(d){d&&w(e),H(a),c&&c.d()}}}function kC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[9]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function Bc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Done',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){S(s,e,l),t||(i=W(e,"click",Yn(n[3])),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function wC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T;s=new _e({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[oC,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:` form-field required `+(n[5]?"":"invalid")+` `+(n[0].id&&n[0].system?"disabled":"")+` - `,name:"schema."+n[1]+".name",$$slots:{default:[oC,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});const D=[_C,gC,mC,hC,pC,dC,cC,fC,uC,aC,rC],A=[];function P(F,U){return F[0].type==="text"?0:F[0].type==="number"?1:F[0].type==="bool"?2:F[0].type==="email"?3:F[0].type==="url"?4:F[0].type==="date"?5:F[0].type==="select"?6:F[0].type==="json"?7:F[0].type==="file"?8:F[0].type==="relation"?9:F[0].type==="user"?10:-1}~(f=P(n))&&(c=A[f]=D[f](n)),m=new _e({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[bC,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&Vc(n),V=!n[0].toDelete&&zc(n);return{c(){e=v("form"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),a=O(),u=v("div"),c&&c.c(),d=O(),h=v("div"),j(m.$$.fragment),b=O(),g=v("div"),L&&L.c(),y=O(),V&&V.c(),k=O(),w=v("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(h,"class","col-sm-4 flex"),p(g,"class","col-sm-4 flex"),p(t,"class","grid"),p(w,"type","submit"),p(w,"class","hidden"),p(w,"tabindex","-1"),p(e,"class","field-form")},m(F,U){$(F,e,U),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),_(t,a),_(t,u),~f&&A[f].m(u,null),_(t,d),_(t,h),R(m,h,null),_(t,b),_(t,g),L&&L.m(g,null),_(t,y),V&&V.m(t,null),_(e,k),_(e,w),C=!0,M||(T=[W(e,"dragstart",$C),W(e,"submit",ut(n[32]))],M=!0)},p(F,U){const G={};U[0]&1&&(G.class="form-field required "+(F[0].id?"disabled":"")),U[0]&2&&(G.name="schema."+F[1]+".type"),U[0]&1|U[1]&12288&&(G.$$scope={dirty:U,ctx:F}),s.$set(G);const K={};U[0]&33&&(K.class=` + `,name:"schema."+n[1]+".name",$$slots:{default:[rC,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});const D=[bC,_C,gC,mC,hC,pC,dC,cC,fC,uC,aC],A=[];function P(F,U){return F[0].type==="text"?0:F[0].type==="number"?1:F[0].type==="bool"?2:F[0].type==="email"?3:F[0].type==="url"?4:F[0].type==="date"?5:F[0].type==="select"?6:F[0].type==="json"?7:F[0].type==="file"?8:F[0].type==="relation"?9:F[0].type==="user"?10:-1}~(f=P(n))&&(c=A[f]=D[f](n)),m=new _e({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[vC,({uniqueId:F})=>({43:F}),({uniqueId:F})=>[0,F?4096:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&Vc(n),V=!n[0].toDelete&&zc(n);return{c(){e=v("form"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),a=O(),u=v("div"),c&&c.c(),d=O(),h=v("div"),j(m.$$.fragment),b=O(),g=v("div"),L&&L.c(),y=O(),V&&V.c(),k=O(),$=v("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(h,"class","col-sm-4 flex"),p(g,"class","col-sm-4 flex"),p(t,"class","grid"),p($,"type","submit"),p($,"class","hidden"),p($,"tabindex","-1"),p(e,"class","field-form")},m(F,U){S(F,e,U),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),_(t,a),_(t,u),~f&&A[f].m(u,null),_(t,d),_(t,h),R(m,h,null),_(t,b),_(t,g),L&&L.m(g,null),_(t,y),V&&V.m(t,null),_(e,k),_(e,$),C=!0,M||(T=[W(e,"dragstart",CC),W(e,"submit",ut(n[32]))],M=!0)},p(F,U){const G={};U[0]&1&&(G.class="form-field required "+(F[0].id?"disabled":"")),U[0]&2&&(G.name="schema."+F[1]+".type"),U[0]&1|U[1]&12288&&(G.$$scope={dirty:U,ctx:F}),s.$set(G);const K={};U[0]&33&&(K.class=` form-field required `+(F[5]?"":"invalid")+` `+(F[0].id&&F[0].system?"disabled":"")+` - `),U[0]&2&&(K.name="schema."+F[1]+".name"),U[0]&33|U[1]&12288&&(K.$$scope={dirty:U,ctx:F}),r.$set(K);let X=f;f=P(F),f===X?~f&&A[f].p(F,U):(c&&(be(),I(A[X],1,1,()=>{A[X]=null}),ve()),~f?(c=A[f],c?c.p(F,U):(c=A[f]=D[f](F),c.c()),E(c,1),c.m(u,null)):c=null);const Z={};U[0]&1|U[1]&12288&&(Z.$$scope={dirty:U,ctx:F}),m.$set(Z),F[0].type!=="file"?L?(L.p(F,U),U[0]&1&&E(L,1)):(L=Vc(F),L.c(),E(L,1),L.m(g,null)):L&&(be(),I(L,1,1,()=>{L=null}),ve()),F[0].toDelete?V&&(be(),I(V,1,1,()=>{V=null}),ve()):V?(V.p(F,U),U[0]&1&&E(V,1)):(V=zc(F),V.c(),E(V,1),V.m(t,null))},i(F){C||(E(s.$$.fragment,F),E(r.$$.fragment,F),E(c),E(m.$$.fragment,F),E(L),E(V),C=!0)},o(F){I(s.$$.fragment,F),I(r.$$.fragment,F),I(c),I(m.$$.fragment,F),I(L),I(V),C=!1},d(F){F&&S(e),H(s),H(r),~f&&A[f].d(),H(m),L&&L.d(),V&&V.d(),M=!1,Re(T)}}}function Uc(n){let e,t,i,s,l=n[0].system&&Wc(),o=!n[0].id&&Yc(n),r=n[0].required&&Kc(),a=n[0].unique&&Jc();return{c(){e=v("div"),l&&l.c(),t=O(),o&&o.c(),i=O(),r&&r.c(),s=O(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){$(u,e,f),l&&l.m(e,null),_(e,t),o&&o.m(e,null),_(e,i),r&&r.m(e,null),_(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Wc(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=Yc(u),o.c(),o.m(e,i)),u[0].required?r||(r=Kc(),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=Jc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&S(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Wc(n){let e;return{c(){e=v("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function Yc(n){let e;return{c(){e=v("span"),e.textContent="New",p(e,"class","label"),ee(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){$(t,e,i)},p(t,i){i[0]&257&&ee(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&S(e)}}}function Kc(n){let e;return{c(){e=v("span"),e.textContent="Nonempty",p(e,"class","label label-success")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function Jc(n){let e;return{c(){e=v("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function Zc(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){$(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&S(e),o&&t&&t.end(),s=!1,l()}}}function Gc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){$(s,e,l),t||(i=W(e,"click",Yn(n[16])),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function wC(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,h,m,b,g,y=!n[0].toDelete&&Uc(n),k=n[7]&&!n[0].system&&Zc(),w=n[0].toDelete&&Gc(n);return{c(){e=v("div"),t=v("span"),i=v("i"),l=O(),o=v("strong"),a=z(r),f=O(),y&&y.c(),c=O(),d=v("div"),h=O(),k&&k.c(),m=O(),w&&w.c(),b=Fe(),p(i,"class",s=uo(B.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),p(t,"class","icon field-type"),p(o,"class","title field-name svelte-1tpxlm5"),p(o,"title",u=n[0].name),ee(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(C,M){$(C,e,M),_(e,t),_(t,i),_(e,l),_(e,o),_(o,a),$(C,f,M),y&&y.m(C,M),$(C,c,M),$(C,d,M),$(C,h,M),k&&k.m(C,M),$(C,m,M),w&&w.m(C,M),$(C,b,M),g=!0},p(C,M){(!g||M[0]&1&&s!==(s=uo(B.getFieldTypeIcon(C[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!g||M[0]&1)&&r!==(r=(C[0].name||"-")+"")&&ue(a,r),(!g||M[0]&1&&u!==(u=C[0].name))&&p(o,"title",u),(!g||M[0]&1)&&ee(o,"txt-strikethrough",C[0].toDelete),C[0].toDelete?y&&(y.d(1),y=null):y?y.p(C,M):(y=Uc(C),y.c(),y.m(c.parentNode,c)),C[7]&&!C[0].system?k?M[0]&129&&E(k,1):(k=Zc(),k.c(),E(k,1),k.m(m.parentNode,m)):k&&(be(),I(k,1,1,()=>{k=null}),ve()),C[0].toDelete?w?w.p(C,M):(w=Gc(C),w.c(),w.m(b.parentNode,b)):w&&(w.d(1),w=null)},i(C){g||(E(k),g=!0)},o(C){I(k),g=!1},d(C){C&&S(e),C&&S(f),y&&y.d(C),C&&S(c),C&&S(d),C&&S(h),k&&k.d(C),C&&S(m),w&&w.d(C),C&&S(b)}}}function SC(n){let e,t;const i=[{draggable:!0},{single:!0},{interactive:n[8]},{class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion"},n[11]];let s={$$slots:{header:[wC],default:[kC]},$$scope:{ctx:n}};for(let l=0;l{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()};function CC(n,e,t){let i,s,l,o;const r=["key","field","disabled","excludeNames","expand","collapse"];let a=wt(e,r),u;Je(n,wi,ce=>t(15,u=ce));const f=It();let{key:c="0"}=e,{field:d=new fn}=e,{disabled:h=!1}=e,{excludeNames:m=[]}=e,b,g=d.type;function y(){b==null||b.expand()}function k(){b==null||b.collapse()}function w(){d.id?t(0,d.toDelete=!0,d):(k(),f("remove"))}function C(ce){if(ce=(""+ce).toLowerCase(),!ce)return!1;for(const se of m)if(se.toLowerCase()===ce)return!1;return!0}function M(ce){return B.slugify(ce)}un(()=>{d.id||y()});const T=()=>{t(0,d.toDelete=!1,d)};function D(ce){n.$$.not_equal(d.type,ce)&&(d.type=ce,t(0,d),t(14,g),t(4,b))}const A=ce=>{t(0,d.name=M(ce.target.value),d),ce.target.value=d.name};function P(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function L(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function V(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function F(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function U(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function G(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function K(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function X(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function Z(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function ie(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function J(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function fe(){d.required=this.checked,t(0,d),t(14,g),t(4,b)}function Y(){d.unique=this.checked,t(0,d),t(14,g),t(4,b)}const re=()=>{i&&k()};function Oe(ce){le[ce?"unshift":"push"](()=>{b=ce,t(4,b)})}function ge(ce){Ve.call(this,n,ce)}function ae(ce){Ve.call(this,n,ce)}function he(ce){Ve.call(this,n,ce)}function de(ce){Ve.call(this,n,ce)}function Se(ce){Ve.call(this,n,ce)}function we(ce){Ve.call(this,n,ce)}function Ue(ce){Ve.call(this,n,ce)}return n.$$set=ce=>{e=Ye(Ye({},e),Wn(ce)),t(11,a=wt(e,r)),"key"in ce&&t(1,c=ce.key),"field"in ce&&t(0,d=ce.field),"disabled"in ce&&t(2,h=ce.disabled),"excludeNames"in ce&&t(12,m=ce.excludeNames)},n.$$.update=()=>{n.$$.dirty[0]&16385&&g!=d.type&&(t(14,g=d.type),t(0,d.options={},d),t(0,d.unique=!1,d)),n.$$.dirty[0]&17&&d.toDelete&&(b&&k(),d.originalName&&d.name!==d.originalName&&t(0,d.name=d.originalName,d)),n.$$.dirty[0]&1&&!d.originalName&&d.name&&t(0,d.originalName=d.name,d),n.$$.dirty[0]&1&&typeof d.toDelete>"u"&&t(0,d.toDelete=!1,d),n.$$.dirty[0]&1&&d.required&&t(0,d.nullable=!1,d),n.$$.dirty[0]&1&&t(6,i=!B.isEmpty(d.name)&&d.type),n.$$.dirty[0]&80&&(i||b&&y()),n.$$.dirty[0]&69&&t(8,s=!h&&!d.system&&!d.toDelete&&i),n.$$.dirty[0]&1&&t(5,l=C(d.name)),n.$$.dirty[0]&32802&&t(7,o=!l||!B.isEmpty(B.getNestedVal(u,`schema.${c}`)))},[d,c,h,k,b,l,i,o,s,w,M,a,m,y,g,u,T,D,A,P,L,V,F,U,G,K,X,Z,ie,J,fe,Y,re,Oe,ge,ae,he,de,Se,we,Ue]}class MC extends Ce{constructor(e){super(),$e(this,e,CC,SC,ke,{key:1,field:0,disabled:2,excludeNames:12,expand:13,collapse:3},null,[-1,-1])}get expand(){return this.$$.ctx[13]}get collapse(){return this.$$.ctx[3]}}function Xc(n,e,t){const i=n.slice();return i[13]=e[t],i[14]=e,i[15]=t,i}function Qc(n){let e,t,i,s,l,o,r,a;return{c(){e=z(`, + `),U[0]&2&&(K.name="schema."+F[1]+".name"),U[0]&33|U[1]&12288&&(K.$$scope={dirty:U,ctx:F}),r.$set(K);let X=f;f=P(F),f===X?~f&&A[f].p(F,U):(c&&(be(),I(A[X],1,1,()=>{A[X]=null}),ve()),~f?(c=A[f],c?c.p(F,U):(c=A[f]=D[f](F),c.c()),E(c,1),c.m(u,null)):c=null);const Z={};U[0]&1|U[1]&12288&&(Z.$$scope={dirty:U,ctx:F}),m.$set(Z),F[0].type!=="file"?L?(L.p(F,U),U[0]&1&&E(L,1)):(L=Vc(F),L.c(),E(L,1),L.m(g,null)):L&&(be(),I(L,1,1,()=>{L=null}),ve()),F[0].toDelete?V&&(be(),I(V,1,1,()=>{V=null}),ve()):V?(V.p(F,U),U[0]&1&&E(V,1)):(V=zc(F),V.c(),E(V,1),V.m(t,null))},i(F){C||(E(s.$$.fragment,F),E(r.$$.fragment,F),E(c),E(m.$$.fragment,F),E(L),E(V),C=!0)},o(F){I(s.$$.fragment,F),I(r.$$.fragment,F),I(c),I(m.$$.fragment,F),I(L),I(V),C=!1},d(F){F&&w(e),H(s),H(r),~f&&A[f].d(),H(m),L&&L.d(),V&&V.d(),M=!1,Re(T)}}}function Uc(n){let e,t,i,s,l=n[0].system&&Wc(),o=!n[0].id&&Yc(n),r=n[0].required&&Kc(),a=n[0].unique&&Jc();return{c(){e=v("div"),l&&l.c(),t=O(),o&&o.c(),i=O(),r&&r.c(),s=O(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){S(u,e,f),l&&l.m(e,null),_(e,t),o&&o.m(e,null),_(e,i),r&&r.m(e,null),_(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Wc(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=Yc(u),o.c(),o.m(e,i)),u[0].required?r||(r=Kc(),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=Jc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Wc(n){let e;return{c(){e=v("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yc(n){let e;return{c(){e=v("span"),e.textContent="New",p(e,"class","label"),ee(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){S(t,e,i)},p(t,i){i[0]&257&&ee(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&w(e)}}}function Kc(n){let e;return{c(){e=v("span"),e.textContent="Nonempty",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Jc(n){let e;return{c(){e=v("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Zc(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Gc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){S(s,e,l),t||(i=W(e,"click",Yn(n[16])),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function SC(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,h,m,b,g,y=!n[0].toDelete&&Uc(n),k=n[7]&&!n[0].system&&Zc(),$=n[0].toDelete&&Gc(n);return{c(){e=v("div"),t=v("span"),i=v("i"),l=O(),o=v("strong"),a=z(r),f=O(),y&&y.c(),c=O(),d=v("div"),h=O(),k&&k.c(),m=O(),$&&$.c(),b=Fe(),p(i,"class",s=uo(B.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),p(t,"class","icon field-type"),p(o,"class","title field-name svelte-1tpxlm5"),p(o,"title",u=n[0].name),ee(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(e,l),_(e,o),_(o,a),S(C,f,M),y&&y.m(C,M),S(C,c,M),S(C,d,M),S(C,h,M),k&&k.m(C,M),S(C,m,M),$&&$.m(C,M),S(C,b,M),g=!0},p(C,M){(!g||M[0]&1&&s!==(s=uo(B.getFieldTypeIcon(C[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!g||M[0]&1)&&r!==(r=(C[0].name||"-")+"")&&ue(a,r),(!g||M[0]&1&&u!==(u=C[0].name))&&p(o,"title",u),(!g||M[0]&1)&&ee(o,"txt-strikethrough",C[0].toDelete),C[0].toDelete?y&&(y.d(1),y=null):y?y.p(C,M):(y=Uc(C),y.c(),y.m(c.parentNode,c)),C[7]&&!C[0].system?k?M[0]&129&&E(k,1):(k=Zc(),k.c(),E(k,1),k.m(m.parentNode,m)):k&&(be(),I(k,1,1,()=>{k=null}),ve()),C[0].toDelete?$?$.p(C,M):($=Gc(C),$.c(),$.m(b.parentNode,b)):$&&($.d(1),$=null)},i(C){g||(E(k),g=!0)},o(C){I(k),g=!1},d(C){C&&w(e),C&&w(f),y&&y.d(C),C&&w(c),C&&w(d),C&&w(h),k&&k.d(C),C&&w(m),$&&$.d(C),C&&w(b)}}}function $C(n){let e,t;const i=[{draggable:!0},{single:!0},{interactive:n[8]},{class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion"},n[11]];let s={$$slots:{header:[SC],default:[wC]},$$scope:{ctx:n}};for(let l=0;l{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()};function MC(n,e,t){let i,s,l,o;const r=["key","field","disabled","excludeNames","expand","collapse"];let a=wt(e,r),u;Je(n,wi,ce=>t(15,u=ce));const f=It();let{key:c="0"}=e,{field:d=new fn}=e,{disabled:h=!1}=e,{excludeNames:m=[]}=e,b,g=d.type;function y(){b==null||b.expand()}function k(){b==null||b.collapse()}function $(){d.id?t(0,d.toDelete=!0,d):(k(),f("remove"))}function C(ce){if(ce=(""+ce).toLowerCase(),!ce)return!1;for(const se of m)if(se.toLowerCase()===ce)return!1;return!0}function M(ce){return B.slugify(ce)}un(()=>{d.id||y()});const T=()=>{t(0,d.toDelete=!1,d)};function D(ce){n.$$.not_equal(d.type,ce)&&(d.type=ce,t(0,d),t(14,g),t(4,b))}const A=ce=>{t(0,d.name=M(ce.target.value),d),ce.target.value=d.name};function P(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function L(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function V(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function F(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function U(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function G(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function K(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function X(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function Z(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function ie(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function J(ce){n.$$.not_equal(d.options,ce)&&(d.options=ce,t(0,d),t(14,g),t(4,b))}function fe(){d.required=this.checked,t(0,d),t(14,g),t(4,b)}function Y(){d.unique=this.checked,t(0,d),t(14,g),t(4,b)}const re=()=>{i&&k()};function Oe(ce){le[ce?"unshift":"push"](()=>{b=ce,t(4,b)})}function ge(ce){Ve.call(this,n,ce)}function ae(ce){Ve.call(this,n,ce)}function he(ce){Ve.call(this,n,ce)}function de(ce){Ve.call(this,n,ce)}function Se(ce){Ve.call(this,n,ce)}function we(ce){Ve.call(this,n,ce)}function Ue(ce){Ve.call(this,n,ce)}return n.$$set=ce=>{e=Ye(Ye({},e),Wn(ce)),t(11,a=wt(e,r)),"key"in ce&&t(1,c=ce.key),"field"in ce&&t(0,d=ce.field),"disabled"in ce&&t(2,h=ce.disabled),"excludeNames"in ce&&t(12,m=ce.excludeNames)},n.$$.update=()=>{n.$$.dirty[0]&16385&&g!=d.type&&(t(14,g=d.type),t(0,d.options={},d),t(0,d.unique=!1,d)),n.$$.dirty[0]&17&&d.toDelete&&(b&&k(),d.originalName&&d.name!==d.originalName&&t(0,d.name=d.originalName,d)),n.$$.dirty[0]&1&&!d.originalName&&d.name&&t(0,d.originalName=d.name,d),n.$$.dirty[0]&1&&typeof d.toDelete>"u"&&t(0,d.toDelete=!1,d),n.$$.dirty[0]&1&&d.required&&t(0,d.nullable=!1,d),n.$$.dirty[0]&1&&t(6,i=!B.isEmpty(d.name)&&d.type),n.$$.dirty[0]&80&&(i||b&&y()),n.$$.dirty[0]&69&&t(8,s=!h&&!d.system&&!d.toDelete&&i),n.$$.dirty[0]&1&&t(5,l=C(d.name)),n.$$.dirty[0]&32802&&t(7,o=!l||!B.isEmpty(B.getNestedVal(u,`schema.${c}`)))},[d,c,h,k,b,l,i,o,s,$,M,a,m,y,g,u,T,D,A,P,L,V,F,U,G,K,X,Z,ie,J,fe,Y,re,Oe,ge,ae,he,de,Se,we,Ue]}class TC extends Ce{constructor(e){super(),$e(this,e,MC,$C,ke,{key:1,field:0,disabled:2,excludeNames:12,expand:13,collapse:3},null,[-1,-1])}get expand(){return this.$$.ctx[13]}get collapse(){return this.$$.ctx[3]}}function Xc(n,e,t){const i=n.slice();return i[13]=e[t],i[14]=e,i[15]=t,i}function Qc(n){let e,t,i,s,l,o,r,a;return{c(){e=z(`, `),t=v("code"),t.textContent="username",i=z(` , `),s=v("code"),s.textContent="email",l=z(` , `),o=v("code"),o.textContent="emailVisibility",r=z(` , - `),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){$(u,e,f),$(u,t,f),$(u,i,f),$(u,s,f),$(u,l,f),$(u,o,f),$(u,r,f),$(u,a,f)},d(u){u&&S(e),u&&S(t),u&&S(i),u&&S(s),u&&S(l),u&&S(o),u&&S(r),u&&S(a)}}}function xc(n,e){let t,i,s,l;function o(c){e[6](c,e[13],e[14],e[15])}function r(){return e[7](e[15])}function a(...c){return e[8](e[15],...c)}function u(...c){return e[9](e[15],...c)}let f={key:e[15],excludeNames:e[1].concat(e[4](e[13]))};return e[13]!==void 0&&(f.field=e[13]),i=new MC({props:f}),le.push(()=>ye(i,"field",o)),i.$on("remove",r),i.$on("dragstart",a),i.$on("drop",u),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(c,d){$(c,t,d),R(i,c,d),l=!0},p(c,d){e=c;const h={};d&1&&(h.key=e[15]),d&3&&(h.excludeNames=e[1].concat(e[4](e[13]))),!s&&d&1&&(s=!0,h.field=e[13],Me(()=>s=!1)),i.$set(h)},i(c){l||(E(i.$$.fragment,c),l=!0)},o(c){I(i.$$.fragment,c),l=!1},d(c){c&&S(t),H(i,c)}}}function TC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=[],m=new Map,b,g,y,k,w,C,M,T,D,A,P,L=n[0].isAuth&&Qc(),V=n[0].schema;const F=U=>U[15]+U[13].id;for(let U=0;Uye(i,"field",o)),i.$on("remove",r),i.$on("dragstart",a),i.$on("drop",u),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(c,d){S(c,t,d),R(i,c,d),l=!0},p(c,d){e=c;const h={};d&1&&(h.key=e[15]),d&3&&(h.excludeNames=e[1].concat(e[4](e[13]))),!s&&d&1&&(s=!0,h.field=e[13],Me(()=>s=!1)),i.$set(h)},i(c){l||(E(i.$$.fragment,c),l=!0)},o(c){I(i.$$.fragment,c),l=!1},d(c){c&&w(t),H(i,c)}}}function OC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=[],m=new Map,b,g,y,k,$,C,M,T,D,A,P,L=n[0].isAuth&&Qc(),V=n[0].schema;const F=U=>U[15]+U[13].id;for(let U=0;Uy.name===g)}function f(g){let y=[];if(g.toDelete)return y;for(let k of i.schema)k===g||k.toDelete||y.push(k.name);return y}function c(g,y){if(!g)return;g.dataTransfer.dropEffect="move";const k=parseInt(g.dataTransfer.getData("text/plain")),w=i.schema;ko(g),m=(g,y)=>OC(y==null?void 0:y.detail,g),b=(g,y)=>c(y==null?void 0:y.detail,g);return n.$$set=g=>{"collection"in g&&t(0,i=g.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof(i==null?void 0:i.schema)>"u"&&(t(0,i=i||{}),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,h,m,b]}class EC extends Ce{constructor(e){super(),$e(this,e,DC,TC,ke,{collection:0})}}const AC=n=>({isAdminOnly:n&512}),ed=n=>({isAdminOnly:n[9]});function IC(n){let e,t,i,s;function l(a,u){return a[9]?NC:LC}let o=l(n),r=o(n);return i=new _e({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[jC,({uniqueId:a})=>({17:a}),({uniqueId:a})=>a?131072:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),r.c(),t=O(),j(i.$$.fragment),p(e,"class","rule-block svelte-fjxz7k")},m(a,u){$(a,e,u),r.m(e,null),_(e,t),R(i,e,null),s=!0},p(a,u){o===(o=l(a))&&r?r.p(a,u):(r.d(1),r=o(a),r&&(r.c(),r.m(e,t)));const f={};u&528&&(f.class="form-field rule-field m-0 "+(a[4]?"requied":"")+" "+(a[9]?"disabled":"")),u&8&&(f.name=a[3]),u&164519&&(f.$$scope={dirty:u,ctx:a}),i.$set(f)},i(a){s||(E(i.$$.fragment,a),s=!0)},o(a){I(i.$$.fragment,a),s=!1},d(a){a&&S(e),r.d(),H(i)}}}function PC(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){$(t,e,i)},p:x,i:x,o:x,d(t){t&&S(e)}}}function LC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(s,l){$(s,e,l),t||(i=[Le(Be.call(null,e,{text:"Lock and set to Admins only",position:"left"})),W(e,"click",n[12])],t=!0)},p:x,d(s){s&&S(e),t=!1,Re(i)}}}function NC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(s,l){$(s,e,l),t||(i=[Le(Be.call(null,e,{text:"Unlock and set custom rule",position:"left"})),W(e,"click",n[11])],t=!0)},p:x,d(s){s&&S(e),t=!1,Re(i)}}}function FC(n){let e;return{c(){e=z("Leave empty to grant everyone access")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function RC(n){let e;return{c(){e=z("Only admins will be able to perform this action (unlock to change)")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function HC(n){let e;function t(l,o){return l[9]?RC:FC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){$(l,e,o),s.m(e,null)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&S(e),s.d()}}}function jC(n){let e,t,i,s=n[9]?"Admins only":"Custom rule",l,o,r,a,u,f,c,d;function h(w){n[14](w)}var m=n[7];function b(w){let C={id:w[17],baseCollection:w[1],disabled:w[9]};return w[0]!==void 0&&(C.value=w[0]),{props:C}}m&&(a=jt(m,b(n)),n[13](a),le.push(()=>ye(a,"value",h)));const g=n[10].default,y=Ot(g,n,n[15],ed),k=y||HC(n);return{c(){e=v("label"),t=z(n[2]),i=z(" - "),l=z(s),r=O(),a&&j(a.$$.fragment),f=O(),c=v("div"),k&&k.c(),p(e,"for",o=n[17]),p(c,"class","help-block")},m(w,C){$(w,e,C),_(e,t),_(e,i),_(e,l),$(w,r,C),a&&R(a,w,C),$(w,f,C),$(w,c,C),k&&k.m(c,null),d=!0},p(w,C){(!d||C&4)&&ue(t,w[2]),(!d||C&512)&&s!==(s=w[9]?"Admins only":"Custom rule")&&ue(l,s),(!d||C&131072&&o!==(o=w[17]))&&p(e,"for",o);const M={};if(C&131072&&(M.id=w[17]),C&2&&(M.baseCollection=w[1]),C&512&&(M.disabled=w[9]),!u&&C&1&&(u=!0,M.value=w[0],Me(()=>u=!1)),m!==(m=w[7])){if(a){be();const T=a;I(T.$$.fragment,1,0,()=>{H(T,1)}),ve()}m?(a=jt(m,b(w)),w[13](a),le.push(()=>ye(a,"value",h)),j(a.$$.fragment),E(a.$$.fragment,1),R(a,f.parentNode,f)):a=null}else m&&a.$set(M);y?y.p&&(!d||C&33280)&&Et(y,g,w,w[15],d?Dt(g,w[15],C,AC):At(w[15]),ed):k&&k.p&&(!d||C&512)&&k.p(w,d?C:-1)},i(w){d||(a&&E(a.$$.fragment,w),E(k,w),d=!0)},o(w){a&&I(a.$$.fragment,w),I(k,w),d=!1},d(w){w&&S(e),w&&S(r),n[13](null),a&&H(a,w),w&&S(f),w&&S(c),k&&k.d(w)}}}function qC(n){let e,t,i,s;const l=[PC,IC],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Fe()},m(a,u){o[e].m(a,u),$(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(be(),I(o[f],1,1,()=>{o[f]=null}),ve(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),E(t,1),t.m(i.parentNode,i))},i(a){s||(E(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&S(i)}}}let td;function VC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,h=td,m=!1;async function b(){h||m||(t(8,m=!0),t(7,h=(await st(()=>import("./FilterAutocompleteInput.66938328.js"),["./FilterAutocompleteInput.66938328.js","./index.9c8b95cd.js"],import.meta.url)).default),td=h,t(8,m=!1))}b();const g=async()=>{t(0,r=d||""),await $n(),c==null||c.focus()},y=()=>{t(6,d=r),t(0,r=null)};function k(C){le[C?"unshift":"push"](()=>{c=C,t(5,c)})}function w(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(15,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,h,m,i,s,g,y,k,w,l]}class ds extends Ce{constructor(e){super(),$e(this,e,VC,qC,ke,{collection:1,rule:0,label:2,formKey:3,required:4})}}function nd(n,e,t){const i=n.slice();return i[9]=e[t],i}function id(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M,T,D,A,P,L,V,F,U,G,K=n[0].schema,X=[];for(let Z=0;Z@request filter:",y=O(),k=v("div"),k.innerHTML=`@request.method + .`),c=O(),d=v("div");for(let G=0;Gy.name===g)}function f(g){let y=[];if(g.toDelete)return y;for(let k of i.schema)k===g||k.toDelete||y.push(k.name);return y}function c(g,y){if(!g)return;g.dataTransfer.dropEffect="move";const k=parseInt(g.dataTransfer.getData("text/plain")),$=i.schema;ko(g),m=(g,y)=>DC(y==null?void 0:y.detail,g),b=(g,y)=>c(y==null?void 0:y.detail,g);return n.$$set=g=>{"collection"in g&&t(0,i=g.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof(i==null?void 0:i.schema)>"u"&&(t(0,i=i||{}),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,h,m,b]}class AC extends Ce{constructor(e){super(),$e(this,e,EC,OC,ke,{collection:0})}}const IC=n=>({isAdminOnly:n&512}),ed=n=>({isAdminOnly:n[9]});function PC(n){let e,t,i,s;function l(a,u){return a[9]?FC:NC}let o=l(n),r=o(n);return i=new _e({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[qC,({uniqueId:a})=>({17:a}),({uniqueId:a})=>a?131072:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),r.c(),t=O(),j(i.$$.fragment),p(e,"class","rule-block svelte-fjxz7k")},m(a,u){S(a,e,u),r.m(e,null),_(e,t),R(i,e,null),s=!0},p(a,u){o===(o=l(a))&&r?r.p(a,u):(r.d(1),r=o(a),r&&(r.c(),r.m(e,t)));const f={};u&528&&(f.class="form-field rule-field m-0 "+(a[4]?"requied":"")+" "+(a[9]?"disabled":"")),u&8&&(f.name=a[3]),u&164519&&(f.$$scope={dirty:u,ctx:a}),i.$set(f)},i(a){s||(E(i.$$.fragment,a),s=!0)},o(a){I(i.$$.fragment,a),s=!1},d(a){a&&w(e),r.d(),H(i)}}}function LC(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){S(t,e,i)},p:x,i:x,o:x,d(t){t&&w(e)}}}function NC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(s,l){S(s,e,l),t||(i=[Le(Be.call(null,e,{text:"Lock and set to Admins only",position:"left"})),W(e,"click",n[12])],t=!0)},p:x,d(s){s&&w(e),t=!1,Re(i)}}}function FC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(s,l){S(s,e,l),t||(i=[Le(Be.call(null,e,{text:"Unlock and set custom rule",position:"left"})),W(e,"click",n[11])],t=!0)},p:x,d(s){s&&w(e),t=!1,Re(i)}}}function RC(n){let e;return{c(){e=z("Leave empty to grant everyone access")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function HC(n){let e;return{c(){e=z("Only admins will be able to perform this action (unlock to change)")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function jC(n){let e;function t(l,o){return l[9]?HC:RC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function qC(n){let e,t,i,s=n[9]?"Admins only":"Custom rule",l,o,r,a,u,f,c,d;function h($){n[14]($)}var m=n[7];function b($){let C={id:$[17],baseCollection:$[1],disabled:$[9]};return $[0]!==void 0&&(C.value=$[0]),{props:C}}m&&(a=jt(m,b(n)),n[13](a),le.push(()=>ye(a,"value",h)));const g=n[10].default,y=Ot(g,n,n[15],ed),k=y||jC(n);return{c(){e=v("label"),t=z(n[2]),i=z(" - "),l=z(s),r=O(),a&&j(a.$$.fragment),f=O(),c=v("div"),k&&k.c(),p(e,"for",o=n[17]),p(c,"class","help-block")},m($,C){S($,e,C),_(e,t),_(e,i),_(e,l),S($,r,C),a&&R(a,$,C),S($,f,C),S($,c,C),k&&k.m(c,null),d=!0},p($,C){(!d||C&4)&&ue(t,$[2]),(!d||C&512)&&s!==(s=$[9]?"Admins only":"Custom rule")&&ue(l,s),(!d||C&131072&&o!==(o=$[17]))&&p(e,"for",o);const M={};if(C&131072&&(M.id=$[17]),C&2&&(M.baseCollection=$[1]),C&512&&(M.disabled=$[9]),!u&&C&1&&(u=!0,M.value=$[0],Me(()=>u=!1)),m!==(m=$[7])){if(a){be();const T=a;I(T.$$.fragment,1,0,()=>{H(T,1)}),ve()}m?(a=jt(m,b($)),$[13](a),le.push(()=>ye(a,"value",h)),j(a.$$.fragment),E(a.$$.fragment,1),R(a,f.parentNode,f)):a=null}else m&&a.$set(M);y?y.p&&(!d||C&33280)&&Et(y,g,$,$[15],d?Dt(g,$[15],C,IC):At($[15]),ed):k&&k.p&&(!d||C&512)&&k.p($,d?C:-1)},i($){d||(a&&E(a.$$.fragment,$),E(k,$),d=!0)},o($){a&&I(a.$$.fragment,$),I(k,$),d=!1},d($){$&&w(e),$&&w(r),n[13](null),a&&H(a,$),$&&w(f),$&&w(c),k&&k.d($)}}}function VC(n){let e,t,i,s;const l=[LC,PC],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Fe()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(be(),I(o[f],1,1,()=>{o[f]=null}),ve(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),E(t,1),t.m(i.parentNode,i))},i(a){s||(E(t),s=!0)},o(a){I(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let td;function zC(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,h=td,m=!1;async function b(){h||m||(t(8,m=!0),t(7,h=(await st(()=>import("./FilterAutocompleteInput.83abd7f1.js"),["./FilterAutocompleteInput.83abd7f1.js","./index.9c8b95cd.js"],import.meta.url)).default),td=h,t(8,m=!1))}b();const g=async()=>{t(0,r=d||""),await $n(),c==null||c.focus()},y=()=>{t(6,d=r),t(0,r=null)};function k(C){le[C?"unshift":"push"](()=>{c=C,t(5,c)})}function $(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(15,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,h,m,i,s,g,y,k,$,l]}class ds extends Ce{constructor(e){super(),$e(this,e,zC,VC,ke,{collection:1,rule:0,label:2,formKey:3,required:4})}}function nd(n,e,t){const i=n.slice();return i[9]=e[t],i}function id(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,P,L,V,F,U,G,K=n[0].schema,X=[];for(let Z=0;Z@request filter:",y=O(),k=v("div"),k.innerHTML=`@request.method @request.query.* @request.data.* - @request.auth.*`,w=O(),C=v("hr"),M=O(),T=v("p"),T.innerHTML="You could also add constraints and query other collections using the @collection filter:",D=O(),A=v("div"),A.innerHTML="@collection.ANY_COLLECTION_NAME.*",P=O(),L=v("hr"),V=O(),F=v("p"),F.innerHTML=`Example rule: + @request.auth.*`,$=O(),C=v("hr"),M=O(),T=v("p"),T.innerHTML="You could also add constraints and query other collections using the @collection filter:",D=O(),A=v("div"),A.innerHTML="@collection.ANY_COLLECTION_NAME.*",P=O(),L=v("hr"),V=O(),F=v("p"),F.innerHTML=`Example rule:
    - @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(m,"class","m-t-10 m-b-5"),p(g,"class","m-b-0"),p(k,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p(T,"class","m-b-0"),p(A,"class","inline-flex flex-gap-5"),p(L,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(Z,ie){$(Z,e,ie),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,r),_(o,a),_(o,u),_(o,f),_(o,c),_(o,d);for(let J=0;J{U||(U=je(e,St,{duration:150},!0)),U.run(1)}),G=!0)},o(Z){Z&&(U||(U=je(e,St,{duration:150},!1)),U.run(0)),G=!1},d(Z){Z&&S(e),Tt(X,Z),Z&&U&&U.end()}}}function zC(n){let e,t=n[9].name+"",i;return{c(){e=v("code"),i=z(t)},m(s,l){$(s,e,l),_(e,i)},p(s,l){l&1&&t!==(t=s[9].name+"")&&ue(i,t)},d(s){s&&S(e)}}}function BC(n){let e,t=n[9].name+"",i,s;return{c(){e=v("code"),i=z(t),s=z(".*")},m(l,o){$(l,e,o),_(e,i),_(e,s)},p(l,o){o&1&&t!==(t=l[9].name+"")&&ue(i,t)},d(l){l&&S(e)}}}function sd(n){let e;function t(l,o){return l[9].type==="relation"||l[9].type==="user"?BC:zC}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function ld(n){let e,t,i,s,l;function o(a){n[8](a)}let r={label:"Manage action",formKey:"options.manageRule",collection:n[0],$$slots:{default:[UC]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(r.rule=n[0].options.manageRule),i=new ds({props:r}),le.push(()=>ye(i,"rule",o)),{c(){e=v("hr"),t=O(),j(i.$$.fragment),p(e,"class","m-t-sm m-b-sm")},m(a,u){$(a,e,u),$(a,t,u),R(i,a,u),l=!0},p(a,u){const f={};u&1&&(f.collection=a[0]),u&4096&&(f.$$scope={dirty:u,ctx:a}),!s&&u&1&&(s=!0,f.rule=a[0].options.manageRule,Me(()=>s=!1)),i.$set(f)},i(a){l||(E(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&S(e),a&&S(t),H(i,a)}}}function UC(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(m,"class","m-t-10 m-b-5"),p(g,"class","m-b-0"),p(k,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p(T,"class","m-b-0"),p(A,"class","inline-flex flex-gap-5"),p(L,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(Z,ie){S(Z,e,ie),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,r),_(o,a),_(o,u),_(o,f),_(o,c),_(o,d);for(let J=0;J{U||(U=je(e,St,{duration:150},!0)),U.run(1)}),G=!0)},o(Z){Z&&(U||(U=je(e,St,{duration:150},!1)),U.run(0)),G=!1},d(Z){Z&&w(e),Tt(X,Z),Z&&U&&U.end()}}}function BC(n){let e,t=n[9].name+"",i;return{c(){e=v("code"),i=z(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&1&&t!==(t=s[9].name+"")&&ue(i,t)},d(s){s&&w(e)}}}function UC(n){let e,t=n[9].name+"",i,s;return{c(){e=v("code"),i=z(t),s=z(".*")},m(l,o){S(l,e,o),_(e,i),_(e,s)},p(l,o){o&1&&t!==(t=l[9].name+"")&&ue(i,t)},d(l){l&&w(e)}}}function sd(n){let e;function t(l,o){return l[9].type==="relation"||l[9].type==="user"?UC:BC}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function ld(n){let e,t,i,s,l;function o(a){n[8](a)}let r={label:"Manage action",formKey:"options.manageRule",collection:n[0],$$slots:{default:[WC]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(r.rule=n[0].options.manageRule),i=new ds({props:r}),le.push(()=>ye(i,"rule",o)),{c(){e=v("hr"),t=O(),j(i.$$.fragment),p(e,"class","m-t-sm m-b-sm")},m(a,u){S(a,e,u),S(a,t,u),R(i,a,u),l=!0},p(a,u){const f={};u&1&&(f.collection=a[0]),u&4096&&(f.$$scope={dirty:u,ctx:a}),!s&&u&1&&(s=!0,f.rule=a[0].options.manageRule,Me(()=>s=!1)),i.$set(f)},i(a){l||(E(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&w(e),a&&w(t),H(i,a)}}}function WC(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. changing the password without requiring to enter the old one, directly updating the verified - state or email, etc.`,t=O(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){$(s,e,l),$(s,t,l),$(s,i,l)},p:x,d(s){s&&S(e),s&&S(t),s&&S(i)}}}function WC(n){var te;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,h,m,b,g,y,k,w,C,M,T,D,A,P,L,V,F,U,G,K,X,Z,ie,J,fe,Y=n[1]&&id(n);function re(ne){n[3](ne)}let Oe={label:"List/Search action",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(Oe.rule=n[0].listRule),f=new ds({props:Oe}),le.push(()=>ye(f,"rule",re));function ge(ne){n[4](ne)}let ae={label:"View action",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(ae.rule=n[0].viewRule),b=new ds({props:ae}),le.push(()=>ye(b,"rule",ge));function he(ne){n[5](ne)}let de={label:"Create action",formKey:"createRule",collection:n[0]};n[0].createRule!==void 0&&(de.rule=n[0].createRule),C=new ds({props:de}),le.push(()=>ye(C,"rule",he));function Se(ne){n[6](ne)}let we={label:"Update action",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(we.rule=n[0].updateRule),P=new ds({props:we}),le.push(()=>ye(P,"rule",Se));function Ue(ne){n[7](ne)}let ce={label:"Delete action",formKey:"deleteRule",collection:n[0]};n[0].deleteRule!==void 0&&(ce.rule=n[0].deleteRule),G=new ds({props:ce}),le.push(()=>ye(G,"rule",Ue));let se=((te=n[0])==null?void 0:te.isAuth)&&ld(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the + state or email, etc.`,t=O(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:x,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function YC(n){var te;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,P,L,V,F,U,G,K,X,Z,ie,J,fe,Y=n[1]&&id(n);function re(ne){n[3](ne)}let Oe={label:"List/Search action",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(Oe.rule=n[0].listRule),f=new ds({props:Oe}),le.push(()=>ye(f,"rule",re));function ge(ne){n[4](ne)}let ae={label:"View action",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(ae.rule=n[0].viewRule),b=new ds({props:ae}),le.push(()=>ye(b,"rule",ge));function he(ne){n[5](ne)}let de={label:"Create action",formKey:"createRule",collection:n[0]};n[0].createRule!==void 0&&(de.rule=n[0].createRule),C=new ds({props:de}),le.push(()=>ye(C,"rule",he));function Se(ne){n[6](ne)}let we={label:"Update action",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(we.rule=n[0].updateRule),P=new ds({props:we}),le.push(()=>ye(P,"rule",Se));function Ue(ne){n[7](ne)}let ce={label:"Delete action",formKey:"deleteRule",collection:n[0]};n[0].deleteRule!==void 0&&(ce.rule=n[0].deleteRule),G=new ds({props:ce}),le.push(()=>ye(G,"rule",Ue));let se=((te=n[0])==null?void 0:te.isAuth)&&ld(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the
    PocketBase filter syntax and operators - .`,s=O(),l=v("span"),r=z(o),a=O(),Y&&Y.c(),u=O(),j(f.$$.fragment),d=O(),h=v("hr"),m=O(),j(b.$$.fragment),y=O(),k=v("hr"),w=O(),j(C.$$.fragment),T=O(),D=v("hr"),A=O(),j(P.$$.fragment),V=O(),F=v("hr"),U=O(),j(G.$$.fragment),X=O(),se&&se.c(),Z=Fe(),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm m-b-5"),p(e,"class","block m-b-base"),p(h,"class","m-t-sm m-b-sm"),p(k,"class","m-t-sm m-b-sm"),p(D,"class","m-t-sm m-b-sm"),p(F,"class","m-t-sm m-b-sm")},m(ne,Ee){$(ne,e,Ee),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),Y&&Y.m(e,null),$(ne,u,Ee),R(f,ne,Ee),$(ne,d,Ee),$(ne,h,Ee),$(ne,m,Ee),R(b,ne,Ee),$(ne,y,Ee),$(ne,k,Ee),$(ne,w,Ee),R(C,ne,Ee),$(ne,T,Ee),$(ne,D,Ee),$(ne,A,Ee),R(P,ne,Ee),$(ne,V,Ee),$(ne,F,Ee),$(ne,U,Ee),R(G,ne,Ee),$(ne,X,Ee),se&&se.m(ne,Ee),$(ne,Z,Ee),ie=!0,J||(fe=W(l,"click",n[2]),J=!0)},p(ne,[Ee]){var Mi;(!ie||Ee&2)&&o!==(o=ne[1]?"Hide available fields":"Show available fields")&&ue(r,o),ne[1]?Y?(Y.p(ne,Ee),Ee&2&&E(Y,1)):(Y=id(ne),Y.c(),E(Y,1),Y.m(e,null)):Y&&(be(),I(Y,1,1,()=>{Y=null}),ve());const it={};Ee&1&&(it.collection=ne[0]),!c&&Ee&1&&(c=!0,it.rule=ne[0].listRule,Me(()=>c=!1)),f.$set(it);const en={};Ee&1&&(en.collection=ne[0]),!g&&Ee&1&&(g=!0,en.rule=ne[0].viewRule,Me(()=>g=!1)),b.$set(en);const Kt={};Ee&1&&(Kt.collection=ne[0]),!M&&Ee&1&&(M=!0,Kt.rule=ne[0].createRule,Me(()=>M=!1)),C.$set(Kt);const tn={};Ee&1&&(tn.collection=ne[0]),!L&&Ee&1&&(L=!0,tn.rule=ne[0].updateRule,Me(()=>L=!1)),P.$set(tn);const Gn={};Ee&1&&(Gn.collection=ne[0]),!K&&Ee&1&&(K=!0,Gn.rule=ne[0].deleteRule,Me(()=>K=!1)),G.$set(Gn),(Mi=ne[0])!=null&&Mi.isAuth?se?(se.p(ne,Ee),Ee&1&&E(se,1)):(se=ld(ne),se.c(),E(se,1),se.m(Z.parentNode,Z)):se&&(be(),I(se,1,1,()=>{se=null}),ve())},i(ne){ie||(E(Y),E(f.$$.fragment,ne),E(b.$$.fragment,ne),E(C.$$.fragment,ne),E(P.$$.fragment,ne),E(G.$$.fragment,ne),E(se),ie=!0)},o(ne){I(Y),I(f.$$.fragment,ne),I(b.$$.fragment,ne),I(C.$$.fragment,ne),I(P.$$.fragment,ne),I(G.$$.fragment,ne),I(se),ie=!1},d(ne){ne&&S(e),Y&&Y.d(),ne&&S(u),H(f,ne),ne&&S(d),ne&&S(h),ne&&S(m),H(b,ne),ne&&S(y),ne&&S(k),ne&&S(w),H(C,ne),ne&&S(T),ne&&S(D),ne&&S(A),H(P,ne),ne&&S(V),ne&&S(F),ne&&S(U),H(G,ne),ne&&S(X),se&&se.d(ne),ne&&S(Z),J=!1,fe()}}}function YC(n,e,t){let{collection:i=new Pn}=e,s=!1;const l=()=>t(1,s=!s);function o(d){n.$$.not_equal(i.listRule,d)&&(i.listRule=d,t(0,i))}function r(d){n.$$.not_equal(i.viewRule,d)&&(i.viewRule=d,t(0,i))}function a(d){n.$$.not_equal(i.createRule,d)&&(i.createRule=d,t(0,i))}function u(d){n.$$.not_equal(i.updateRule,d)&&(i.updateRule=d,t(0,i))}function f(d){n.$$.not_equal(i.deleteRule,d)&&(i.deleteRule=d,t(0,i))}function c(d){n.$$.not_equal(i.options.manageRule,d)&&(i.options.manageRule=d,t(0,i))}return n.$$set=d=>{"collection"in d&&t(0,i=d.collection)},[i,s,l,o,r,a,u,f,c]}class KC extends Ce{constructor(e){super(),$e(this,e,YC,WC,ke,{collection:0})}}function JC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){$(u,e,f),e.checked=n[0].options.allowUsernameAuth,$(u,i,f),$(u,s,f),_(s,l),r||(a=W(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&&S(e),u&&S(i),u&&S(s),r=!1,a()}}}function ZC(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[JC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function GC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function XC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function od(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){$(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&S(e),o&&t&&t.end(),s=!1,l()}}}function QC(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowUsernameAuth?XC:GC}let u=a(n),f=u(n),c=n[3]&&od();return{c(){e=v("div"),e.innerHTML=` - Username/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Fe(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){$(d,e,h),$(d,t,h),$(d,i,h),$(d,s,h),f.m(d,h),$(d,l,h),c&&c.m(d,h),$(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?h&8&&E(c,1):(c=od(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){r||(E(c),r=!0)},o(d){I(c),r=!1},d(d){d&&S(e),d&&S(t),d&&S(i),d&&S(s),f.d(d),d&&S(l),c&&c.d(d),d&&S(o)}}}function xC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){$(u,e,f),e.checked=n[0].options.allowEmailAuth,$(u,i,f),$(u,s,f),_(s,l),r||(a=W(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&&S(e),u&&S(i),u&&S(s),r=!1,a()}}}function rd(n){let e,t,i,s,l,o,r,a;return i=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[e4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[t4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(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){$(u,e,f),_(e,t),R(i,t,null),_(e,s),_(e,l),R(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||(E(i.$$.fragment,u),E(o.$$.fragment,u),u&&Qe(()=>{r||(r=je(e,St,{duration:150},!0)),r.run(1)}),a=!0)},o(u){I(i.$$.fragment,u),I(o.$$.fragment,u),u&&(r||(r=je(e,St,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&S(e),H(i),H(o),u&&r&&r.end()}}}function e4(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[7](g)}let b={id:n[12],disabled:!B.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(b.value=n[0].options.exceptEmailDomains),r=new xi({props:b}),le.push(()=>ye(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(g,y){$(g,e,y),_(e,t),_(e,i),_(e,s),$(g,o,y),R(r,g,y),$(g,u,y),$(g,f,y),c=!0,d||(h=Le(Be.call(null,s,{text:`Email domains that are NOT allowed to sign up. - This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=g[12]),y&1&&(k.disabled=!B.isEmpty(g[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,k.value=g[0].options.exceptEmailDomains,Me(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){I(r.$$.fragment,g),c=!1},d(g){g&&S(e),g&&S(o),H(r,g),g&&S(u),g&&S(f),d=!1,h()}}}function t4(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[8](g)}let b={id:n[12],disabled:!B.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(b.value=n[0].options.onlyEmailDomains),r=new xi({props:b}),le.push(()=>ye(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(g,y){$(g,e,y),_(e,t),_(e,i),_(e,s),$(g,o,y),R(r,g,y),$(g,u,y),$(g,f,y),c=!0,d||(h=Le(Be.call(null,s,{text:`Email domains that are ONLY allowed to sign up. - This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=g[12]),y&1&&(k.disabled=!B.isEmpty(g[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,k.value=g[0].options.onlyEmailDomains,Me(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){I(r.$$.fragment,g),c=!1},d(g){g&&S(e),g&&S(o),H(r,g),g&&S(u),g&&S(f),d=!1,h()}}}function n4(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[xC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&rd(n);return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Fe()},m(o,r){R(e,o,r),$(o,t,r),l&&l.m(o,r),$(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&&E(l,1)):(l=rd(o),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){H(e,o),o&&S(t),l&&l.d(o),o&&S(i)}}}function i4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function s4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function ad(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){$(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&S(e),o&&t&&t.end(),s=!1,l()}}}function l4(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowEmailAuth?s4:i4}let u=a(n),f=u(n),c=n[2]&&ad();return{c(){e=v("div"),e.innerHTML=` - Email/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Fe(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){$(d,e,h),$(d,t,h),$(d,i,h),$(d,s,h),f.m(d,h),$(d,l,h),c&&c.m(d,h),$(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?h&4&&E(c,1):(c=ad(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){r||(E(c),r=!0)},o(d){I(c),r=!1},d(d){d&&S(e),d&&S(t),d&&S(i),d&&S(s),f.d(d),d&&S(l),c&&c.d(d),d&&S(o)}}}function o4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){$(u,e,f),e.checked=n[0].options.allowOAuth2Auth,$(u,i,f),$(u,s,f),_(s,l),r||(a=W(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&&S(e),u&&S(i),u&&S(s),r=!1,a()}}}function ud(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){$(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{t||(t=je(e,St,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,St,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&S(e),s&&t&&t.end()}}}function r4(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[o4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&ud();return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Fe()},m(o,r){R(e,o,r),$(o,t,r),l&&l.m(o,r),$(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&&E(l,1):(l=ud(),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){H(e,o),o&&S(t),l&&l.d(o),o&&S(i)}}}function a4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function u4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function fd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){$(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&S(e),o&&t&&t.end(),s=!1,l()}}}function f4(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowOAuth2Auth?u4:a4}let u=a(n),f=u(n),c=n[1]&&fd();return{c(){e=v("div"),e.innerHTML=` - OAuth2`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Fe(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){$(d,e,h),$(d,t,h),$(d,i,h),$(d,s,h),f.m(d,h),$(d,l,h),c&&c.m(d,h),$(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?h&2&&E(c,1):(c=fd(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){r||(E(c),r=!0)},o(d){I(c),r=!1},d(d){d&&S(e),d&&S(t),d&&S(i),d&&S(s),f.d(d),d&&S(l),c&&c.d(d),d&&S(o)}}}function c4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Minimum password length"),s=O(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].options.minPasswordLength),r||(a=W(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&&rt(l.value)!==u[0].options.minPasswordLength&&pe(l,u[0].options.minPasswordLength)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function d4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Always require email",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){$(c,e,d),e.checked=n[0].options.requireEmail,$(c,i,d),$(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"change",n[11]),Le(Be.call(null,r,{text:`The constraint is applied only for new records. -Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&S(e),c&&S(i),c&&S(s),u=!1,Re(f)}}}function p4(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return s=new _s({props:{single:!0,$$slots:{header:[QC],default:[ZC]},$$scope:{ctx:n}}}),o=new _s({props:{single:!0,$$slots:{header:[l4],default:[n4]},$$scope:{ctx:n}}}),a=new _s({props:{single:!0,$$slots:{header:[f4],default:[r4]},$$scope:{ctx:n}}}),m=new _e({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[c4,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[d4,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=O(),i=v("div"),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),f=v("hr"),c=O(),d=v("h4"),d.textContent="General",h=O(),j(m.$$.fragment),b=O(),j(g.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(k,w){$(k,e,w),$(k,t,w),$(k,i,w),R(s,i,null),_(i,l),R(o,i,null),_(i,r),R(a,i,null),$(k,u,w),$(k,f,w),$(k,c,w),$(k,d,w),$(k,h,w),R(m,k,w),$(k,b,w),R(g,k,w),y=!0},p(k,[w]){const C={};w&8201&&(C.$$scope={dirty:w,ctx:k}),s.$set(C);const M={};w&8197&&(M.$$scope={dirty:w,ctx:k}),o.$set(M);const T={};w&8195&&(T.$$scope={dirty:w,ctx:k}),a.$set(T);const D={};w&12289&&(D.$$scope={dirty:w,ctx:k}),m.$set(D);const A={};w&12289&&(A.$$scope={dirty:w,ctx:k}),g.$set(A)},i(k){y||(E(s.$$.fragment,k),E(o.$$.fragment,k),E(a.$$.fragment,k),E(m.$$.fragment,k),E(g.$$.fragment,k),y=!0)},o(k){I(s.$$.fragment,k),I(o.$$.fragment,k),I(a.$$.fragment,k),I(m.$$.fragment,k),I(g.$$.fragment,k),y=!1},d(k){k&&S(e),k&&S(t),k&&S(i),H(s),H(o),H(a),k&&S(u),k&&S(f),k&&S(c),k&&S(d),k&&S(h),H(m,k),k&&S(b),H(g,k)}}}function h4(n,e,t){let i,s,l,o;Je(n,wi,b=>t(4,o=b));let{collection:r=new Pn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(b){n.$$.not_equal(r.options.exceptEmailDomains,b)&&(r.options.exceptEmailDomains=b,t(0,r))}function c(b){n.$$.not_equal(r.options.onlyEmailDomains,b)&&(r.options.onlyEmailDomains=b,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function h(){r.options.minPasswordLength=rt(this.value),t(0,r)}function m(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=b=>{"collection"in b&&t(0,r=b.collection)},n.$$.update=()=>{var b,g,y,k;n.$$.dirty&1&&r.isAuth&&B.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!B.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.allowEmailAuth)||!B.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.onlyEmailDomains)||!B.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!B.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,h,m]}class m4 extends Ce{constructor(e){super(),$e(this,e,h4,p4,ke,{collection:0})}}function cd(n,e,t){const i=n.slice();return i[14]=e[t],i}function dd(n,e,t){const i=n.slice();return i[14]=e[t],i}function pd(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function hd(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=v("li"),t=v("div"),i=z(`Renamed collection - `),s=v("strong"),o=z(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=z(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){$(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&2&&l!==(l=h[1].originalName+"")&&ue(o,l),m&2&&c!==(c=h[1].name+"")&&ue(d,c)},d(h){h&&S(e)}}}function md(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=v("li"),t=v("div"),i=z(`Renamed field - `),s=v("strong"),o=z(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=z(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){$(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&16&&l!==(l=h[14].originalName+"")&&ue(o,l),m&16&&c!==(c=h[14].name+"")&&ue(d,c)},d(h){h&&S(e)}}}function gd(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=v("li"),t=z("Removed field "),i=v("span"),l=z(s),o=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){$(r,e,a),_(e,t),_(e,i),_(i,l),_(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&ue(l,s)},d(r){r&&S(e)}}}function g4(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[3].length&&pd(),m=n[5]&&hd(n),b=n[4],g=[];for(let w=0;w',i=O(),s=v("div"),l=v("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to - update it manually!`,o=O(),h&&h.c(),r=O(),a=v("h6"),a.textContent="Changes:",u=O(),f=v("ul"),m&&m.c(),c=O();for(let w=0;wCancel',t=O(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){$(o,e,r),$(o,t,r),$(o,i,r),e.focus(),s||(l=[W(e,"click",n[8]),W(i,"click",n[9])],s=!0)},p:x,d(o){o&&S(e),o&&S(t),o&&S(i),s=!1,Re(l)}}}function v4(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[b4],header:[_4],default:[g4]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function y4(n,e,t){let i,s,l;const o=It();let r,a;async function u(y){t(1,a=y),await $n(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),h=()=>c();function m(y){le[y?"unshift":"push"](()=>{r=y,t(2,r)})}function b(y){Ve.call(this,n,y)}function g(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,h,m,b,g]}class k4 extends Ce{constructor(e){super(),$e(this,e,y4,v4,ke,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function _d(n,e,t){const i=n.slice();return i[43]=e[t][0],i[44]=e[t][1],i}function bd(n){let e,t,i,s;function l(r){n[30](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new KC({props:o}),le.push(()=>ye(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){$(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],Me(()=>i=!1)),t.$set(u)},i(r){s||(E(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&S(e),H(t)}}}function vd(n){let e,t,i,s;function l(r){n[31](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new m4({props:o}),le.push(()=>ye(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ee(e,"active",n[3]===Cs)},m(r,a){$(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],Me(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&ee(e,"active",r[3]===Cs)},i(r){s||(E(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&S(e),H(t)}}}function w4(n){let e,t,i,s,l,o,r;function a(d){n[29](d)}let u={};n[2]!==void 0&&(u.collection=n[2]),i=new EC({props:u}),le.push(()=>ye(i,"collection",a));let f=n[3]===ml&&bd(n),c=n[2].isAuth&&vd(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),l=O(),f&&f.c(),o=O(),c&&c.c(),p(t,"class","tab-item"),ee(t,"active",n[3]===gi),p(e,"class","tabs-content svelte-lo1530")},m(d,h){$(d,e,h),_(e,t),R(i,t,null),_(e,l),f&&f.m(e,null),_(e,o),c&&c.m(e,null),r=!0},p(d,h){const m={};!s&&h[0]&4&&(s=!0,m.collection=d[2],Me(()=>s=!1)),i.$set(m),(!r||h[0]&8)&&ee(t,"active",d[3]===gi),d[3]===ml?f?(f.p(d,h),h[0]&8&&E(f,1)):(f=bd(d),f.c(),E(f,1),f.m(e,o)):f&&(be(),I(f,1,1,()=>{f=null}),ve()),d[2].isAuth?c?(c.p(d,h),h[0]&4&&E(c,1)):(c=vd(d),c.c(),E(c,1),c.m(e,null)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){r||(E(i.$$.fragment,d),E(f),E(c),r=!0)},o(d){I(i.$$.fragment,d),I(f),I(c),r=!1},d(d){d&&S(e),H(i),f&&f.d(),c&&c.d()}}}function yd(n){let e,t,i,s,l,o,r;return o=new Zn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[S4]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),i=v("button"),s=v("i"),l=O(),j(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){$(a,e,u),$(a,t,u),$(a,i,u),_(i,s),_(i,l),R(o,i,null),r=!0},p(a,u){const f={};u[1]&65536&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(E(o.$$.fragment,a),r=!0)},o(a){I(o.$$.fragment,a),r=!1},d(a){a&&S(e),a&&S(t),a&&S(i),H(o)}}}function S4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger closable")},m(s,l){$(s,e,l),t||(i=W(e,"click",Yn(ut(n[22]))),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function kd(n){let e,t,i,s;return i=new Zn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[$4]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=O(),j(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){$(l,e,o),$(l,t,o),R(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&65536&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&S(e),l&&S(t),H(i,l)}}}function wd(n){let e,t,i,s,l,o=n[44]+"",r,a,u,f,c;function d(){return n[24](n[43])}return{c(){e=v("button"),t=v("i"),s=O(),l=v("span"),r=z(o),a=z(" collection"),u=O(),p(t,"class",i=uo(B.getCollectionTypeIcon(n[43]))+" svelte-lo1530"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),ee(e,"selected",n[43]==n[2].type)},m(h,m){$(h,e,m),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),_(e,u),f||(c=W(e,"click",d),f=!0)},p(h,m){n=h,m[0]&64&&i!==(i=uo(B.getCollectionTypeIcon(n[43]))+" svelte-lo1530")&&p(t,"class",i),m[0]&64&&o!==(o=n[44]+"")&&ue(r,o),m[0]&68&&ee(e,"selected",n[43]==n[2].type)},d(h){h&&S(e),f=!1,c()}}}function $4(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{L=null}),ve()),(!D||U[0]&4&&w!==(w="btn btn-sm p-r-10 p-l-10 "+(F[2].isNew?"btn-hint":"btn-secondary")))&&p(c,"class",w),(!D||U[0]&4&&C!==(C=!F[2].isNew))&&(c.disabled=C),F[2].system?V||(V=Sd(),V.c(),V.m(T.parentNode,T)):V&&(V.d(1),V=null)},i(F){D||(E(L),D=!0)},o(F){I(L),D=!1},d(F){F&&S(e),F&&S(s),F&&S(l),F&&S(u),F&&S(f),L&&L.d(),F&&S(M),V&&V.d(F),F&&S(T),A=!1,P()}}}function $d(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){$(r,e,a),s=!0,l||(o=Le(t=Be.call(null,e,n[13])),l=!0)},p(r,a){t&&Wt(t.update)&&a[0]&8192&&t.update.call(null,r[13])},i(r){s||(r&&Qe(()=>{i||(i=je(e,$t,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=je(e,$t,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&S(e),r&&i&&i.end(),l=!1,o()}}}function Cd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){$(o,e,r),i=!0,s||(l=Le(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&S(e),o&&t&&t.end(),s=!1,l()}}}function Md(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&&Td();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=O(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),ee(e,"active",n[3]===Cs)},m(c,d){$(c,e,d),_(e,t),_(e,i),r&&r.m(e,null),l||(o=W(e,"click",n[28]),l=!0)},p(c,d){var h,m,b;d[0]&32&&(s=!B.isEmpty((h=c[5])==null?void 0:h.options)&&!((b=(m=c[5])==null?void 0:m.options)!=null&&b.manageRule)),s?r?d[0]&32&&E(r,1):(r=Td(),r.c(),E(r,1),r.m(e,null)):r&&(be(),I(r,1,1,()=>{r=null}),ve()),d[0]&8&&ee(e,"active",c[3]===Cs)},d(c){c&&S(e),r&&r.d(),l=!1,o()}}}function Td(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){$(o,e,r),i=!0,s||(l=Le(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&S(e),o&&t&&t.end(),s=!1,l()}}}function M4(n){var U,G,K,X,Z,ie,J,fe;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,h,m,b=!B.isEmpty((U=n[5])==null?void 0:U.schema),g,y,k,w,C=!B.isEmpty((G=n[5])==null?void 0:G.listRule)||!B.isEmpty((K=n[5])==null?void 0:K.viewRule)||!B.isEmpty((X=n[5])==null?void 0:X.createRule)||!B.isEmpty((Z=n[5])==null?void 0:Z.updateRule)||!B.isEmpty((ie=n[5])==null?void 0:ie.deleteRule)||!B.isEmpty((fe=(J=n[5])==null?void 0:J.options)==null?void 0:fe.manageRule),M,T,D,A,P=!n[2].isNew&&!n[2].system&&yd(n);r=new _e({props:{class:"form-field collection-field-name required m-b-0 "+(n[12]?"disabled":""),name:"name",$$slots:{default:[C4,({uniqueId:Y})=>({42:Y}),({uniqueId:Y})=>[0,Y?2048:0]]},$$scope:{ctx:n}}});let L=b&&$d(n),V=C&&Cd(),F=n[2].isAuth&&Md(n);return{c(){e=v("h4"),i=z(t),s=O(),P&&P.c(),l=O(),o=v("form"),j(r.$$.fragment),a=O(),u=v("input"),f=O(),c=v("div"),d=v("button"),h=v("span"),h.textContent="Fields",m=O(),L&&L.c(),g=O(),y=v("button"),k=v("span"),k.textContent="API Rules",w=O(),V&&V.c(),M=O(),F&&F.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ee(d,"active",n[3]===gi),p(k,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),ee(y,"active",n[3]===ml),p(c,"class","tabs-header stretched")},m(Y,re){$(Y,e,re),_(e,i),$(Y,s,re),P&&P.m(Y,re),$(Y,l,re),$(Y,o,re),R(r,o,null),_(o,a),_(o,u),$(Y,f,re),$(Y,c,re),_(c,d),_(d,h),_(d,m),L&&L.m(d,null),_(c,g),_(c,y),_(y,k),_(y,w),V&&V.m(y,null),_(c,M),F&&F.m(c,null),T=!0,D||(A=[W(o,"submit",ut(n[25])),W(d,"click",n[26]),W(y,"click",n[27])],D=!0)},p(Y,re){var ge,ae,he,de,Se,we,Ue,ce;(!T||re[0]&4)&&t!==(t=Y[2].isNew?"New collection":"Edit collection")&&ue(i,t),!Y[2].isNew&&!Y[2].system?P?(P.p(Y,re),re[0]&4&&E(P,1)):(P=yd(Y),P.c(),E(P,1),P.m(l.parentNode,l)):P&&(be(),I(P,1,1,()=>{P=null}),ve());const Oe={};re[0]&4096&&(Oe.class="form-field collection-field-name required m-b-0 "+(Y[12]?"disabled":"")),re[0]&4164|re[1]&67584&&(Oe.$$scope={dirty:re,ctx:Y}),r.$set(Oe),re[0]&32&&(b=!B.isEmpty((ge=Y[5])==null?void 0:ge.schema)),b?L?(L.p(Y,re),re[0]&32&&E(L,1)):(L=$d(Y),L.c(),E(L,1),L.m(d,null)):L&&(be(),I(L,1,1,()=>{L=null}),ve()),(!T||re[0]&8)&&ee(d,"active",Y[3]===gi),re[0]&32&&(C=!B.isEmpty((ae=Y[5])==null?void 0:ae.listRule)||!B.isEmpty((he=Y[5])==null?void 0:he.viewRule)||!B.isEmpty((de=Y[5])==null?void 0:de.createRule)||!B.isEmpty((Se=Y[5])==null?void 0:Se.updateRule)||!B.isEmpty((we=Y[5])==null?void 0:we.deleteRule)||!B.isEmpty((ce=(Ue=Y[5])==null?void 0:Ue.options)==null?void 0:ce.manageRule)),C?V?re[0]&32&&E(V,1):(V=Cd(),V.c(),E(V,1),V.m(y,null)):V&&(be(),I(V,1,1,()=>{V=null}),ve()),(!T||re[0]&8)&&ee(y,"active",Y[3]===ml),Y[2].isAuth?F?F.p(Y,re):(F=Md(Y),F.c(),F.m(c,null)):F&&(F.d(1),F=null)},i(Y){T||(E(P),E(r.$$.fragment,Y),E(L),E(V),T=!0)},o(Y){I(P),I(r.$$.fragment,Y),I(L),I(V),T=!1},d(Y){Y&&S(e),Y&&S(s),P&&P.d(Y),Y&&S(l),Y&&S(o),H(r),Y&&S(f),Y&&S(c),L&&L.d(),V&&V.d(),F&&F.d(),D=!1,Re(A)}}}function T4(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=z(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[9],ee(s,"btn-loading",n[9])},m(c,d){$(c,e,d),_(e,t),$(c,i,d),$(c,s,d),_(s,l),_(l,r),u||(f=[W(e,"click",n[20]),W(s,"click",n[21])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ue(r,o),d[0]&2560&&a!==(a=!c[11]||c[9])&&(s.disabled=a),d[0]&512&&ee(s,"btn-loading",c[9])},d(c){c&&S(e),c&&S(i),c&&S(s),u=!1,Re(f)}}}function O4(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[32],$$slots:{footer:[T4],header:[M4],default:[w4]},$$scope:{ctx:n}};e=new Jn({props:l}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]);let o={};return i=new k4({props:o}),n[36](i),i.$on("confirm",n[37]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(r,a){R(e,r,a),$(r,t,a),R(i,r,a),s=!0},p(r,a){const u={};a[0]&1040&&(u.beforeHide=r[32]),a[0]&14956|a[1]&65536&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(E(e.$$.fragment,r),E(i.$$.fragment,r),s=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),s=!1},d(r){n[33](null),H(e,r),r&&S(t),n[36](null),H(i,r)}}}const gi="fields",ml="api_rules",Cs="options",D4="base",Od="auth";function Sr(n){return JSON.stringify(n)}function E4(n,e,t){let i,s,l,o,r;Je(n,wi,we=>t(5,r=we));const a={};a[D4]="Base",a[Od]="Auth";const u=It();let f,c,d=null,h=new Pn,m=!1,b=!1,g=gi,y=Sr(h);function k(we){t(3,g=we)}function w(we){return M(we),t(10,b=!0),k(gi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(we){Fn({}),typeof we<"u"?(d=we,t(2,h=we==null?void 0:we.clone())):(d=null,t(2,h=new Pn)),t(2,h.schema=h.schema||[],h),t(2,h.originalName=h.name||"",h),await $n(),t(19,y=Sr(h))}function T(){if(h.isNew)return D();c==null||c.show(h)}function D(){if(m)return;t(9,m=!0);const we=A();let Ue;h.isNew?Ue=me.collections.create(we):Ue=me.collections.update(h.id,we),Ue.then(ce=>{t(10,b=!1),C(),Lt(h.isNew?"Successfully created collection.":"Successfully updated collection."),kS(ce),u("save",{isNew:h.isNew,collection:ce})}).catch(ce=>{me.errorResponseHandler(ce)}).finally(()=>{t(9,m=!1)})}function A(){const we=h.export();we.schema=we.schema.slice(0);for(let Ue=we.schema.length-1;Ue>=0;Ue--)we.schema[Ue].toDelete&&we.schema.splice(Ue,1);return we}function P(){!(d!=null&&d.id)||yn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>me.collections.delete(d==null?void 0:d.id).then(()=>{C(),Lt(`Successfully deleted collection "${d==null?void 0:d.name}".`),u("delete",d),wS(d)}).catch(we=>{me.errorResponseHandler(we)}))}function L(we){t(2,h.type=we,h)}const V=()=>C(),F=()=>T(),U=()=>P(),G=we=>{t(2,h.name=B.slugify(we.target.value),h),we.target.value=h.name},K=we=>L(we),X=()=>{o&&T()},Z=()=>k(gi),ie=()=>k(ml),J=()=>k(Cs);function fe(we){h=we,t(2,h)}function Y(we){h=we,t(2,h)}function re(we){h=we,t(2,h)}const Oe=()=>l&&b?(yn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,b=!1),C()}),!1):!0;function ge(we){le[we?"unshift":"push"](()=>{f=we,t(7,f)})}function ae(we){Ve.call(this,n,we)}function he(we){Ve.call(this,n,we)}function de(we){le[we?"unshift":"push"](()=>{c=we,t(8,c)})}const Se=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&32&&t(13,i=typeof B.getNestedVal(r,"schema.message",null)=="string"?B.getNestedVal(r,"schema.message"):"Has errors"),n.$$.dirty[0]&4&&t(12,s=!h.isNew&&h.system),n.$$.dirty[0]&524292&&t(4,l=y!=Sr(h)),n.$$.dirty[0]&20&&t(11,o=h.isNew||l),n.$$.dirty[0]&12&&g===Cs&&h.type!==Od&&k(gi)},[k,C,h,g,l,r,a,f,c,m,b,o,s,i,T,D,P,L,w,y,V,F,U,G,K,X,Z,ie,J,fe,Y,re,Oe,ge,ae,he,de,Se]}class Ja extends Ce{constructor(e){super(),$e(this,e,E4,O4,ke,{changeTab:0,show:18,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[18]}get hide(){return this.$$.ctx[1]}}function Dd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Ed(n){let e,t=n[1].length&&Ad();return{c(){t&&t.c(),e=Fe()},m(i,s){t&&t.m(i,s),$(i,e,s)},p(i,s){i[1].length?t||(t=Ad(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&S(e)}}}function Ad(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){$(t,e,i)},d(t){t&&S(e)}}}function Id(n,e){let t,i,s,l,o,r=e[14].name+"",a,u,f,c,d;return{key:n,first:null,c(){var h;t=v("a"),i=v("i"),l=O(),o=v("span"),a=z(r),u=O(),p(i,"class",s=B.getCollectionTypeIcon(e[14].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[14].id),p(t,"class","sidebar-list-item"),ee(t,"active",((h=e[5])==null?void 0:h.id)===e[14].id),this.first=t},m(h,m){$(h,t,m),_(t,i),_(t,l),_(t,o),_(o,a),_(t,u),c||(d=Le(zt.call(null,t)),c=!0)},p(h,m){var b;e=h,m&8&&s!==(s=B.getCollectionTypeIcon(e[14].type))&&p(i,"class",s),m&8&&r!==(r=e[14].name+"")&&ue(a,r),m&8&&f!==(f="/collections?collectionId="+e[14].id)&&p(t,"href",f),m&40&&ee(t,"active",((b=e[5])==null?void 0:b.id)===e[14].id)},d(h){h&&S(t),c=!1,d()}}}function Pd(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` - New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){$(l,e,o),_(e,t),i||(s=W(t,"click",n[11]),i=!0)},p:x,d(l){l&&S(e),i=!1,s()}}}function A4(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],h=new Map,m,b,g,y,k,w,C=n[3];const M=P=>P[14].id;for(let P=0;P',o=O(),r=v("input"),a=O(),u=v("hr"),f=O(),c=v("div");for(let P=0;P20),p(e,"class","page-sidebar collection-sidebar")},m(P,L){$(P,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),pe(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let V=0;V20),P[6]?D&&(D.d(1),D=null):D?D.p(P,L):(D=Pd(P),D.c(),D.m(e,null));const V={};g.$set(V)},i(P){y||(E(g.$$.fragment,P),y=!0)},o(P){I(g.$$.fragment,P),y=!1},d(P){P&&S(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function P4(n,e,t){let i,s,l,o,r,a;Je(n,Bn,y=>t(5,o=y)),Je(n,Zi,y=>t(8,r=y)),Je(n,ks,y=>t(6,a=y));let u,f="";function c(y){Ht(Bn,o=y,o)}const d=()=>t(0,f="");function h(){f=this.value,t(0,f)}const m=()=>u==null?void 0:u.show();function b(y){le[y?"unshift":"push"](()=>{u=y,t(2,u)})}const g=y=>{var k;((k=y.detail)==null?void 0:k.isNew)&&y.detail.collection&&c(y.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=f.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=f!==""),n.$$.dirty&259&&t(3,l=r.filter(y=>y.id==f||y.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&256&&r&&I4()},[f,i,u,l,s,o,a,c,r,d,h,m,b,g]}class L4 extends Ce{constructor(e){super(),$e(this,e,P4,A4,ke,{})}}function Ld(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Nd(n){n[18]=n[19].default}function Fd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Rd(n,e){let t,i=e[15].label+"",s,l,o,r;function a(){return e[8](e[14])}return{key:n,first:null,c(){t=v("button"),s=z(i),l=O(),p(t,"type","button"),p(t,"class","sidebar-item"),ee(t,"active",e[5]===e[14]),this.first=t},m(u,f){$(u,t,f),_(t,s),_(t,l),o||(r=W(t,"click",a),o=!0)},p(u,f){e=u,f&8&&i!==(i=e[15].label+"")&&ue(s,i),f&40&&ee(t,"active",e[5]===e[14])},d(u){u&&S(t),o=!1,r()}}}function Hd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:R4,then:F4,catch:N4,value:19,blocks:[,,,]};return xa(t=n[15].component,s),{c(){e=Fe(),s.block.c()},m(l,o){$(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&xa(t,s)||x_(s,n,o)},i(l){i||(E(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&&S(e),s.block.d(l),s.token=null,s=null}}}function N4(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function F4(n){Nd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){j(e.$$.fragment),t=O()},m(s,l){R(e,s,l),$(s,t,l),i=!0},p(s,l){Nd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(E(e.$$.fragment,s),i=!0)},o(s){I(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&S(t)}}}function R4(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function jd(n,e){let t,i,s,l=e[5]===e[14]&&Hd(e);return{key:n,first:null,c(){t=Fe(),l&&l.c(),i=Fe(),this.first=t},m(o,r){$(o,t,r),l&&l.m(o,r),$(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&E(l,1)):(l=Hd(e),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){s||(E(l),s=!0)},o(o){I(l),s=!1},d(o){o&&S(t),l&&l.d(o),o&&S(i)}}}function H4(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=b=>b[14];for(let b=0;bb[14];for(let b=0;bClose',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[7]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function q4(n){let e,t,i={class:"docs-panel",$$slots:{footer:[j4],default:[H4]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[9](e),e.$on("hide",n[10]),e.$on("show",n[11]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[9](null),H(e,s)}}}function V4(n,e,t){const i={list:{label:"List/Search",component:st(()=>import("./ListApiDocs.e6ffd7ae.js"),["./ListApiDocs.e6ffd7ae.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css","./ListApiDocs.68f52edd.css"],import.meta.url)},view:{label:"View",component:st(()=>import("./ViewApiDocs.7c16115c.js"),["./ViewApiDocs.7c16115c.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:st(()=>import("./CreateApiDocs.5b22060b.js"),["./CreateApiDocs.5b22060b.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:st(()=>import("./UpdateApiDocs.e200c0d6.js"),["./UpdateApiDocs.e200c0d6.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:st(()=>import("./DeleteApiDocs.459334be.js"),["./DeleteApiDocs.459334be.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:st(()=>import("./RealtimeApiDocs.9639f54e.js"),["./RealtimeApiDocs.9639f54e.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:st(()=>import("./AuthWithPasswordDocs.8731404d.js"),["./AuthWithPasswordDocs.8731404d.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:st(()=>import("./AuthWithOAuth2Docs.9d132f74.js"),["./AuthWithOAuth2Docs.9d132f74.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:st(()=>import("./AuthRefreshDocs.9e6993e7.js"),["./AuthRefreshDocs.9e6993e7.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:st(()=>import("./RequestVerificationDocs.28db8063.js"),["./RequestVerificationDocs.28db8063.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:st(()=>import("./ConfirmVerificationDocs.c8ffdb27.js"),["./ConfirmVerificationDocs.c8ffdb27.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:st(()=>import("./RequestPasswordResetDocs.4c9f6ae3.js"),["./RequestPasswordResetDocs.4c9f6ae3.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:st(()=>import("./ConfirmPasswordResetDocs.242b72e8.js"),["./ConfirmPasswordResetDocs.242b72e8.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:st(()=>import("./RequestEmailChangeDocs.a5bce610.js"),["./RequestEmailChangeDocs.a5bce610.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:st(()=>import("./ConfirmEmailChangeDocs.4643c758.js"),["./ConfirmEmailChangeDocs.4643c758.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:st(()=>import("./AuthMethodsDocs.c1281d2c.js"),["./AuthMethodsDocs.c1281d2c.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:st(()=>import("./ListExternalAuthsDocs.305ff8e3.js"),["./ListExternalAuthsDocs.305ff8e3.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:st(()=>import("./UnlinkExternalAuthDocs.b05265d9.js"),["./UnlinkExternalAuthDocs.b05265d9.js","./SdkTabs.8f55857f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}};let l,o=new Pn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),h=y=>c(y);function m(y){le[y?"unshift":"push"](()=>{l=y,t(4,l)})}function b(y){Ve.call(this,n,y)}function g(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,u,d,h,m,b,g]}class z4 extends Ce{constructor(e){super(),$e(this,e,V4,q4,ke,{show:6,hide:0,changeTab:1})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function B4(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Username",o=O(),r=v("input"),p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(h,m){$(h,e,m),_(e,t),_(e,i),_(e,s),$(h,o,m),$(h,r,m),pe(r,n[0].username),c||(d=W(r,"input",n[4]),c=!0)},p(h,m){m&4096&&l!==(l=h[12])&&p(e,"for",l),m&1&&a!==(a=!h[0].isNew)&&p(r,"requried",a),m&1&&u!==(u=h[0].isNew?"Leave empty to auto generate...":h[3])&&p(r,"placeholder",u),m&4096&&f!==(f=h[12])&&p(r,"id",f),m&1&&r.value!==h[0].username&&pe(r,h[0].username)},d(h){h&&S(e),h&&S(o),h&&S(r),c=!1,d()}}}function U4(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,h,m,b,g,y,k,w,C;return{c(){var M;e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("div"),a=v("button"),u=v("span"),f=z("Public: "),d=z(c),m=O(),b=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",h="btn btn-sm btn-secondary "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(b,"type","email"),b.autofocus=g=n[0].isNew,p(b,"autocomplete","off"),p(b,"id",y=n[12]),b.required=k=(M=n[1].options)==null?void 0:M.requireEmail,p(b,"class","svelte-1751a4d")},m(M,T){$(M,e,T),_(e,t),_(e,i),_(e,s),$(M,o,T),$(M,r,T),_(r,a),_(a,u),_(u,f),_(u,d),$(M,m,T),$(M,b,T),pe(b,n[0].email),n[0].isNew&&b.focus(),w||(C=[Le(Be.call(null,a,{text:"Make email public or private",position:"top-right"})),W(a,"click",n[5]),W(b,"input",n[6])],w=!0)},p(M,T){var D;T&4096&&l!==(l=M[12])&&p(e,"for",l),T&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&ue(d,c),T&1&&h!==(h="btn btn-sm btn-secondary "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",h),T&1&&g!==(g=M[0].isNew)&&(b.autofocus=g),T&4096&&y!==(y=M[12])&&p(b,"id",y),T&2&&k!==(k=(D=M[1].options)==null?void 0:D.requireEmail)&&(b.required=k),T&1&&b.value!==M[0].email&&pe(b,M[0].email)},d(M){M&&S(e),M&&S(o),M&&S(r),M&&S(m),M&&S(b),w=!1,Re(C)}}}function qd(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[W4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function W4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){$(u,e,f),e.checked=n[2],$(u,i,f),$(u,s,f),_(s,l),r||(a=W(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&S(e),u&&S(i),u&&S(s),r=!1,a()}}}function Vd(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[Y4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[K4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),ee(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){$(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c&12289&&(h.$$scope={dirty:c,ctx:f}),r.$set(h),(!u||c&4)&&ee(t,"p-t-xs",f[2])},i(f){u||(E(s.$$.fragment,f),E(r.$$.fragment,f),f&&Qe(()=>{a||(a=je(e,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(e,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&S(e),H(s),H(r),f&&a&&a.end()}}}function Y4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){$(c,e,d),_(e,t),_(e,i),_(e,s),$(c,o,d),$(c,r,d),pe(r,n[0].password),u||(f=W(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&pe(r,c[0].password)},d(c){c&&S(e),c&&S(o),c&&S(r),u=!1,f()}}}function K4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){$(c,e,d),_(e,t),_(e,i),_(e,s),$(c,o,d),$(c,r,d),pe(r,n[0].passwordConfirm),u||(f=W(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&pe(r,c[0].passwordConfirm)},d(c){c&&S(e),c&&S(o),c&&S(r),u=!1,f()}}}function J4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){$(u,e,f),e.checked=n[0].verified,$(u,i,f),$(u,s,f),_(s,l),r||(a=[W(e,"change",n[10]),W(e,"change",ut(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&S(e),u&&S(i),u&&S(s),r=!1,Re(a)}}}function Z4(n){var g;let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new _e({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[B4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+((g=n[1].options)!=null&&g.requireEmail?"required":""),name:"email",$$slots:{default:[U4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}});let m=!n[0].isNew&&qd(n),b=(n[0].isNew||n[2])&&Vd(n);return d=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[J4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),m&&m.c(),u=O(),b&&b.c(),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,k){$(y,e,k),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),m&&m.m(a,null),_(a,u),b&&b.m(a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(y,[k]){var T;const w={};k&1&&(w.class="form-field "+(y[0].isNew?"":"required")),k&12289&&(w.$$scope={dirty:k,ctx:y}),i.$set(w);const C={};k&2&&(C.class="form-field "+((T=y[1].options)!=null&&T.requireEmail?"required":"")),k&12291&&(C.$$scope={dirty:k,ctx:y}),o.$set(C),y[0].isNew?m&&(be(),I(m,1,1,()=>{m=null}),ve()):m?(m.p(y,k),k&1&&E(m,1)):(m=qd(y),m.c(),E(m,1),m.m(a,u)),y[0].isNew||y[2]?b?(b.p(y,k),k&5&&E(b,1)):(b=Vd(y),b.c(),E(b,1),b.m(a,null)):b&&(be(),I(b,1,1,()=>{b=null}),ve());const M={};k&12289&&(M.$$scope={dirty:k,ctx:y}),d.$set(M)},i(y){h||(E(i.$$.fragment,y),E(o.$$.fragment,y),E(m),E(b),E(d.$$.fragment,y),h=!0)},o(y){I(i.$$.fragment,y),I(o.$$.fragment,y),I(m),I(b),I(d.$$.fragment,y),h=!1},d(y){y&&S(e),H(i),H(o),m&&m.d(),b&&b.d(),H(d)}}}function G4(n,e,t){let{collection:i=new Pn}=e,{record:s=new Wi}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function h(){s.verified=this.checked,t(0,s),t(2,o)}const m=b=>{s.isNew||yn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!b.target.checked,s)})};return n.$$set=b=>{"collection"in b&&t(1,i=b.collection),"record"in b&&t(0,s=b.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),al("password"),al("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,h,m]}class X4 extends Ce{constructor(e){super(),$e(this,e,G4,Z4,ke,{collection:1,record:0})}}function Q4(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)){h.preventDefault();const m=r.closest("form");m!=null&&m.requestSubmit&&m.requestSubmit()}}un(()=>(u(),()=>clearTimeout(a)));function c(h){le[h?"unshift":"push"](()=>{r=h,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ye(Ye({},e),Wn(h)),t(3,s=wt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,o=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class e3 extends Ce{constructor(e){super(),$e(this,e,x4,Q4,ke,{value:0,maxHeight:4})}}function t3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(b){n[2](b)}let m={id:n[3],required:n[1].required};return n[0]!==void 0&&(m.value=n[0]),f=new e3({props:m}),le.push(()=>ye(f,"value",h)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),j(f.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(b,g){$(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),$(b,u,g),R(f,b,g),d=!0},p(b,g){(!d||g&2&&i!==(i=B.getFieldTypeIcon(b[1].type)))&&p(t,"class",i),(!d||g&2)&&o!==(o=b[1].name+"")&&ue(r,o),(!d||g&8&&a!==(a=b[3]))&&p(e,"for",a);const y={};g&8&&(y.id=b[3]),g&2&&(y.required=b[1].required),!c&&g&1&&(c=!0,y.value=b[0],Me(()=>c=!1)),f.$set(y)},i(b){d||(E(f.$$.fragment,b),d=!0)},o(b){I(f.$$.fragment,b),d=!1},d(b){b&&S(e),b&&S(u),H(f,b)}}}function n3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[t3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function i3(n,e,t){let{field:i=new fn}=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 s3 extends Ce{constructor(e){super(),$e(this,e,i3,n3,ke,{field:1,value:0})}}function l3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,b,g;return{c(){var y,k;e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),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",h=(y=n[1].options)==null?void 0:y.min),p(f,"max",m=(k=n[1].options)==null?void 0:k.max),p(f,"step","any")},m(y,k){$(y,e,k),_(e,t),_(e,s),_(e,l),_(l,r),$(y,u,k),$(y,f,k),pe(f,n[0]),b||(g=W(f,"input",n[2]),b=!0)},p(y,k){var w,C;k&2&&i!==(i=B.getFieldTypeIcon(y[1].type))&&p(t,"class",i),k&2&&o!==(o=y[1].name+"")&&ue(r,o),k&8&&a!==(a=y[3])&&p(e,"for",a),k&8&&c!==(c=y[3])&&p(f,"id",c),k&2&&d!==(d=y[1].required)&&(f.required=d),k&2&&h!==(h=(w=y[1].options)==null?void 0:w.min)&&p(f,"min",h),k&2&&m!==(m=(C=y[1].options)==null?void 0:C.max)&&p(f,"max",m),k&1&&rt(f.value)!==y[0]&&pe(f,y[0])},d(y){y&&S(e),y&&S(u),y&&S(f),b=!1,g()}}}function o3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[l3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function r3(n,e,t){let{field:i=new fn}=e,{value:s=void 0}=e;function l(){s=rt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class a3 extends Ce{constructor(e){super(),$e(this,e,r3,o3,ke,{field:1,value:0})}}function u3(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=O(),s=v("label"),o=z(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){$(f,e,c),e.checked=n[0],$(f,i,c),$(f,s,c),_(s,o),a||(u=W(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+"")&&ue(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&S(e),f&&S(i),f&&S(s),a=!1,u()}}}function f3(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[u3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function c3(n,e,t){let{field:i=new fn}=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 d3 extends Ce{constructor(e){super(),$e(this,e,c3,f3,ke,{field:1,value:0})}}function p3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),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(b,g){$(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),$(b,u,g),$(b,f,g),pe(f,n[0]),h||(m=W(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=B.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ue(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&f.value!==b[0]&&pe(f,b[0])},d(b){b&&S(e),b&&S(u),b&&S(f),h=!1,m()}}}function h3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[p3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function m3(n,e,t){let{field:i=new fn}=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 g3 extends Ce{constructor(e){super(),$e(this,e,m3,h3,ke,{field:1,value:0})}}function _3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),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(b,g){$(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),$(b,u,g),$(b,f,g),pe(f,n[0]),h||(m=W(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=B.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ue(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&pe(f,b[0])},d(b){b&&S(e),b&&S(u),b&&S(f),h=!1,m()}}}function b3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[_3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function v3(n,e,t){let{field:i=new fn}=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 y3 extends Ce{constructor(e){super(),$e(this,e,v3,b3,ke,{field:1,value:0})}}function k3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h;function m(g){n[2](g)}let b={id:n[3],options:B.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(b.formattedValue=n[0]),c=new Ka({props:b}),le.push(()=>ye(c,"formattedValue",m)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),a=z(" (UTC)"),f=O(),j(c.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",u=n[3])},m(g,y){$(g,e,y),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),$(g,f,y),R(c,g,y),h=!0},p(g,y){(!h||y&2&&i!==(i=B.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!h||y&2)&&o!==(o=g[1].name+"")&&ue(r,o),(!h||y&8&&u!==(u=g[3]))&&p(e,"for",u);const k={};y&8&&(k.id=g[3]),y&1&&(k.value=g[0]),!d&&y&1&&(d=!0,k.formattedValue=g[0],Me(()=>d=!1)),c.$set(k)},i(g){h||(E(c.$$.fragment,g),h=!0)},o(g){I(c.$$.fragment,g),h=!1},d(g){g&&S(e),g&&S(f),H(c,g)}}}function w3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[k3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function S3(n,e,t){let{field:i=new fn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19))},[s,i,l]}class $3 extends Ce{constructor(e){super(),$e(this,e,S3,w3,ke,{field:1,value:0})}}function zd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=z("Select up to "),s=z(i),l=z(" items."),p(e,"class","help-block")},m(o,r){$(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&ue(s,i)},d(o){o&&S(e)}}}function C3(n){var k,w,C;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function b(M){n[3](M)}let g={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(k=n[1].options)==null?void 0:k.values,searchable:((w=n[1].options)==null?void 0:w.values)>5};n[0]!==void 0&&(g.selected=n[0]),f=new $_({props:g}),le.push(()=>ye(f,"selected",b));let y=((C=n[1].options)==null?void 0:C.maxSelect)>1&&zd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Fe(),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,T){$(M,e,T),_(e,t),_(e,s),_(e,l),_(l,r),$(M,u,T),R(f,M,T),$(M,d,T),y&&y.m(M,T),$(M,h,T),m=!0},p(M,T){var A,P,L;(!m||T&2&&i!==(i=B.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!m||T&2)&&o!==(o=M[1].name+"")&&ue(r,o),(!m||T&16&&a!==(a=M[4]))&&p(e,"for",a);const D={};T&16&&(D.id=M[4]),T&6&&(D.toggle=!M[1].required||M[2]),T&4&&(D.multiple=M[2]),T&2&&(D.items=(A=M[1].options)==null?void 0:A.values),T&2&&(D.searchable=((P=M[1].options)==null?void 0:P.values)>5),!c&&T&1&&(c=!0,D.selected=M[0],Me(()=>c=!1)),f.$set(D),((L=M[1].options)==null?void 0:L.maxSelect)>1?y?y.p(M,T):(y=zd(M),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(M){m||(E(f.$$.fragment,M),m=!0)},o(M){I(f.$$.fragment,M),m=!1},d(M){M&&S(e),M&&S(u),H(f,M),M&&S(d),y&&y.d(M),M&&S(h)}}}function M3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[C3,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function T3(n,e,t){let i,{field:s=new fn}=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 O3 extends Ce{constructor(e){super(),$e(this,e,T3,M3,ke,{field:1,value:0})}}function D3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),f=v("textarea"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono")},m(b,g){$(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),$(b,u,g),$(b,f,g),pe(f,n[0]),h||(m=W(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=B.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ue(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&pe(f,b[0])},d(b){b&&S(e),b&&S(u),b&&S(f),h=!1,m()}}}function E3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[D3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function A3(n,e,t){let{field:i=new fn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class I3 extends Ce{constructor(e){super(),$e(this,e,A3,E3,ke,{field:1,value:0})}}function P3(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){$(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&S(e)}}}function L3(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){$(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&S(e)}}}function N3(n){let e;function t(l,o){return l[2]?L3:P3}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function F3(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),B.hasImageExtension(s==null?void 0:s.name)&&B.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class R3 extends Ce{constructor(e){super(),$e(this,e,F3,N3,ke,{file:0,size:1})}}function H3(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){$(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&S(e)}}}function j3(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){$(s,e,l),t||(i=W(e,"click",ut(n[0])),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function q3(n){let e,t=n[2].substring(n[2].lastIndexOf("/")+1)+"",i,s,l,o,r,a,u;return{c(){e=v("a"),i=z(t),s=O(),l=v("div"),o=O(),r=v("button"),r.textContent="Close",p(e,"href",n[2]),p(e,"title","Download"),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis"),p(l,"class","flex-fill"),p(r,"type","button"),p(r,"class","btn btn-secondary")},m(f,c){$(f,e,c),_(e,i),$(f,s,c),$(f,l,c),$(f,o,c),$(f,r,c),a||(u=W(r,"click",n[0]),a=!0)},p(f,c){c&4&&t!==(t=f[2].substring(f[2].lastIndexOf("/")+1)+"")&&ue(i,t),c&4&&p(e,"href",f[2])},d(f){f&&S(e),f&&S(s),f&&S(l),f&&S(o),f&&S(r),a=!1,u()}}}function V3(n){let e,t,i={class:"image-preview",btnClose:!1,popup:!0,$$slots:{footer:[q3],header:[j3],default:[H3]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&132&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[4](null),H(e,s)}}}function z3(n,e,t){let i,s="";function l(f){f!==""&&(t(2,s=f),i==null||i.show())}function o(){return i==null?void 0:i.hide()}function r(f){le[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){Ve.call(this,n,f)}function u(f){Ve.call(this,n,f)}return[o,i,s,l,r,a,u]}class B3 extends Ce{constructor(e){super(),$e(this,e,z3,V3,ke,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function U3(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-line")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function W3(n){let e,t,i,s,l;return{c(){e=v("img"),Ln(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),ee(e,"link-fade",n[2])},m(o,r){$(o,e,r),s||(l=[W(e,"click",n[7]),W(e,"error",n[5])],s=!0)},p(o,r){r&16&&!Ln(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i),r&4&&ee(e,"link-fade",o[2])},d(o){o&&S(e),s=!1,Re(l)}}}function Y3(n){let e,t,i;function s(a,u){return a[2]?W3:U3}let l=s(n),o=l(n),r={};return t=new B3({props:r}),n[8](t),{c(){o.c(),e=O(),j(t.$$.fragment)},m(a,u){o.m(a,u),$(a,e,u),R(t,a,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const f={};t.$set(f)},i(a){i||(E(t.$$.fragment,a),i=!0)},o(a){I(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&S(e),n[8](null),H(t,a)}}}function K3(n,e,t){let i,{record:s}=e,{filename:l}=e,o,r="",a="";function u(){t(4,r="")}const f=d=>{d.stopPropagation(),o==null||o.show(a)};function c(d){le[d?"unshift":"push"](()=>{o=d,t(3,o)})}return n.$$set=d=>{"record"in d&&t(6,s=d.record),"filename"in d&&t(0,l=d.filename)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=B.hasImageExtension(l)),n.$$.dirty&69&&i&&t(1,a=me.getFileUrl(s,`${l}`)),n.$$.dirty&2&&t(4,r=a?a+"?thumb=100x100":"")},[l,a,i,o,r,u,s,f,c]}class O_ extends Ce{constructor(e){super(),$e(this,e,K3,Y3,ke,{record:6,filename:0})}}function Bd(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function Ud(n,e,t){const i=n.slice();return i[25]=e[t],i[24]=t,i}function J3(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,o){$(l,e,o),t||(i=[Le(Be.call(null,e,"Remove file")),W(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&S(e),t=!1,Re(i)}}}function Z3(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,o){$(l,e,o),t||(i=W(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&S(e),t=!1,i()}}}function Wd(n,e){let t,i,s,l,o,r=e[25]+"",a,u,f,c,d,h,m;s=new O_({props:{record:e[2],filename:e[25]}});function b(k,w){return w&18&&(c=null),c==null&&(c=!!k[1].includes(k[24])),c?Z3:J3}let g=b(e,-1),y=g(e);return{key:n,first:null,c(){t=v("div"),i=v("figure"),j(s.$$.fragment),l=O(),o=v("a"),a=z(r),f=O(),y.c(),p(i,"class","thumb"),ee(i,"fade",e[1].includes(e[24])),p(o,"href",u=me.getFileUrl(e[2],e[25])),p(o,"class","filename link-hint"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),ee(o,"txt-strikethrough",e[1].includes(e[24])),p(t,"class","list-item"),this.first=t},m(k,w){$(k,t,w),_(t,i),R(s,i,null),_(t,l),_(t,o),_(o,a),_(t,f),y.m(t,null),d=!0,h||(m=Le(Be.call(null,o,{position:"right",text:"Download"})),h=!0)},p(k,w){e=k;const C={};w&4&&(C.record=e[2]),w&16&&(C.filename=e[25]),s.$set(C),(!d||w&18)&&ee(i,"fade",e[1].includes(e[24])),(!d||w&16)&&r!==(r=e[25]+"")&&ue(a,r),(!d||w&20&&u!==(u=me.getFileUrl(e[2],e[25])))&&p(o,"href",u),(!d||w&18)&&ee(o,"txt-strikethrough",e[1].includes(e[24])),g===(g=b(e,w))&&y?y.p(e,w):(y.d(1),y=g(e),y&&(y.c(),y.m(t,null)))},i(k){d||(E(s.$$.fragment,k),d=!0)},o(k){I(s.$$.fragment,k),d=!1},d(k){k&&S(t),H(s),y.d(),h=!1,m()}}}function Yd(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,h,m,b,g;i=new R3({props:{file:n[22]}});function y(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),j(i.$$.fragment),s=O(),l=v("div"),o=v("small"),o.textContent="New",r=O(),a=v("span"),f=z(u),d=O(),h=v("button"),h.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[22].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(k,w){$(k,e,w),_(e,t),R(i,t,null),_(e,s),_(e,l),_(l,o),_(l,r),_(l,a),_(a,f),_(e,d),_(e,h),m=!0,b||(g=[Le(Be.call(null,h,"Remove file")),W(h,"click",y)],b=!0)},p(k,w){n=k;const C={};w&1&&(C.file=n[22]),i.$set(C),(!m||w&1)&&u!==(u=n[22].name+"")&&ue(f,u),(!m||w&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(k){m||(E(i.$$.fragment,k),m=!0)},o(k){I(i.$$.fragment,k),m=!1},d(k){k&&S(e),H(i),b=!1,Re(g)}}}function Kd(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=O(),s=v("button"),s.innerHTML=` - Upload new file`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(r,a){$(r,e,a),_(e,t),n[16](t),_(e,i),_(e,s),l||(o=[W(t,"change",n[17]),W(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&S(e),n[16](null),l=!1,Re(o)}}}function G3(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,h,m,b,g=n[4];const y=T=>T[25];for(let T=0;TI(w[T],1,1,()=>{w[T]=null});let M=!n[8]&&Kd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),f=v("div");for(let T=0;T({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Q3(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new fn}=e,c,d;function h(A){B.removeByValue(u,A),t(1,u)}function m(A){B.pushUnique(u,A),t(1,u)}function b(A){B.isEmpty(a[A])||a.splice(A,1),t(0,a)}function g(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=A=>h(A),k=A=>m(A),w=A=>b(A);function C(A){le[A?"unshift":"push"](()=>{c=A,t(6,c)})}const M=()=>{for(let A of c.files)a.push(A);t(0,a),t(6,c.value=null,c)},T=()=>c==null?void 0:c.click();function D(A){le[A?"unshift":"push"](()=>{d=A,t(7,d)})}return n.$$set=A=>{"record"in A&&t(2,o=A.record),"value"in A&&t(12,r=A.value),"uploadedFiles"in A&&t(0,a=A.uploadedFiles),"deletedFileIndexes"in A&&t(1,u=A.deletedFileIndexes),"field"in A&&t(3,f=A.field)},n.$$.update=()=>{var A,P;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=B.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=B.toArray(u))),n.$$.dirty&8&&t(5,i=((A=f.options)==null?void 0:A.maxSelect)>1),n.$$.dirty&4128&&B.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=B.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((P=f.options)==null?void 0:P.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&g()},[a,u,o,f,s,i,c,d,l,h,m,b,r,y,k,w,C,M,T,D]}class x3 extends Ce{constructor(e){super(),$e(this,e,Q3,X3,ke,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function Jd(n){let e,t;return{c(){e=v("small"),t=z(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){$(i,e,s),_(e,t)},p(i,s){s&2&&ue(t,i[1])},d(i){i&&S(e)}}}function eM(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&Jd(n);return{c(){e=v("i"),i=O(),s=v("div"),l=v("div"),r=z(o),a=O(),c&&c.c(),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(s,"class","content svelte-1gjwqyd")},m(d,h){$(d,e,h),$(d,i,h),$(d,s,h),_(s,l),_(l,r),_(s,a),c&&c.m(s,null),u||(f=Le(t=Be.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Wt(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&o!==(o=d[0].id+"")&&ue(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=Jd(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:x,o:x,d(d){d&&S(e),d&&S(i),d&&S(s),c&&c.d(),u=!1,f()}}}function tM(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["title","name","email","username","label","key","heading","content","description",...Object.keys(r)];for(const u of a)if(typeof r[u]=="string"&&!B.isEmpty(r[u])&&!s.includes(u))return u+": "+r[u];return""}return n.$$set=r=>{"item"in r&&t(0,l=r.item)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=o(l))},[l,i]}class nM extends Ce{constructor(e){super(),$e(this,e,tM,eM,ke,{item:0})}}function Zd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='New record',p(e,"type","button"),p(e,"class","btn btn-warning btn-block btn-sm m-t-5")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[17]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function Gd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Load more',p(e,"type","button"),p(e,"class","btn btn-block btn-sm m-t-5"),ee(e,"btn-loading",n[6]),ee(e,"btn-disabled",n[6])},m(s,l){$(s,e,l),t||(i=W(e,"click",Yn(n[18])),t=!0)},p(s,l){l&64&&ee(e,"btn-loading",s[6]),l&64&&ee(e,"btn-disabled",s[6])},d(s){s&&S(e),t=!1,i()}}}function iM(n){let e,t,i=!n[7]&&n[8]&&Zd(n),s=n[10]&&Gd(n);return{c(){i&&i.c(),e=O(),s&&s.c(),t=Fe()},m(l,o){i&&i.m(l,o),$(l,e,o),s&&s.m(l,o),$(l,t,o)},p(l,o){!l[7]&&l[8]?i?i.p(l,o):(i=Zd(l),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),l[10]?s?s.p(l,o):(s=Gd(l),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null)},d(l){i&&i.d(l),l&&S(e),s&&s.d(l),l&&S(t)}}}function sM(n){let e,t,i,s,l,o;const r=[{selectPlaceholder:n[11]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:n[4]},{disabled:n[11]},{optionComponent:n[4]},{multiple:n[2]},{class:"records-select block-options"},n[13]];function a(d){n[19](d)}function u(d){n[20](d)}let f={$$slots:{afterOptions:[iM]},$$scope:{ctx:n}};for(let d=0;dye(e,"keyOfSelected",a)),le.push(()=>ye(e,"selected",u)),e.$on("show",n[21]),e.$on("hide",n[22]);let c={collection:n[8]};return l=new D_({props:c}),n[23](l),l.$on("save",n[24]),{c(){j(e.$$.fragment),s=O(),j(l.$$.fragment)},m(d,h){R(e,d,h),$(d,s,h),R(l,d,h),o=!0},p(d,[h]){const m=h&10300?Yt(r,[h&2056&&{selectPlaceholder:d[11]?"Loading...":d[3]},h&32&&{items:d[5]},h&32&&{searchable:d[5].length>5},r[3],h&16&&{labelComponent:d[4]},h&2048&&{disabled:d[11]},h&16&&{optionComponent:d[4]},h&4&&{multiple:d[2]},r[8],h&8192&&Kn(d[13])]):{};h&536872896&&(m.$$scope={dirty:h,ctx:d}),!t&&h&2&&(t=!0,m.keyOfSelected=d[1],Me(()=>t=!1)),!i&&h&1&&(i=!0,m.selected=d[0],Me(()=>i=!1)),e.$set(m);const b={};h&256&&(b.collection=d[8]),l.$set(b)},i(d){o||(E(e.$$.fragment,d),E(l.$$.fragment,d),o=!0)},o(d){I(e.$$.fragment,d),I(l.$$.fragment,d),o=!1},d(d){H(e,d),d&&S(s),n[23](null),H(l,d)}}}function lM(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent","collectionId"];let o=wt(e,l);const r="select_"+B.randomString(5);let{multiple:a=!1}=e,{selected:u=[]}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=nM}=e,{collectionId:h}=e,m=[],b=1,g=0,y=!1,k=!1,w=!1,C=null,M;async function T(){if(!h){t(8,C=null),t(7,w=!1);return}t(7,w=!0);try{t(8,C=await me.collections.getOne(h,{$cancelKey:"collection_"+r}))}catch(Z){me.errorResponseHandler(Z)}t(7,w=!1)}async function D(){const Z=B.toArray(f);if(!h||!Z.length)return;t(16,k=!0);let ie=[];const J=Z.slice(),fe=[];for(;J.length>0;){const Y=[];for(const re of J.splice(0,50))Y.push(`id="${re}"`);fe.push(me.collection(h).getFullList(200,{filter:Y.join("||"),$autoCancel:!1}))}try{await Promise.all(fe).then(Y=>{ie=ie.concat(...Y)}),t(0,u=[]);for(const Y of Z){const re=B.findByKey(ie,"id",Y);re&&u.push(re)}t(5,m=B.filterDuplicatesByKey(u.concat(m)))}catch(Y){me.errorResponseHandler(Y)}t(16,k=!1)}async function A(Z=!1){if(!!h){t(6,y=!0);try{const ie=Z?1:b+1,J=await me.collection(h).getList(ie,200,{sort:"-created",$cancelKey:r+"loadList"});Z&&t(5,m=B.toArray(u).slice()),t(5,m=B.filterDuplicatesByKey(m.concat(J.items,B.toArray(u)))),b=J.page,t(15,g=J.totalItems)}catch(ie){me.errorResponseHandler(ie)}t(6,y=!1)}}const P=()=>M==null?void 0:M.show(),L=()=>A();function V(Z){f=Z,t(1,f)}function F(Z){u=Z,t(0,u)}function U(Z){Ve.call(this,n,Z)}function G(Z){Ve.call(this,n,Z)}function K(Z){le[Z?"unshift":"push"](()=>{M=Z,t(9,M)})}const X=Z=>{var ie;(ie=Z==null?void 0:Z.detail)!=null&&ie.id&&t(1,f=B.toArray(f).concat(Z.detail.id)),A(!0)};return n.$$set=Z=>{e=Ye(Ye({},e),Wn(Z)),t(13,o=wt(e,l)),"multiple"in Z&&t(2,a=Z.multiple),"selected"in Z&&t(0,u=Z.selected),"keyOfSelected"in Z&&t(1,f=Z.keyOfSelected),"selectPlaceholder"in Z&&t(3,c=Z.selectPlaceholder),"optionComponent"in Z&&t(4,d=Z.optionComponent),"collectionId"in Z&&t(14,h=Z.collectionId)},n.$$.update=()=>{n.$$.dirty&16384&&h&&(T(),D().then(()=>{A(!0)})),n.$$.dirty&65600&&t(11,i=y||k),n.$$.dirty&32800&&t(10,s=g>m.length)},[u,f,a,c,d,m,y,w,C,M,s,i,A,o,h,g,k,P,L,V,F,U,G,K,X]}class oM extends Ce{constructor(e){super(),$e(this,e,lM,sM,ke,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4,collectionId:14})}}function Xd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=z("Select up to "),s=z(i),l=z(" items."),p(e,"class","help-block")},m(o,r){$(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&ue(s,i)},d(o){o&&S(e)}}}function rM(n){var k,w;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function b(C){n[3](C)}let g={toggle:!0,id:n[4],multiple:n[2],collectionId:(k=n[1].options)==null?void 0:k.collectionId};n[0]!==void 0&&(g.keyOfSelected=n[0]),f=new oM({props:g}),le.push(()=>ye(f,"keyOfSelected",b));let y=((w=n[1].options)==null?void 0:w.maxSelect)>1&&Xd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Fe(),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(C,M){$(C,e,M),_(e,t),_(e,s),_(e,l),_(l,r),$(C,u,M),R(f,C,M),$(C,d,M),y&&y.m(C,M),$(C,h,M),m=!0},p(C,M){var D,A;(!m||M&2&&i!==(i=B.getFieldTypeIcon(C[1].type)))&&p(t,"class",i),(!m||M&2)&&o!==(o=C[1].name+"")&&ue(r,o),(!m||M&16&&a!==(a=C[4]))&&p(e,"for",a);const T={};M&16&&(T.id=C[4]),M&4&&(T.multiple=C[2]),M&2&&(T.collectionId=(D=C[1].options)==null?void 0:D.collectionId),!c&&M&1&&(c=!0,T.keyOfSelected=C[0],Me(()=>c=!1)),f.$set(T),((A=C[1].options)==null?void 0:A.maxSelect)>1?y?y.p(C,M):(y=Xd(C),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(C){m||(E(f.$$.fragment,C),m=!0)},o(C){I(f.$$.fragment,C),m=!1},d(C){C&&S(e),C&&S(u),H(f,C),C&&S(d),y&&y.d(C),C&&S(h)}}}function aM(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[rM,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function uM(n,e,t){let i,{field:s=new fn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r,a;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)!=1),n.$$.dirty&7&&i&&Array.isArray(l)&&((a=s.options)==null?void 0:a.maxSelect)&&l.length>s.options.maxSelect&&t(0,l=l.slice(s.options.maxSelect-1))},[l,s,i,o]}class fM extends Ce{constructor(e){super(),$e(this,e,uM,aM,ke,{field:1,value:0})}}function cM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Auth URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].authUrl),r||(a=W(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&&pe(l,u[0].authUrl)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function dM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Token URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].tokenUrl),r||(a=W(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&&pe(l,u[0].tokenUrl)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function pM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("User API URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].userApiUrl),r||(a=W(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&&pe(l,u[0].userApiUrl)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function hM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new _e({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[cM,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[dM,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),c=new _e({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[pM,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),u=O(),f=v("div"),j(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-4"),p(r,"class","col-lg-4"),p(f,"class","col-lg-4"),p(i,"class","grid")},m(h,m){$(h,e,m),$(h,t,m),$(h,i,m),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),_(i,u),_(i,f),R(c,f,null),d=!0},p(h,[m]){const b={};m&2&&(b.name=h[1]+".authUrl"),m&97&&(b.$$scope={dirty:m,ctx:h}),l.$set(b);const g={};m&2&&(g.name=h[1]+".tokenUrl"),m&97&&(g.$$scope={dirty:m,ctx:h}),a.$set(g);const y={};m&2&&(y.name=h[1]+".userApiUrl"),m&97&&(y.$$scope={dirty:m,ctx:h}),c.$set(y)},i(h){d||(E(l.$$.fragment,h),E(a.$$.fragment,h),E(c.$$.fragment,h),d=!0)},o(h){I(l.$$.fragment,h),I(a.$$.fragment,h),I(c.$$.fragment,h),d=!1},d(h){h&&S(e),h&&S(t),h&&S(i),H(l),H(a),H(c)}}}function mM(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 gM extends Ce{constructor(e){super(),$e(this,e,mM,hM,ke,{key:1,config:0})}}function _M(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Auth URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize"),p(a,"class","help-block")},m(c,d){$(c,e,d),_(e,t),$(c,s,d),$(c,l,d),pe(l,n[0].authUrl),$(c,r,d),$(c,a,d),u||(f=W(l,"input",n[2]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&pe(l,c[0].authUrl)},d(c){c&&S(e),c&&S(s),c&&S(l),c&&S(r),c&&S(a),u=!1,f()}}}function bM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Token URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","text"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token"),p(a,"class","help-block")},m(c,d){$(c,e,d),_(e,t),$(c,s,d),$(c,l,d),pe(l,n[0].tokenUrl),$(c,r,d),$(c,a,d),u||(f=W(l,"input",n[3]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&pe(l,c[0].tokenUrl)},d(c){c&&S(e),c&&S(s),c&&S(l),c&&S(r),c&&S(a),u=!1,f()}}}function vM(n){let e,t,i,s,l,o,r,a,u;return l=new _e({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[_M,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[bM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(i,"class","grid")},m(f,c){$(f,e,c),$(f,t,c),$(f,i,c),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),u=!0},p(f,[c]){const d={};c&2&&(d.name=f[1]+".authUrl"),c&49&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const h={};c&2&&(h.name=f[1]+".tokenUrl"),c&49&&(h.$$scope={dirty:c,ctx:f}),a.$set(h)},i(f){u||(E(l.$$.fragment,f),E(a.$$.fragment,f),u=!0)},o(f){I(l.$$.fragment,f),I(a.$$.fragment,f),u=!1},d(f){f&&S(e),f&&S(t),f&&S(i),H(l),H(a)}}}function yM(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 kM extends Ce{constructor(e){super(),$e(this,e,yM,vM,ke,{key:1,config:0})}}const gl={googleAuth:{title:"Google",icon:"ri-google-fill"},facebookAuth:{title:"Facebook",icon:"ri-facebook-fill"},twitterAuth:{title:"Twitter",icon:"ri-twitter-fill"},githubAuth:{title:"GitHub",icon:"ri-github-fill"},gitlabAuth:{title:"GitLab",icon:"ri-gitlab-fill",optionsComponent:gM},discordAuth:{title:"Discord",icon:"ri-discord-fill"},microsoftAuth:{title:"Microsoft",icon:"ri-microsoft-fill",optionsComponent:kM},spotifyAuth:{title:"Spotify",icon:"ri-spotify-fill"}};function Qd(n,e,t){const i=n.slice();return i[9]=e[t],i}function wM(n){let e;return{c(){e=v("p"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function SM(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function xd(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,h,m,b,g,y;function k(){return n[6](n[9])}return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=z(o),a=O(),u=v("div"),f=z("ID: "),d=z(c),h=O(),m=v("button"),m.innerHTML='',b=O(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(m,"type","button"),p(m,"class","btn btn-secondary link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m(w,C){$(w,e,C),_(e,t),_(e,s),_(e,l),_(l,r),_(e,a),_(e,u),_(u,f),_(u,d),_(e,h),_(e,m),_(e,b),g||(y=W(m,"click",k),g=!0)},p(w,C){n=w,C&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&ue(r,o),C&2&&c!==(c=n[9].providerId+"")&&ue(d,c)},d(w){w&&S(e),g=!1,y()}}}function CM(n){let e;function t(l,o){var r;return l[2]?$M:((r=l[0])==null?void 0:r.id)&&l[1].length?SM:wM}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function MM(n,e,t){const i=It();let{record:s}=e,l=[],o=!1;function r(d){var h;return((h=gl[d+"Auth"])==null?void 0:h.title)||B.sentenize(d,!1)}function a(d){var h;return((h=gl[d+"Auth"])==null?void 0:h.icon)||`ri-${d}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await me.collection(s.collectionId).listExternalAuths(s.id))}catch(d){me.errorResponseHandler(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||yn(`Do you really want to unlink the ${r(d)} provider?`,()=>me.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{Lt(`Successfully unlinked the ${r(d)} provider.`),i("unlink",d),u()}).catch(h=>{me.errorResponseHandler(h)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class TM extends Ce{constructor(e){super(),$e(this,e,MM,CM,ke,{record:0})}}function ep(n,e,t){const i=n.slice();return i[46]=e[t],i[47]=e,i[48]=t,i}function tp(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[OM,({uniqueId:i})=>({49:i}),({uniqueId:i})=>[0,i?262144:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&786432&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function OM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",l=O(),o=v("span"),a=O(),u=v("div"),f=v("i"),d=O(),h=v("input"),p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[49]),p(f,"class","ri-calendar-event-line txt-disabled"),p(u,"class","form-field-addon"),p(h,"type","text"),p(h,"id",m=n[49]),h.value=b=n[2].id,h.readOnly=!0},m(k,w){$(k,e,w),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),$(k,a,w),$(k,u,w),_(u,f),$(k,d,w),$(k,h,w),g||(y=Le(c=Be.call(null,f,{text:`Created: ${n[2].created} -Updated: ${n[2].updated}`,position:"left"})),g=!0)},p(k,w){w[1]&262144&&r!==(r=k[49])&&p(e,"for",r),c&&Wt(c.update)&&w[0]&4&&c.update.call(null,{text:`Created: ${k[2].created} -Updated: ${k[2].updated}`,position:"left"}),w[1]&262144&&m!==(m=k[49])&&p(h,"id",m),w[0]&4&&b!==(b=k[2].id)&&h.value!==b&&(h.value=b)},d(k){k&&S(e),k&&S(a),k&&S(u),k&&S(d),k&&S(h),g=!1,y()}}}function np(n){let e,t,i,s,l;function o(a){n[26](a)}let r={collection:n[0]};return n[2]!==void 0&&(r.record=n[2]),e=new X4({props:r}),le.push(()=>ye(e,"record",o)),{c(){j(e.$$.fragment),i=O(),s=v("hr")},m(a,u){R(e,a,u),$(a,i,u),$(a,s,u),l=!0},p(a,u){const f={};u[0]&1&&(f.collection=a[0]),!t&&u[0]&4&&(t=!0,f.record=a[2],Me(()=>t=!1)),e.$set(f)},i(a){l||(E(e.$$.fragment,a),l=!0)},o(a){I(e.$$.fragment,a),l=!1},d(a){H(e,a),a&&S(i),a&&S(s)}}}function ip(n){let e;return{c(){e=v("div"),e.innerHTML=`
    No custom fields to be set
    - `,p(e,"class","block txt-center txt-disabled")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function DM(n){let e,t,i;function s(o){n[38](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new fM({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function EM(n){let e,t,i,s,l;function o(f){n[35](f,n[46])}function r(f){n[36](f,n[46])}function a(f){n[37](f,n[46])}let u={field:n[46],record:n[2]};return n[2][n[46].name]!==void 0&&(u.value=n[2][n[46].name]),n[3][n[46].name]!==void 0&&(u.uploadedFiles=n[3][n[46].name]),n[4][n[46].name]!==void 0&&(u.deletedFileIndexes=n[4][n[46].name]),e=new x3({props:u}),le.push(()=>ye(e,"value",o)),le.push(()=>ye(e,"uploadedFiles",r)),le.push(()=>ye(e,"deletedFileIndexes",a)),{c(){j(e.$$.fragment)},m(f,c){R(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[46]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[46].name],Me(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[46].name],Me(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[46].name],Me(()=>s=!1)),e.$set(d)},i(f){l||(E(e.$$.fragment,f),l=!0)},o(f){I(e.$$.fragment,f),l=!1},d(f){H(e,f)}}}function AM(n){let e,t,i;function s(o){n[34](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new I3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function IM(n){let e,t,i;function s(o){n[33](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new O3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function PM(n){let e,t,i;function s(o){n[32](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new $3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function LM(n){let e,t,i;function s(o){n[31](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new y3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function NM(n){let e,t,i;function s(o){n[30](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new g3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function FM(n){let e,t,i;function s(o){n[29](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new d3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function RM(n){let e,t,i;function s(o){n[28](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new a3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function HM(n){let e,t,i;function s(o){n[27](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new s3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function sp(n,e){let t,i,s,l,o;const r=[HM,RM,FM,NM,LM,PM,IM,AM,EM,DM],a=[];function u(f,c){return f[46].type==="text"?0:f[46].type==="number"?1:f[46].type==="bool"?2:f[46].type==="email"?3:f[46].type==="url"?4:f[46].type==="date"?5:f[46].type==="select"?6:f[46].type==="json"?7:f[46].type==="file"?8:f[46].type==="relation"?9:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Fe(),s&&s.c(),l=Fe(),this.first=t},m(f,c){$(f,t,c),~i&&a[i].m(f,c),$(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&&(be(),I(a[d],1,1,()=>{a[d]=null}),ve()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),E(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(E(s),o=!0)},o(f){I(s),o=!1},d(f){f&&S(t),~i&&a[i].d(f),f&&S(l)}}}function lp(n){let e,t,i;return t=new TM({props:{record:n[2]}}),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ee(e,"active",n[10]===_l)},m(s,l){$(s,e,l),R(t,e,null),i=!0},p(s,l){const o={};l[0]&4&&(o.record=s[2]),t.$set(o),(!i||l[0]&1024)&&ee(e,"active",s[10]===_l)},i(s){i||(E(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&S(e),H(t)}}}function jM(n){var y,k;let e,t,i,s,l=[],o=new Map,r,a,u,f,c=!n[2].isNew&&tp(n),d=((y=n[0])==null?void 0:y.isAuth)&&np(n),h=((k=n[0])==null?void 0:k.schema)||[];const m=w=>w[46].name;for(let w=0;w{c=null}),ve()):c?(c.p(w,C),C[0]&4&&E(c,1)):(c=tp(w),c.c(),E(c,1),c.m(t,i)),(M=w[0])!=null&&M.isAuth?d?(d.p(w,C),C[0]&1&&E(d,1)):(d=np(w),d.c(),E(d,1),d.m(t,s)):d&&(be(),I(d,1,1,()=>{d=null}),ve()),C[0]&29&&(h=((T=w[0])==null?void 0:T.schema)||[],be(),l=bt(l,C,m,1,w,h,o,t,xt,sp,null,ep),ve(),!h.length&&b?b.p(w,C):h.length?b&&(b.d(1),b=null):(b=ip(),b.c(),b.m(t,null))),(!a||C[0]&1024)&&ee(t,"active",w[10]===Ui),w[0].isAuth&&!w[2].isNew?g?(g.p(w,C),C[0]&5&&E(g,1)):(g=lp(w),g.c(),E(g,1),g.m(e,null)):g&&(be(),I(g,1,1,()=>{g=null}),ve())},i(w){if(!a){E(c),E(d);for(let C=0;C - Send verification email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[21]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function ap(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send password reset email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[22]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function qM(n){let e,t,i,s,l,o=n[0].isAuth&&!n[7].verified&&n[7].email&&rp(n),r=n[0].isAuth&&n[7].email&&ap(n);return{c(){o&&o.c(),e=O(),r&&r.c(),t=O(),i=v("button"),i.innerHTML=` - Delete`,p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(a,u){o&&o.m(a,u),$(a,e,u),r&&r.m(a,u),$(a,t,u),$(a,i,u),s||(l=W(i,"click",Yn(ut(n[23]))),s=!0)},p(a,u){a[0].isAuth&&!a[7].verified&&a[7].email?o?o.p(a,u):(o=rp(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),a[0].isAuth&&a[7].email?r?r.p(a,u):(r=ap(a),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(a){o&&o.d(a),a&&S(e),r&&r.d(a),a&&S(t),a&&S(i),s=!1,l()}}}function up(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=O(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),ee(t,"active",n[10]===Ui),p(s,"type","button"),p(s,"class","tab-item"),ee(s,"active",n[10]===_l),p(e,"class","tabs-header stretched")},m(r,a){$(r,e,a),_(e,t),_(e,i),_(e,s),l||(o=[W(t,"click",n[24]),W(s,"click",n[25])],l=!0)},p(r,a){a[0]&1024&&ee(t,"active",r[10]===Ui),a[0]&1024&&ee(s,"active",r[10]===_l)},d(r){r&&S(e),l=!1,Re(o)}}}function VM(n){var b;let e,t=n[2].isNew?"New":"Edit",i,s,l,o=((b=n[0])==null?void 0:b.name)+"",r,a,u,f,c,d,h=!n[2].isNew&&op(n),m=n[0].isAuth&&!n[2].isNew&&up(n);return{c(){e=v("h4"),i=z(t),s=O(),l=v("strong"),r=z(o),a=z(" record"),u=O(),h&&h.c(),f=O(),m&&m.c(),c=Fe()},m(g,y){$(g,e,y),_(e,i),_(e,s),_(e,l),_(l,r),_(e,a),$(g,u,y),h&&h.m(g,y),$(g,f,y),m&&m.m(g,y),$(g,c,y),d=!0},p(g,y){var k;(!d||y[0]&4)&&t!==(t=g[2].isNew?"New":"Edit")&&ue(i,t),(!d||y[0]&1)&&o!==(o=((k=g[0])==null?void 0:k.name)+"")&&ue(r,o),g[2].isNew?h&&(be(),I(h,1,1,()=>{h=null}),ve()):h?(h.p(g,y),y[0]&4&&E(h,1)):(h=op(g),h.c(),E(h,1),h.m(f.parentNode,f)),g[0].isAuth&&!g[2].isNew?m?m.p(g,y):(m=up(g),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(g){d||(E(h),d=!0)},o(g){I(h),d=!1},d(g){g&&S(e),g&&S(u),h&&h.d(g),g&&S(f),m&&m.d(g),g&&S(c)}}}function zM(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=z(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[8],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[12]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[8],ee(s,"btn-loading",n[8])},m(c,d){$(c,e,d),_(e,t),$(c,i,d),$(c,s,d),_(s,l),_(l,r),u||(f=W(e,"click",n[20]),u=!0)},p(c,d){d[0]&256&&(e.disabled=c[8]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ue(r,o),d[0]&2304&&a!==(a=!c[11]||c[8])&&(s.disabled=a),d[0]&256&&ee(s,"btn-loading",c[8])},d(c){c&&S(e),c&&S(i),c&&S(s),u=!1,f()}}}function BM(n){var s;let e,t,i={class:"overlay-panel-lg record-panel "+(((s=n[0])==null?void 0:s.isAuth)&&!n[2].isNew?"colored-header":""),beforeHide:n[39],$$slots:{footer:[zM],header:[VM],default:[jM]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[40](e),e.$on("hide",n[41]),e.$on("show",n[42]),{c(){j(e.$$.fragment)},m(l,o){R(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&5&&(r.class="overlay-panel-lg record-panel "+(((a=l[0])==null?void 0:a.isAuth)&&!l[2].isNew?"colored-header":"")),o[0]&544&&(r.beforeHide=l[39]),o[0]&3485|o[1]&524288&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(E(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){n[40](null),H(e,l)}}}const Ui="form",_l="providers";function fp(n){return JSON.stringify(n)}function UM(n,e,t){let i,s,l;const o=It(),r="record_"+B.randomString(5);let{collection:a}=e,u,f=null,c=new Wi,d=!1,h=!1,m={},b={},g="",y=Ui;function k(te){return C(te),t(9,h=!0),t(10,y=Ui),u==null?void 0:u.show()}function w(){return u==null?void 0:u.hide()}async function C(te){Fn({}),t(7,f=te||{}),te!=null&&te.clone?t(2,c=te.clone()):t(2,c=new Wi),t(3,m={}),t(4,b={}),await $n(),t(18,g=fp(c))}function M(){if(d||!l||!(a!=null&&a.id))return;t(8,d=!0);const te=D();let ne;c.isNew?ne=me.collection(a.id).create(te):ne=me.collection(a.id).update(c.id,te),ne.then(Ee=>{Lt(c.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),w(),o("save",Ee)}).catch(Ee=>{me.errorResponseHandler(Ee)}).finally(()=>{t(8,d=!1)})}function T(){!(f!=null&&f.id)||yn("Do you really want to delete the selected record?",()=>me.collection(f.collectionId).delete(f.id).then(()=>{w(),Lt("Successfully deleted record."),o("delete",f)}).catch(te=>{me.errorResponseHandler(te)}))}function D(){const te=(c==null?void 0:c.export())||{},ne=new FormData,Ee={};for(const it of(a==null?void 0:a.schema)||[])Ee[it.name]=!0;a!=null&&a.isAuth&&(Ee.username=!0,Ee.email=!0,Ee.emailVisibility=!0,Ee.password=!0,Ee.passwordConfirm=!0,Ee.verified=!0);for(const it in te)!Ee[it]||(typeof te[it]>"u"&&(te[it]=null),B.addValueToFormData(ne,it,te[it]));for(const it in m){const en=B.toArray(m[it]);for(const Kt of en)ne.append(it,Kt)}for(const it in b){const en=B.toArray(b[it]);for(const Kt of en)ne.append(it+"."+Kt,"")}return ne}function A(){!(a!=null&&a.id)||!(f!=null&&f.email)||yn(`Do you really want to sent verification email to ${f.email}?`,()=>me.collection(a.id).requestVerification(f.email).then(()=>{Lt(`Successfully sent verification email to ${f.email}.`)}).catch(te=>{me.errorResponseHandler(te)}))}function P(){!(a!=null&&a.id)||!(f!=null&&f.email)||yn(`Do you really want to sent password reset email to ${f.email}?`,()=>me.collection(a.id).requestPasswordReset(f.email).then(()=>{Lt(`Successfully sent password reset email to ${f.email}.`)}).catch(te=>{me.errorResponseHandler(te)}))}const L=()=>w(),V=()=>A(),F=()=>P(),U=()=>T(),G=()=>t(10,y=Ui),K=()=>t(10,y=_l);function X(te){c=te,t(2,c)}function Z(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function ie(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function J(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function fe(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function Y(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function re(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function Oe(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function ge(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function ae(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function he(te,ne){n.$$.not_equal(m[ne.name],te)&&(m[ne.name]=te,t(3,m))}function de(te,ne){n.$$.not_equal(b[ne.name],te)&&(b[ne.name]=te,t(4,b))}function Se(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}const we=()=>s&&h?(yn("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),w()}),!1):(Fn({}),!0);function Ue(te){le[te?"unshift":"push"](()=>{u=te,t(6,u)})}function ce(te){Ve.call(this,n,te)}function se(te){Ve.call(this,n,te)}return n.$$set=te=>{"collection"in te&&t(0,a=te.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(19,i=B.hasNonEmptyProps(m)||B.hasNonEmptyProps(b)),n.$$.dirty[0]&786436&&t(5,s=i||g!=fp(c)),n.$$.dirty[0]&36&&t(11,l=c.isNew||s)},[a,w,c,m,b,s,u,f,d,h,y,l,r,M,T,A,P,k,g,i,L,V,F,U,G,K,X,Z,ie,J,fe,Y,re,Oe,ge,ae,he,de,Se,we,Ue,ce,se]}class D_ extends Ce{constructor(e){super(),$e(this,e,UM,BM,ke,{collection:0,show:17,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[17]}get hide(){return this.$$.ctx[1]}}function WM(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function YM(n){let e,t;return{c(){e=v("span"),t=z(n[1]),p(e,"class","label txt-base txt-mono"),p(e,"title",n[0])},m(i,s){$(i,e,s),_(e,t)},p(i,s){s&2&&ue(t,i[1]),s&1&&p(e,"title",i[0])},d(i){i&&S(e)}}}function KM(n){let e;function t(l,o){return l[0]?YM:WM}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function JM(n,e,t){let{id:i=""}=e,s=i;return n.$$set=l=>{"id"in l&&t(0,i=l.id)},n.$$.update=()=>{n.$$.dirty&1&&typeof i=="string"&&i.length>27&&t(1,s=i.substring(0,5)+"..."+i.substring(i.length-10))},[i,s]}class Za extends Ce{constructor(e){super(),$e(this,e,JM,KM,ke,{id:0})}}function cp(n,e,t){const i=n.slice();return i[7]=e[t],i[5]=t,i}function dp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function pp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function ZM(n){let e,t=ps(n[0][n[1].name])+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=ps(n[0][n[1].name]))},m(l,o){$(l,e,o),_(e,i)},p(l,o){o&3&&t!==(t=ps(l[0][l[1].name])+"")&&ue(i,t),o&3&&s!==(s=ps(l[0][l[1].name]))&&p(e,"title",s)},i:x,o:x,d(l){l&&S(e)}}}function GM(n){let e,t=[],i=new Map,s,l=B.toArray(n[0][n[1].name]);const o=r=>r[5]+r[7];for(let r=0;r20,o,r=B.toArray(n[0][n[1].name]).slice(0,20);const a=f=>f[5]+f[3];for(let f=0;f20),l?u||(u=gp(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){if(!o){for(let c=0;co[5]+o[3];for(let o=0;o{a[d]=null}),ve(),s=a[i],s?s.p(f,c):(s=a[i]=r[i](f),s.c()),E(s,1),s.m(e,null)),(!o||c&2&&l!==(l="col-type-"+f[1].type+" col-field-"+f[1].name))&&p(e,"class",l)},i(f){o||(E(s),o=!0)},o(f){I(s),o=!1},d(f){f&&S(e),a[i].d()}}}function ps(n){return n=n||"",n.length>200?n.substring(0,200):n}function lT(n,e,t){let{record:i}=e,{field:s}=e;function l(o){Ve.call(this,n,o)}return n.$$set=o=>{"record"in o&&t(0,i=o.record),"field"in o&&t(1,s=o.field)},[i,s,l]}class oT extends Ce{constructor(e){super(),$e(this,e,lT,sT,ke,{record:0,field:1})}}function bp(n,e,t){const i=n.slice();return i[50]=e[t],i}function vp(n,e,t){const i=n.slice();return i[46]=e[t],i}function yp(n,e,t){const i=n.slice();return i[46]=e[t],i}function kp(n,e,t){const i=n.slice();return i[46]=e[t],i}function rT(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=O(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[14],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){$(a,e,u),_(e,t),_(e,s),_(e,l),o||(r=W(t,"change",n[25]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&16384&&(t.checked=a[14])},d(a){a&&S(e),o=!1,r()}}}function aT(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function uT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function wp(n){let e,t,i,s,l,o;function r(c){n[27](c)}let a={class:"col-type-text col-field-id",name:"username",$$slots:{default:[fT]},$$scope:{ctx:n}};n[0]!==void 0&&(a.sort=n[0]),e=new Ft({props:a}),le.push(()=>ye(e,"sort",r));function u(c){n[28](c)}let f={class:"col-type-email col-field-email",name:"email",$$slots:{default:[cT]},$$scope:{ctx:n}};return n[0]!==void 0&&(f.sort=n[0]),s=new Ft({props:f}),le.push(()=>ye(s,"sort",u)),{c(){j(e.$$.fragment),i=O(),j(s.$$.fragment)},m(c,d){R(e,c,d),$(c,i,d),R(s,c,d),o=!0},p(c,d){const h={};d[1]&67108864&&(h.$$scope={dirty:d,ctx:c}),!t&&d[0]&1&&(t=!0,h.sort=c[0],Me(()=>t=!1)),e.$set(h);const m={};d[1]&67108864&&(m.$$scope={dirty:d,ctx:c}),!l&&d[0]&1&&(l=!0,m.sort=c[0],Me(()=>l=!1)),s.$set(m)},i(c){o||(E(e.$$.fragment,c),E(s.$$.fragment,c),o=!0)},o(c){I(e.$$.fragment,c),I(s.$$.fragment,c),o=!1},d(c){H(e,c),c&&S(i),H(s,c)}}}function fT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="username",p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function cT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function dT(n){let e,t,i,s,l,o=n[46].name+"",r;return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=z(o),p(t,"class",i=B.getFieldTypeIcon(n[46].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){$(a,e,u),_(e,t),_(e,s),_(e,l),_(l,r)},p(a,u){u[0]&65536&&i!==(i=B.getFieldTypeIcon(a[46].type))&&p(t,"class",i),u[0]&65536&&o!==(o=a[46].name+"")&&ue(r,o)},d(a){a&&S(e)}}}function Sp(n,e){let t,i,s,l;function o(a){e[29](a)}let r={class:"col-type-"+e[46].type+" col-field-"+e[46].name,name:e[46].name,$$slots:{default:[dT]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new Ft({props:r}),le.push(()=>ye(i,"sort",o)),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(a,u){$(a,t,u),R(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&65536&&(f.class="col-type-"+e[46].type+" col-field-"+e[46].name),u[0]&65536&&(f.name=e[46].name),u[0]&65536|u[1]&67108864&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],Me(()=>s=!1)),i.$set(f)},i(a){l||(E(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&S(t),H(i,a)}}}function pT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function hT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function $p(n){let e;function t(l,o){return l[11]?gT:mT}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function mT(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Cp(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){$(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Cp(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&S(e),o&&o.d()}}}function gT(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function Cp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[36]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function Mp(n){let e;function t(l,o){return l[50].verified?bT:_T}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function _T(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){$(s,e,l),t||(i=Le(Be.call(null,e,"Unverified")),t=!0)},d(s){s&&S(e),t=!1,i()}}}function bT(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){$(s,e,l),t||(i=Le(Be.call(null,e,"Verified")),t=!0)},d(s){s&&S(e),t=!1,i()}}}function Tp(n){let e,t,i,s,l;function o(d,h){return h[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(d[50].username)),t?yT:vT}let r=o(n,[-1,-1]),a=r(n);function u(d,h){return h[0]&16&&(l=null),l==null&&(l=!!B.isEmpty(d[50].email)),l?wT:kT}let f=u(n,[-1,-1]),c=f(n);return{c(){e=v("td"),a.c(),i=O(),s=v("td"),c.c(),p(e,"class","col-type-text col-field-username"),p(s,"class","col-type-text col-field-email")},m(d,h){$(d,e,h),a.m(e,null),$(d,i,h),$(d,s,h),c.m(s,null)},p(d,h){r===(r=o(d,h))&&a?a.p(d,h):(a.d(1),a=r(d),a&&(a.c(),a.m(e,null))),f===(f=u(d,h))&&c?c.p(d,h):(c.d(1),c=f(d),c&&(c.c(),c.m(s,null)))},d(d){d&&S(e),a.d(),d&&S(i),d&&S(s),c.d()}}}function vT(n){let e,t=n[50].username+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[50].username)},m(l,o){$(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[50].username+"")&&ue(i,t),o[0]&16&&s!==(s=l[50].username)&&p(e,"title",s)},d(l){l&&S(e)}}}function yT(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function kT(n){let e,t=n[50].email+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[50].email)},m(l,o){$(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[50].email+"")&&ue(i,t),o[0]&16&&s!==(s=l[50].email)&&p(e,"title",s)},d(l){l&&S(e)}}}function wT(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function Op(n,e){let t,i,s;return i=new oT({props:{record:e[50],field:e[46]}}),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(l,o){$(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&16&&(r.record=e[50]),o[0]&65536&&(r.field=e[46]),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&S(t),H(i,l)}}}function Dp(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k=[],w=new Map,C,M,T,D,A,P,L,V,F,U,G,K;function X(){return e[33](e[50])}m=new Za({props:{id:e[50].id}});let Z=e[2].isAuth&&Mp(e),ie=e[2].isAuth&&Tp(e),J=e[16];const fe=Oe=>Oe[46].name;for(let Oe=0;Oe',F=O(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[50].id),l.checked=r=e[6][e[50].id],p(u,"for",f="checkbox_"+e[50].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(h,"class","flex flex-gap-5"),p(d,"class","col-type-text col-field-id"),p(M,"class","col-type-date col-field-created"),p(A,"class","col-type-date col-field-updated"),p(V,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Oe,ge){$(Oe,t,ge),_(t,i),_(i,s),_(s,l),_(s,a),_(s,u),_(t,c),_(t,d),_(d,h),R(m,h,null),_(h,b),Z&&Z.m(h,null),_(t,g),ie&&ie.m(t,null),_(t,y);for(let ae=0;aeye(o,"sort",U));let K=n[2].isAuth&&wp(n),X=n[16];const Z=ae=>ae[46].name;for(let ae=0;aeye(h,"sort",ie));function fe(ae){n[31](ae)}let Y={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[hT]},$$scope:{ctx:n}};n[0]!==void 0&&(Y.sort=n[0]),g=new Ft({props:Y}),le.push(()=>ye(g,"sort",fe));let re=n[4];const Oe=ae=>ae[50].id;for(let ae=0;ae',M=O(),T=v("tbody");for(let ae=0;aer=!1)),o.$set(de),ae[2].isAuth?K?(K.p(ae,he),he[0]&4&&E(K,1)):(K=wp(ae),K.c(),E(K,1),K.m(i,u)):K&&(be(),I(K,1,1,()=>{K=null}),ve()),he[0]&65537&&(X=ae[16],be(),f=bt(f,he,Z,1,ae,X,c,i,xt,Sp,d,yp),ve());const Se={};he[1]&67108864&&(Se.$$scope={dirty:he,ctx:ae}),!m&&he[0]&1&&(m=!0,Se.sort=ae[0],Me(()=>m=!1)),h.$set(Se);const we={};he[1]&67108864&&(we.$$scope={dirty:he,ctx:ae}),!y&&he[0]&1&&(y=!0,we.sort=ae[0],Me(()=>y=!1)),g.$set(we),he[0]&1247318&&(re=ae[4],be(),D=bt(D,he,Oe,1,ae,re,A,T,xt,Dp,null,bp),ve(),!re.length&&ge?ge.p(ae,he):re.length?ge&&(ge.d(1),ge=null):(ge=$p(ae),ge.c(),ge.m(T,null))),(!P||he[0]&2048)&&ee(e,"table-loading",ae[11])},i(ae){if(!P){E(o.$$.fragment,ae),E(K);for(let he=0;he({49:l}),({uniqueId:l})=>[0,l?262144:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(l,o){$(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&640|o[1]&67371008&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&S(t),H(i,l)}}}function CT(n){let e,t,i=[],s=new Map,l,o,r=n[9];const a=u=>u[46].id+u[46].name;for(let u=0;uReset',c=O(),d=v("div"),h=O(),m=v("button"),m.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ee(f,"btn-disabled",n[12]),p(d,"class","flex-fill"),p(m,"type","button"),p(m,"class","btn btn-sm btn-secondary btn-danger"),ee(m,"btn-loading",n[12]),ee(m,"btn-disabled",n[12]),p(e,"class","bulkbar")},m(w,C){$(w,e,C),_(e,t),_(t,i),_(t,s),_(s,l),_(t,o),_(t,a),_(e,u),_(e,f),_(e,c),_(e,d),_(e,h),_(e,m),g=!0,y||(k=[W(f,"click",n[38]),W(m,"click",n[39])],y=!0)},p(w,C){(!g||C[0]&256)&&ue(l,w[8]),(!g||C[0]&256)&&r!==(r=w[8]===1?"record":"records")&&ue(a,r),(!g||C[0]&4096)&&ee(f,"btn-disabled",w[12]),(!g||C[0]&4096)&&ee(m,"btn-loading",w[12]),(!g||C[0]&4096)&&ee(m,"btn-disabled",w[12])},i(w){g||(w&&Qe(()=>{b||(b=je(e,kn,{duration:150,y:5},!0)),b.run(1)}),g=!0)},o(w){w&&(b||(b=je(e,kn,{duration:150,y:5},!1)),b.run(0)),g=!1},d(w){w&&S(e),w&&b&&b.end(),y=!1,Re(k)}}}function TT(n){let e,t,i,s,l,o;e=new Sa({props:{class:"table-wrapper",$$slots:{before:[MT],default:[ST]},$$scope:{ctx:n}}});let r=n[4].length&&Ap(n),a=n[4].length&&n[15]&&Ip(n),u=n[8]&&Pp(n);return{c(){j(e.$$.fragment),t=O(),r&&r.c(),i=O(),a&&a.c(),s=O(),u&&u.c(),l=Fe()},m(f,c){R(e,f,c),$(f,t,c),r&&r.m(f,c),$(f,i,c),a&&a.m(f,c),$(f,s,c),u&&u.m(f,c),$(f,l,c),o=!0},p(f,c){const d={};c[0]&92887|c[1]&67108864&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=Ap(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[15]?a?a.p(f,c):(a=Ip(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&E(u,1)):(u=Pp(f),u.c(),E(u,1),u.m(l.parentNode,l)):u&&(be(),I(u,1,1,()=>{u=null}),ve())},i(f){o||(E(e.$$.fragment,f),E(u),o=!0)},o(f){I(e.$$.fragment,f),I(u),o=!1},d(f){H(e,f),f&&S(t),r&&r.d(f),f&&S(i),a&&a.d(f),f&&S(s),u&&u.d(f),f&&S(l)}}}function OT(n,e,t){let i,s,l,o,r;const a=It();let{collection:u}=e,{sort:f=""}=e,{filter:c=""}=e,d=[],h=1,m=0,b={},g=!0,y=!1,k=0,w=[],C;function M(){!(u!=null&&u.id)||localStorage.setItem((u==null?void 0:u.id)+"@hiddenCollumns",JSON.stringify(w))}function T(){if(t(7,w=[]),!!(u!=null&&u.id))try{const te=localStorage.getItem(u.id+"@hiddenCollumns");te&&t(7,w=JSON.parse(te)||[])}catch{}}async function D(){const te=h;for(let ne=1;ne<=te;ne++)(ne===1||i)&&await A(ne,!1)}async function A(te=1,ne=!0){if(!!(u!=null&&u.id))return t(11,g=!0),me.collection(u.id).getList(te,30,{sort:f,filter:c}).then(async Ee=>{if(te<=1&&P(),t(11,g=!1),t(10,h=Ee.page),t(5,m=Ee.totalItems),a("load",d.concat(Ee.items)),ne){const it=++k;for(;Ee.items.length&&k==it;)t(4,d=d.concat(Ee.items.splice(0,15))),await B.yieldToMain()}else t(4,d=d.concat(Ee.items))}).catch(Ee=>{Ee!=null&&Ee.isAbort||(t(11,g=!1),console.warn(Ee),P(),me.errorResponseHandler(Ee,!1))})}function P(){t(4,d=[]),t(10,h=1),t(5,m=0),t(6,b={})}function L(){r?V():F()}function V(){t(6,b={})}function F(){for(const te of d)t(6,b[te.id]=te,b);t(6,b)}function U(te){b[te.id]?delete b[te.id]:t(6,b[te.id]=te,b),t(6,b)}function G(){yn(`Do you really want to delete the selected ${o===1?"record":"records"}?`,K)}async function K(){if(y||!o||!(u!=null&&u.id))return;let te=[];for(const ne of Object.keys(b))te.push(me.collection(u.id).delete(ne));return t(12,y=!0),Promise.all(te).then(()=>{Lt(`Successfully deleted the selected ${o===1?"record":"records"}.`),V()}).catch(ne=>{me.errorResponseHandler(ne)}).finally(()=>(t(12,y=!1),D()))}function X(te){Ve.call(this,n,te)}const Z=(te,ne)=>{ne.target.checked?B.removeByValue(w,te.id):B.pushUnique(w,te.id),t(7,w)},ie=()=>L();function J(te){f=te,t(0,f)}function fe(te){f=te,t(0,f)}function Y(te){f=te,t(0,f)}function re(te){f=te,t(0,f)}function Oe(te){f=te,t(0,f)}function ge(te){f=te,t(0,f)}function ae(te){le[te?"unshift":"push"](()=>{C=te,t(13,C)})}const he=te=>U(te),de=te=>a("select",te),Se=(te,ne)=>{ne.code==="Enter"&&(ne.preventDefault(),a("select",te))},we=()=>t(1,c=""),Ue=()=>A(h+1),ce=()=>V(),se=()=>G();return n.$$set=te=>{"collection"in te&&t(2,u=te.collection),"sort"in te&&t(0,f=te.sort),"filter"in te&&t(1,c=te.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&u!=null&&u.id&&(T(),P()),n.$$.dirty[0]&7&&(u==null?void 0:u.id)&&f!==-1&&c!==-1&&A(1),n.$$.dirty[0]&48&&t(15,i=m>d.length),n.$$.dirty[0]&4&&t(9,s=(u==null?void 0:u.schema)||[]),n.$$.dirty[0]&640&&t(16,l=s.filter(te=>!w.includes(te.id))),n.$$.dirty[0]&64&&t(8,o=Object.keys(b).length),n.$$.dirty[0]&272&&t(14,r=d.length&&o===d.length),n.$$.dirty[0]&128&&w!==-1&&M()},[f,c,u,A,d,m,b,w,o,s,h,g,y,C,r,i,l,a,L,V,U,G,D,X,Z,ie,J,fe,Y,re,Oe,ge,ae,he,de,Se,we,Ue,ce,se]}class DT extends Ce{constructor(e){super(),$e(this,e,OT,TT,ke,{collection:2,sort:0,filter:1,reloadLoadedPages:22,load:3},null,[-1,-1])}get reloadLoadedPages(){return this.$$.ctx[22]}get load(){return this.$$.ctx[3]}}function ET(n){let e,t,i,s;return e=new L4({}),i=new cn({props:{$$slots:{default:[PT]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),$(l,t,o),R(i,l,o),s=!0},p(l,o){const r={};o[0]&759|o[1]&1&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&S(t),H(i,l)}}}function AT(n){let e,t;return e=new cn({props:{center:!0,$$slots:{default:[FT]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&528|s[1]&1&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function IT(n){let e,t;return e=new cn({props:{center:!0,$$slots:{default:[RT]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[1]&1&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Lp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle")},m(s,l){$(s,e,l),t||(i=[Le(Be.call(null,e,{text:"Edit collection",position:"right"})),W(e,"click",n[14])],t=!0)},p:x,d(s){s&&S(e),t=!1,Re(i)}}}function PT(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,h,m,b,g,y,k,w,C,M,T,D,A,P,L=!n[9]&&Lp(n);c=new wa({}),c.$on("refresh",n[15]),k=new ka({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[18]);function V(G){n[20](G)}function F(G){n[21](G)}let U={collection:n[2]};return n[0]!==void 0&&(U.filter=n[0]),n[1]!==void 0&&(U.sort=n[1]),C=new DT({props:U}),n[19](C),le.push(()=>ye(C,"filter",V)),le.push(()=>ye(C,"sort",F)),C.$on("select",n[22]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=O(),l=v("div"),r=z(o),a=O(),u=v("div"),L&&L.c(),f=O(),j(c.$$.fragment),d=O(),h=v("div"),m=v("button"),m.innerHTML=` + .`,s=O(),l=v("span"),r=z(o),a=O(),Y&&Y.c(),u=O(),j(f.$$.fragment),d=O(),h=v("hr"),m=O(),j(b.$$.fragment),y=O(),k=v("hr"),$=O(),j(C.$$.fragment),T=O(),D=v("hr"),A=O(),j(P.$$.fragment),V=O(),F=v("hr"),U=O(),j(G.$$.fragment),X=O(),se&&se.c(),Z=Fe(),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm m-b-5"),p(e,"class","block m-b-base"),p(h,"class","m-t-sm m-b-sm"),p(k,"class","m-t-sm m-b-sm"),p(D,"class","m-t-sm m-b-sm"),p(F,"class","m-t-sm m-b-sm")},m(ne,Ee){S(ne,e,Ee),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),Y&&Y.m(e,null),S(ne,u,Ee),R(f,ne,Ee),S(ne,d,Ee),S(ne,h,Ee),S(ne,m,Ee),R(b,ne,Ee),S(ne,y,Ee),S(ne,k,Ee),S(ne,$,Ee),R(C,ne,Ee),S(ne,T,Ee),S(ne,D,Ee),S(ne,A,Ee),R(P,ne,Ee),S(ne,V,Ee),S(ne,F,Ee),S(ne,U,Ee),R(G,ne,Ee),S(ne,X,Ee),se&&se.m(ne,Ee),S(ne,Z,Ee),ie=!0,J||(fe=W(l,"click",n[2]),J=!0)},p(ne,[Ee]){var Mi;(!ie||Ee&2)&&o!==(o=ne[1]?"Hide available fields":"Show available fields")&&ue(r,o),ne[1]?Y?(Y.p(ne,Ee),Ee&2&&E(Y,1)):(Y=id(ne),Y.c(),E(Y,1),Y.m(e,null)):Y&&(be(),I(Y,1,1,()=>{Y=null}),ve());const it={};Ee&1&&(it.collection=ne[0]),!c&&Ee&1&&(c=!0,it.rule=ne[0].listRule,Me(()=>c=!1)),f.$set(it);const en={};Ee&1&&(en.collection=ne[0]),!g&&Ee&1&&(g=!0,en.rule=ne[0].viewRule,Me(()=>g=!1)),b.$set(en);const Kt={};Ee&1&&(Kt.collection=ne[0]),!M&&Ee&1&&(M=!0,Kt.rule=ne[0].createRule,Me(()=>M=!1)),C.$set(Kt);const tn={};Ee&1&&(tn.collection=ne[0]),!L&&Ee&1&&(L=!0,tn.rule=ne[0].updateRule,Me(()=>L=!1)),P.$set(tn);const Gn={};Ee&1&&(Gn.collection=ne[0]),!K&&Ee&1&&(K=!0,Gn.rule=ne[0].deleteRule,Me(()=>K=!1)),G.$set(Gn),(Mi=ne[0])!=null&&Mi.isAuth?se?(se.p(ne,Ee),Ee&1&&E(se,1)):(se=ld(ne),se.c(),E(se,1),se.m(Z.parentNode,Z)):se&&(be(),I(se,1,1,()=>{se=null}),ve())},i(ne){ie||(E(Y),E(f.$$.fragment,ne),E(b.$$.fragment,ne),E(C.$$.fragment,ne),E(P.$$.fragment,ne),E(G.$$.fragment,ne),E(se),ie=!0)},o(ne){I(Y),I(f.$$.fragment,ne),I(b.$$.fragment,ne),I(C.$$.fragment,ne),I(P.$$.fragment,ne),I(G.$$.fragment,ne),I(se),ie=!1},d(ne){ne&&w(e),Y&&Y.d(),ne&&w(u),H(f,ne),ne&&w(d),ne&&w(h),ne&&w(m),H(b,ne),ne&&w(y),ne&&w(k),ne&&w($),H(C,ne),ne&&w(T),ne&&w(D),ne&&w(A),H(P,ne),ne&&w(V),ne&&w(F),ne&&w(U),H(G,ne),ne&&w(X),se&&se.d(ne),ne&&w(Z),J=!1,fe()}}}function KC(n,e,t){let{collection:i=new Pn}=e,s=!1;const l=()=>t(1,s=!s);function o(d){n.$$.not_equal(i.listRule,d)&&(i.listRule=d,t(0,i))}function r(d){n.$$.not_equal(i.viewRule,d)&&(i.viewRule=d,t(0,i))}function a(d){n.$$.not_equal(i.createRule,d)&&(i.createRule=d,t(0,i))}function u(d){n.$$.not_equal(i.updateRule,d)&&(i.updateRule=d,t(0,i))}function f(d){n.$$.not_equal(i.deleteRule,d)&&(i.deleteRule=d,t(0,i))}function c(d){n.$$.not_equal(i.options.manageRule,d)&&(i.options.manageRule=d,t(0,i))}return n.$$set=d=>{"collection"in d&&t(0,i=d.collection)},[i,s,l,o,r,a,u,f,c]}class JC extends Ce{constructor(e){super(),$e(this,e,KC,YC,ke,{collection:0})}}function ZC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=W(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function GC(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[ZC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function XC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function QC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function od(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function xC(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowUsernameAuth?QC:XC}let u=a(n),f=u(n),c=n[3]&&od();return{c(){e=v("div"),e.innerHTML=` + Username/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Fe(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){S(d,e,h),S(d,t,h),S(d,i,h),S(d,s,h),f.m(d,h),S(d,l,h),c&&c.m(d,h),S(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?h&8&&E(c,1):(c=od(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){r||(E(c),r=!0)},o(d){I(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function e4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=W(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function rd(n){let e,t,i,s,l,o,r,a;return i=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[t4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+(B.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[n4,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),_(e,t),R(i,t,null),_(e,s),_(e,l),R(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||(E(i.$$.fragment,u),E(o.$$.fragment,u),u&&Qe(()=>{r||(r=je(e,St,{duration:150},!0)),r.run(1)}),a=!0)},o(u){I(i.$$.fragment,u),I(o.$$.fragment,u),u&&(r||(r=je(e,St,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),H(i),H(o),u&&r&&r.end()}}}function t4(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[7](g)}let b={id:n[12],disabled:!B.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(b.value=n[0].options.exceptEmailDomains),r=new xi({props:b}),le.push(()=>ye(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),R(r,g,y),S(g,u,y),S(g,f,y),c=!0,d||(h=Le(Be.call(null,s,{text:`Email domains that are NOT allowed to sign up. + This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=g[12]),y&1&&(k.disabled=!B.isEmpty(g[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,k.value=g[0].options.exceptEmailDomains,Me(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){I(r.$$.fragment,g),c=!1},d(g){g&&w(e),g&&w(o),H(r,g),g&&w(u),g&&w(f),d=!1,h()}}}function n4(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[8](g)}let b={id:n[12],disabled:!B.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(b.value=n[0].options.onlyEmailDomains),r=new xi({props:b}),le.push(()=>ye(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),R(r,g,y),S(g,u,y),S(g,f,y),c=!0,d||(h=Le(Be.call(null,s,{text:`Email domains that are ONLY allowed to sign up. + This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=g[12]),y&1&&(k.disabled=!B.isEmpty(g[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,k.value=g[0].options.onlyEmailDomains,Me(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){I(r.$$.fragment,g),c=!1},d(g){g&&w(e),g&&w(o),H(r,g),g&&w(u),g&&w(f),d=!1,h()}}}function i4(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[e4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&rd(n);return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Fe()},m(o,r){R(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&E(l,1)):(l=rd(o),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function s4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function l4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ad(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function o4(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowEmailAuth?l4:s4}let u=a(n),f=u(n),c=n[2]&&ad();return{c(){e=v("div"),e.innerHTML=` + Email/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Fe(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){S(d,e,h),S(d,t,h),S(d,i,h),S(d,s,h),f.m(d,h),S(d,l,h),c&&c.m(d,h),S(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?h&4&&E(c,1):(c=ad(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){r||(E(c),r=!0)},o(d){I(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function r4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),_(s,l),r||(a=W(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ud(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&Qe(()=>{t||(t=je(e,St,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,St,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function a4(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[r4,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&ud();return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Fe()},m(o,r){R(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&E(l,1):(l=ud(),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function u4(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function f4(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function fd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function c4(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowOAuth2Auth?f4:u4}let u=a(n),f=u(n),c=n[1]&&fd();return{c(){e=v("div"),e.innerHTML=` + OAuth2`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Fe(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){S(d,e,h),S(d,t,h),S(d,i,h),S(d,s,h),f.m(d,h),S(d,l,h),c&&c.m(d,h),S(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?h&2&&E(c,1):(c=fd(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){r||(E(c),r=!0)},o(d){I(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function d4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Minimum password length"),s=O(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].options.minPasswordLength),r||(a=W(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&&rt(l.value)!==u[0].options.minPasswordLength&&pe(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function p4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Always require email",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){S(c,e,d),e.checked=n[0].options.requireEmail,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"change",n[11]),Le(Be.call(null,r,{text:`The constraint is applied only for new records. +Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Re(f)}}}function h4(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return s=new _s({props:{single:!0,$$slots:{header:[xC],default:[GC]},$$scope:{ctx:n}}}),o=new _s({props:{single:!0,$$slots:{header:[o4],default:[i4]},$$scope:{ctx:n}}}),a=new _s({props:{single:!0,$$slots:{header:[c4],default:[a4]},$$scope:{ctx:n}}}),m=new _e({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[d4,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),g=new _e({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[p4,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=O(),i=v("div"),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),f=v("hr"),c=O(),d=v("h4"),d.textContent="General",h=O(),j(m.$$.fragment),b=O(),j(g.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(k,$){S(k,e,$),S(k,t,$),S(k,i,$),R(s,i,null),_(i,l),R(o,i,null),_(i,r),R(a,i,null),S(k,u,$),S(k,f,$),S(k,c,$),S(k,d,$),S(k,h,$),R(m,k,$),S(k,b,$),R(g,k,$),y=!0},p(k,[$]){const C={};$&8201&&(C.$$scope={dirty:$,ctx:k}),s.$set(C);const M={};$&8197&&(M.$$scope={dirty:$,ctx:k}),o.$set(M);const T={};$&8195&&(T.$$scope={dirty:$,ctx:k}),a.$set(T);const D={};$&12289&&(D.$$scope={dirty:$,ctx:k}),m.$set(D);const A={};$&12289&&(A.$$scope={dirty:$,ctx:k}),g.$set(A)},i(k){y||(E(s.$$.fragment,k),E(o.$$.fragment,k),E(a.$$.fragment,k),E(m.$$.fragment,k),E(g.$$.fragment,k),y=!0)},o(k){I(s.$$.fragment,k),I(o.$$.fragment,k),I(a.$$.fragment,k),I(m.$$.fragment,k),I(g.$$.fragment,k),y=!1},d(k){k&&w(e),k&&w(t),k&&w(i),H(s),H(o),H(a),k&&w(u),k&&w(f),k&&w(c),k&&w(d),k&&w(h),H(m,k),k&&w(b),H(g,k)}}}function m4(n,e,t){let i,s,l,o;Je(n,wi,b=>t(4,o=b));let{collection:r=new Pn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(b){n.$$.not_equal(r.options.exceptEmailDomains,b)&&(r.options.exceptEmailDomains=b,t(0,r))}function c(b){n.$$.not_equal(r.options.onlyEmailDomains,b)&&(r.options.onlyEmailDomains=b,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function h(){r.options.minPasswordLength=rt(this.value),t(0,r)}function m(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=b=>{"collection"in b&&t(0,r=b.collection)},n.$$.update=()=>{var b,g,y,k;n.$$.dirty&1&&r.isAuth&&B.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!B.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.allowEmailAuth)||!B.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.onlyEmailDomains)||!B.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!B.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,h,m]}class g4 extends Ce{constructor(e){super(),$e(this,e,m4,h4,ke,{collection:0})}}function cd(n,e,t){const i=n.slice();return i[14]=e[t],i}function dd(n,e,t){const i=n.slice();return i[14]=e[t],i}function pd(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function hd(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=v("li"),t=v("div"),i=z(`Renamed collection + `),s=v("strong"),o=z(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=z(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){S(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&2&&l!==(l=h[1].originalName+"")&&ue(o,l),m&2&&c!==(c=h[1].name+"")&&ue(d,c)},d(h){h&&w(e)}}}function md(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=v("li"),t=v("div"),i=z(`Renamed field + `),s=v("strong"),o=z(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=z(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){S(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&16&&l!==(l=h[14].originalName+"")&&ue(o,l),m&16&&c!==(c=h[14].name+"")&&ue(d,c)},d(h){h&&w(e)}}}function gd(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=v("li"),t=z("Removed field "),i=v("span"),l=z(s),o=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(i,l),_(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&ue(l,s)},d(r){r&&w(e)}}}function _4(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[3].length&&pd(),m=n[5]&&hd(n),b=n[4],g=[];for(let $=0;$',i=O(),s=v("div"),l=v("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to + update it manually!`,o=O(),h&&h.c(),r=O(),a=v("h6"),a.textContent="Changes:",u=O(),f=v("ul"),m&&m.c(),c=O();for(let $=0;$Cancel',t=O(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[W(e,"click",n[8]),W(i,"click",n[9])],s=!0)},p:x,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Re(l)}}}function y4(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[v4],header:[b4],default:[_4]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function k4(n,e,t){let i,s,l;const o=It();let r,a;async function u(y){t(1,a=y),await $n(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),h=()=>c();function m(y){le[y?"unshift":"push"](()=>{r=y,t(2,r)})}function b(y){Ve.call(this,n,y)}function g(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,h,m,b,g]}class w4 extends Ce{constructor(e){super(),$e(this,e,k4,y4,ke,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function _d(n,e,t){const i=n.slice();return i[43]=e[t][0],i[44]=e[t][1],i}function bd(n){let e,t,i,s;function l(r){n[30](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new JC({props:o}),le.push(()=>ye(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){S(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],Me(()=>i=!1)),t.$set(u)},i(r){s||(E(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function vd(n){let e,t,i,s;function l(r){n[31](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new g4({props:o}),le.push(()=>ye(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ee(e,"active",n[3]===Cs)},m(r,a){S(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],Me(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&ee(e,"active",r[3]===Cs)},i(r){s||(E(t.$$.fragment,r),s=!0)},o(r){I(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function S4(n){let e,t,i,s,l,o,r;function a(d){n[29](d)}let u={};n[2]!==void 0&&(u.collection=n[2]),i=new AC({props:u}),le.push(()=>ye(i,"collection",a));let f=n[3]===ml&&bd(n),c=n[2].isAuth&&vd(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),l=O(),f&&f.c(),o=O(),c&&c.c(),p(t,"class","tab-item"),ee(t,"active",n[3]===gi),p(e,"class","tabs-content svelte-lo1530")},m(d,h){S(d,e,h),_(e,t),R(i,t,null),_(e,l),f&&f.m(e,null),_(e,o),c&&c.m(e,null),r=!0},p(d,h){const m={};!s&&h[0]&4&&(s=!0,m.collection=d[2],Me(()=>s=!1)),i.$set(m),(!r||h[0]&8)&&ee(t,"active",d[3]===gi),d[3]===ml?f?(f.p(d,h),h[0]&8&&E(f,1)):(f=bd(d),f.c(),E(f,1),f.m(e,o)):f&&(be(),I(f,1,1,()=>{f=null}),ve()),d[2].isAuth?c?(c.p(d,h),h[0]&4&&E(c,1)):(c=vd(d),c.c(),E(c,1),c.m(e,null)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){r||(E(i.$$.fragment,d),E(f),E(c),r=!0)},o(d){I(i.$$.fragment,d),I(f),I(c),r=!1},d(d){d&&w(e),H(i),f&&f.d(),c&&c.d()}}}function yd(n){let e,t,i,s,l,o,r;return o=new Zn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[$4]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),i=v("button"),s=v("i"),l=O(),j(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),_(i,s),_(i,l),R(o,i,null),r=!0},p(a,u){const f={};u[1]&65536&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(E(o.$$.fragment,a),r=!0)},o(a){I(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),H(o)}}}function $4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger closable")},m(s,l){S(s,e,l),t||(i=W(e,"click",Yn(ut(n[22]))),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function kd(n){let e,t,i,s;return i=new Zn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[C4]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=O(),j(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),R(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&65536&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),H(i,l)}}}function wd(n){let e,t,i,s,l,o=n[44]+"",r,a,u,f,c;function d(){return n[24](n[43])}return{c(){e=v("button"),t=v("i"),s=O(),l=v("span"),r=z(o),a=z(" collection"),u=O(),p(t,"class",i=uo(B.getCollectionTypeIcon(n[43]))+" svelte-lo1530"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),ee(e,"selected",n[43]==n[2].type)},m(h,m){S(h,e,m),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),_(e,u),f||(c=W(e,"click",d),f=!0)},p(h,m){n=h,m[0]&64&&i!==(i=uo(B.getCollectionTypeIcon(n[43]))+" svelte-lo1530")&&p(t,"class",i),m[0]&64&&o!==(o=n[44]+"")&&ue(r,o),m[0]&68&&ee(e,"selected",n[43]==n[2].type)},d(h){h&&w(e),f=!1,c()}}}function C4(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{L=null}),ve()),(!D||U[0]&4&&$!==($="btn btn-sm p-r-10 p-l-10 "+(F[2].isNew?"btn-hint":"btn-secondary")))&&p(c,"class",$),(!D||U[0]&4&&C!==(C=!F[2].isNew))&&(c.disabled=C),F[2].system?V||(V=Sd(),V.c(),V.m(T.parentNode,T)):V&&(V.d(1),V=null)},i(F){D||(E(L),D=!0)},o(F){I(L),D=!1},d(F){F&&w(e),F&&w(s),F&&w(l),F&&w(u),F&&w(f),L&&L.d(),F&&w(M),V&&V.d(F),F&&w(T),A=!1,P()}}}function $d(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Le(t=Be.call(null,e,n[13])),l=!0)},p(r,a){t&&Wt(t.update)&&a[0]&8192&&t.update.call(null,r[13])},i(r){s||(r&&Qe(()=>{i||(i=je(e,$t,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=je(e,$t,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function Cd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Le(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Md(n){var a,u,f;let e,t,i,s=!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&&Td();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=O(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),ee(e,"active",n[3]===Cs)},m(c,d){S(c,e,d),_(e,t),_(e,i),r&&r.m(e,null),l||(o=W(e,"click",n[28]),l=!0)},p(c,d){var h,m,b;d[0]&32&&(s=!B.isEmpty((h=c[5])==null?void 0:h.options)&&!((b=(m=c[5])==null?void 0:m.options)!=null&&b.manageRule)),s?r?d[0]&32&&E(r,1):(r=Td(),r.c(),E(r,1),r.m(e,null)):r&&(be(),I(r,1,1,()=>{r=null}),ve()),d[0]&8&&ee(e,"active",c[3]===Cs)},d(c){c&&w(e),r&&r.d(),l=!1,o()}}}function Td(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Le(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function T4(n){var U,G,K,X,Z,ie,J,fe;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,h,m,b=!B.isEmpty((U=n[5])==null?void 0:U.schema),g,y,k,$,C=!B.isEmpty((G=n[5])==null?void 0:G.listRule)||!B.isEmpty((K=n[5])==null?void 0:K.viewRule)||!B.isEmpty((X=n[5])==null?void 0:X.createRule)||!B.isEmpty((Z=n[5])==null?void 0:Z.updateRule)||!B.isEmpty((ie=n[5])==null?void 0:ie.deleteRule)||!B.isEmpty((fe=(J=n[5])==null?void 0:J.options)==null?void 0:fe.manageRule),M,T,D,A,P=!n[2].isNew&&!n[2].system&&yd(n);r=new _e({props:{class:"form-field collection-field-name required m-b-0 "+(n[12]?"disabled":""),name:"name",$$slots:{default:[M4,({uniqueId:Y})=>({42:Y}),({uniqueId:Y})=>[0,Y?2048:0]]},$$scope:{ctx:n}}});let L=b&&$d(n),V=C&&Cd(),F=n[2].isAuth&&Md(n);return{c(){e=v("h4"),i=z(t),s=O(),P&&P.c(),l=O(),o=v("form"),j(r.$$.fragment),a=O(),u=v("input"),f=O(),c=v("div"),d=v("button"),h=v("span"),h.textContent="Fields",m=O(),L&&L.c(),g=O(),y=v("button"),k=v("span"),k.textContent="API Rules",$=O(),V&&V.c(),M=O(),F&&F.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ee(d,"active",n[3]===gi),p(k,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),ee(y,"active",n[3]===ml),p(c,"class","tabs-header stretched")},m(Y,re){S(Y,e,re),_(e,i),S(Y,s,re),P&&P.m(Y,re),S(Y,l,re),S(Y,o,re),R(r,o,null),_(o,a),_(o,u),S(Y,f,re),S(Y,c,re),_(c,d),_(d,h),_(d,m),L&&L.m(d,null),_(c,g),_(c,y),_(y,k),_(y,$),V&&V.m(y,null),_(c,M),F&&F.m(c,null),T=!0,D||(A=[W(o,"submit",ut(n[25])),W(d,"click",n[26]),W(y,"click",n[27])],D=!0)},p(Y,re){var ge,ae,he,de,Se,we,Ue,ce;(!T||re[0]&4)&&t!==(t=Y[2].isNew?"New collection":"Edit collection")&&ue(i,t),!Y[2].isNew&&!Y[2].system?P?(P.p(Y,re),re[0]&4&&E(P,1)):(P=yd(Y),P.c(),E(P,1),P.m(l.parentNode,l)):P&&(be(),I(P,1,1,()=>{P=null}),ve());const Oe={};re[0]&4096&&(Oe.class="form-field collection-field-name required m-b-0 "+(Y[12]?"disabled":"")),re[0]&4164|re[1]&67584&&(Oe.$$scope={dirty:re,ctx:Y}),r.$set(Oe),re[0]&32&&(b=!B.isEmpty((ge=Y[5])==null?void 0:ge.schema)),b?L?(L.p(Y,re),re[0]&32&&E(L,1)):(L=$d(Y),L.c(),E(L,1),L.m(d,null)):L&&(be(),I(L,1,1,()=>{L=null}),ve()),(!T||re[0]&8)&&ee(d,"active",Y[3]===gi),re[0]&32&&(C=!B.isEmpty((ae=Y[5])==null?void 0:ae.listRule)||!B.isEmpty((he=Y[5])==null?void 0:he.viewRule)||!B.isEmpty((de=Y[5])==null?void 0:de.createRule)||!B.isEmpty((Se=Y[5])==null?void 0:Se.updateRule)||!B.isEmpty((we=Y[5])==null?void 0:we.deleteRule)||!B.isEmpty((ce=(Ue=Y[5])==null?void 0:Ue.options)==null?void 0:ce.manageRule)),C?V?re[0]&32&&E(V,1):(V=Cd(),V.c(),E(V,1),V.m(y,null)):V&&(be(),I(V,1,1,()=>{V=null}),ve()),(!T||re[0]&8)&&ee(y,"active",Y[3]===ml),Y[2].isAuth?F?F.p(Y,re):(F=Md(Y),F.c(),F.m(c,null)):F&&(F.d(1),F=null)},i(Y){T||(E(P),E(r.$$.fragment,Y),E(L),E(V),T=!0)},o(Y){I(P),I(r.$$.fragment,Y),I(L),I(V),T=!1},d(Y){Y&&w(e),Y&&w(s),P&&P.d(Y),Y&&w(l),Y&&w(o),H(r),Y&&w(f),Y&&w(c),L&&L.d(),V&&V.d(),F&&F.d(),D=!1,Re(A)}}}function O4(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=z(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[9],ee(s,"btn-loading",n[9])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=[W(e,"click",n[20]),W(s,"click",n[21])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ue(r,o),d[0]&2560&&a!==(a=!c[11]||c[9])&&(s.disabled=a),d[0]&512&&ee(s,"btn-loading",c[9])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Re(f)}}}function D4(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[32],$$slots:{footer:[O4],header:[T4],default:[S4]},$$scope:{ctx:n}};e=new Jn({props:l}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]);let o={};return i=new w4({props:o}),n[36](i),i.$on("confirm",n[37]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(r,a){R(e,r,a),S(r,t,a),R(i,r,a),s=!0},p(r,a){const u={};a[0]&1040&&(u.beforeHide=r[32]),a[0]&14956|a[1]&65536&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(E(e.$$.fragment,r),E(i.$$.fragment,r),s=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),s=!1},d(r){n[33](null),H(e,r),r&&w(t),n[36](null),H(i,r)}}}const gi="fields",ml="api_rules",Cs="options",E4="base",Od="auth";function Sr(n){return JSON.stringify(n)}function A4(n,e,t){let i,s,l,o,r;Je(n,wi,we=>t(5,r=we));const a={};a[E4]="Base",a[Od]="Auth";const u=It();let f,c,d=null,h=new Pn,m=!1,b=!1,g=gi,y=Sr(h);function k(we){t(3,g=we)}function $(we){return M(we),t(10,b=!0),k(gi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(we){Fn({}),typeof we<"u"?(d=we,t(2,h=we==null?void 0:we.clone())):(d=null,t(2,h=new Pn)),t(2,h.schema=h.schema||[],h),t(2,h.originalName=h.name||"",h),await $n(),t(19,y=Sr(h))}function T(){if(h.isNew)return D();c==null||c.show(h)}function D(){if(m)return;t(9,m=!0);const we=A();let Ue;h.isNew?Ue=me.collections.create(we):Ue=me.collections.update(h.id,we),Ue.then(ce=>{t(10,b=!1),C(),Lt(h.isNew?"Successfully created collection.":"Successfully updated collection."),wS(ce),u("save",{isNew:h.isNew,collection:ce})}).catch(ce=>{me.errorResponseHandler(ce)}).finally(()=>{t(9,m=!1)})}function A(){const we=h.export();we.schema=we.schema.slice(0);for(let Ue=we.schema.length-1;Ue>=0;Ue--)we.schema[Ue].toDelete&&we.schema.splice(Ue,1);return we}function P(){!(d!=null&&d.id)||yn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>me.collections.delete(d==null?void 0:d.id).then(()=>{C(),Lt(`Successfully deleted collection "${d==null?void 0:d.name}".`),u("delete",d),SS(d)}).catch(we=>{me.errorResponseHandler(we)}))}function L(we){t(2,h.type=we,h)}const V=()=>C(),F=()=>T(),U=()=>P(),G=we=>{t(2,h.name=B.slugify(we.target.value),h),we.target.value=h.name},K=we=>L(we),X=()=>{o&&T()},Z=()=>k(gi),ie=()=>k(ml),J=()=>k(Cs);function fe(we){h=we,t(2,h)}function Y(we){h=we,t(2,h)}function re(we){h=we,t(2,h)}const Oe=()=>l&&b?(yn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,b=!1),C()}),!1):!0;function ge(we){le[we?"unshift":"push"](()=>{f=we,t(7,f)})}function ae(we){Ve.call(this,n,we)}function he(we){Ve.call(this,n,we)}function de(we){le[we?"unshift":"push"](()=>{c=we,t(8,c)})}const Se=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&32&&t(13,i=typeof B.getNestedVal(r,"schema.message",null)=="string"?B.getNestedVal(r,"schema.message"):"Has errors"),n.$$.dirty[0]&4&&t(12,s=!h.isNew&&h.system),n.$$.dirty[0]&524292&&t(4,l=y!=Sr(h)),n.$$.dirty[0]&20&&t(11,o=h.isNew||l),n.$$.dirty[0]&12&&g===Cs&&h.type!==Od&&k(gi)},[k,C,h,g,l,r,a,f,c,m,b,o,s,i,T,D,P,L,$,y,V,F,U,G,K,X,Z,ie,J,fe,Y,re,Oe,ge,ae,he,de,Se]}class Ja extends Ce{constructor(e){super(),$e(this,e,A4,D4,ke,{changeTab:0,show:18,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[18]}get hide(){return this.$$.ctx[1]}}function Dd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Ed(n){let e,t=n[1].length&&Ad();return{c(){t&&t.c(),e=Fe()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=Ad(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Ad(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Id(n,e){let t,i,s,l,o,r=e[14].name+"",a,u,f,c,d;return{key:n,first:null,c(){var h;t=v("a"),i=v("i"),l=O(),o=v("span"),a=z(r),u=O(),p(i,"class",s=B.getCollectionTypeIcon(e[14].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[14].id),p(t,"class","sidebar-list-item"),ee(t,"active",((h=e[5])==null?void 0:h.id)===e[14].id),this.first=t},m(h,m){S(h,t,m),_(t,i),_(t,l),_(t,o),_(o,a),_(t,u),c||(d=Le(zt.call(null,t)),c=!0)},p(h,m){var b;e=h,m&8&&s!==(s=B.getCollectionTypeIcon(e[14].type))&&p(i,"class",s),m&8&&r!==(r=e[14].name+"")&&ue(a,r),m&8&&f!==(f="/collections?collectionId="+e[14].id)&&p(t,"href",f),m&40&&ee(t,"active",((b=e[5])==null?void 0:b.id)===e[14].id)},d(h){h&&w(t),c=!1,d()}}}function Pd(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` + New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),_(e,t),i||(s=W(t,"click",n[11]),i=!0)},p:x,d(l){l&&w(e),i=!1,s()}}}function I4(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],h=new Map,m,b,g,y,k,$,C=n[3];const M=P=>P[14].id;for(let P=0;P',o=O(),r=v("input"),a=O(),u=v("hr"),f=O(),c=v("div");for(let P=0;P20),p(e,"class","page-sidebar collection-sidebar")},m(P,L){S(P,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),pe(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let V=0;V20),P[6]?D&&(D.d(1),D=null):D?D.p(P,L):(D=Pd(P),D.c(),D.m(e,null));const V={};g.$set(V)},i(P){y||(E(g.$$.fragment,P),y=!0)},o(P){I(g.$$.fragment,P),y=!1},d(P){P&&w(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function L4(n,e,t){let i,s,l,o,r,a;Je(n,Bn,y=>t(5,o=y)),Je(n,Zi,y=>t(8,r=y)),Je(n,ks,y=>t(6,a=y));let u,f="";function c(y){Ht(Bn,o=y,o)}const d=()=>t(0,f="");function h(){f=this.value,t(0,f)}const m=()=>u==null?void 0:u.show();function b(y){le[y?"unshift":"push"](()=>{u=y,t(2,u)})}const g=y=>{var k;((k=y.detail)==null?void 0:k.isNew)&&y.detail.collection&&c(y.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=f.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=f!==""),n.$$.dirty&259&&t(3,l=r.filter(y=>y.id==f||y.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&256&&r&&P4()},[f,i,u,l,s,o,a,c,r,d,h,m,b,g]}class N4 extends Ce{constructor(e){super(),$e(this,e,L4,I4,ke,{})}}function Ld(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Nd(n){n[18]=n[19].default}function Fd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Rd(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Hd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Rd();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Fe(),c&&c.c(),s=O(),l=v("button"),r=z(o),a=O(),p(l,"type","button"),p(l,"class","sidebar-item"),ee(l,"active",e[5]===e[14]),this.first=t},m(h,m){S(h,t,m),c&&c.m(h,m),S(h,s,m),S(h,l,m),_(l,r),_(l,a),u||(f=W(l,"click",d),u=!0)},p(h,m){e=h,m&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Rd(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),m&8&&o!==(o=e[15].label+"")&&ue(r,o),m&40&&ee(l,"active",e[5]===e[14])},d(h){h&&w(t),c&&c.d(h),h&&w(s),h&&w(l),u=!1,f()}}}function jd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:H4,then:R4,catch:F4,value:19,blocks:[,,,]};return xa(t=n[15].component,s),{c(){e=Fe(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&xa(t,s)||e0(s,n,o)},i(l){i||(E(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];I(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function F4(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function R4(n){Nd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){j(e.$$.fragment),t=O()},m(s,l){R(e,s,l),S(s,t,l),i=!0},p(s,l){Nd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(E(e.$$.fragment,s),i=!0)},o(s){I(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&w(t)}}}function H4(n){return{c:x,m:x,p:x,i:x,o:x,d:x}}function qd(n,e){let t,i,s,l=e[5]===e[14]&&jd(e);return{key:n,first:null,c(){t=Fe(),l&&l.c(),i=Fe(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&E(l,1)):(l=jd(e),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){s||(E(l),s=!0)},o(o){I(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function j4(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=b=>b[14];for(let b=0;bb[14];for(let b=0;bClose',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[8]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function V4(n){let e,t,i={class:"docs-panel",$$slots:{footer:[q4],default:[j4]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function z4(n,e,t){const i={list:{label:"List/Search",component:st(()=>import("./ListApiDocs.57db06f5.js"),["./ListApiDocs.57db06f5.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css","./ListApiDocs.68f52edd.css"],import.meta.url)},view:{label:"View",component:st(()=>import("./ViewApiDocs.0c82d5c8.js"),["./ViewApiDocs.0c82d5c8.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:st(()=>import("./CreateApiDocs.33991bcd.js"),["./CreateApiDocs.33991bcd.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:st(()=>import("./UpdateApiDocs.cddb18a8.js"),["./UpdateApiDocs.cddb18a8.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:st(()=>import("./DeleteApiDocs.d73d5d41.js"),["./DeleteApiDocs.d73d5d41.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:st(()=>import("./RealtimeApiDocs.b12acb7b.js"),["./RealtimeApiDocs.b12acb7b.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:st(()=>import("./AuthWithPasswordDocs.c60c1c6d.js"),["./AuthWithPasswordDocs.c60c1c6d.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:st(()=>import("./AuthWithOAuth2Docs.198dc925.js"),["./AuthWithOAuth2Docs.198dc925.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:st(()=>import("./AuthRefreshDocs.c793266d.js"),["./AuthRefreshDocs.c793266d.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:st(()=>import("./RequestVerificationDocs.85b1446d.js"),["./RequestVerificationDocs.85b1446d.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:st(()=>import("./ConfirmVerificationDocs.49a6a87a.js"),["./ConfirmVerificationDocs.49a6a87a.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:st(()=>import("./RequestPasswordResetDocs.13d66dd3.js"),["./RequestPasswordResetDocs.13d66dd3.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:st(()=>import("./ConfirmPasswordResetDocs.e8766802.js"),["./ConfirmPasswordResetDocs.e8766802.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:st(()=>import("./RequestEmailChangeDocs.94646c17.js"),["./RequestEmailChangeDocs.94646c17.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:st(()=>import("./ConfirmEmailChangeDocs.a952ff52.js"),["./ConfirmEmailChangeDocs.a952ff52.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:st(()=>import("./AuthMethodsDocs.6fc389af.js"),["./AuthMethodsDocs.6fc389af.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:st(()=>import("./ListExternalAuthsDocs.ee06242a.js"),["./ListExternalAuthsDocs.ee06242a.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:st(()=>import("./UnlinkExternalAuthDocs.728267cc.js"),["./UnlinkExternalAuthDocs.728267cc.js","./SdkTabs.c9d3b27f.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}};let l,o=new Pn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),h=y=>c(y);function m(y){le[y?"unshift":"push"](()=>{l=y,t(4,l)})}function b(y){Ve.call(this,n,y)}function g(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,h,m,b,g]}class B4 extends Ce{constructor(e){super(),$e(this,e,z4,V4,ke,{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 U4(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Username",o=O(),r=v("input"),p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(h,m){S(h,e,m),_(e,t),_(e,i),_(e,s),S(h,o,m),S(h,r,m),pe(r,n[0].username),c||(d=W(r,"input",n[4]),c=!0)},p(h,m){m&4096&&l!==(l=h[12])&&p(e,"for",l),m&1&&a!==(a=!h[0].isNew)&&p(r,"requried",a),m&1&&u!==(u=h[0].isNew?"Leave empty to auto generate...":h[3])&&p(r,"placeholder",u),m&4096&&f!==(f=h[12])&&p(r,"id",f),m&1&&r.value!==h[0].username&&pe(r,h[0].username)},d(h){h&&w(e),h&&w(o),h&&w(r),c=!1,d()}}}function W4(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,h,m,b,g,y,k,$,C;return{c(){var M;e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("div"),a=v("button"),u=v("span"),f=z("Public: "),d=z(c),m=O(),b=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",h="btn btn-sm btn-secondary "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(b,"type","email"),b.autofocus=g=n[0].isNew,p(b,"autocomplete","off"),p(b,"id",y=n[12]),b.required=k=(M=n[1].options)==null?void 0:M.requireEmail,p(b,"class","svelte-1751a4d")},m(M,T){S(M,e,T),_(e,t),_(e,i),_(e,s),S(M,o,T),S(M,r,T),_(r,a),_(a,u),_(u,f),_(u,d),S(M,m,T),S(M,b,T),pe(b,n[0].email),n[0].isNew&&b.focus(),$||(C=[Le(Be.call(null,a,{text:"Make email public or private",position:"top-right"})),W(a,"click",n[5]),W(b,"input",n[6])],$=!0)},p(M,T){var D;T&4096&&l!==(l=M[12])&&p(e,"for",l),T&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&ue(d,c),T&1&&h!==(h="btn btn-sm btn-secondary "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",h),T&1&&g!==(g=M[0].isNew)&&(b.autofocus=g),T&4096&&y!==(y=M[12])&&p(b,"id",y),T&2&&k!==(k=(D=M[1].options)==null?void 0:D.requireEmail)&&(b.required=k),T&1&&b.value!==M[0].email&&pe(b,M[0].email)},d(M){M&&w(e),M&&w(o),M&&w(r),M&&w(m),M&&w(b),$=!1,Re(C)}}}function Vd(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[Y4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Y4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),_(s,l),r||(a=W(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function zd(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[K4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[J4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),ee(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){S(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c&12289&&(h.$$scope={dirty:c,ctx:f}),r.$set(h),(!u||c&4)&&ee(t,"p-t-xs",f[2])},i(f){u||(E(s.$$.fragment,f),E(r.$$.fragment,f),f&&Qe(()=>{a||(a=je(e,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(e,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function K4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),pe(r,n[0].password),u||(f=W(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&pe(r,c[0].password)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function J4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),pe(r,n[0].passwordConfirm),u||(f=W(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&pe(r,c[0].passwordConfirm)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function Z4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),_(s,l),r||(a=[W(e,"change",n[10]),W(e,"change",ut(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Re(a)}}}function G4(n){var g;let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new _e({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[U4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field "+((g=n[1].options)!=null&&g.requireEmail?"required":""),name:"email",$$slots:{default:[W4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}});let m=!n[0].isNew&&Vd(n),b=(n[0].isNew||n[2])&&zd(n);return d=new _e({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[Z4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),m&&m.c(),u=O(),b&&b.c(),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,k){S(y,e,k),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),m&&m.m(a,null),_(a,u),b&&b.m(a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(y,[k]){var T;const $={};k&1&&($.class="form-field "+(y[0].isNew?"":"required")),k&12289&&($.$$scope={dirty:k,ctx:y}),i.$set($);const C={};k&2&&(C.class="form-field "+((T=y[1].options)!=null&&T.requireEmail?"required":"")),k&12291&&(C.$$scope={dirty:k,ctx:y}),o.$set(C),y[0].isNew?m&&(be(),I(m,1,1,()=>{m=null}),ve()):m?(m.p(y,k),k&1&&E(m,1)):(m=Vd(y),m.c(),E(m,1),m.m(a,u)),y[0].isNew||y[2]?b?(b.p(y,k),k&5&&E(b,1)):(b=zd(y),b.c(),E(b,1),b.m(a,null)):b&&(be(),I(b,1,1,()=>{b=null}),ve());const M={};k&12289&&(M.$$scope={dirty:k,ctx:y}),d.$set(M)},i(y){h||(E(i.$$.fragment,y),E(o.$$.fragment,y),E(m),E(b),E(d.$$.fragment,y),h=!0)},o(y){I(i.$$.fragment,y),I(o.$$.fragment,y),I(m),I(b),I(d.$$.fragment,y),h=!1},d(y){y&&w(e),H(i),H(o),m&&m.d(),b&&b.d(),H(d)}}}function X4(n,e,t){let{collection:i=new Pn}=e,{record:s=new Wi}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function h(){s.verified=this.checked,t(0,s),t(2,o)}const m=b=>{s.isNew||yn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!b.target.checked,s)})};return n.$$set=b=>{"collection"in b&&t(1,i=b.collection),"record"in b&&t(0,s=b.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),al("password"),al("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,h,m]}class Q4 extends Ce{constructor(e){super(),$e(this,e,X4,G4,ke,{collection:1,record:0})}}function x4(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)){h.preventDefault();const m=r.closest("form");m!=null&&m.requestSubmit&&m.requestSubmit()}}un(()=>(u(),()=>clearTimeout(a)));function c(h){le[h?"unshift":"push"](()=>{r=h,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ye(Ye({},e),Wn(h)),t(3,s=wt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,o=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class t3 extends Ce{constructor(e){super(),$e(this,e,e3,x4,ke,{value:0,maxHeight:4})}}function n3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(b){n[2](b)}let m={id:n[3],required:n[1].required};return n[0]!==void 0&&(m.value=n[0]),f=new t3({props:m}),le.push(()=>ye(f,"value",h)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),j(f.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),R(f,b,g),d=!0},p(b,g){(!d||g&2&&i!==(i=B.getFieldTypeIcon(b[1].type)))&&p(t,"class",i),(!d||g&2)&&o!==(o=b[1].name+"")&&ue(r,o),(!d||g&8&&a!==(a=b[3]))&&p(e,"for",a);const y={};g&8&&(y.id=b[3]),g&2&&(y.required=b[1].required),!c&&g&1&&(c=!0,y.value=b[0],Me(()=>c=!1)),f.$set(y)},i(b){d||(E(f.$$.fragment,b),d=!0)},o(b){I(f.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(u),H(f,b)}}}function i3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[n3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function s3(n,e,t){let{field:i=new fn}=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 l3 extends Ce{constructor(e){super(),$e(this,e,s3,i3,ke,{field:1,value:0})}}function o3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,b,g;return{c(){var y,k;e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),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",h=(y=n[1].options)==null?void 0:y.min),p(f,"max",m=(k=n[1].options)==null?void 0:k.max),p(f,"step","any")},m(y,k){S(y,e,k),_(e,t),_(e,s),_(e,l),_(l,r),S(y,u,k),S(y,f,k),pe(f,n[0]),b||(g=W(f,"input",n[2]),b=!0)},p(y,k){var $,C;k&2&&i!==(i=B.getFieldTypeIcon(y[1].type))&&p(t,"class",i),k&2&&o!==(o=y[1].name+"")&&ue(r,o),k&8&&a!==(a=y[3])&&p(e,"for",a),k&8&&c!==(c=y[3])&&p(f,"id",c),k&2&&d!==(d=y[1].required)&&(f.required=d),k&2&&h!==(h=($=y[1].options)==null?void 0:$.min)&&p(f,"min",h),k&2&&m!==(m=(C=y[1].options)==null?void 0:C.max)&&p(f,"max",m),k&1&&rt(f.value)!==y[0]&&pe(f,y[0])},d(y){y&&w(e),y&&w(u),y&&w(f),b=!1,g()}}}function r3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[o3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function a3(n,e,t){let{field:i=new fn}=e,{value:s=void 0}=e;function l(){s=rt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class u3 extends Ce{constructor(e){super(),$e(this,e,a3,r3,ke,{field:1,value:0})}}function f3(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=O(),s=v("label"),o=z(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){S(f,e,c),e.checked=n[0],S(f,i,c),S(f,s,c),_(s,o),a||(u=W(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+"")&&ue(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function c3(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[f3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function d3(n,e,t){let{field:i=new fn}=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 p3 extends Ce{constructor(e){super(),$e(this,e,d3,c3,ke,{field:1,value:0})}}function h3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),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(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),pe(f,n[0]),h||(m=W(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=B.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ue(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&f.value!==b[0]&&pe(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function m3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[h3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function g3(n,e,t){let{field:i=new fn}=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 _3 extends Ce{constructor(e){super(),$e(this,e,g3,m3,ke,{field:1,value:0})}}function b3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),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(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),pe(f,n[0]),h||(m=W(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=B.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ue(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&pe(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function v3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[b3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function y3(n,e,t){let{field:i=new fn}=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 k3 extends Ce{constructor(e){super(),$e(this,e,y3,v3,ke,{field:1,value:0})}}function w3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h;function m(g){n[2](g)}let b={id:n[3],options:B.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(b.formattedValue=n[0]),c=new Ka({props:b}),le.push(()=>ye(c,"formattedValue",m)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),a=z(" (UTC)"),f=O(),j(c.$$.fragment),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",u=n[3])},m(g,y){S(g,e,y),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),S(g,f,y),R(c,g,y),h=!0},p(g,y){(!h||y&2&&i!==(i=B.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!h||y&2)&&o!==(o=g[1].name+"")&&ue(r,o),(!h||y&8&&u!==(u=g[3]))&&p(e,"for",u);const k={};y&8&&(k.id=g[3]),y&1&&(k.value=g[0]),!d&&y&1&&(d=!0,k.formattedValue=g[0],Me(()=>d=!1)),c.$set(k)},i(g){h||(E(c.$$.fragment,g),h=!0)},o(g){I(c.$$.fragment,g),h=!1},d(g){g&&w(e),g&&w(f),H(c,g)}}}function S3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[w3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function $3(n,e,t){let{field:i=new fn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19))},[s,i,l]}class C3 extends Ce{constructor(e){super(),$e(this,e,$3,S3,ke,{field:1,value:0})}}function Bd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=z("Select up to "),s=z(i),l=z(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&ue(s,i)},d(o){o&&w(e)}}}function M3(n){var k,$,C;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function b(M){n[3](M)}let g={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(k=n[1].options)==null?void 0:k.values,searchable:(($=n[1].options)==null?void 0:$.values)>5};n[0]!==void 0&&(g.selected=n[0]),f=new C_({props:g}),le.push(()=>ye(f,"selected",b));let y=((C=n[1].options)==null?void 0:C.maxSelect)>1&&Bd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Fe(),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,T){S(M,e,T),_(e,t),_(e,s),_(e,l),_(l,r),S(M,u,T),R(f,M,T),S(M,d,T),y&&y.m(M,T),S(M,h,T),m=!0},p(M,T){var A,P,L;(!m||T&2&&i!==(i=B.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!m||T&2)&&o!==(o=M[1].name+"")&&ue(r,o),(!m||T&16&&a!==(a=M[4]))&&p(e,"for",a);const D={};T&16&&(D.id=M[4]),T&6&&(D.toggle=!M[1].required||M[2]),T&4&&(D.multiple=M[2]),T&2&&(D.items=(A=M[1].options)==null?void 0:A.values),T&2&&(D.searchable=((P=M[1].options)==null?void 0:P.values)>5),!c&&T&1&&(c=!0,D.selected=M[0],Me(()=>c=!1)),f.$set(D),((L=M[1].options)==null?void 0:L.maxSelect)>1?y?y.p(M,T):(y=Bd(M),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(M){m||(E(f.$$.fragment,M),m=!0)},o(M){I(f.$$.fragment,M),m=!1},d(M){M&&w(e),M&&w(u),H(f,M),M&&w(d),y&&y.d(M),M&&w(h)}}}function T3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[M3,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function O3(n,e,t){let i,{field:s=new fn}=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 D3 extends Ce{constructor(e){super(),$e(this,e,O3,T3,ke,{field:1,value:0})}}function E3(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),f=v("textarea"),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono")},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),pe(f,n[0]),h||(m=W(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=B.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ue(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&pe(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function A3(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[E3,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function I3(n,e,t){let{field:i=new fn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class P3 extends Ce{constructor(e){super(),$e(this,e,I3,A3,ke,{field:1,value:0})}}function L3(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&w(e)}}}function N3(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&w(e)}}}function F3(n){let e;function t(l,o){return l[2]?N3:L3}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&w(e)}}}function R3(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),B.hasImageExtension(s==null?void 0:s.name)&&B.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class H3 extends Ce{constructor(e){super(),$e(this,e,R3,F3,ke,{file:0,size:1})}}function j3(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&w(e)}}}function q3(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=W(e,"click",ut(n[0])),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function V3(n){let e,t=n[2].substring(n[2].lastIndexOf("/")+1)+"",i,s,l,o,r,a,u;return{c(){e=v("a"),i=z(t),s=O(),l=v("div"),o=O(),r=v("button"),r.textContent="Close",p(e,"href",n[2]),p(e,"title","Download"),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis"),p(l,"class","flex-fill"),p(r,"type","button"),p(r,"class","btn btn-secondary")},m(f,c){S(f,e,c),_(e,i),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=W(r,"click",n[0]),a=!0)},p(f,c){c&4&&t!==(t=f[2].substring(f[2].lastIndexOf("/")+1)+"")&&ue(i,t),c&4&&p(e,"href",f[2])},d(f){f&&w(e),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,u()}}}function z3(n){let e,t,i={class:"image-preview",btnClose:!1,popup:!0,$$slots:{footer:[V3],header:[q3],default:[j3]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&132&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[4](null),H(e,s)}}}function B3(n,e,t){let i,s="";function l(f){f!==""&&(t(2,s=f),i==null||i.show())}function o(){return i==null?void 0:i.hide()}function r(f){le[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){Ve.call(this,n,f)}function u(f){Ve.call(this,n,f)}return[o,i,s,l,r,a,u]}class U3 extends Ce{constructor(e){super(),$e(this,e,B3,z3,ke,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function W3(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-line")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function Y3(n){let e,t,i,s,l;return{c(){e=v("img"),Ln(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),ee(e,"link-fade",n[2])},m(o,r){S(o,e,r),s||(l=[W(e,"click",n[7]),W(e,"error",n[5])],s=!0)},p(o,r){r&16&&!Ln(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i),r&4&&ee(e,"link-fade",o[2])},d(o){o&&w(e),s=!1,Re(l)}}}function K3(n){let e,t,i;function s(a,u){return a[2]?Y3:W3}let l=s(n),o=l(n),r={};return t=new U3({props:r}),n[8](t),{c(){o.c(),e=O(),j(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),R(t,a,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const f={};t.$set(f)},i(a){i||(E(t.$$.fragment,a),i=!0)},o(a){I(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[8](null),H(t,a)}}}function J3(n,e,t){let i,{record:s}=e,{filename:l}=e,o,r="",a="";function u(){t(4,r="")}const f=d=>{d.stopPropagation(),o==null||o.show(a)};function c(d){le[d?"unshift":"push"](()=>{o=d,t(3,o)})}return n.$$set=d=>{"record"in d&&t(6,s=d.record),"filename"in d&&t(0,l=d.filename)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=B.hasImageExtension(l)),n.$$.dirty&69&&i&&t(1,a=me.getFileUrl(s,`${l}`)),n.$$.dirty&2&&t(4,r=a?a+"?thumb=100x100":"")},[l,a,i,o,r,u,s,f,c]}class D_ extends Ce{constructor(e){super(),$e(this,e,J3,K3,ke,{record:6,filename:0})}}function Ud(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function Wd(n,e,t){const i=n.slice();return i[25]=e[t],i[24]=t,i}function Z3(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,o){S(l,e,o),t||(i=[Le(Be.call(null,e,"Remove file")),W(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Re(i)}}}function G3(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,o){S(l,e,o),t||(i=W(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Yd(n,e){let t,i,s,l,o,r=e[25]+"",a,u,f,c,d,h,m;s=new D_({props:{record:e[2],filename:e[25]}});function b(k,$){return $&18&&(c=null),c==null&&(c=!!k[1].includes(k[24])),c?G3:Z3}let g=b(e,-1),y=g(e);return{key:n,first:null,c(){t=v("div"),i=v("figure"),j(s.$$.fragment),l=O(),o=v("a"),a=z(r),f=O(),y.c(),p(i,"class","thumb"),ee(i,"fade",e[1].includes(e[24])),p(o,"href",u=me.getFileUrl(e[2],e[25])),p(o,"class","filename link-hint"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),ee(o,"txt-strikethrough",e[1].includes(e[24])),p(t,"class","list-item"),this.first=t},m(k,$){S(k,t,$),_(t,i),R(s,i,null),_(t,l),_(t,o),_(o,a),_(t,f),y.m(t,null),d=!0,h||(m=Le(Be.call(null,o,{position:"right",text:"Download"})),h=!0)},p(k,$){e=k;const C={};$&4&&(C.record=e[2]),$&16&&(C.filename=e[25]),s.$set(C),(!d||$&18)&&ee(i,"fade",e[1].includes(e[24])),(!d||$&16)&&r!==(r=e[25]+"")&&ue(a,r),(!d||$&20&&u!==(u=me.getFileUrl(e[2],e[25])))&&p(o,"href",u),(!d||$&18)&&ee(o,"txt-strikethrough",e[1].includes(e[24])),g===(g=b(e,$))&&y?y.p(e,$):(y.d(1),y=g(e),y&&(y.c(),y.m(t,null)))},i(k){d||(E(s.$$.fragment,k),d=!0)},o(k){I(s.$$.fragment,k),d=!1},d(k){k&&w(t),H(s),y.d(),h=!1,m()}}}function Kd(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,h,m,b,g;i=new H3({props:{file:n[22]}});function y(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),j(i.$$.fragment),s=O(),l=v("div"),o=v("small"),o.textContent="New",r=O(),a=v("span"),f=z(u),d=O(),h=v("button"),h.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[22].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(k,$){S(k,e,$),_(e,t),R(i,t,null),_(e,s),_(e,l),_(l,o),_(l,r),_(l,a),_(a,f),_(e,d),_(e,h),m=!0,b||(g=[Le(Be.call(null,h,"Remove file")),W(h,"click",y)],b=!0)},p(k,$){n=k;const C={};$&1&&(C.file=n[22]),i.$set(C),(!m||$&1)&&u!==(u=n[22].name+"")&&ue(f,u),(!m||$&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(k){m||(E(i.$$.fragment,k),m=!0)},o(k){I(i.$$.fragment,k),m=!1},d(k){k&&w(e),H(i),b=!1,Re(g)}}}function Jd(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=O(),s=v("button"),s.innerHTML=` + Upload new file`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(r,a){S(r,e,a),_(e,t),n[16](t),_(e,i),_(e,s),l||(o=[W(t,"change",n[17]),W(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&w(e),n[16](null),l=!1,Re(o)}}}function X3(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,h,m,b,g=n[4];const y=T=>T[25];for(let T=0;TI($[T],1,1,()=>{$[T]=null});let M=!n[8]&&Jd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),f=v("div");for(let T=0;T({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function x3(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new fn}=e,c,d;function h(A){B.removeByValue(u,A),t(1,u)}function m(A){B.pushUnique(u,A),t(1,u)}function b(A){B.isEmpty(a[A])||a.splice(A,1),t(0,a)}function g(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=A=>h(A),k=A=>m(A),$=A=>b(A);function C(A){le[A?"unshift":"push"](()=>{c=A,t(6,c)})}const M=()=>{for(let A of c.files)a.push(A);t(0,a),t(6,c.value=null,c)},T=()=>c==null?void 0:c.click();function D(A){le[A?"unshift":"push"](()=>{d=A,t(7,d)})}return n.$$set=A=>{"record"in A&&t(2,o=A.record),"value"in A&&t(12,r=A.value),"uploadedFiles"in A&&t(0,a=A.uploadedFiles),"deletedFileIndexes"in A&&t(1,u=A.deletedFileIndexes),"field"in A&&t(3,f=A.field)},n.$$.update=()=>{var A,P;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=B.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=B.toArray(u))),n.$$.dirty&8&&t(5,i=((A=f.options)==null?void 0:A.maxSelect)>1),n.$$.dirty&4128&&B.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=B.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((P=f.options)==null?void 0:P.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&g()},[a,u,o,f,s,i,c,d,l,h,m,b,r,y,k,$,C,M,T,D]}class eM extends Ce{constructor(e){super(),$e(this,e,x3,Q3,ke,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function Zd(n){let e,t;return{c(){e=v("small"),t=z(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&2&&ue(t,i[1])},d(i){i&&w(e)}}}function tM(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&Zd(n);return{c(){e=v("i"),i=O(),s=v("div"),l=v("div"),r=z(o),a=O(),c&&c.c(),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(s,"class","content svelte-1gjwqyd")},m(d,h){S(d,e,h),S(d,i,h),S(d,s,h),_(s,l),_(l,r),_(s,a),c&&c.m(s,null),u||(f=Le(t=Be.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Wt(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&o!==(o=d[0].id+"")&&ue(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=Zd(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:x,o:x,d(d){d&&w(e),d&&w(i),d&&w(s),c&&c.d(),u=!1,f()}}}function nM(n,e,t){let i;const s=["id","created","updated","@collectionId","@collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["title","name","email","username","label","key","heading","content","description",...Object.keys(r)];for(const u of a)if(typeof r[u]=="string"&&!B.isEmpty(r[u])&&!s.includes(u))return u+": "+r[u];return""}return n.$$set=r=>{"item"in r&&t(0,l=r.item)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=o(l))},[l,i]}class iM extends Ce{constructor(e){super(),$e(this,e,nM,tM,ke,{item:0})}}function Gd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='New record',p(e,"type","button"),p(e,"class","btn btn-warning btn-block btn-sm m-t-5")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[17]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function Xd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Load more',p(e,"type","button"),p(e,"class","btn btn-block btn-sm m-t-5"),ee(e,"btn-loading",n[6]),ee(e,"btn-disabled",n[6])},m(s,l){S(s,e,l),t||(i=W(e,"click",Yn(n[18])),t=!0)},p(s,l){l&64&&ee(e,"btn-loading",s[6]),l&64&&ee(e,"btn-disabled",s[6])},d(s){s&&w(e),t=!1,i()}}}function sM(n){let e,t,i=!n[7]&&n[8]&&Gd(n),s=n[10]&&Xd(n);return{c(){i&&i.c(),e=O(),s&&s.c(),t=Fe()},m(l,o){i&&i.m(l,o),S(l,e,o),s&&s.m(l,o),S(l,t,o)},p(l,o){!l[7]&&l[8]?i?i.p(l,o):(i=Gd(l),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),l[10]?s?s.p(l,o):(s=Xd(l),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null)},d(l){i&&i.d(l),l&&w(e),s&&s.d(l),l&&w(t)}}}function lM(n){let e,t,i,s,l,o;const r=[{selectPlaceholder:n[11]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:n[4]},{disabled:n[11]},{optionComponent:n[4]},{multiple:n[2]},{class:"records-select block-options"},n[13]];function a(d){n[19](d)}function u(d){n[20](d)}let f={$$slots:{afterOptions:[sM]},$$scope:{ctx:n}};for(let d=0;dye(e,"keyOfSelected",a)),le.push(()=>ye(e,"selected",u)),e.$on("show",n[21]),e.$on("hide",n[22]);let c={collection:n[8]};return l=new E_({props:c}),n[23](l),l.$on("save",n[24]),{c(){j(e.$$.fragment),s=O(),j(l.$$.fragment)},m(d,h){R(e,d,h),S(d,s,h),R(l,d,h),o=!0},p(d,[h]){const m=h&10300?Yt(r,[h&2056&&{selectPlaceholder:d[11]?"Loading...":d[3]},h&32&&{items:d[5]},h&32&&{searchable:d[5].length>5},r[3],h&16&&{labelComponent:d[4]},h&2048&&{disabled:d[11]},h&16&&{optionComponent:d[4]},h&4&&{multiple:d[2]},r[8],h&8192&&Kn(d[13])]):{};h&536872896&&(m.$$scope={dirty:h,ctx:d}),!t&&h&2&&(t=!0,m.keyOfSelected=d[1],Me(()=>t=!1)),!i&&h&1&&(i=!0,m.selected=d[0],Me(()=>i=!1)),e.$set(m);const b={};h&256&&(b.collection=d[8]),l.$set(b)},i(d){o||(E(e.$$.fragment,d),E(l.$$.fragment,d),o=!0)},o(d){I(e.$$.fragment,d),I(l.$$.fragment,d),o=!1},d(d){H(e,d),d&&w(s),n[23](null),H(l,d)}}}function oM(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent","collectionId"];let o=wt(e,l);const r="select_"+B.randomString(5);let{multiple:a=!1}=e,{selected:u=[]}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=iM}=e,{collectionId:h}=e,m=[],b=1,g=0,y=!1,k=!1,$=!1,C=null,M;async function T(){if(!h){t(8,C=null),t(7,$=!1);return}t(7,$=!0);try{t(8,C=await me.collections.getOne(h,{$cancelKey:"collection_"+r}))}catch(Z){me.errorResponseHandler(Z)}t(7,$=!1)}async function D(){const Z=B.toArray(f);if(!h||!Z.length)return;t(16,k=!0);let ie=[];const J=Z.slice(),fe=[];for(;J.length>0;){const Y=[];for(const re of J.splice(0,50))Y.push(`id="${re}"`);fe.push(me.collection(h).getFullList(200,{filter:Y.join("||"),$autoCancel:!1}))}try{await Promise.all(fe).then(Y=>{ie=ie.concat(...Y)}),t(0,u=[]);for(const Y of Z){const re=B.findByKey(ie,"id",Y);re&&u.push(re)}t(5,m=B.filterDuplicatesByKey(u.concat(m)))}catch(Y){me.errorResponseHandler(Y)}t(16,k=!1)}async function A(Z=!1){if(!!h){t(6,y=!0);try{const ie=Z?1:b+1,J=await me.collection(h).getList(ie,200,{sort:"-created",$cancelKey:r+"loadList"});Z&&t(5,m=B.toArray(u).slice()),t(5,m=B.filterDuplicatesByKey(m.concat(J.items,B.toArray(u)))),b=J.page,t(15,g=J.totalItems)}catch(ie){me.errorResponseHandler(ie)}t(6,y=!1)}}const P=()=>M==null?void 0:M.show(),L=()=>A();function V(Z){f=Z,t(1,f)}function F(Z){u=Z,t(0,u)}function U(Z){Ve.call(this,n,Z)}function G(Z){Ve.call(this,n,Z)}function K(Z){le[Z?"unshift":"push"](()=>{M=Z,t(9,M)})}const X=Z=>{var ie;(ie=Z==null?void 0:Z.detail)!=null&&ie.id&&t(1,f=B.toArray(f).concat(Z.detail.id)),A(!0)};return n.$$set=Z=>{e=Ye(Ye({},e),Wn(Z)),t(13,o=wt(e,l)),"multiple"in Z&&t(2,a=Z.multiple),"selected"in Z&&t(0,u=Z.selected),"keyOfSelected"in Z&&t(1,f=Z.keyOfSelected),"selectPlaceholder"in Z&&t(3,c=Z.selectPlaceholder),"optionComponent"in Z&&t(4,d=Z.optionComponent),"collectionId"in Z&&t(14,h=Z.collectionId)},n.$$.update=()=>{n.$$.dirty&16384&&h&&(T(),D().then(()=>{A(!0)})),n.$$.dirty&65600&&t(11,i=y||k),n.$$.dirty&32800&&t(10,s=g>m.length)},[u,f,a,c,d,m,y,$,C,M,s,i,A,o,h,g,k,P,L,V,F,U,G,K,X]}class rM extends Ce{constructor(e){super(),$e(this,e,oM,lM,ke,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4,collectionId:14})}}function Qd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=z("Select up to "),s=z(i),l=z(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&ue(s,i)},d(o){o&&w(e)}}}function aM(n){var k,$;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function b(C){n[3](C)}let g={toggle:!0,id:n[4],multiple:n[2],collectionId:(k=n[1].options)==null?void 0:k.collectionId};n[0]!==void 0&&(g.keyOfSelected=n[0]),f=new rM({props:g}),le.push(()=>ye(f,"keyOfSelected",b));let y=(($=n[1].options)==null?void 0:$.maxSelect)>1&&Qd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=z(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Fe(),p(t,"class",i=B.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(C,M){S(C,e,M),_(e,t),_(e,s),_(e,l),_(l,r),S(C,u,M),R(f,C,M),S(C,d,M),y&&y.m(C,M),S(C,h,M),m=!0},p(C,M){var D,A;(!m||M&2&&i!==(i=B.getFieldTypeIcon(C[1].type)))&&p(t,"class",i),(!m||M&2)&&o!==(o=C[1].name+"")&&ue(r,o),(!m||M&16&&a!==(a=C[4]))&&p(e,"for",a);const T={};M&16&&(T.id=C[4]),M&4&&(T.multiple=C[2]),M&2&&(T.collectionId=(D=C[1].options)==null?void 0:D.collectionId),!c&&M&1&&(c=!0,T.keyOfSelected=C[0],Me(()=>c=!1)),f.$set(T),((A=C[1].options)==null?void 0:A.maxSelect)>1?y?y.p(C,M):(y=Qd(C),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(C){m||(E(f.$$.fragment,C),m=!0)},o(C){I(f.$$.fragment,C),m=!1},d(C){C&&w(e),C&&w(u),H(f,C),C&&w(d),y&&y.d(C),C&&w(h)}}}function uM(n){let e,t;return e=new _e({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[aM,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function fM(n,e,t){let i,{field:s=new fn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r,a;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)!=1),n.$$.dirty&7&&i&&Array.isArray(l)&&((a=s.options)==null?void 0:a.maxSelect)&&l.length>s.options.maxSelect&&t(0,l=l.slice(s.options.maxSelect-1))},[l,s,i,o]}class cM extends Ce{constructor(e){super(),$e(this,e,fM,uM,ke,{field:1,value:0})}}function dM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Auth URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].authUrl),r||(a=W(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&&pe(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function pM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Token URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].tokenUrl),r||(a=W(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&&pe(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function hM(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("User API URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].userApiUrl),r||(a=W(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&&pe(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function mM(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new _e({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[dM,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[pM,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),c=new _e({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[hM,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),u=O(),f=v("div"),j(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-4"),p(r,"class","col-lg-4"),p(f,"class","col-lg-4"),p(i,"class","grid")},m(h,m){S(h,e,m),S(h,t,m),S(h,i,m),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),_(i,u),_(i,f),R(c,f,null),d=!0},p(h,[m]){const b={};m&2&&(b.name=h[1]+".authUrl"),m&97&&(b.$$scope={dirty:m,ctx:h}),l.$set(b);const g={};m&2&&(g.name=h[1]+".tokenUrl"),m&97&&(g.$$scope={dirty:m,ctx:h}),a.$set(g);const y={};m&2&&(y.name=h[1]+".userApiUrl"),m&97&&(y.$$scope={dirty:m,ctx:h}),c.$set(y)},i(h){d||(E(l.$$.fragment,h),E(a.$$.fragment,h),E(c.$$.fragment,h),d=!0)},o(h){I(l.$$.fragment,h),I(a.$$.fragment,h),I(c.$$.fragment,h),d=!1},d(h){h&&w(e),h&&w(t),h&&w(i),H(l),H(a),H(c)}}}function gM(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 _M extends Ce{constructor(e){super(),$e(this,e,gM,mM,ke,{key:1,config:0})}}function bM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Auth URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize"),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),pe(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=W(l,"input",n[2]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&pe(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function vM(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=z("Token URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","text"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token"),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),pe(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=W(l,"input",n[3]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&pe(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function yM(n){let e,t,i,s,l,o,r,a,u;return l=new _e({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[bM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[vM,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(i,"class","grid")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),u=!0},p(f,[c]){const d={};c&2&&(d.name=f[1]+".authUrl"),c&49&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const h={};c&2&&(h.name=f[1]+".tokenUrl"),c&49&&(h.$$scope={dirty:c,ctx:f}),a.$set(h)},i(f){u||(E(l.$$.fragment,f),E(a.$$.fragment,f),u=!0)},o(f){I(l.$$.fragment,f),I(a.$$.fragment,f),u=!1},d(f){f&&w(e),f&&w(t),f&&w(i),H(l),H(a)}}}function kM(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 wM extends Ce{constructor(e){super(),$e(this,e,kM,yM,ke,{key:1,config:0})}}const gl={googleAuth:{title:"Google",icon:"ri-google-fill"},facebookAuth:{title:"Facebook",icon:"ri-facebook-fill"},twitterAuth:{title:"Twitter",icon:"ri-twitter-fill"},githubAuth:{title:"GitHub",icon:"ri-github-fill"},gitlabAuth:{title:"GitLab",icon:"ri-gitlab-fill",optionsComponent:_M},discordAuth:{title:"Discord",icon:"ri-discord-fill"},microsoftAuth:{title:"Microsoft",icon:"ri-microsoft-fill",optionsComponent:wM},spotifyAuth:{title:"Spotify",icon:"ri-spotify-fill"}};function xd(n,e,t){const i=n.slice();return i[9]=e[t],i}function SM(n){let e;return{c(){e=v("p"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function $M(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function ep(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,h,m,b,g,y;function k(){return n[6](n[9])}return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=z(o),a=O(),u=v("div"),f=z("ID: "),d=z(c),h=O(),m=v("button"),m.innerHTML='',b=O(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(m,"type","button"),p(m,"class","btn btn-secondary link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m($,C){S($,e,C),_(e,t),_(e,s),_(e,l),_(l,r),_(e,a),_(e,u),_(u,f),_(u,d),_(e,h),_(e,m),_(e,b),g||(y=W(m,"click",k),g=!0)},p($,C){n=$,C&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&ue(r,o),C&2&&c!==(c=n[9].providerId+"")&&ue(d,c)},d($){$&&w(e),g=!1,y()}}}function MM(n){let e;function t(l,o){var r;return l[2]?CM:((r=l[0])==null?void 0:r.id)&&l[1].length?$M:SM}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&w(e)}}}function TM(n,e,t){const i=It();let{record:s}=e,l=[],o=!1;function r(d){var h;return((h=gl[d+"Auth"])==null?void 0:h.title)||B.sentenize(d,!1)}function a(d){var h;return((h=gl[d+"Auth"])==null?void 0:h.icon)||`ri-${d}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await me.collection(s.collectionId).listExternalAuths(s.id))}catch(d){me.errorResponseHandler(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||yn(`Do you really want to unlink the ${r(d)} provider?`,()=>me.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{Lt(`Successfully unlinked the ${r(d)} provider.`),i("unlink",d),u()}).catch(h=>{me.errorResponseHandler(h)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class OM extends Ce{constructor(e){super(),$e(this,e,TM,MM,ke,{record:0})}}function tp(n,e,t){const i=n.slice();return i[46]=e[t],i[47]=e,i[48]=t,i}function np(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[DM,({uniqueId:i})=>({49:i}),({uniqueId:i})=>[0,i?262144:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&786432&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function DM(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",l=O(),o=v("span"),a=O(),u=v("div"),f=v("i"),d=O(),h=v("input"),p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[49]),p(f,"class","ri-calendar-event-line txt-disabled"),p(u,"class","form-field-addon"),p(h,"type","text"),p(h,"id",m=n[49]),h.value=b=n[2].id,h.readOnly=!0},m(k,$){S(k,e,$),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),S(k,a,$),S(k,u,$),_(u,f),S(k,d,$),S(k,h,$),g||(y=Le(c=Be.call(null,f,{text:`Created: ${n[2].created} +Updated: ${n[2].updated}`,position:"left"})),g=!0)},p(k,$){$[1]&262144&&r!==(r=k[49])&&p(e,"for",r),c&&Wt(c.update)&&$[0]&4&&c.update.call(null,{text:`Created: ${k[2].created} +Updated: ${k[2].updated}`,position:"left"}),$[1]&262144&&m!==(m=k[49])&&p(h,"id",m),$[0]&4&&b!==(b=k[2].id)&&h.value!==b&&(h.value=b)},d(k){k&&w(e),k&&w(a),k&&w(u),k&&w(d),k&&w(h),g=!1,y()}}}function ip(n){let e,t,i,s,l;function o(a){n[26](a)}let r={collection:n[0]};return n[2]!==void 0&&(r.record=n[2]),e=new Q4({props:r}),le.push(()=>ye(e,"record",o)),{c(){j(e.$$.fragment),i=O(),s=v("hr")},m(a,u){R(e,a,u),S(a,i,u),S(a,s,u),l=!0},p(a,u){const f={};u[0]&1&&(f.collection=a[0]),!t&&u[0]&4&&(t=!0,f.record=a[2],Me(()=>t=!1)),e.$set(f)},i(a){l||(E(e.$$.fragment,a),l=!0)},o(a){I(e.$$.fragment,a),l=!1},d(a){H(e,a),a&&w(i),a&&w(s)}}}function sp(n){let e;return{c(){e=v("div"),e.innerHTML=`
    No custom fields to be set
    + `,p(e,"class","block txt-center txt-disabled")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function EM(n){let e,t,i;function s(o){n[38](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new cM({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function AM(n){let e,t,i,s,l;function o(f){n[35](f,n[46])}function r(f){n[36](f,n[46])}function a(f){n[37](f,n[46])}let u={field:n[46],record:n[2]};return n[2][n[46].name]!==void 0&&(u.value=n[2][n[46].name]),n[3][n[46].name]!==void 0&&(u.uploadedFiles=n[3][n[46].name]),n[4][n[46].name]!==void 0&&(u.deletedFileIndexes=n[4][n[46].name]),e=new eM({props:u}),le.push(()=>ye(e,"value",o)),le.push(()=>ye(e,"uploadedFiles",r)),le.push(()=>ye(e,"deletedFileIndexes",a)),{c(){j(e.$$.fragment)},m(f,c){R(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[46]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[46].name],Me(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[46].name],Me(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[46].name],Me(()=>s=!1)),e.$set(d)},i(f){l||(E(e.$$.fragment,f),l=!0)},o(f){I(e.$$.fragment,f),l=!1},d(f){H(e,f)}}}function IM(n){let e,t,i;function s(o){n[34](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new P3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function PM(n){let e,t,i;function s(o){n[33](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new D3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function LM(n){let e,t,i;function s(o){n[32](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new C3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function NM(n){let e,t,i;function s(o){n[31](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new k3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function FM(n){let e,t,i;function s(o){n[30](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new _3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function RM(n){let e,t,i;function s(o){n[29](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new p3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function HM(n){let e,t,i;function s(o){n[28](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new u3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function jM(n){let e,t,i;function s(o){n[27](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new l3({props:l}),le.push(()=>ye(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],Me(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){I(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function lp(n,e){let t,i,s,l,o;const r=[jM,HM,RM,FM,NM,LM,PM,IM,AM,EM],a=[];function u(f,c){return f[46].type==="text"?0:f[46].type==="number"?1:f[46].type==="bool"?2:f[46].type==="email"?3:f[46].type==="url"?4:f[46].type==="date"?5:f[46].type==="select"?6:f[46].type==="json"?7:f[46].type==="file"?8:f[46].type==="relation"?9:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Fe(),s&&s.c(),l=Fe(),this.first=t},m(f,c){S(f,t,c),~i&&a[i].m(f,c),S(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(be(),I(a[d],1,1,()=>{a[d]=null}),ve()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),E(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(E(s),o=!0)},o(f){I(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function op(n){let e,t,i;return t=new OM({props:{record:n[2]}}),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ee(e,"active",n[10]===_l)},m(s,l){S(s,e,l),R(t,e,null),i=!0},p(s,l){const o={};l[0]&4&&(o.record=s[2]),t.$set(o),(!i||l[0]&1024)&&ee(e,"active",s[10]===_l)},i(s){i||(E(t.$$.fragment,s),i=!0)},o(s){I(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function qM(n){var y,k;let e,t,i,s,l=[],o=new Map,r,a,u,f,c=!n[2].isNew&&np(n),d=((y=n[0])==null?void 0:y.isAuth)&&ip(n),h=((k=n[0])==null?void 0:k.schema)||[];const m=$=>$[46].name;for(let $=0;${c=null}),ve()):c?(c.p($,C),C[0]&4&&E(c,1)):(c=np($),c.c(),E(c,1),c.m(t,i)),(M=$[0])!=null&&M.isAuth?d?(d.p($,C),C[0]&1&&E(d,1)):(d=ip($),d.c(),E(d,1),d.m(t,s)):d&&(be(),I(d,1,1,()=>{d=null}),ve()),C[0]&29&&(h=((T=$[0])==null?void 0:T.schema)||[],be(),l=bt(l,C,m,1,$,h,o,t,xt,lp,null,tp),ve(),!h.length&&b?b.p($,C):h.length?b&&(b.d(1),b=null):(b=sp(),b.c(),b.m(t,null))),(!a||C[0]&1024)&&ee(t,"active",$[10]===Ui),$[0].isAuth&&!$[2].isNew?g?(g.p($,C),C[0]&5&&E(g,1)):(g=op($),g.c(),E(g,1),g.m(e,null)):g&&(be(),I(g,1,1,()=>{g=null}),ve())},i($){if(!a){E(c),E(d);for(let C=0;C + Send verification email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[21]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function up(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Send password reset email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[22]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function VM(n){let e,t,i,s,l,o=n[0].isAuth&&!n[7].verified&&n[7].email&&ap(n),r=n[0].isAuth&&n[7].email&&up(n);return{c(){o&&o.c(),e=O(),r&&r.c(),t=O(),i=v("button"),i.innerHTML=` + Delete`,p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(a,u){o&&o.m(a,u),S(a,e,u),r&&r.m(a,u),S(a,t,u),S(a,i,u),s||(l=W(i,"click",Yn(ut(n[23]))),s=!0)},p(a,u){a[0].isAuth&&!a[7].verified&&a[7].email?o?o.p(a,u):(o=ap(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),a[0].isAuth&&a[7].email?r?r.p(a,u):(r=up(a),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(a){o&&o.d(a),a&&w(e),r&&r.d(a),a&&w(t),a&&w(i),s=!1,l()}}}function fp(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=O(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),ee(t,"active",n[10]===Ui),p(s,"type","button"),p(s,"class","tab-item"),ee(s,"active",n[10]===_l),p(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(e,s),l||(o=[W(t,"click",n[24]),W(s,"click",n[25])],l=!0)},p(r,a){a[0]&1024&&ee(t,"active",r[10]===Ui),a[0]&1024&&ee(s,"active",r[10]===_l)},d(r){r&&w(e),l=!1,Re(o)}}}function zM(n){var b;let e,t=n[2].isNew?"New":"Edit",i,s,l,o=((b=n[0])==null?void 0:b.name)+"",r,a,u,f,c,d,h=!n[2].isNew&&rp(n),m=n[0].isAuth&&!n[2].isNew&&fp(n);return{c(){e=v("h4"),i=z(t),s=O(),l=v("strong"),r=z(o),a=z(" record"),u=O(),h&&h.c(),f=O(),m&&m.c(),c=Fe()},m(g,y){S(g,e,y),_(e,i),_(e,s),_(e,l),_(l,r),_(e,a),S(g,u,y),h&&h.m(g,y),S(g,f,y),m&&m.m(g,y),S(g,c,y),d=!0},p(g,y){var k;(!d||y[0]&4)&&t!==(t=g[2].isNew?"New":"Edit")&&ue(i,t),(!d||y[0]&1)&&o!==(o=((k=g[0])==null?void 0:k.name)+"")&&ue(r,o),g[2].isNew?h&&(be(),I(h,1,1,()=>{h=null}),ve()):h?(h.p(g,y),y[0]&4&&E(h,1)):(h=rp(g),h.c(),E(h,1),h.m(f.parentNode,f)),g[0].isAuth&&!g[2].isNew?m?m.p(g,y):(m=fp(g),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(g){d||(E(h),d=!0)},o(g){I(h),d=!1},d(g){g&&w(e),g&&w(u),h&&h.d(g),g&&w(f),m&&m.d(g),g&&w(c)}}}function BM(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=z(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[8],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[12]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[8],ee(s,"btn-loading",n[8])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=W(e,"click",n[20]),u=!0)},p(c,d){d[0]&256&&(e.disabled=c[8]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ue(r,o),d[0]&2304&&a!==(a=!c[11]||c[8])&&(s.disabled=a),d[0]&256&&ee(s,"btn-loading",c[8])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,f()}}}function UM(n){var s;let e,t,i={class:"overlay-panel-lg record-panel "+(((s=n[0])==null?void 0:s.isAuth)&&!n[2].isNew?"colored-header":""),beforeHide:n[39],$$slots:{footer:[BM],header:[zM],default:[qM]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[40](e),e.$on("hide",n[41]),e.$on("show",n[42]),{c(){j(e.$$.fragment)},m(l,o){R(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&5&&(r.class="overlay-panel-lg record-panel "+(((a=l[0])==null?void 0:a.isAuth)&&!l[2].isNew?"colored-header":"")),o[0]&544&&(r.beforeHide=l[39]),o[0]&3485|o[1]&524288&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(E(e.$$.fragment,l),t=!0)},o(l){I(e.$$.fragment,l),t=!1},d(l){n[40](null),H(e,l)}}}const Ui="form",_l="providers";function cp(n){return JSON.stringify(n)}function WM(n,e,t){let i,s,l;const o=It(),r="record_"+B.randomString(5);let{collection:a}=e,u,f=null,c=new Wi,d=!1,h=!1,m={},b={},g="",y=Ui;function k(te){return C(te),t(9,h=!0),t(10,y=Ui),u==null?void 0:u.show()}function $(){return u==null?void 0:u.hide()}async function C(te){Fn({}),t(7,f=te||{}),te!=null&&te.clone?t(2,c=te.clone()):t(2,c=new Wi),t(3,m={}),t(4,b={}),await $n(),t(18,g=cp(c))}function M(){if(d||!l||!(a!=null&&a.id))return;t(8,d=!0);const te=D();let ne;c.isNew?ne=me.collection(a.id).create(te):ne=me.collection(a.id).update(c.id,te),ne.then(Ee=>{Lt(c.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),$(),o("save",Ee)}).catch(Ee=>{me.errorResponseHandler(Ee)}).finally(()=>{t(8,d=!1)})}function T(){!(f!=null&&f.id)||yn("Do you really want to delete the selected record?",()=>me.collection(f.collectionId).delete(f.id).then(()=>{$(),Lt("Successfully deleted record."),o("delete",f)}).catch(te=>{me.errorResponseHandler(te)}))}function D(){const te=(c==null?void 0:c.export())||{},ne=new FormData,Ee={};for(const it of(a==null?void 0:a.schema)||[])Ee[it.name]=!0;a!=null&&a.isAuth&&(Ee.username=!0,Ee.email=!0,Ee.emailVisibility=!0,Ee.password=!0,Ee.passwordConfirm=!0,Ee.verified=!0);for(const it in te)!Ee[it]||(typeof te[it]>"u"&&(te[it]=null),B.addValueToFormData(ne,it,te[it]));for(const it in m){const en=B.toArray(m[it]);for(const Kt of en)ne.append(it,Kt)}for(const it in b){const en=B.toArray(b[it]);for(const Kt of en)ne.append(it+"."+Kt,"")}return ne}function A(){!(a!=null&&a.id)||!(f!=null&&f.email)||yn(`Do you really want to sent verification email to ${f.email}?`,()=>me.collection(a.id).requestVerification(f.email).then(()=>{Lt(`Successfully sent verification email to ${f.email}.`)}).catch(te=>{me.errorResponseHandler(te)}))}function P(){!(a!=null&&a.id)||!(f!=null&&f.email)||yn(`Do you really want to sent password reset email to ${f.email}?`,()=>me.collection(a.id).requestPasswordReset(f.email).then(()=>{Lt(`Successfully sent password reset email to ${f.email}.`)}).catch(te=>{me.errorResponseHandler(te)}))}const L=()=>$(),V=()=>A(),F=()=>P(),U=()=>T(),G=()=>t(10,y=Ui),K=()=>t(10,y=_l);function X(te){c=te,t(2,c)}function Z(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function ie(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function J(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function fe(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function Y(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function re(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function Oe(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function ge(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function ae(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}function he(te,ne){n.$$.not_equal(m[ne.name],te)&&(m[ne.name]=te,t(3,m))}function de(te,ne){n.$$.not_equal(b[ne.name],te)&&(b[ne.name]=te,t(4,b))}function Se(te,ne){n.$$.not_equal(c[ne.name],te)&&(c[ne.name]=te,t(2,c))}const we=()=>s&&h?(yn("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),$()}),!1):(Fn({}),!0);function Ue(te){le[te?"unshift":"push"](()=>{u=te,t(6,u)})}function ce(te){Ve.call(this,n,te)}function se(te){Ve.call(this,n,te)}return n.$$set=te=>{"collection"in te&&t(0,a=te.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(19,i=B.hasNonEmptyProps(m)||B.hasNonEmptyProps(b)),n.$$.dirty[0]&786436&&t(5,s=i||g!=cp(c)),n.$$.dirty[0]&36&&t(11,l=c.isNew||s)},[a,$,c,m,b,s,u,f,d,h,y,l,r,M,T,A,P,k,g,i,L,V,F,U,G,K,X,Z,ie,J,fe,Y,re,Oe,ge,ae,he,de,Se,we,Ue,ce,se]}class E_ extends Ce{constructor(e){super(),$e(this,e,WM,UM,ke,{collection:0,show:17,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[17]}get hide(){return this.$$.ctx[1]}}function YM(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function KM(n){let e,t;return{c(){e=v("span"),t=z(n[1]),p(e,"class","label txt-base txt-mono"),p(e,"title",n[0])},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&2&&ue(t,i[1]),s&1&&p(e,"title",i[0])},d(i){i&&w(e)}}}function JM(n){let e;function t(l,o){return l[0]?KM:YM}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&w(e)}}}function ZM(n,e,t){let{id:i=""}=e,s=i;return n.$$set=l=>{"id"in l&&t(0,i=l.id)},n.$$.update=()=>{n.$$.dirty&1&&typeof i=="string"&&i.length>27&&t(1,s=i.substring(0,5)+"..."+i.substring(i.length-10))},[i,s]}class Za extends Ce{constructor(e){super(),$e(this,e,ZM,JM,ke,{id:0})}}function dp(n,e,t){const i=n.slice();return i[7]=e[t],i[5]=t,i}function pp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function hp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function GM(n){let e,t=ps(n[0][n[1].name])+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=ps(n[0][n[1].name]))},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&3&&t!==(t=ps(l[0][l[1].name])+"")&&ue(i,t),o&3&&s!==(s=ps(l[0][l[1].name]))&&p(e,"title",s)},i:x,o:x,d(l){l&&w(e)}}}function XM(n){let e,t=[],i=new Map,s,l=B.toArray(n[0][n[1].name]);const o=r=>r[5]+r[7];for(let r=0;r20,o,r=B.toArray(n[0][n[1].name]).slice(0,20);const a=f=>f[5]+f[3];for(let f=0;f20),l?u||(u=_p(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){if(!o){for(let c=0;co[5]+o[3];for(let o=0;o{a[d]=null}),ve(),s=a[i],s?s.p(f,c):(s=a[i]=r[i](f),s.c()),E(s,1),s.m(e,null)),(!o||c&2&&l!==(l="col-type-"+f[1].type+" col-field-"+f[1].name))&&p(e,"class",l)},i(f){o||(E(s),o=!0)},o(f){I(s),o=!1},d(f){f&&w(e),a[i].d()}}}function ps(n){return n=n||"",n.length>200?n.substring(0,200):n}function oT(n,e,t){let{record:i}=e,{field:s}=e;function l(o){Ve.call(this,n,o)}return n.$$set=o=>{"record"in o&&t(0,i=o.record),"field"in o&&t(1,s=o.field)},[i,s,l]}class rT extends Ce{constructor(e){super(),$e(this,e,oT,lT,ke,{record:0,field:1})}}function vp(n,e,t){const i=n.slice();return i[50]=e[t],i}function yp(n,e,t){const i=n.slice();return i[46]=e[t],i}function kp(n,e,t){const i=n.slice();return i[46]=e[t],i}function wp(n,e,t){const i=n.slice();return i[46]=e[t],i}function aT(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=O(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[14],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),o||(r=W(t,"change",n[25]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&16384&&(t.checked=a[14])},d(a){a&&w(e),o=!1,r()}}}function uT(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function fT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function Sp(n){let e,t,i,s,l,o;function r(c){n[27](c)}let a={class:"col-type-text col-field-id",name:"username",$$slots:{default:[cT]},$$scope:{ctx:n}};n[0]!==void 0&&(a.sort=n[0]),e=new Ft({props:a}),le.push(()=>ye(e,"sort",r));function u(c){n[28](c)}let f={class:"col-type-email col-field-email",name:"email",$$slots:{default:[dT]},$$scope:{ctx:n}};return n[0]!==void 0&&(f.sort=n[0]),s=new Ft({props:f}),le.push(()=>ye(s,"sort",u)),{c(){j(e.$$.fragment),i=O(),j(s.$$.fragment)},m(c,d){R(e,c,d),S(c,i,d),R(s,c,d),o=!0},p(c,d){const h={};d[1]&67108864&&(h.$$scope={dirty:d,ctx:c}),!t&&d[0]&1&&(t=!0,h.sort=c[0],Me(()=>t=!1)),e.$set(h);const m={};d[1]&67108864&&(m.$$scope={dirty:d,ctx:c}),!l&&d[0]&1&&(l=!0,m.sort=c[0],Me(()=>l=!1)),s.$set(m)},i(c){o||(E(e.$$.fragment,c),E(s.$$.fragment,c),o=!0)},o(c){I(e.$$.fragment,c),I(s.$$.fragment,c),o=!1},d(c){H(e,c),c&&w(i),H(s,c)}}}function cT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="username",p(t,"class",B.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function dT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function pT(n){let e,t,i,s,l,o=n[46].name+"",r;return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=z(o),p(t,"class",i=B.getFieldTypeIcon(n[46].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),_(l,r)},p(a,u){u[0]&65536&&i!==(i=B.getFieldTypeIcon(a[46].type))&&p(t,"class",i),u[0]&65536&&o!==(o=a[46].name+"")&&ue(r,o)},d(a){a&&w(e)}}}function $p(n,e){let t,i,s,l;function o(a){e[29](a)}let r={class:"col-type-"+e[46].type+" col-field-"+e[46].name,name:e[46].name,$$slots:{default:[pT]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new Ft({props:r}),le.push(()=>ye(i,"sort",o)),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),R(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&65536&&(f.class="col-type-"+e[46].type+" col-field-"+e[46].name),u[0]&65536&&(f.name=e[46].name),u[0]&65536|u[1]&67108864&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],Me(()=>s=!1)),i.$set(f)},i(a){l||(E(i.$$.fragment,a),l=!0)},o(a){I(i.$$.fragment,a),l=!1},d(a){a&&w(t),H(i,a)}}}function hT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function mT(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function Cp(n){let e;function t(l,o){return l[11]?_T:gT}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function gT(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Mp(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Mp(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function _T(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function Mp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[36]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function Tp(n){let e;function t(l,o){return l[50].verified?vT:bT}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function bT(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Le(Be.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function vT(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Le(Be.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function Op(n){let e,t,i,s,l;function o(d,h){return h[0]&16&&(t=null),t==null&&(t=!!B.isEmpty(d[50].username)),t?kT:yT}let r=o(n,[-1,-1]),a=r(n);function u(d,h){return h[0]&16&&(l=null),l==null&&(l=!!B.isEmpty(d[50].email)),l?ST:wT}let f=u(n,[-1,-1]),c=f(n);return{c(){e=v("td"),a.c(),i=O(),s=v("td"),c.c(),p(e,"class","col-type-text col-field-username"),p(s,"class","col-type-text col-field-email")},m(d,h){S(d,e,h),a.m(e,null),S(d,i,h),S(d,s,h),c.m(s,null)},p(d,h){r===(r=o(d,h))&&a?a.p(d,h):(a.d(1),a=r(d),a&&(a.c(),a.m(e,null))),f===(f=u(d,h))&&c?c.p(d,h):(c.d(1),c=f(d),c&&(c.c(),c.m(s,null)))},d(d){d&&w(e),a.d(),d&&w(i),d&&w(s),c.d()}}}function yT(n){let e,t=n[50].username+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[50].username)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[50].username+"")&&ue(i,t),o[0]&16&&s!==(s=l[50].username)&&p(e,"title",s)},d(l){l&&w(e)}}}function kT(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function wT(n){let e,t=n[50].email+"",i,s;return{c(){e=v("span"),i=z(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[50].email)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[50].email+"")&&ue(i,t),o[0]&16&&s!==(s=l[50].email)&&p(e,"title",s)},d(l){l&&w(e)}}}function ST(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function Dp(n,e){let t,i,s;return i=new rT({props:{record:e[50],field:e[46]}}),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&16&&(r.record=e[50]),o[0]&65536&&(r.field=e[46]),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function Ep(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k=[],$=new Map,C,M,T,D,A,P,L,V,F,U,G,K;function X(){return e[33](e[50])}m=new Za({props:{id:e[50].id}});let Z=e[2].isAuth&&Tp(e),ie=e[2].isAuth&&Op(e),J=e[16];const fe=Oe=>Oe[46].name;for(let Oe=0;Oe',F=O(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[50].id),l.checked=r=e[6][e[50].id],p(u,"for",f="checkbox_"+e[50].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(h,"class","flex flex-gap-5"),p(d,"class","col-type-text col-field-id"),p(M,"class","col-type-date col-field-created"),p(A,"class","col-type-date col-field-updated"),p(V,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(Oe,ge){S(Oe,t,ge),_(t,i),_(i,s),_(s,l),_(s,a),_(s,u),_(t,c),_(t,d),_(d,h),R(m,h,null),_(h,b),Z&&Z.m(h,null),_(t,g),ie&&ie.m(t,null),_(t,y);for(let ae=0;aeye(o,"sort",U));let K=n[2].isAuth&&Sp(n),X=n[16];const Z=ae=>ae[46].name;for(let ae=0;aeye(h,"sort",ie));function fe(ae){n[31](ae)}let Y={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[mT]},$$scope:{ctx:n}};n[0]!==void 0&&(Y.sort=n[0]),g=new Ft({props:Y}),le.push(()=>ye(g,"sort",fe));let re=n[4];const Oe=ae=>ae[50].id;for(let ae=0;ae',M=O(),T=v("tbody");for(let ae=0;aer=!1)),o.$set(de),ae[2].isAuth?K?(K.p(ae,he),he[0]&4&&E(K,1)):(K=Sp(ae),K.c(),E(K,1),K.m(i,u)):K&&(be(),I(K,1,1,()=>{K=null}),ve()),he[0]&65537&&(X=ae[16],be(),f=bt(f,he,Z,1,ae,X,c,i,xt,$p,d,kp),ve());const Se={};he[1]&67108864&&(Se.$$scope={dirty:he,ctx:ae}),!m&&he[0]&1&&(m=!0,Se.sort=ae[0],Me(()=>m=!1)),h.$set(Se);const we={};he[1]&67108864&&(we.$$scope={dirty:he,ctx:ae}),!y&&he[0]&1&&(y=!0,we.sort=ae[0],Me(()=>y=!1)),g.$set(we),he[0]&1247318&&(re=ae[4],be(),D=bt(D,he,Oe,1,ae,re,A,T,xt,Ep,null,vp),ve(),!re.length&&ge?ge.p(ae,he):re.length?ge&&(ge.d(1),ge=null):(ge=Cp(ae),ge.c(),ge.m(T,null))),(!P||he[0]&2048)&&ee(e,"table-loading",ae[11])},i(ae){if(!P){E(o.$$.fragment,ae),E(K);for(let he=0;he({49:l}),({uniqueId:l})=>[0,l?262144:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&640|o[1]&67371008&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function MT(n){let e,t,i=[],s=new Map,l,o,r=n[9];const a=u=>u[46].id+u[46].name;for(let u=0;uReset',c=O(),d=v("div"),h=O(),m=v("button"),m.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ee(f,"btn-disabled",n[12]),p(d,"class","flex-fill"),p(m,"type","button"),p(m,"class","btn btn-sm btn-secondary btn-danger"),ee(m,"btn-loading",n[12]),ee(m,"btn-disabled",n[12]),p(e,"class","bulkbar")},m($,C){S($,e,C),_(e,t),_(t,i),_(t,s),_(s,l),_(t,o),_(t,a),_(e,u),_(e,f),_(e,c),_(e,d),_(e,h),_(e,m),g=!0,y||(k=[W(f,"click",n[38]),W(m,"click",n[39])],y=!0)},p($,C){(!g||C[0]&256)&&ue(l,$[8]),(!g||C[0]&256)&&r!==(r=$[8]===1?"record":"records")&&ue(a,r),(!g||C[0]&4096)&&ee(f,"btn-disabled",$[12]),(!g||C[0]&4096)&&ee(m,"btn-loading",$[12]),(!g||C[0]&4096)&&ee(m,"btn-disabled",$[12])},i($){g||($&&Qe(()=>{b||(b=je(e,kn,{duration:150,y:5},!0)),b.run(1)}),g=!0)},o($){$&&(b||(b=je(e,kn,{duration:150,y:5},!1)),b.run(0)),g=!1},d($){$&&w(e),$&&b&&b.end(),y=!1,Re(k)}}}function OT(n){let e,t,i,s,l,o;e=new Sa({props:{class:"table-wrapper",$$slots:{before:[TT],default:[$T]},$$scope:{ctx:n}}});let r=n[4].length&&Ip(n),a=n[4].length&&n[15]&&Pp(n),u=n[8]&&Lp(n);return{c(){j(e.$$.fragment),t=O(),r&&r.c(),i=O(),a&&a.c(),s=O(),u&&u.c(),l=Fe()},m(f,c){R(e,f,c),S(f,t,c),r&&r.m(f,c),S(f,i,c),a&&a.m(f,c),S(f,s,c),u&&u.m(f,c),S(f,l,c),o=!0},p(f,c){const d={};c[0]&92887|c[1]&67108864&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=Ip(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[15]?a?a.p(f,c):(a=Pp(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&E(u,1)):(u=Lp(f),u.c(),E(u,1),u.m(l.parentNode,l)):u&&(be(),I(u,1,1,()=>{u=null}),ve())},i(f){o||(E(e.$$.fragment,f),E(u),o=!0)},o(f){I(e.$$.fragment,f),I(u),o=!1},d(f){H(e,f),f&&w(t),r&&r.d(f),f&&w(i),a&&a.d(f),f&&w(s),u&&u.d(f),f&&w(l)}}}function DT(n,e,t){let i,s,l,o,r;const a=It();let{collection:u}=e,{sort:f=""}=e,{filter:c=""}=e,d=[],h=1,m=0,b={},g=!0,y=!1,k=0,$=[],C;function M(){!(u!=null&&u.id)||localStorage.setItem((u==null?void 0:u.id)+"@hiddenCollumns",JSON.stringify($))}function T(){if(t(7,$=[]),!!(u!=null&&u.id))try{const te=localStorage.getItem(u.id+"@hiddenCollumns");te&&t(7,$=JSON.parse(te)||[])}catch{}}async function D(){const te=h;for(let ne=1;ne<=te;ne++)(ne===1||i)&&await A(ne,!1)}async function A(te=1,ne=!0){if(!!(u!=null&&u.id))return t(11,g=!0),me.collection(u.id).getList(te,30,{sort:f,filter:c}).then(async Ee=>{if(te<=1&&P(),t(11,g=!1),t(10,h=Ee.page),t(5,m=Ee.totalItems),a("load",d.concat(Ee.items)),ne){const it=++k;for(;Ee.items.length&&k==it;)t(4,d=d.concat(Ee.items.splice(0,15))),await B.yieldToMain()}else t(4,d=d.concat(Ee.items))}).catch(Ee=>{Ee!=null&&Ee.isAbort||(t(11,g=!1),console.warn(Ee),P(),me.errorResponseHandler(Ee,!1))})}function P(){t(4,d=[]),t(10,h=1),t(5,m=0),t(6,b={})}function L(){r?V():F()}function V(){t(6,b={})}function F(){for(const te of d)t(6,b[te.id]=te,b);t(6,b)}function U(te){b[te.id]?delete b[te.id]:t(6,b[te.id]=te,b),t(6,b)}function G(){yn(`Do you really want to delete the selected ${o===1?"record":"records"}?`,K)}async function K(){if(y||!o||!(u!=null&&u.id))return;let te=[];for(const ne of Object.keys(b))te.push(me.collection(u.id).delete(ne));return t(12,y=!0),Promise.all(te).then(()=>{Lt(`Successfully deleted the selected ${o===1?"record":"records"}.`),V()}).catch(ne=>{me.errorResponseHandler(ne)}).finally(()=>(t(12,y=!1),D()))}function X(te){Ve.call(this,n,te)}const Z=(te,ne)=>{ne.target.checked?B.removeByValue($,te.id):B.pushUnique($,te.id),t(7,$)},ie=()=>L();function J(te){f=te,t(0,f)}function fe(te){f=te,t(0,f)}function Y(te){f=te,t(0,f)}function re(te){f=te,t(0,f)}function Oe(te){f=te,t(0,f)}function ge(te){f=te,t(0,f)}function ae(te){le[te?"unshift":"push"](()=>{C=te,t(13,C)})}const he=te=>U(te),de=te=>a("select",te),Se=(te,ne)=>{ne.code==="Enter"&&(ne.preventDefault(),a("select",te))},we=()=>t(1,c=""),Ue=()=>A(h+1),ce=()=>V(),se=()=>G();return n.$$set=te=>{"collection"in te&&t(2,u=te.collection),"sort"in te&&t(0,f=te.sort),"filter"in te&&t(1,c=te.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&u!=null&&u.id&&(T(),P()),n.$$.dirty[0]&7&&(u==null?void 0:u.id)&&f!==-1&&c!==-1&&A(1),n.$$.dirty[0]&48&&t(15,i=m>d.length),n.$$.dirty[0]&4&&t(9,s=(u==null?void 0:u.schema)||[]),n.$$.dirty[0]&640&&t(16,l=s.filter(te=>!$.includes(te.id))),n.$$.dirty[0]&64&&t(8,o=Object.keys(b).length),n.$$.dirty[0]&272&&t(14,r=d.length&&o===d.length),n.$$.dirty[0]&128&&$!==-1&&M()},[f,c,u,A,d,m,b,$,o,s,h,g,y,C,r,i,l,a,L,V,U,G,D,X,Z,ie,J,fe,Y,re,Oe,ge,ae,he,de,Se,we,Ue,ce,se]}class ET extends Ce{constructor(e){super(),$e(this,e,DT,OT,ke,{collection:2,sort:0,filter:1,reloadLoadedPages:22,load:3},null,[-1,-1])}get reloadLoadedPages(){return this.$$.ctx[22]}get load(){return this.$$.ctx[3]}}function AT(n){let e,t,i,s;return e=new N4({}),i=new cn({props:{$$slots:{default:[LT]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,o){const r={};o[0]&759|o[1]&1&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function IT(n){let e,t;return e=new cn({props:{center:!0,$$slots:{default:[RT]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&528|s[1]&1&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function PT(n){let e,t;return e=new cn({props:{center:!0,$$slots:{default:[HT]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[1]&1&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Np(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle")},m(s,l){S(s,e,l),t||(i=[Le(Be.call(null,e,{text:"Edit collection",position:"right"})),W(e,"click",n[14])],t=!0)},p:x,d(s){s&&w(e),t=!1,Re(i)}}}function LT(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,P,L=!n[9]&&Np(n);c=new wa({}),c.$on("refresh",n[15]),k=new ka({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[18]);function V(G){n[20](G)}function F(G){n[21](G)}let U={collection:n[2]};return n[0]!==void 0&&(U.filter=n[0]),n[1]!==void 0&&(U.sort=n[1]),C=new ET({props:U}),n[19](C),le.push(()=>ye(C,"filter",V)),le.push(()=>ye(C,"sort",F)),C.$on("select",n[22]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=O(),l=v("div"),r=z(o),a=O(),u=v("div"),L&&L.c(),f=O(),j(c.$$.fragment),d=O(),h=v("div"),m=v("button"),m.innerHTML=` API Preview`,b=O(),g=v("button"),g.innerHTML=` - New record`,y=O(),j(k.$$.fragment),w=O(),j(C.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(m,"type","button"),p(m,"class","btn btn-outline"),p(g,"type","button"),p(g,"class","btn btn-expanded"),p(h,"class","btns-group"),p(e,"class","page-header")},m(G,K){$(G,e,K),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),_(e,u),L&&L.m(u,null),_(u,f),R(c,u,null),_(e,d),_(e,h),_(h,m),_(h,b),_(h,g),$(G,y,K),R(k,G,K),$(G,w,K),R(C,G,K),D=!0,A||(P=[W(m,"click",n[16]),W(g,"click",n[17])],A=!0)},p(G,K){(!D||K[0]&4)&&o!==(o=G[2].name+"")&&ue(r,o),G[9]?L&&(L.d(1),L=null):L?L.p(G,K):(L=Lp(G),L.c(),L.m(u,f));const X={};K[0]&1&&(X.value=G[0]),K[0]&4&&(X.autocompleteCollection=G[2]),k.$set(X);const Z={};K[0]&4&&(Z.collection=G[2]),!M&&K[0]&1&&(M=!0,Z.filter=G[0],Me(()=>M=!1)),!T&&K[0]&2&&(T=!0,Z.sort=G[1],Me(()=>T=!1)),C.$set(Z)},i(G){D||(E(c.$$.fragment,G),E(k.$$.fragment,G),E(C.$$.fragment,G),D=!0)},o(G){I(c.$$.fragment,G),I(k.$$.fragment,G),I(C.$$.fragment,G),D=!1},d(G){G&&S(e),L&&L.d(),H(c),G&&S(y),H(k,G),G&&S(w),n[19](null),H(C,G),A=!1,Re(P)}}}function LT(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=O(),i=v("button"),i.innerHTML=` - Create new collection`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){$(o,e,r),$(o,t,r),$(o,i,r),s||(l=W(i,"click",n[13]),s=!0)},p:x,d(o){o&&S(e),o&&S(t),o&&S(i),s=!1,l()}}}function NT(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){$(t,e,i)},p:x,d(t){t&&S(e)}}}function FT(n){let e,t,i;function s(r,a){return r[9]?NT:LT}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=O(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){$(r,e,a),_(e,t),_(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&S(e),o.d()}}}function RT(n){let e;return{c(){e=v("div"),e.innerHTML=` -

    Loading collections...

    `,p(e,"class","placeholder-section m-b-base")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function HT(n){let e,t,i,s,l,o,r,a,u;const f=[IT,AT,ET],c=[];function d(g,y){return g[3]?0:g[8].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new Ja({props:h}),n[23](s);let m={};o=new z4({props:m}),n[24](o);let b={collection:n[2]};return a=new D_({props:b}),n[25](a),a.$on("save",n[26]),a.$on("delete",n[27]),{c(){t.c(),i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment)},m(g,y){c[e].m(g,y),$(g,i,y),R(s,g,y),$(g,l,y),R(o,g,y),$(g,r,y),R(a,g,y),u=!0},p(g,y){let k=e;e=d(g),e===k?c[e].p(g,y):(be(),I(c[k],1,1,()=>{c[k]=null}),ve(),t=c[e],t?t.p(g,y):(t=c[e]=f[e](g),t.c()),E(t,1),t.m(i.parentNode,i));const w={};s.$set(w);const C={};o.$set(C);const M={};y[0]&4&&(M.collection=g[2]),a.$set(M)},i(g){u||(E(t),E(s.$$.fragment,g),E(o.$$.fragment,g),E(a.$$.fragment,g),u=!0)},o(g){I(t),I(s.$$.fragment,g),I(o.$$.fragment,g),I(a.$$.fragment,g),u=!1},d(g){c[e].d(g),g&&S(i),n[23](null),H(s,g),g&&S(l),n[24](null),H(o,g),g&&S(r),n[25](null),H(a,g)}}}function jT(n,e,t){let i,s,l,o,r,a,u;Je(n,Bn,ie=>t(2,s=ie)),Je(n,na,ie=>t(3,l=ie)),Je(n,aa,ie=>t(12,o=ie)),Je(n,mt,ie=>t(28,r=ie)),Je(n,Zi,ie=>t(8,a=ie)),Je(n,ks,ie=>t(9,u=ie)),Ht(mt,r="Collections",r);const f=new URLSearchParams(o);let c,d,h,m,b=f.get("filter")||"",g=f.get("sort")||"-created",y=f.get("collectionId")||"";function k(){t(10,y=s.id),t(1,g="-created"),t(0,b="")}SS(y);const w=()=>c==null?void 0:c.show(),C=()=>c==null?void 0:c.show(s),M=()=>m==null?void 0:m.load(),T=()=>d==null?void 0:d.show(s),D=()=>h==null?void 0:h.show(),A=ie=>t(0,b=ie.detail);function P(ie){le[ie?"unshift":"push"](()=>{m=ie,t(7,m)})}function L(ie){b=ie,t(0,b)}function V(ie){g=ie,t(1,g)}const F=ie=>h==null?void 0:h.show(ie==null?void 0:ie.detail);function U(ie){le[ie?"unshift":"push"](()=>{c=ie,t(4,c)})}function G(ie){le[ie?"unshift":"push"](()=>{d=ie,t(5,d)})}function K(ie){le[ie?"unshift":"push"](()=>{h=ie,t(6,h)})}const X=()=>m==null?void 0:m.reloadLoadedPages(),Z=()=>m==null?void 0:m.reloadLoadedPages();return n.$$.update=()=>{if(n.$$.dirty[0]&4096&&t(11,i=new URLSearchParams(o)),n.$$.dirty[0]&3080&&!l&&i.has("collectionId")&&i.get("collectionId")!=y&&yS(i.get("collectionId")),n.$$.dirty[0]&1028&&(s==null?void 0:s.id)&&y!=s.id&&k(),n.$$.dirty[0]&7&&(g||b||(s==null?void 0:s.id))){const ie=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:g}).toString();ki("/collections?"+ie)}},[b,g,s,l,c,d,h,m,a,u,y,i,o,w,C,M,T,D,A,P,L,V,F,U,G,K,X,Z]}class qT extends Ce{constructor(e){super(),$e(this,e,jT,HT,ke,{},null,[-1,-1])}}function VT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M,T,D,A,P;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=O(),l=v("a"),l.innerHTML=` + New record`,y=O(),j(k.$$.fragment),$=O(),j(C.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(m,"type","button"),p(m,"class","btn btn-outline"),p(g,"type","button"),p(g,"class","btn btn-expanded"),p(h,"class","btns-group"),p(e,"class","page-header")},m(G,K){S(G,e,K),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),_(e,u),L&&L.m(u,null),_(u,f),R(c,u,null),_(e,d),_(e,h),_(h,m),_(h,b),_(h,g),S(G,y,K),R(k,G,K),S(G,$,K),R(C,G,K),D=!0,A||(P=[W(m,"click",n[16]),W(g,"click",n[17])],A=!0)},p(G,K){(!D||K[0]&4)&&o!==(o=G[2].name+"")&&ue(r,o),G[9]?L&&(L.d(1),L=null):L?L.p(G,K):(L=Np(G),L.c(),L.m(u,f));const X={};K[0]&1&&(X.value=G[0]),K[0]&4&&(X.autocompleteCollection=G[2]),k.$set(X);const Z={};K[0]&4&&(Z.collection=G[2]),!M&&K[0]&1&&(M=!0,Z.filter=G[0],Me(()=>M=!1)),!T&&K[0]&2&&(T=!0,Z.sort=G[1],Me(()=>T=!1)),C.$set(Z)},i(G){D||(E(c.$$.fragment,G),E(k.$$.fragment,G),E(C.$$.fragment,G),D=!0)},o(G){I(c.$$.fragment,G),I(k.$$.fragment,G),I(C.$$.fragment,G),D=!1},d(G){G&&w(e),L&&L.d(),H(c),G&&w(y),H(k,G),G&&w($),n[19](null),H(C,G),A=!1,Re(P)}}}function NT(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=O(),i=v("button"),i.innerHTML=` + Create new collection`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=W(i,"click",n[13]),s=!0)},p:x,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function FT(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function RT(n){let e,t,i;function s(r,a){return r[9]?FT:NT}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=O(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),_(e,t),_(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function HT(n){let e;return{c(){e=v("div"),e.innerHTML=` +

    Loading collections...

    `,p(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function jT(n){let e,t,i,s,l,o,r,a,u;const f=[PT,IT,AT],c=[];function d(g,y){return g[3]?0:g[8].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new Ja({props:h}),n[23](s);let m={};o=new B4({props:m}),n[24](o);let b={collection:n[2]};return a=new E_({props:b}),n[25](a),a.$on("save",n[26]),a.$on("delete",n[27]),{c(){t.c(),i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment)},m(g,y){c[e].m(g,y),S(g,i,y),R(s,g,y),S(g,l,y),R(o,g,y),S(g,r,y),R(a,g,y),u=!0},p(g,y){let k=e;e=d(g),e===k?c[e].p(g,y):(be(),I(c[k],1,1,()=>{c[k]=null}),ve(),t=c[e],t?t.p(g,y):(t=c[e]=f[e](g),t.c()),E(t,1),t.m(i.parentNode,i));const $={};s.$set($);const C={};o.$set(C);const M={};y[0]&4&&(M.collection=g[2]),a.$set(M)},i(g){u||(E(t),E(s.$$.fragment,g),E(o.$$.fragment,g),E(a.$$.fragment,g),u=!0)},o(g){I(t),I(s.$$.fragment,g),I(o.$$.fragment,g),I(a.$$.fragment,g),u=!1},d(g){c[e].d(g),g&&w(i),n[23](null),H(s,g),g&&w(l),n[24](null),H(o,g),g&&w(r),n[25](null),H(a,g)}}}function qT(n,e,t){let i,s,l,o,r,a,u;Je(n,Bn,ie=>t(2,s=ie)),Je(n,na,ie=>t(3,l=ie)),Je(n,aa,ie=>t(12,o=ie)),Je(n,mt,ie=>t(28,r=ie)),Je(n,Zi,ie=>t(8,a=ie)),Je(n,ks,ie=>t(9,u=ie)),Ht(mt,r="Collections",r);const f=new URLSearchParams(o);let c,d,h,m,b=f.get("filter")||"",g=f.get("sort")||"-created",y=f.get("collectionId")||"";function k(){t(10,y=s.id),t(1,g="-created"),t(0,b="")}$S(y);const $=()=>c==null?void 0:c.show(),C=()=>c==null?void 0:c.show(s),M=()=>m==null?void 0:m.load(),T=()=>d==null?void 0:d.show(s),D=()=>h==null?void 0:h.show(),A=ie=>t(0,b=ie.detail);function P(ie){le[ie?"unshift":"push"](()=>{m=ie,t(7,m)})}function L(ie){b=ie,t(0,b)}function V(ie){g=ie,t(1,g)}const F=ie=>h==null?void 0:h.show(ie==null?void 0:ie.detail);function U(ie){le[ie?"unshift":"push"](()=>{c=ie,t(4,c)})}function G(ie){le[ie?"unshift":"push"](()=>{d=ie,t(5,d)})}function K(ie){le[ie?"unshift":"push"](()=>{h=ie,t(6,h)})}const X=()=>m==null?void 0:m.reloadLoadedPages(),Z=()=>m==null?void 0:m.reloadLoadedPages();return n.$$.update=()=>{if(n.$$.dirty[0]&4096&&t(11,i=new URLSearchParams(o)),n.$$.dirty[0]&3080&&!l&&i.has("collectionId")&&i.get("collectionId")!=y&&kS(i.get("collectionId")),n.$$.dirty[0]&1028&&(s==null?void 0:s.id)&&y!=s.id&&k(),n.$$.dirty[0]&7&&(g||b||(s==null?void 0:s.id))){const ie=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:g}).toString();ki("/collections?"+ie)}},[b,g,s,l,c,d,h,m,a,u,y,i,o,$,C,M,T,D,A,P,L,V,F,U,G,K,X,Z]}class VT extends Ce{constructor(e){super(),$e(this,e,qT,jT,ke,{},null,[-1,-1])}}function zT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,P;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=O(),l=v("a"),l.innerHTML=` Application`,o=O(),r=v("a"),r.innerHTML=` Mail settings`,a=O(),u=v("a"),u.innerHTML=` Files storage`,f=O(),c=v("div"),c.innerHTML=`Sync Experimental`,d=O(),h=v("a"),h.innerHTML=` Export collections`,m=O(),b=v("a"),b.innerHTML=` - Import collections`,g=O(),y=v("div"),y.textContent="Authentication",k=O(),w=v("a"),w.innerHTML=` + Import collections`,g=O(),y=v("div"),y.textContent="Authentication",k=O(),$=v("a"),$.innerHTML=` Auth providers`,C=O(),M=v("a"),M.innerHTML=` Token options`,T=O(),D=v("a"),D.innerHTML=` - Admins`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(b,"href","/settings/import-collections"),p(b,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p(w,"href","/settings/auth-providers"),p(w,"class","sidebar-list-item"),p(M,"href","/settings/tokens"),p(M,"class","sidebar-list-item"),p(D,"href","/settings/admins"),p(D,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(L,V){$(L,e,V),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),_(t,f),_(t,c),_(t,d),_(t,h),_(t,m),_(t,b),_(t,g),_(t,y),_(t,k),_(t,w),_(t,C),_(t,M),_(t,T),_(t,D),A||(P=[Le(On.call(null,l,{path:"/settings"})),Le(zt.call(null,l)),Le(On.call(null,r,{path:"/settings/mail/?.*"})),Le(zt.call(null,r)),Le(On.call(null,u,{path:"/settings/storage/?.*"})),Le(zt.call(null,u)),Le(On.call(null,h,{path:"/settings/export-collections/?.*"})),Le(zt.call(null,h)),Le(On.call(null,b,{path:"/settings/import-collections/?.*"})),Le(zt.call(null,b)),Le(On.call(null,w,{path:"/settings/auth-providers/?.*"})),Le(zt.call(null,w)),Le(On.call(null,M,{path:"/settings/tokens/?.*"})),Le(zt.call(null,M)),Le(On.call(null,D,{path:"/settings/admins/?.*"})),Le(zt.call(null,D))],A=!0)},p:x,i:x,o:x,d(L){L&&S(e),A=!1,Re(P)}}}class Ci extends Ce{constructor(e){super(),$e(this,e,null,VT,ke,{})}}function Np(n,e,t){const i=n.slice();return i[30]=e[t],i}function Fp(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[zT,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(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||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function zT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="ID",o=O(),r=v("div"),a=v("i"),f=O(),c=v("input"),p(t,"class",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=h=n[1].id,c.disabled=!0},m(g,y){$(g,e,y),_(e,t),_(e,i),_(e,s),$(g,o,y),$(g,r,y),_(r,a),$(g,f,y),$(g,c,y),m||(b=Le(u=Be.call(null,a,{text:`Created: ${n[1].created} + Admins`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(b,"href","/settings/import-collections"),p(b,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p($,"href","/settings/auth-providers"),p($,"class","sidebar-list-item"),p(M,"href","/settings/tokens"),p(M,"class","sidebar-list-item"),p(D,"href","/settings/admins"),p(D,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(L,V){S(L,e,V),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),_(t,f),_(t,c),_(t,d),_(t,h),_(t,m),_(t,b),_(t,g),_(t,y),_(t,k),_(t,$),_(t,C),_(t,M),_(t,T),_(t,D),A||(P=[Le(On.call(null,l,{path:"/settings"})),Le(zt.call(null,l)),Le(On.call(null,r,{path:"/settings/mail/?.*"})),Le(zt.call(null,r)),Le(On.call(null,u,{path:"/settings/storage/?.*"})),Le(zt.call(null,u)),Le(On.call(null,h,{path:"/settings/export-collections/?.*"})),Le(zt.call(null,h)),Le(On.call(null,b,{path:"/settings/import-collections/?.*"})),Le(zt.call(null,b)),Le(On.call(null,$,{path:"/settings/auth-providers/?.*"})),Le(zt.call(null,$)),Le(On.call(null,M,{path:"/settings/tokens/?.*"})),Le(zt.call(null,M)),Le(On.call(null,D,{path:"/settings/admins/?.*"})),Le(zt.call(null,D))],A=!0)},p:x,i:x,o:x,d(L){L&&w(e),A=!1,Re(P)}}}class Ci extends Ce{constructor(e){super(),$e(this,e,null,zT,ke,{})}}function Fp(n,e,t){const i=n.slice();return i[30]=e[t],i}function Rp(n){let e,t;return e=new _e({props:{class:"form-field disabled",name:"id",$$slots:{default:[BT,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(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||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function BT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="ID",o=O(),r=v("div"),a=v("i"),f=O(),c=v("input"),p(t,"class",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=h=n[1].id,c.disabled=!0},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),S(g,r,y),_(r,a),S(g,f,y),S(g,c,y),m||(b=Le(u=Be.call(null,a,{text:`Created: ${n[1].created} Updated: ${n[1].updated}`,position:"left"})),m=!0)},p(g,y){y[0]&536870912&&l!==(l=g[29])&&p(e,"for",l),u&&Wt(u.update)&&y[0]&2&&u.update.call(null,{text:`Created: ${g[1].created} -Updated: ${g[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=g[29])&&p(c,"id",d),y[0]&2&&h!==(h=g[1].id)&&c.value!==h&&(c.value=h)},d(g){g&&S(e),g&&S(o),g&&S(r),g&&S(f),g&&S(c),m=!1,b()}}}function Rp(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=O(),Ln(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){$(u,e,f),_(e,t),_(e,s),o||(r=W(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&&S(e),o=!1,r()}}}function BT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("input"),p(t,"class",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){$(c,e,d),_(e,t),_(e,i),_(e,s),$(c,o,d),$(c,r,d),pe(r,n[3]),u||(f=W(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]&&pe(r,c[3])},d(c){c&&S(e),c&&S(o),c&&S(r),u=!1,f()}}}function Hp(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[UT,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(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||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function UT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){$(u,e,f),e.checked=n[4],$(u,i,f),$(u,s,f),_(s,l),r||(a=W(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&&S(e),u&&S(i),u&&S(s),r=!1,a()}}}function jp(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[WT,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[YT,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){$(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&536871424|c[1]&4&&(h.$$scope={dirty:c,ctx:f}),r.$set(h)},i(f){u||(E(s.$$.fragment,f),E(r.$$.fragment,f),f&&Qe(()=>{a||(a=je(t,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(t,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&S(e),H(s),H(r),f&&a&&a.end()}}}function WT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){$(c,e,d),_(e,t),_(e,i),_(e,s),$(c,o,d),$(c,r,d),pe(r,n[8]),u||(f=W(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]&&pe(r,c[8])},d(c){c&&S(e),c&&S(o),c&&S(r),u=!1,f()}}}function YT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){$(c,e,d),_(e,t),_(e,i),_(e,s),$(c,o,d),$(c,r,d),pe(r,n[9]),u||(f=W(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]&&pe(r,c[9])},d(c){c&&S(e),c&&S(o),c&&S(r),u=!1,f()}}}function KT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m=!n[1].isNew&&Fp(n),b=[0,1,2,3,4,5,6,7,8,9],g=[];for(let w=0;w<10;w+=1)g[w]=Rp(Np(n,b,w));a=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[BT,({uniqueId:w})=>({29:w}),({uniqueId:w})=>[w?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].isNew&&Hp(n),k=(n[1].isNew||n[4])&&jp(n);return{c(){e=v("form"),m&&m.c(),t=O(),i=v("div"),s=v("p"),s.textContent="Avatar",l=O(),o=v("div");for(let w=0;w<10;w+=1)g[w].c();r=O(),j(a.$$.fragment),u=O(),y&&y.c(),f=O(),k&&k.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m(w,C){$(w,e,C),m&&m.m(e,null),_(e,t),_(e,i),_(i,s),_(i,l),_(i,o);for(let M=0;M<10;M+=1)g[M].m(o,null);_(e,r),R(a,e,null),_(e,u),y&&y.m(e,null),_(e,f),k&&k.m(e,null),c=!0,d||(h=W(e,"submit",ut(n[12])),d=!0)},p(w,C){if(w[1].isNew?m&&(be(),I(m,1,1,()=>{m=null}),ve()):m?(m.p(w,C),C[0]&2&&E(m,1)):(m=Fp(w),m.c(),E(m,1),m.m(e,t)),C[0]&4){b=[0,1,2,3,4,5,6,7,8,9];let T;for(T=0;T<10;T+=1){const D=Np(w,b,T);g[T]?g[T].p(D,C):(g[T]=Rp(D),g[T].c(),g[T].m(o,null))}for(;T<10;T+=1)g[T].d(1)}const M={};C[0]&536870920|C[1]&4&&(M.$$scope={dirty:C,ctx:w}),a.$set(M),w[1].isNew?y&&(be(),I(y,1,1,()=>{y=null}),ve()):y?(y.p(w,C),C[0]&2&&E(y,1)):(y=Hp(w),y.c(),E(y,1),y.m(e,f)),w[1].isNew||w[4]?k?(k.p(w,C),C[0]&18&&E(k,1)):(k=jp(w),k.c(),E(k,1),k.m(e,null)):k&&(be(),I(k,1,1,()=>{k=null}),ve())},i(w){c||(E(m),E(a.$$.fragment,w),E(y),E(k),c=!0)},o(w){I(m),I(a.$$.fragment,w),I(y),I(k),c=!1},d(w){w&&S(e),m&&m.d(),Tt(g,w),H(a),y&&y.d(),k&&k.d(),d=!1,h()}}}function JT(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=z(t)},m(s,l){$(s,e,l),_(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&ue(i,t)},d(s){s&&S(e)}}}function qp(n){let e,t,i,s,l,o,r,a,u;return o=new Zn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[ZT]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=O(),s=v("i"),l=O(),j(o.$$.fragment),r=O(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-secondary"),p(a,"class","flex-fill")},m(f,c){$(f,e,c),_(e,t),_(e,i),_(e,s),_(e,l),R(o,e,null),$(f,r,c),$(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||(E(o.$$.fragment,f),u=!0)},o(f){I(o.$$.fragment,f),u=!1},d(f){f&&S(e),H(o),f&&S(r),f&&S(a)}}}function ZT(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[15]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function GT(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&qp(n);return{c(){h&&h.c(),e=O(),t=v("button"),i=v("span"),i.textContent="Cancel",s=O(),l=v("button"),o=v("span"),a=z(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],ee(l,"btn-loading",n[6])},m(m,b){h&&h.m(m,b),$(m,e,b),$(m,t,b),_(t,i),$(m,s,b),$(m,l,b),_(l,o),_(o,a),f=!0,c||(d=W(t,"click",n[16]),c=!0)},p(m,b){m[1].isNew?h&&(be(),I(h,1,1,()=>{h=null}),ve()):h?(h.p(m,b),b[0]&2&&E(h,1)):(h=qp(m),h.c(),E(h,1),h.m(e.parentNode,e)),(!f||b[0]&64)&&(t.disabled=m[6]),(!f||b[0]&2)&&r!==(r=m[1].isNew?"Create":"Save changes")&&ue(a,r),(!f||b[0]&1088&&u!==(u=!m[10]||m[6]))&&(l.disabled=u),(!f||b[0]&64)&&ee(l,"btn-loading",m[6])},i(m){f||(E(h),f=!0)},o(m){I(h),f=!1},d(m){h&&h.d(m),m&&S(e),m&&S(t),m&&S(s),m&&S(l),c=!1,d()}}}function XT(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[GT],header:[JT],default:[KT]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){j(e.$$.fragment)},m(s,l){R(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||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[23](null),H(e,s)}}}function QT(n,e,t){let i;const s=It(),l="admin_"+B.randomString(5);let o,r=new Yi,a=!1,u=!1,f=0,c="",d="",h="",m=!1;function b(X){return y(X),t(7,u=!0),o==null?void 0:o.show()}function g(){return o==null?void 0:o.hide()}function y(X){t(1,r=X!=null&&X.clone?X.clone():new Yi),k()}function k(){t(4,m=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,h=""),Fn({})}function w(){if(a||!i)return;t(6,a=!0);const X={email:c,avatar:f};(r.isNew||m)&&(X.password=d,X.passwordConfirm=h);let Z;r.isNew?Z=me.admins.create(X):Z=me.admins.update(r.id,X),Z.then(async ie=>{var J;t(7,u=!1),g(),Lt(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",ie),((J=me.authStore.model)==null?void 0:J.id)===ie.id&&me.authStore.save(me.authStore.token,ie)}).catch(ie=>{me.errorResponseHandler(ie)}).finally(()=>{t(6,a=!1)})}function C(){!(r!=null&&r.id)||yn("Do you really want to delete the selected admin?",()=>me.admins.delete(r.id).then(()=>{t(7,u=!1),g(),Lt("Successfully deleted admin."),s("delete",r)}).catch(X=>{me.errorResponseHandler(X)}))}const M=()=>C(),T=()=>g(),D=X=>t(2,f=X);function A(){c=this.value,t(3,c)}function P(){m=this.checked,t(4,m)}function L(){d=this.value,t(8,d)}function V(){h=this.value,t(9,h)}const F=()=>i&&u?(yn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),g()}),!1):!0;function U(X){le[X?"unshift":"push"](()=>{o=X,t(5,o)})}function G(X){Ve.call(this,n,X)}function K(X){Ve.call(this,n,X)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||m||c!==r.email||f!==r.avatar)},[g,r,f,c,m,o,a,u,d,h,i,l,w,C,b,M,T,D,A,P,L,V,F,U,G,K]}class xT extends Ce{constructor(e){super(),$e(this,e,QT,XT,ke,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function Vp(n,e,t){const i=n.slice();return i[24]=e[t],i}function eO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function tO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function nO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function iO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){$(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&S(e)}}}function zp(n){let e;function t(l,o){return l[5]?lO:sO}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function sO(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Bp(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){$(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Bp(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&S(e),o&&o.d()}}}function lO(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function Bp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[17]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function Up(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function Wp(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,m=e[24].email+"",b,g,y,k,w,C,M,T,D,A,P,L,V,F;u=new Za({props:{id:e[24].id}});let U=e[24].id===e[7].id&&Up();w=new Ki({props:{date:e[24].created}}),T=new Ki({props:{date:e[24].updated}});function G(){return e[15](e[24])}function K(...X){return e[16](e[24],...X)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=O(),a=v("td"),j(u.$$.fragment),f=O(),U&&U.c(),c=O(),d=v("td"),h=v("span"),b=z(m),y=O(),k=v("td"),j(w.$$.fragment),C=O(),M=v("td"),j(T.$$.fragment),D=O(),A=v("td"),A.innerHTML='',P=O(),Ln(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",g=e[24].email),p(d,"class","col-type-email col-field-email"),p(k,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(A,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(X,Z){$(X,t,Z),_(t,i),_(i,s),_(s,l),_(t,r),_(t,a),R(u,a,null),_(a,f),U&&U.m(a,null),_(t,c),_(t,d),_(d,h),_(h,b),_(t,y),_(t,k),R(w,k,null),_(t,C),_(t,M),R(T,M,null),_(t,D),_(t,A),_(t,P),L=!0,V||(F=[W(t,"click",G),W(t,"keydown",K)],V=!0)},p(X,Z){e=X,(!L||Z&16&&!Ln(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const ie={};Z&16&&(ie.id=e[24].id),u.$set(ie),e[24].id===e[7].id?U||(U=Up(),U.c(),U.m(a,null)):U&&(U.d(1),U=null),(!L||Z&16)&&m!==(m=e[24].email+"")&&ue(b,m),(!L||Z&16&&g!==(g=e[24].email))&&p(h,"title",g);const J={};Z&16&&(J.date=e[24].created),w.$set(J);const fe={};Z&16&&(fe.date=e[24].updated),T.$set(fe)},i(X){L||(E(u.$$.fragment,X),E(w.$$.fragment,X),E(T.$$.fragment,X),L=!0)},o(X){I(u.$$.fragment,X),I(w.$$.fragment,X),I(T.$$.fragment,X),L=!1},d(X){X&&S(t),H(u),U&&U.d(),H(w),H(T),V=!1,Re(F)}}}function oO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M=[],T=new Map,D;function A(J){n[11](J)}let P={class:"col-type-text",name:"id",$$slots:{default:[eO]},$$scope:{ctx:n}};n[2]!==void 0&&(P.sort=n[2]),o=new Ft({props:P}),le.push(()=>ye(o,"sort",A));function L(J){n[12](J)}let V={class:"col-type-email col-field-email",name:"email",$$slots:{default:[tO]},$$scope:{ctx:n}};n[2]!==void 0&&(V.sort=n[2]),u=new Ft({props:V}),le.push(()=>ye(u,"sort",L));function F(J){n[13](J)}let U={class:"col-type-date col-field-created",name:"created",$$slots:{default:[nO]},$$scope:{ctx:n}};n[2]!==void 0&&(U.sort=n[2]),d=new Ft({props:U}),le.push(()=>ye(d,"sort",F));function G(J){n[14](J)}let K={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[iO]},$$scope:{ctx:n}};n[2]!==void 0&&(K.sort=n[2]),b=new Ft({props:K}),le.push(()=>ye(b,"sort",G));let X=n[4];const Z=J=>J[24].id;for(let J=0;Jr=!1)),o.$set(Y);const re={};fe&134217728&&(re.$$scope={dirty:fe,ctx:J}),!f&&fe&4&&(f=!0,re.sort=J[2],Me(()=>f=!1)),u.$set(re);const Oe={};fe&134217728&&(Oe.$$scope={dirty:fe,ctx:J}),!h&&fe&4&&(h=!0,Oe.sort=J[2],Me(()=>h=!1)),d.$set(Oe);const ge={};fe&134217728&&(ge.$$scope={dirty:fe,ctx:J}),!g&&fe&4&&(g=!0,ge.sort=J[2],Me(()=>g=!1)),b.$set(ge),fe&186&&(X=J[4],be(),M=bt(M,fe,Z,1,J,X,T,C,xt,Wp,null,Vp),ve(),!X.length&&ie?ie.p(J,fe):X.length?ie&&(ie.d(1),ie=null):(ie=zp(J),ie.c(),ie.m(C,null))),(!D||fe&32)&&ee(e,"table-loading",J[5])},i(J){if(!D){E(o.$$.fragment,J),E(u.$$.fragment,J),E(d.$$.fragment,J),E(b.$$.fragment,J);for(let fe=0;fe - New admin`,h=O(),j(m.$$.fragment),b=O(),j(g.$$.fragment),y=O(),T&&T.c(),k=Fe(),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")},m(D,A){$(D,e,A),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(e,r),R(a,e,null),_(e,u),_(e,f),_(e,c),_(e,d),$(D,h,A),R(m,D,A),$(D,b,A),R(g,D,A),$(D,y,A),T&&T.m(D,A),$(D,k,A),w=!0,C||(M=W(d,"click",n[9]),C=!0)},p(D,A){(!w||A&64)&&ue(o,D[6]);const P={};A&2&&(P.value=D[1]),m.$set(P);const L={};A&134217918&&(L.$$scope={dirty:A,ctx:D}),g.$set(L),D[4].length?T?T.p(D,A):(T=Yp(D),T.c(),T.m(k.parentNode,k)):T&&(T.d(1),T=null)},i(D){w||(E(a.$$.fragment,D),E(m.$$.fragment,D),E(g.$$.fragment,D),w=!0)},o(D){I(a.$$.fragment,D),I(m.$$.fragment,D),I(g.$$.fragment,D),w=!1},d(D){D&&S(e),H(a),D&&S(h),H(m,D),D&&S(b),H(g,D),D&&S(y),T&&T.d(D),D&&S(k),C=!1,M()}}}function aO(n){let e,t,i,s,l,o;e=new Ci({}),i=new cn({props:{$$slots:{default:[rO]},$$scope:{ctx:n}}});let r={};return l=new xT({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),$(a,t,u),R(i,a,u),$(a,s,u),R(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||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&S(t),H(i,a),a&&S(s),n[18](null),H(l,a)}}}function uO(n,e,t){let i,s,l;Je(n,aa,V=>t(21,i=V)),Je(n,mt,V=>t(6,s=V)),Je(n,ya,V=>t(7,l=V)),Ht(mt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),me.admins.getFullList(100,{sort:c||"-created",filter:f}).then(V=>{t(4,a=V),t(5,u=!1)}).catch(V=>{V!=null&&V.isAbort||(t(5,u=!1),console.warn(V),h(),me.errorResponseHandler(V,!1))})}function h(){t(4,a=[])}const m=()=>d(),b=()=>r==null?void 0:r.show(),g=V=>t(1,f=V.detail);function y(V){c=V,t(2,c)}function k(V){c=V,t(2,c)}function w(V){c=V,t(2,c)}function C(V){c=V,t(2,c)}const M=V=>r==null?void 0:r.show(V),T=(V,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(V))},D=()=>t(1,f="");function A(V){le[V?"unshift":"push"](()=>{r=V,t(3,r)})}const P=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const V=new URLSearchParams({filter:f,sort:c}).toString();ki("/settings/admins?"+V),d()}},[d,f,c,r,a,u,s,l,m,b,g,y,k,w,C,M,T,D,A,P,L]}class fO extends Ce{constructor(e){super(),$e(this,e,uO,aO,ke,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function cO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=O(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0]),l.focus(),r||(a=W(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]&&pe(l,u[0])},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function dO(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=z("Password"),s=O(),l=v("input"),r=O(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,h){$(d,e,h),_(e,t),$(d,s,h),$(d,l,h),pe(l,n[1]),$(d,r,h),$(d,a,h),_(a,u),f||(c=[W(l,"input",n[5]),Le(zt.call(null,u))],f=!0)},p(d,h){h&256&&i!==(i=d[8])&&p(e,"for",i),h&256&&o!==(o=d[8])&&p(l,"id",o),h&2&&l.value!==d[1]&&pe(l,d[1])},d(d){d&&S(e),d&&S(s),d&&S(l),d&&S(r),d&&S(a),f=!1,Re(c)}}}function pO(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new _e({props:{class:"form-field required",name:"identity",$$slots:{default:[cO,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[dO,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),a=v("button"),a.innerHTML=`Login - `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),ee(a,"btn-disabled",n[2]),ee(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){$(d,e,h),_(e,t),_(e,i),R(s,e,null),_(e,l),R(o,e,null),_(e,r),_(e,a),u=!0,f||(c=W(e,"submit",ut(n[3])),f=!0)},p(d,h){const m={};h&769&&(m.$$scope={dirty:h,ctx:d}),s.$set(m);const b={};h&770&&(b.$$scope={dirty:h,ctx:d}),o.$set(b),(!u||h&4)&&ee(a,"btn-disabled",d[2]),(!u||h&4)&&ee(a,"btn-loading",d[2])},i(d){u||(E(s.$$.fragment,d),E(o.$$.fragment,d),u=!0)},o(d){I(s.$$.fragment,d),I(o.$$.fragment,d),u=!1},d(d){d&&S(e),H(s),H(o),f=!1,c()}}}function hO(n){let e,t;return e=new kg({props:{$$slots:{default:[pO]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function mO(n,e,t){let i;Je(n,aa,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),me.admins.authWithPassword(l,o).then(()=>{yg(),ki("/")}).catch(()=>{rl("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 gO extends Ce{constructor(e){super(),$e(this,e,mO,hO,ke,{})}}function _O(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M;i=new _e({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[vO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[yO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[kO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[wO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}});let T=n[3]&&Kp(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),c=O(),d=v("div"),h=v("div"),m=O(),T&&T.c(),b=O(),g=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(h,"class","flex-fill"),p(y,"class","txt"),p(g,"type","submit"),p(g,"class","btn btn-expanded"),g.disabled=k=!n[3]||n[2],ee(g,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(D,A){$(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),R(a,e,null),_(e,u),R(f,e,null),_(e,c),_(e,d),_(d,h),_(d,m),T&&T.m(d,null),_(d,b),_(d,g),_(g,y),w=!0,C||(M=W(g,"click",n[13]),C=!0)},p(D,A){const P={};A&1572865&&(P.$$scope={dirty:A,ctx:D}),i.$set(P);const L={};A&1572865&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const V={};A&1572865&&(V.$$scope={dirty:A,ctx:D}),a.$set(V);const F={};A&1572865&&(F.$$scope={dirty:A,ctx:D}),f.$set(F),D[3]?T?T.p(D,A):(T=Kp(D),T.c(),T.m(d,b)):T&&(T.d(1),T=null),(!w||A&12&&k!==(k=!D[3]||D[2]))&&(g.disabled=k),(!w||A&4)&&ee(g,"btn-loading",D[2])},i(D){w||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(a.$$.fragment,D),E(f.$$.fragment,D),w=!0)},o(D){I(i.$$.fragment,D),I(o.$$.fragment,D),I(a.$$.fragment,D),I(f.$$.fragment,D),w=!1},d(D){D&&S(e),H(i),H(o),H(a),H(f),T&&T.d(),C=!1,M()}}}function bO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){$(t,e,i)},p:x,i:x,o:x,d(t){t&&S(e)}}}function vO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application name"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].meta.appName),r||(a=W(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&&pe(l,u[0].meta.appName)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function yO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application url"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].meta.appUrl),r||(a=W(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&&pe(l,u[0].meta.appUrl)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function kO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Logs max days retention"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].logs.maxDays),r||(a=W(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&&rt(l.value)!==u[0].logs.maxDays&&pe(l,u[0].logs.maxDays)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function wO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){$(c,e,d),e.checked=n[0].meta.hideControls,$(c,i,d),$(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"change",n[11]),Le(Be.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&S(e),c&&S(i),c&&S(s),u=!1,Re(f)}}}function Kp(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-secondary btn-hint"),e.disabled=n[2]},m(l,o){$(l,e,o),_(e,t),i||(s=W(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&S(e),i=!1,s()}}}function SO(n){let e,t,i,s,l,o,r,a,u;const f=[bO,_O],c=[];function d(h,m){return h[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=O(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(h,m){$(h,e,m),$(h,t,m),$(h,i,m),_(i,s),c[l].m(s,null),r=!0,a||(u=W(s,"submit",ut(n[4])),a=!0)},p(h,m){let b=l;l=d(h),l===b?c[l].p(h,m):(be(),I(c[b],1,1,()=>{c[b]=null}),ve(),o=c[l],o?o.p(h,m):(o=c[l]=f[l](h),o.c()),E(o,1),o.m(s,null))},i(h){r||(E(o),r=!0)},o(h){I(o),r=!1},d(h){h&&S(e),h&&S(t),h&&S(i),c[l].d(),a=!1,u()}}}function $O(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[SO]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),$(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&S(t),H(i,l)}}}function CO(n,e,t){let i,s,l,o;Je(n,ks,T=>t(14,s=T)),Je(n,_o,T=>t(15,l=T)),Je(n,mt,T=>t(16,o=T)),Ht(mt,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const T=await me.settings.getAll()||{};m(T)}catch(T){me.errorResponseHandler(T)}t(1,u=!1)}async function h(){if(!(f||!i)){t(2,f=!0);try{const T=await me.settings.update(B.filterRedactedProps(a));m(T),Lt("Successfully saved application settings.")}catch(T){me.errorResponseHandler(T)}t(2,f=!1)}}function m(T={}){var D,A;Ht(_o,l=(D=T==null?void 0:T.meta)==null?void 0:D.appName,l),Ht(ks,s=!!((A=T==null?void 0:T.meta)!=null&&A.hideControls),s),t(0,a={meta:(T==null?void 0:T.meta)||{},logs:(T==null?void 0:T.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function b(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function k(){a.logs.maxDays=rt(this.value),t(0,a)}function w(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>b(),M=()=>h();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,h,b,r,c,g,y,k,w,C,M]}class MO extends Ce{constructor(e){super(),$e(this,e,CO,$O,ke,{})}}function TO(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=O(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),Un(s,a)},m(u,f){$(u,e,f),_(e,t),$(u,i,f),$(u,s,f),s.autofocus&&s.focus(),l||(o=[Le(Be.call(null,t,{position:"left",text:"Set new value"})),W(t,"click",n[6])],l=!0)},p(u,f){Un(s,a=Yt(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&S(e),u&&S(i),u&&S(s),l=!1,Re(o)}}}function DO(n){let e;function t(l,o){return l[3]?OO:TO}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function EO(n,e,t){const i=["value","mask"];let s=wt(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await $n(),r==null||r.focus()}const f=()=>u();function c(h){le[h?"unshift":"push"](()=>{r=h,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ye(Ye({},e),Wn(h)),t(5,s=wt(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,o=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class Ga extends Ce{constructor(e){super(),$e(this,e,EO,DO,ke,{value:0,mask:1})}}function AO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;return{c(){e=v("label"),t=z("Subject"),s=O(),l=v("input"),r=O(),a=v("div"),u=z(`Available placeholder parameters: +Updated: ${g[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=g[29])&&p(c,"id",d),y[0]&2&&h!==(h=g[1].id)&&c.value!==h&&(c.value=h)},d(g){g&&w(e),g&&w(o),g&&w(r),g&&w(f),g&&w(c),m=!1,b()}}}function Hp(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=O(),Ln(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),_(e,t),_(e,s),o||(r=W(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function UT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("input"),p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),pe(r,n[3]),u||(f=W(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]&&pe(r,c[3])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function jp(n){let e,t;return e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[WT,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(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||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function WT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),_(s,l),r||(a=W(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function qp(n){let e,t,i,s,l,o,r,a,u;return s=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[YT,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new _e({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[KT,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){S(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&536871424|c[1]&4&&(h.$$scope={dirty:c,ctx:f}),r.$set(h)},i(f){u||(E(s.$$.fragment,f),E(r.$$.fragment,f),f&&Qe(()=>{a||(a=je(t,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){I(s.$$.fragment,f),I(r.$$.fragment,f),f&&(a||(a=je(t,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function YT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),pe(r,n[8]),u||(f=W(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]&&pe(r,c[8])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function KT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),pe(r,n[9]),u||(f=W(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]&&pe(r,c[9])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function JT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m=!n[1].isNew&&Rp(n),b=[0,1,2,3,4,5,6,7,8,9],g=[];for(let $=0;$<10;$+=1)g[$]=Hp(Fp(n,b,$));a=new _e({props:{class:"form-field required",name:"email",$$slots:{default:[UT,({uniqueId:$})=>({29:$}),({uniqueId:$})=>[$?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].isNew&&jp(n),k=(n[1].isNew||n[4])&&qp(n);return{c(){e=v("form"),m&&m.c(),t=O(),i=v("div"),s=v("p"),s.textContent="Avatar",l=O(),o=v("div");for(let $=0;$<10;$+=1)g[$].c();r=O(),j(a.$$.fragment),u=O(),y&&y.c(),f=O(),k&&k.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m($,C){S($,e,C),m&&m.m(e,null),_(e,t),_(e,i),_(i,s),_(i,l),_(i,o);for(let M=0;M<10;M+=1)g[M].m(o,null);_(e,r),R(a,e,null),_(e,u),y&&y.m(e,null),_(e,f),k&&k.m(e,null),c=!0,d||(h=W(e,"submit",ut(n[12])),d=!0)},p($,C){if($[1].isNew?m&&(be(),I(m,1,1,()=>{m=null}),ve()):m?(m.p($,C),C[0]&2&&E(m,1)):(m=Rp($),m.c(),E(m,1),m.m(e,t)),C[0]&4){b=[0,1,2,3,4,5,6,7,8,9];let T;for(T=0;T<10;T+=1){const D=Fp($,b,T);g[T]?g[T].p(D,C):(g[T]=Hp(D),g[T].c(),g[T].m(o,null))}for(;T<10;T+=1)g[T].d(1)}const M={};C[0]&536870920|C[1]&4&&(M.$$scope={dirty:C,ctx:$}),a.$set(M),$[1].isNew?y&&(be(),I(y,1,1,()=>{y=null}),ve()):y?(y.p($,C),C[0]&2&&E(y,1)):(y=jp($),y.c(),E(y,1),y.m(e,f)),$[1].isNew||$[4]?k?(k.p($,C),C[0]&18&&E(k,1)):(k=qp($),k.c(),E(k,1),k.m(e,null)):k&&(be(),I(k,1,1,()=>{k=null}),ve())},i($){c||(E(m),E(a.$$.fragment,$),E(y),E(k),c=!0)},o($){I(m),I(a.$$.fragment,$),I(y),I(k),c=!1},d($){$&&w(e),m&&m.d(),Tt(g,$),H(a),y&&y.d(),k&&k.d(),d=!1,h()}}}function ZT(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=z(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&ue(i,t)},d(s){s&&w(e)}}}function Vp(n){let e,t,i,s,l,o,r,a,u;return o=new Zn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[GT]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=O(),s=v("i"),l=O(),j(o.$$.fragment),r=O(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-secondary"),p(a,"class","flex-fill")},m(f,c){S(f,e,c),_(e,t),_(e,i),_(e,s),_(e,l),R(o,e,null),S(f,r,c),S(f,a,c),u=!0},p(f,c){const d={};c[1]&4&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(E(o.$$.fragment,f),u=!0)},o(f){I(o.$$.fragment,f),u=!1},d(f){f&&w(e),H(o),f&&w(r),f&&w(a)}}}function GT(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[15]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function XT(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&Vp(n);return{c(){h&&h.c(),e=O(),t=v("button"),i=v("span"),i.textContent="Cancel",s=O(),l=v("button"),o=v("span"),a=z(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],ee(l,"btn-loading",n[6])},m(m,b){h&&h.m(m,b),S(m,e,b),S(m,t,b),_(t,i),S(m,s,b),S(m,l,b),_(l,o),_(o,a),f=!0,c||(d=W(t,"click",n[16]),c=!0)},p(m,b){m[1].isNew?h&&(be(),I(h,1,1,()=>{h=null}),ve()):h?(h.p(m,b),b[0]&2&&E(h,1)):(h=Vp(m),h.c(),E(h,1),h.m(e.parentNode,e)),(!f||b[0]&64)&&(t.disabled=m[6]),(!f||b[0]&2)&&r!==(r=m[1].isNew?"Create":"Save changes")&&ue(a,r),(!f||b[0]&1088&&u!==(u=!m[10]||m[6]))&&(l.disabled=u),(!f||b[0]&64)&&ee(l,"btn-loading",m[6])},i(m){f||(E(h),f=!0)},o(m){I(h),f=!1},d(m){h&&h.d(m),m&&w(e),m&&w(t),m&&w(s),m&&w(l),c=!1,d()}}}function QT(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[XT],header:[ZT],default:[JT]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){j(e.$$.fragment)},m(s,l){R(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||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[23](null),H(e,s)}}}function xT(n,e,t){let i;const s=It(),l="admin_"+B.randomString(5);let o,r=new Yi,a=!1,u=!1,f=0,c="",d="",h="",m=!1;function b(X){return y(X),t(7,u=!0),o==null?void 0:o.show()}function g(){return o==null?void 0:o.hide()}function y(X){t(1,r=X!=null&&X.clone?X.clone():new Yi),k()}function k(){t(4,m=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,h=""),Fn({})}function $(){if(a||!i)return;t(6,a=!0);const X={email:c,avatar:f};(r.isNew||m)&&(X.password=d,X.passwordConfirm=h);let Z;r.isNew?Z=me.admins.create(X):Z=me.admins.update(r.id,X),Z.then(async ie=>{var J;t(7,u=!1),g(),Lt(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",ie),((J=me.authStore.model)==null?void 0:J.id)===ie.id&&me.authStore.save(me.authStore.token,ie)}).catch(ie=>{me.errorResponseHandler(ie)}).finally(()=>{t(6,a=!1)})}function C(){!(r!=null&&r.id)||yn("Do you really want to delete the selected admin?",()=>me.admins.delete(r.id).then(()=>{t(7,u=!1),g(),Lt("Successfully deleted admin."),s("delete",r)}).catch(X=>{me.errorResponseHandler(X)}))}const M=()=>C(),T=()=>g(),D=X=>t(2,f=X);function A(){c=this.value,t(3,c)}function P(){m=this.checked,t(4,m)}function L(){d=this.value,t(8,d)}function V(){h=this.value,t(9,h)}const F=()=>i&&u?(yn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),g()}),!1):!0;function U(X){le[X?"unshift":"push"](()=>{o=X,t(5,o)})}function G(X){Ve.call(this,n,X)}function K(X){Ve.call(this,n,X)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||m||c!==r.email||f!==r.avatar)},[g,r,f,c,m,o,a,u,d,h,i,l,$,C,b,M,T,D,A,P,L,V,F,U,G,K]}class eO extends Ce{constructor(e){super(),$e(this,e,xT,QT,ke,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function zp(n,e,t){const i=n.slice();return i[24]=e[t],i}function tO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",B.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function nO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",B.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function iO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function sO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",B.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:x,d(l){l&&w(e)}}}function Bp(n){let e;function t(l,o){return l[5]?oO:lO}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function lO(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Up(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Up(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function oO(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function Up(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[17]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function Wp(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yp(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,m=e[24].email+"",b,g,y,k,$,C,M,T,D,A,P,L,V,F;u=new Za({props:{id:e[24].id}});let U=e[24].id===e[7].id&&Wp();$=new Ki({props:{date:e[24].created}}),T=new Ki({props:{date:e[24].updated}});function G(){return e[15](e[24])}function K(...X){return e[16](e[24],...X)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=O(),a=v("td"),j(u.$$.fragment),f=O(),U&&U.c(),c=O(),d=v("td"),h=v("span"),b=z(m),y=O(),k=v("td"),j($.$$.fragment),C=O(),M=v("td"),j(T.$$.fragment),D=O(),A=v("td"),A.innerHTML='',P=O(),Ln(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",g=e[24].email),p(d,"class","col-type-email col-field-email"),p(k,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(A,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(X,Z){S(X,t,Z),_(t,i),_(i,s),_(s,l),_(t,r),_(t,a),R(u,a,null),_(a,f),U&&U.m(a,null),_(t,c),_(t,d),_(d,h),_(h,b),_(t,y),_(t,k),R($,k,null),_(t,C),_(t,M),R(T,M,null),_(t,D),_(t,A),_(t,P),L=!0,V||(F=[W(t,"click",G),W(t,"keydown",K)],V=!0)},p(X,Z){e=X,(!L||Z&16&&!Ln(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const ie={};Z&16&&(ie.id=e[24].id),u.$set(ie),e[24].id===e[7].id?U||(U=Wp(),U.c(),U.m(a,null)):U&&(U.d(1),U=null),(!L||Z&16)&&m!==(m=e[24].email+"")&&ue(b,m),(!L||Z&16&&g!==(g=e[24].email))&&p(h,"title",g);const J={};Z&16&&(J.date=e[24].created),$.$set(J);const fe={};Z&16&&(fe.date=e[24].updated),T.$set(fe)},i(X){L||(E(u.$$.fragment,X),E($.$$.fragment,X),E(T.$$.fragment,X),L=!0)},o(X){I(u.$$.fragment,X),I($.$$.fragment,X),I(T.$$.fragment,X),L=!1},d(X){X&&w(t),H(u),U&&U.d(),H($),H(T),V=!1,Re(F)}}}function rO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M=[],T=new Map,D;function A(J){n[11](J)}let P={class:"col-type-text",name:"id",$$slots:{default:[tO]},$$scope:{ctx:n}};n[2]!==void 0&&(P.sort=n[2]),o=new Ft({props:P}),le.push(()=>ye(o,"sort",A));function L(J){n[12](J)}let V={class:"col-type-email col-field-email",name:"email",$$slots:{default:[nO]},$$scope:{ctx:n}};n[2]!==void 0&&(V.sort=n[2]),u=new Ft({props:V}),le.push(()=>ye(u,"sort",L));function F(J){n[13](J)}let U={class:"col-type-date col-field-created",name:"created",$$slots:{default:[iO]},$$scope:{ctx:n}};n[2]!==void 0&&(U.sort=n[2]),d=new Ft({props:U}),le.push(()=>ye(d,"sort",F));function G(J){n[14](J)}let K={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[sO]},$$scope:{ctx:n}};n[2]!==void 0&&(K.sort=n[2]),b=new Ft({props:K}),le.push(()=>ye(b,"sort",G));let X=n[4];const Z=J=>J[24].id;for(let J=0;Jr=!1)),o.$set(Y);const re={};fe&134217728&&(re.$$scope={dirty:fe,ctx:J}),!f&&fe&4&&(f=!0,re.sort=J[2],Me(()=>f=!1)),u.$set(re);const Oe={};fe&134217728&&(Oe.$$scope={dirty:fe,ctx:J}),!h&&fe&4&&(h=!0,Oe.sort=J[2],Me(()=>h=!1)),d.$set(Oe);const ge={};fe&134217728&&(ge.$$scope={dirty:fe,ctx:J}),!g&&fe&4&&(g=!0,ge.sort=J[2],Me(()=>g=!1)),b.$set(ge),fe&186&&(X=J[4],be(),M=bt(M,fe,Z,1,J,X,T,C,xt,Yp,null,zp),ve(),!X.length&&ie?ie.p(J,fe):X.length?ie&&(ie.d(1),ie=null):(ie=Bp(J),ie.c(),ie.m(C,null))),(!D||fe&32)&&ee(e,"table-loading",J[5])},i(J){if(!D){E(o.$$.fragment,J),E(u.$$.fragment,J),E(d.$$.fragment,J),E(b.$$.fragment,J);for(let fe=0;fe + New admin`,h=O(),j(m.$$.fragment),b=O(),j(g.$$.fragment),y=O(),T&&T.c(),k=Fe(),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")},m(D,A){S(D,e,A),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(e,r),R(a,e,null),_(e,u),_(e,f),_(e,c),_(e,d),S(D,h,A),R(m,D,A),S(D,b,A),R(g,D,A),S(D,y,A),T&&T.m(D,A),S(D,k,A),$=!0,C||(M=W(d,"click",n[9]),C=!0)},p(D,A){(!$||A&64)&&ue(o,D[6]);const P={};A&2&&(P.value=D[1]),m.$set(P);const L={};A&134217918&&(L.$$scope={dirty:A,ctx:D}),g.$set(L),D[4].length?T?T.p(D,A):(T=Kp(D),T.c(),T.m(k.parentNode,k)):T&&(T.d(1),T=null)},i(D){$||(E(a.$$.fragment,D),E(m.$$.fragment,D),E(g.$$.fragment,D),$=!0)},o(D){I(a.$$.fragment,D),I(m.$$.fragment,D),I(g.$$.fragment,D),$=!1},d(D){D&&w(e),H(a),D&&w(h),H(m,D),D&&w(b),H(g,D),D&&w(y),T&&T.d(D),D&&w(k),C=!1,M()}}}function uO(n){let e,t,i,s,l,o;e=new Ci({}),i=new cn({props:{$$slots:{default:[aO]},$$scope:{ctx:n}}});let r={};return l=new eO({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[18](null),H(l,a)}}}function fO(n,e,t){let i,s,l;Je(n,aa,V=>t(21,i=V)),Je(n,mt,V=>t(6,s=V)),Je(n,ya,V=>t(7,l=V)),Ht(mt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),me.admins.getFullList(100,{sort:c||"-created",filter:f}).then(V=>{t(4,a=V),t(5,u=!1)}).catch(V=>{V!=null&&V.isAbort||(t(5,u=!1),console.warn(V),h(),me.errorResponseHandler(V,!1))})}function h(){t(4,a=[])}const m=()=>d(),b=()=>r==null?void 0:r.show(),g=V=>t(1,f=V.detail);function y(V){c=V,t(2,c)}function k(V){c=V,t(2,c)}function $(V){c=V,t(2,c)}function C(V){c=V,t(2,c)}const M=V=>r==null?void 0:r.show(V),T=(V,F)=>{(F.code==="Enter"||F.code==="Space")&&(F.preventDefault(),r==null||r.show(V))},D=()=>t(1,f="");function A(V){le[V?"unshift":"push"](()=>{r=V,t(3,r)})}const P=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const V=new URLSearchParams({filter:f,sort:c}).toString();ki("/settings/admins?"+V),d()}},[d,f,c,r,a,u,s,l,m,b,g,y,k,$,C,M,T,D,A,P,L]}class cO extends Ce{constructor(e){super(),$e(this,e,fO,uO,ke,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function dO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Email"),s=O(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0]),l.focus(),r||(a=W(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]&&pe(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function pO(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=z("Password"),s=O(),l=v("input"),r=O(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,h){S(d,e,h),_(e,t),S(d,s,h),S(d,l,h),pe(l,n[1]),S(d,r,h),S(d,a,h),_(a,u),f||(c=[W(l,"input",n[5]),Le(zt.call(null,u))],f=!0)},p(d,h){h&256&&i!==(i=d[8])&&p(e,"for",i),h&256&&o!==(o=d[8])&&p(l,"id",o),h&2&&l.value!==d[1]&&pe(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),f=!1,Re(c)}}}function hO(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new _e({props:{class:"form-field required",name:"identity",$$slots:{default:[dO,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"password",$$slots:{default:[pO,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),a=v("button"),a.innerHTML=`Login + `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),ee(a,"btn-disabled",n[2]),ee(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){S(d,e,h),_(e,t),_(e,i),R(s,e,null),_(e,l),R(o,e,null),_(e,r),_(e,a),u=!0,f||(c=W(e,"submit",ut(n[3])),f=!0)},p(d,h){const m={};h&769&&(m.$$scope={dirty:h,ctx:d}),s.$set(m);const b={};h&770&&(b.$$scope={dirty:h,ctx:d}),o.$set(b),(!u||h&4)&&ee(a,"btn-disabled",d[2]),(!u||h&4)&&ee(a,"btn-loading",d[2])},i(d){u||(E(s.$$.fragment,d),E(o.$$.fragment,d),u=!0)},o(d){I(s.$$.fragment,d),I(o.$$.fragment,d),u=!1},d(d){d&&w(e),H(s),H(o),f=!1,c()}}}function mO(n){let e,t;return e=new wg({props:{$$slots:{default:[hO]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function gO(n,e,t){let i;Je(n,aa,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),me.admins.authWithPassword(l,o).then(()=>{kg(),ki("/")}).catch(()=>{rl("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 _O extends Ce{constructor(e){super(),$e(this,e,gO,mO,ke,{})}}function bO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M;i=new _e({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[yO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[kO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[wO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),f=new _e({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[SO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}});let T=n[3]&&Jp(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),c=O(),d=v("div"),h=v("div"),m=O(),T&&T.c(),b=O(),g=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(h,"class","flex-fill"),p(y,"class","txt"),p(g,"type","submit"),p(g,"class","btn btn-expanded"),g.disabled=k=!n[3]||n[2],ee(g,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(D,A){S(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),R(a,e,null),_(e,u),R(f,e,null),_(e,c),_(e,d),_(d,h),_(d,m),T&&T.m(d,null),_(d,b),_(d,g),_(g,y),$=!0,C||(M=W(g,"click",n[13]),C=!0)},p(D,A){const P={};A&1572865&&(P.$$scope={dirty:A,ctx:D}),i.$set(P);const L={};A&1572865&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const V={};A&1572865&&(V.$$scope={dirty:A,ctx:D}),a.$set(V);const F={};A&1572865&&(F.$$scope={dirty:A,ctx:D}),f.$set(F),D[3]?T?T.p(D,A):(T=Jp(D),T.c(),T.m(d,b)):T&&(T.d(1),T=null),(!$||A&12&&k!==(k=!D[3]||D[2]))&&(g.disabled=k),(!$||A&4)&&ee(g,"btn-loading",D[2])},i(D){$||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(a.$$.fragment,D),E(f.$$.fragment,D),$=!0)},o(D){I(i.$$.fragment,D),I(o.$$.fragment,D),I(a.$$.fragment,D),I(f.$$.fragment,D),$=!1},d(D){D&&w(e),H(i),H(o),H(a),H(f),T&&T.d(),C=!1,M()}}}function vO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:x,i:x,o:x,d(t){t&&w(e)}}}function yO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application name"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].meta.appName),r||(a=W(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&&pe(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function kO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Application url"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].meta.appUrl),r||(a=W(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&&pe(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function wO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Logs max days retention"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].logs.maxDays),r||(a=W(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&&rt(l.value)!==u[0].logs.maxDays&&pe(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function SO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){S(c,e,d),e.checked=n[0].meta.hideControls,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"change",n[11]),Le(Be.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Re(f)}}}function Jp(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-secondary btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=W(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function $O(n){let e,t,i,s,l,o,r,a,u;const f=[vO,bO],c=[];function d(h,m){return h[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=O(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(h,m){S(h,e,m),S(h,t,m),S(h,i,m),_(i,s),c[l].m(s,null),r=!0,a||(u=W(s,"submit",ut(n[4])),a=!0)},p(h,m){let b=l;l=d(h),l===b?c[l].p(h,m):(be(),I(c[b],1,1,()=>{c[b]=null}),ve(),o=c[l],o?o.p(h,m):(o=c[l]=f[l](h),o.c()),E(o,1),o.m(s,null))},i(h){r||(E(o),r=!0)},o(h){I(o),r=!1},d(h){h&&w(e),h&&w(t),h&&w(i),c[l].d(),a=!1,u()}}}function CO(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[$O]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function MO(n,e,t){let i,s,l,o;Je(n,ks,T=>t(14,s=T)),Je(n,_o,T=>t(15,l=T)),Je(n,mt,T=>t(16,o=T)),Ht(mt,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const T=await me.settings.getAll()||{};m(T)}catch(T){me.errorResponseHandler(T)}t(1,u=!1)}async function h(){if(!(f||!i)){t(2,f=!0);try{const T=await me.settings.update(B.filterRedactedProps(a));m(T),Lt("Successfully saved application settings.")}catch(T){me.errorResponseHandler(T)}t(2,f=!1)}}function m(T={}){var D,A;Ht(_o,l=(D=T==null?void 0:T.meta)==null?void 0:D.appName,l),Ht(ks,s=!!((A=T==null?void 0:T.meta)!=null&&A.hideControls),s),t(0,a={meta:(T==null?void 0:T.meta)||{},logs:(T==null?void 0:T.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function b(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function k(){a.logs.maxDays=rt(this.value),t(0,a)}function $(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>b(),M=()=>h();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,h,b,r,c,g,y,k,$,C,M]}class TO extends Ce{constructor(e){super(),$e(this,e,MO,CO,ke,{})}}function OO(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=O(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),Un(s,a)},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Le(Be.call(null,t,{position:"left",text:"Set new value"})),W(t,"click",n[6])],l=!0)},p(u,f){Un(s,a=Yt(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Re(o)}}}function EO(n){let e;function t(l,o){return l[3]?DO:OO}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:x,o:x,d(l){s.d(l),l&&w(e)}}}function AO(n,e,t){const i=["value","mask"];let s=wt(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await $n(),r==null||r.focus()}const f=()=>u();function c(h){le[h?"unshift":"push"](()=>{r=h,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ye(Ye({},e),Wn(h)),t(5,s=wt(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,o=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class Ga extends Ce{constructor(e){super(),$e(this,e,AO,EO,ke,{value:0,mask:1})}}function IO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;return{c(){e=v("label"),t=z("Subject"),s=O(),l=v("input"),r=O(),a=v("div"),u=z(`Available placeholder parameters: `),f=v("span"),f.textContent=`{APP_NAME} `,c=z(`, `),d=v("span"),d.textContent=`{APP_URL} - `,h=z("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(g,y){$(g,e,y),_(e,t),$(g,s,y),$(g,l,y),pe(l,n[0].subject),$(g,r,y),$(g,a,y),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),m||(b=[W(l,"input",n[13]),W(f,"click",n[14]),W(d,"click",n[15])],m=!0)},p(g,y){y[1]&1&&i!==(i=g[31])&&p(e,"for",i),y[1]&1&&o!==(o=g[31])&&p(l,"id",o),y[0]&1&&l.value!==g[0].subject&&pe(l,g[0].subject)},d(g){g&&S(e),g&&S(s),g&&S(l),g&&S(r),g&&S(a),m=!1,Re(b)}}}function IO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return{c(){e=v("label"),t=z("Action URL"),s=O(),l=v("input"),r=O(),a=v("div"),u=z(`Available placeholder parameters: + `,h=z("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(g,y){S(g,e,y),_(e,t),S(g,s,y),S(g,l,y),pe(l,n[0].subject),S(g,r,y),S(g,a,y),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),m||(b=[W(l,"input",n[13]),W(f,"click",n[14]),W(d,"click",n[15])],m=!0)},p(g,y){y[1]&1&&i!==(i=g[31])&&p(e,"for",i),y[1]&1&&o!==(o=g[31])&&p(l,"id",o),y[0]&1&&l.value!==g[0].subject&&pe(l,g[0].subject)},d(g){g&&w(e),g&&w(s),g&&w(l),g&&w(r),g&&w(a),m=!1,Re(b)}}}function PO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return{c(){e=v("label"),t=z("Action URL"),s=O(),l=v("input"),r=O(),a=v("div"),u=z(`Available placeholder parameters: `),f=v("span"),f.textContent=`{APP_NAME} `,c=z(`, `),d=v("span"),d.textContent=`{APP_URL} `,h=z(`, - `),m=v("span"),m.textContent="{TOKEN}",b=z("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(m,"title","Required parameter"),p(a,"class","help-block")},m(k,w){$(k,e,w),_(e,t),$(k,s,w),$(k,l,w),pe(l,n[0].actionUrl),$(k,r,w),$(k,a,w),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,b),g||(y=[W(l,"input",n[16]),W(f,"click",n[17]),W(d,"click",n[18]),W(m,"click",n[19])],g=!0)},p(k,w){w[1]&1&&i!==(i=k[31])&&p(e,"for",i),w[1]&1&&o!==(o=k[31])&&p(l,"id",o),w[0]&1&&l.value!==k[0].actionUrl&&pe(l,k[0].actionUrl)},d(k){k&&S(e),k&&S(s),k&&S(l),k&&S(r),k&&S(a),g=!1,Re(y)}}}function PO(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){$(l,e,o),pe(e,n[0].body),i||(s=W(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&pe(e,l[0].body)},i:x,o:x,d(l){l&&S(e),i=!1,s()}}}function LO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>ye(e,"value",l))),{c(){e&&j(e.$$.fragment),i=Fe()},m(a,u){e&&R(e,a,u),$(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,Me(()=>t=!1)),o!==(o=a[4])){if(e){be();const c=e;I(c.$$.fragment,1,0,()=>{H(c,1)}),ve()}o?(e=jt(o,r(a)),le.push(()=>ye(e,"value",l)),j(e.$$.fragment),E(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&S(i),e&&H(e,a)}}}function NO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C;const M=[LO,PO],T=[];function D(A,P){return A[4]&&!A[5]?0:1}return l=D(n),o=T[l]=M[l](n),{c(){e=v("label"),t=z("Body (HTML)"),s=O(),o.c(),r=O(),a=v("div"),u=z(`Available placeholder parameters: + `),m=v("span"),m.textContent="{TOKEN}",b=z("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(m,"title","Required parameter"),p(a,"class","help-block")},m(k,$){S(k,e,$),_(e,t),S(k,s,$),S(k,l,$),pe(l,n[0].actionUrl),S(k,r,$),S(k,a,$),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,b),g||(y=[W(l,"input",n[16]),W(f,"click",n[17]),W(d,"click",n[18]),W(m,"click",n[19])],g=!0)},p(k,$){$[1]&1&&i!==(i=k[31])&&p(e,"for",i),$[1]&1&&o!==(o=k[31])&&p(l,"id",o),$[0]&1&&l.value!==k[0].actionUrl&&pe(l,k[0].actionUrl)},d(k){k&&w(e),k&&w(s),k&&w(l),k&&w(r),k&&w(a),g=!1,Re(y)}}}function LO(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),pe(e,n[0].body),i||(s=W(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&pe(e,l[0].body)},i:x,o:x,d(l){l&&w(e),i=!1,s()}}}function NO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>ye(e,"value",l))),{c(){e&&j(e.$$.fragment),i=Fe()},m(a,u){e&&R(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,Me(()=>t=!1)),o!==(o=a[4])){if(e){be();const c=e;I(c.$$.fragment,1,0,()=>{H(c,1)}),ve()}o?(e=jt(o,r(a)),le.push(()=>ye(e,"value",l)),j(e.$$.fragment),E(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&I(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function FO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C;const M=[NO,LO],T=[];function D(A,P){return A[4]&&!A[5]?0:1}return l=D(n),o=T[l]=M[l](n),{c(){e=v("label"),t=z("Body (HTML)"),s=O(),o.c(),r=O(),a=v("div"),u=z(`Available placeholder parameters: `),f=v("span"),f.textContent=`{APP_NAME} `,c=z(`, `),d=v("span"),d.textContent=`{APP_URL} @@ -146,8 +146,8 @@ Updated: ${g[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=g[29])&&p(c," `),m=v("span"),m.textContent=`{TOKEN} `,b=z(`, `),g=v("span"),g.textContent=`{ACTION_URL} - `,y=z("."),p(e,"for",i=n[31]),p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(g,"class","label label-sm link-primary txt-mono"),p(g,"title","Required parameter"),p(a,"class","help-block")},m(A,P){$(A,e,P),_(e,t),$(A,s,P),T[l].m(A,P),$(A,r,P),$(A,a,P),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,b),_(a,g),_(a,y),k=!0,w||(C=[W(f,"click",n[22]),W(d,"click",n[23]),W(m,"click",n[24]),W(g,"click",n[25])],w=!0)},p(A,P){(!k||P[1]&1&&i!==(i=A[31]))&&p(e,"for",i);let L=l;l=D(A),l===L?T[l].p(A,P):(be(),I(T[L],1,1,()=>{T[L]=null}),ve(),o=T[l],o?o.p(A,P):(o=T[l]=M[l](A),o.c()),E(o,1),o.m(r.parentNode,r))},i(A){k||(E(o),k=!0)},o(A){I(o),k=!1},d(A){A&&S(e),A&&S(s),T[l].d(A),A&&S(r),A&&S(a),w=!1,Re(C)}}}function FO(n){let e,t,i,s,l,o;return e=new _e({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[AO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new _e({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[IO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new _e({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[NO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(r,a){R(e,r,a),$(r,t,a),R(i,r,a),$(r,s,a),R(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(E(e.$$.fragment,r),E(i.$$.fragment,r),E(l.$$.fragment,r),o=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&S(t),H(i,r),r&&S(s),H(l,r)}}}function Jp(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){$(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&S(e),o&&t&&t.end(),s=!1,l()}}}function RO(n){let e,t,i,s,l,o,r,a,u,f,c=n[6]&&Jp();return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),l=z(n[2]),o=O(),r=v("div"),a=O(),c&&c.c(),u=Fe(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(d,h){$(d,e,h),_(e,t),_(e,i),_(e,s),_(s,l),$(d,o,h),$(d,r,h),$(d,a,h),c&&c.m(d,h),$(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&ue(l,d[2]),d[6]?c?h[0]&64&&E(c,1):(c=Jp(),c.c(),E(c,1),c.m(u.parentNode,u)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){f||(E(c),f=!0)},o(d){I(c),f=!1},d(d){d&&S(e),d&&S(o),d&&S(r),d&&S(a),c&&c.d(d),d&&S(u)}}}function HO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[RO],default:[FO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=J));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Zp,d=!1;function h(){f==null||f.expand()}function m(){f==null||f.collapse()}function b(){f==null||f.collapseSiblings()}async function g(){c||d||(t(5,d=!0),t(4,c=(await st(()=>import("./CodeEditor.244d40d4.js"),["./CodeEditor.244d40d4.js","./index.9c8b95cd.js"],import.meta.url)).default),Zp=c,t(5,d=!1))}function y(J){B.copyToClipboard(J),bg(`Copied ${J} to clipboard`,2e3)}g();function k(){u.subject=this.value,t(0,u)}const w=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),D=()=>y("{APP_URL}"),A=()=>y("{TOKEN}");function P(J){n.$$.not_equal(u.body,J)&&(u.body=J,t(0,u))}function L(){u.body=this.value,t(0,u)}const V=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),U=()=>y("{TOKEN}"),G=()=>y("{ACTION_URL}");function K(J){le[J?"unshift":"push"](()=>{f=J,t(3,f)})}function X(J){Ve.call(this,n,J)}function Z(J){Ve.call(this,n,J)}function ie(J){Ve.call(this,n,J)}return n.$$set=J=>{e=Ye(Ye({},e),Wn(J)),t(8,l=wt(e,s)),"key"in J&&t(1,r=J.key),"title"in J&&t(2,a=J.title),"config"in J&&t(0,u=J.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||al(r))},[u,r,a,f,c,d,i,y,l,h,m,b,o,k,w,C,M,T,D,A,P,L,V,F,U,G,K,X,Z,ie]}class $r extends Ce{constructor(e){super(),$e(this,e,jO,HO,ke,{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 Gp(n,e,t){const i=n.slice();return i[22]=e[t],i}function Xp(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=O(),o=v("label"),a=z(r),f=O(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(h,m){$(h,t,m),_(t,i),i.checked=i.__value===e[2],_(t,l),_(t,o),_(o,a),_(t,f),c||(d=W(i,"change",e[11]),c=!0)},p(h,m){e=h,m&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),m&4&&(i.checked=i.__value===e[2]),m&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(h){h&&S(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function qO(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new _e({props:{class:"form-field required m-0",name:"email",$$slots:{default:[VO,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),j(t.$$.fragment),i=O(),j(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){$(a,e,u),R(t,e,null),_(e,i),R(s,e,null),l=!0,o||(r=W(e,"submit",ut(n[14])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(E(t.$$.fragment,a),E(s.$$.fragment,a),l=!0)},o(a){I(t.$$.fragment,a),I(s.$$.fragment,a),l=!1},d(a){a&&S(e),H(t),H(s),o=!1,r()}}}function BO(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}function UO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=z("Close"),i=O(),s=v("button"),l=v("i"),o=O(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],ee(s,"btn-loading",n[4])},m(c,d){$(c,e,d),_(e,t),$(c,i,d),$(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"click",n[0]),W(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&ee(s,"btn-loading",c[4])},d(c){c&&S(e),c&&S(i),c&&S(s),u=!1,Re(f)}}}function WO(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[UO],header:[BO],default:[zO]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[16](null),H(e,s)}}}const Cr="last_email_test",Qp="email_test_request";function YO(n,e,t){let i;const s=It(),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(Cr),u=o[0].value,f=!1,c=null;function d(A="",P=""){t(1,a=A||localStorage.getItem(Cr)),t(2,u=P||o[0].value),Fn({}),r==null||r.show()}function h(){return clearTimeout(c),r==null?void 0:r.hide()}async function m(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Cr,a),clearTimeout(c),c=setTimeout(()=>{me.cancelRequest(Qp),rl("Test email send timeout.")},3e4);try{await me.settings.testEmail(a,u,{$cancelKey:Qp}),Lt("Successfully sent test email."),s("submit"),t(4,f=!1),await $n(),h()}catch(A){t(4,f=!1),me.errorResponseHandler(A)}clearTimeout(c)}}const b=[[]],g=()=>m();function y(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const w=()=>m(),C=()=>!f;function M(A){le[A?"unshift":"push"](()=>{r=A,t(3,r)})}function T(A){Ve.call(this,n,A)}function D(A){Ve.call(this,n,A)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,m,d,g,y,b,k,w,C,M,T,D]}class KO extends Ce{constructor(e){super(),$e(this,e,YO,WO,ke,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function JO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M,T,D,A,P,L;i=new _e({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[GO,({uniqueId:Y})=>({29:Y}),({uniqueId:Y})=>Y?536870912:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[XO,({uniqueId:Y})=>({29:Y}),({uniqueId:Y})=>Y?536870912:0]},$$scope:{ctx:n}}});function V(Y){n[13](Y)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new $r({props:F}),le.push(()=>ye(u,"config",V));function U(Y){n[14](Y)}let G={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(G.config=n[0].meta.resetPasswordTemplate),d=new $r({props:G}),le.push(()=>ye(d,"config",U));function K(Y){n[15](Y)}let X={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(X.config=n[0].meta.confirmEmailChangeTemplate),b=new $r({props:X}),le.push(()=>ye(b,"config",K)),C=new _e({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[QO,({uniqueId:Y})=>({29:Y}),({uniqueId:Y})=>Y?536870912:0]},$$scope:{ctx:n}}});let Z=n[0].smtp.enabled&&xp(n);function ie(Y,re){return Y[4]?lD:sD}let J=ie(n),fe=J(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),c=O(),j(d.$$.fragment),m=O(),j(b.$$.fragment),y=O(),k=v("hr"),w=O(),j(C.$$.fragment),M=O(),Z&&Z.c(),T=O(),D=v("div"),A=v("div"),P=O(),fe.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(A,"class","flex-fill"),p(D,"class","flex")},m(Y,re){$(Y,e,re),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),$(Y,r,re),$(Y,a,re),R(u,a,null),_(a,c),R(d,a,null),_(a,m),R(b,a,null),$(Y,y,re),$(Y,k,re),$(Y,w,re),R(C,Y,re),$(Y,M,re),Z&&Z.m(Y,re),$(Y,T,re),$(Y,D,re),_(D,A),_(D,P),fe.m(D,null),L=!0},p(Y,re){const Oe={};re&1610612737&&(Oe.$$scope={dirty:re,ctx:Y}),i.$set(Oe);const ge={};re&1610612737&&(ge.$$scope={dirty:re,ctx:Y}),o.$set(ge);const ae={};!f&&re&1&&(f=!0,ae.config=Y[0].meta.verificationTemplate,Me(()=>f=!1)),u.$set(ae);const he={};!h&&re&1&&(h=!0,he.config=Y[0].meta.resetPasswordTemplate,Me(()=>h=!1)),d.$set(he);const de={};!g&&re&1&&(g=!0,de.config=Y[0].meta.confirmEmailChangeTemplate,Me(()=>g=!1)),b.$set(de);const Se={};re&1610612737&&(Se.$$scope={dirty:re,ctx:Y}),C.$set(Se),Y[0].smtp.enabled?Z?(Z.p(Y,re),re&1&&E(Z,1)):(Z=xp(Y),Z.c(),E(Z,1),Z.m(T.parentNode,T)):Z&&(be(),I(Z,1,1,()=>{Z=null}),ve()),J===(J=ie(Y))&&fe?fe.p(Y,re):(fe.d(1),fe=J(Y),fe&&(fe.c(),fe.m(D,null)))},i(Y){L||(E(i.$$.fragment,Y),E(o.$$.fragment,Y),E(u.$$.fragment,Y),E(d.$$.fragment,Y),E(b.$$.fragment,Y),E(C.$$.fragment,Y),E(Z),L=!0)},o(Y){I(i.$$.fragment,Y),I(o.$$.fragment,Y),I(u.$$.fragment,Y),I(d.$$.fragment,Y),I(b.$$.fragment,Y),I(C.$$.fragment,Y),I(Z),L=!1},d(Y){Y&&S(e),H(i),H(o),Y&&S(r),Y&&S(a),H(u),H(d),H(b),Y&&S(y),Y&&S(k),Y&&S(w),H(C,Y),Y&&S(M),Z&&Z.d(Y),Y&&S(T),Y&&S(D),fe.d()}}}function ZO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){$(t,e,i)},p:x,i:x,o:x,d(t){t&&S(e)}}}function GO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Sender name"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].meta.senderName),r||(a=W(l,"input",n[11]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderName&&pe(l,u[0].meta.senderName)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function XO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Sender address"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","email"),p(l,"id",o=n[29]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].meta.senderAddress),r||(a=W(l,"input",n[12]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderAddress&&pe(l,u[0].meta.senderAddress)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function QO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[29]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[29])},m(c,d){$(c,e,d),e.checked=n[0].smtp.enabled,$(c,i,d),$(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"change",n[16]),Le(Be.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d&536870912&&t!==(t=c[29])&&p(e,"id",t),d&1&&(e.checked=c[0].smtp.enabled),d&536870912&&a!==(a=c[29])&&p(s,"for",a)},d(c){c&&S(e),c&&S(i),c&&S(s),u=!1,Re(f)}}}function xp(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w;return i=new _e({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[xO,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[eD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[tD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"smtp.username",$$slots:{default:[nD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),b=new _e({props:{class:"form-field",name:"smtp.password",$$slots:{default:[iD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(b.$$.fragment),g=O(),y=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(m,"class","col-lg-6"),p(y,"class","col-lg-12"),p(e,"class","grid")},m(C,M){$(C,e,M),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(b,m,null),_(e,g),_(e,y),w=!0},p(C,M){const T={};M&1610612737&&(T.$$scope={dirty:M,ctx:C}),i.$set(T);const D={};M&1610612737&&(D.$$scope={dirty:M,ctx:C}),o.$set(D);const A={};M&1610612737&&(A.$$scope={dirty:M,ctx:C}),u.$set(A);const P={};M&1610612737&&(P.$$scope={dirty:M,ctx:C}),d.$set(P);const L={};M&1610612737&&(L.$$scope={dirty:M,ctx:C}),b.$set(L)},i(C){w||(E(i.$$.fragment,C),E(o.$$.fragment,C),E(u.$$.fragment,C),E(d.$$.fragment,C),E(b.$$.fragment,C),C&&Qe(()=>{k||(k=je(e,St,{duration:150},!0)),k.run(1)}),w=!0)},o(C){I(i.$$.fragment,C),I(o.$$.fragment,C),I(u.$$.fragment,C),I(d.$$.fragment,C),I(b.$$.fragment,C),C&&(k||(k=je(e,St,{duration:150},!1)),k.run(0)),w=!1},d(C){C&&S(e),H(i),H(o),H(u),H(d),H(b),C&&k&&k.end()}}}function xO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("SMTP server host"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].smtp.host),r||(a=W(l,"input",n[17]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.host&&pe(l,u[0].smtp.host)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function eD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Port"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","number"),p(l,"id",o=n[29]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].smtp.port),r||(a=W(l,"input",n[18]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].smtp.port&&pe(l,u[0].smtp.port)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function tD(n){let e,t,i,s,l,o,r;function a(f){n[19](f)}let u={id:n[29],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Es({props:u}),le.push(()=>ye(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("TLS Encryption"),s=O(),j(l.$$.fragment),p(e,"for",i=n[29])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&536870912&&i!==(i=f[29]))&&p(e,"for",i);const d={};c&536870912&&(d.id=f[29]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function nD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Username"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29])},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].smtp.username),r||(a=W(l,"input",n[20]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.username&&pe(l,u[0].smtp.username)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function iD(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[29]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new Ga({props:u}),le.push(()=>ye(l,"value",a)),{c(){e=v("label"),t=z("Password"),s=O(),j(l.$$.fragment),p(e,"for",i=n[29])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&536870912&&i!==(i=f[29]))&&p(e,"for",i);const d={};c&536870912&&(d.id=f[29]),!o&&c&1&&(o=!0,d.value=f[0].smtp.password,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function sD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[24]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function lD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],ee(s,"btn-loading",n[3])},m(u,f){$(u,e,f),_(e,t),$(u,i,f),$(u,s,f),_(s,l),r||(a=[W(e,"click",n[22]),W(s,"click",n[23])],r=!0)},p(u,f){f&8&&(e.disabled=u[3]),f&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f&8&&ee(s,"btn-loading",u[3])},d(u){u&&S(e),u&&S(i),u&&S(s),r=!1,Re(a)}}}function oD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[ZO,JO],k=[];function w(C,M){return C[2]?0:1}return d=w(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[5]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){$(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),$(C,r,M),$(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=W(u,"submit",ut(n[25])),b=!0)},p(C,M){(!m||M&32)&&ue(o,C[5]);let T=d;d=w(C),d===T?k[d].p(C,M):(be(),I(k[T],1,1,()=>{k[T]=null}),ve(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){I(h),m=!1},d(C){C&&S(e),C&&S(r),C&&S(a),k[d].d(),b=!1,g()}}}function rD(n){let e,t,i,s,l,o;e=new Ci({}),i=new cn({props:{$$slots:{default:[oD]},$$scope:{ctx:n}}});let r={};return l=new KO({props:r}),n[26](l),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),$(a,t,u),R(i,a,u),$(a,s,u),R(l,a,u),o=!0},p(a,[u]){const f={};u&1073741887&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&S(t),H(i,a),a&&S(s),n[26](null),H(l,a)}}}function aD(n,e,t){let i,s,l;Je(n,mt,X=>t(5,l=X));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}];Ht(mt,l="Mail settings",l);let r,a={},u={},f=!1,c=!1;d();async function d(){t(2,f=!0);try{const X=await me.settings.getAll()||{};m(X)}catch(X){me.errorResponseHandler(X)}t(2,f=!1)}async function h(){if(!(c||!s)){t(3,c=!0);try{const X=await me.settings.update(B.filterRedactedProps(u));m(X),Fn({}),Lt("Successfully saved mail settings.")}catch(X){me.errorResponseHandler(X)}t(3,c=!1)}}function m(X={}){t(0,u={meta:(X==null?void 0:X.meta)||{},smtp:(X==null?void 0:X.smtp)||{}}),t(9,a=JSON.parse(JSON.stringify(u)))}function b(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function g(){u.meta.senderName=this.value,t(0,u)}function y(){u.meta.senderAddress=this.value,t(0,u)}function k(X){n.$$.not_equal(u.meta.verificationTemplate,X)&&(u.meta.verificationTemplate=X,t(0,u))}function w(X){n.$$.not_equal(u.meta.resetPasswordTemplate,X)&&(u.meta.resetPasswordTemplate=X,t(0,u))}function C(X){n.$$.not_equal(u.meta.confirmEmailChangeTemplate,X)&&(u.meta.confirmEmailChangeTemplate=X,t(0,u))}function M(){u.smtp.enabled=this.checked,t(0,u)}function T(){u.smtp.host=this.value,t(0,u)}function D(){u.smtp.port=rt(this.value),t(0,u)}function A(X){n.$$.not_equal(u.smtp.tls,X)&&(u.smtp.tls=X,t(0,u))}function P(){u.smtp.username=this.value,t(0,u)}function L(X){n.$$.not_equal(u.smtp.password,X)&&(u.smtp.password=X,t(0,u))}const V=()=>b(),F=()=>h(),U=()=>r==null?void 0:r.show(),G=()=>h();function K(X){le[X?"unshift":"push"](()=>{r=X,t(1,r)})}return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(4,s=i!=JSON.stringify(u))},[u,r,f,c,s,l,o,h,b,a,i,g,y,k,w,C,M,T,D,A,P,L,V,F,U,G,K]}class uD extends Ce{constructor(e){super(),$e(this,e,aD,rD,ke,{})}}function fD(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[dD,({uniqueId:T})=>({25:T}),({uniqueId:T})=>T?33554432:0]},$$scope:{ctx:n}}});let g=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&eh(n),y=n[1].s3.enabled&&th(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&nh(n),w=n[6]&&ih(n);return{c(){j(e.$$.fragment),t=O(),g&&g.c(),i=O(),y&&y.c(),s=O(),l=v("div"),o=v("div"),r=O(),k&&k.c(),a=O(),w&&w.c(),u=O(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"class","flex-fill"),p(c,"class","txt"),p(f,"type","submit"),p(f,"class","btn btn-expanded"),f.disabled=d=!n[6]||n[3],ee(f,"btn-loading",n[3]),p(l,"class","flex")},m(T,D){R(e,T,D),$(T,t,D),g&&g.m(T,D),$(T,i,D),y&&y.m(T,D),$(T,s,D),$(T,l,D),_(l,o),_(l,r),k&&k.m(l,null),_(l,a),w&&w.m(l,null),_(l,u),_(l,f),_(f,c),h=!0,m||(b=W(f,"click",n[19]),m=!0)},p(T,D){var P,L;const A={};D&100663298&&(A.$$scope={dirty:D,ctx:T}),e.$set(A),((P=T[0].s3)==null?void 0:P.enabled)!=T[1].s3.enabled?g?(g.p(T,D),D&3&&E(g,1)):(g=eh(T),g.c(),E(g,1),g.m(i.parentNode,i)):g&&(be(),I(g,1,1,()=>{g=null}),ve()),T[1].s3.enabled?y?(y.p(T,D),D&2&&E(y,1)):(y=th(T),y.c(),E(y,1),y.m(s.parentNode,s)):y&&(be(),I(y,1,1,()=>{y=null}),ve()),((L=T[1].s3)==null?void 0:L.enabled)&&!T[6]&&!T[3]?k?k.p(T,D):(k=nh(T),k.c(),k.m(l,a)):k&&(k.d(1),k=null),T[6]?w?w.p(T,D):(w=ih(T),w.c(),w.m(l,u)):w&&(w.d(1),w=null),(!h||D&72&&d!==(d=!T[6]||T[3]))&&(f.disabled=d),(!h||D&8)&&ee(f,"btn-loading",T[3])},i(T){h||(E(e.$$.fragment,T),E(g),E(y),h=!0)},o(T){I(e.$$.fragment,T),I(g),I(y),h=!1},d(T){H(e,T),T&&S(t),g&&g.d(T),T&&S(i),y&&y.d(T),T&&S(s),T&&S(l),k&&k.d(),w&&w.d(),m=!1,b()}}}function cD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){$(t,e,i)},p:x,i:x,o:x,d(t){t&&S(e)}}}function dD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[25]),e.required=!0,p(s,"for",o=n[25])},m(u,f){$(u,e,f),e.checked=n[1].s3.enabled,$(u,i,f),$(u,s,f),_(s,l),r||(a=W(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&p(s,"for",o)},d(u){u&&S(e),u&&S(i),u&&S(s),r=!1,a()}}}function eh(n){var P;let e,t,i,s,l,o,r,a=(P=n[0].s3)!=null&&P.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",h,m,b,g,y,k,w,C,M,T,D,A;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=z(`If you have existing uploaded files, you'll have to migrate them manually from + `,y=z("."),p(e,"for",i=n[31]),p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(g,"class","label label-sm link-primary txt-mono"),p(g,"title","Required parameter"),p(a,"class","help-block")},m(A,P){S(A,e,P),_(e,t),S(A,s,P),T[l].m(A,P),S(A,r,P),S(A,a,P),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,b),_(a,g),_(a,y),k=!0,$||(C=[W(f,"click",n[22]),W(d,"click",n[23]),W(m,"click",n[24]),W(g,"click",n[25])],$=!0)},p(A,P){(!k||P[1]&1&&i!==(i=A[31]))&&p(e,"for",i);let L=l;l=D(A),l===L?T[l].p(A,P):(be(),I(T[L],1,1,()=>{T[L]=null}),ve(),o=T[l],o?o.p(A,P):(o=T[l]=M[l](A),o.c()),E(o,1),o.m(r.parentNode,r))},i(A){k||(E(o),k=!0)},o(A){I(o),k=!1},d(A){A&&w(e),A&&w(s),T[l].d(A),A&&w(r),A&&w(a),$=!1,Re(C)}}}function RO(n){let e,t,i,s,l,o;return e=new _e({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[IO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new _e({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[PO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new _e({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[FO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(r,a){R(e,r,a),S(r,t,a),R(i,r,a),S(r,s,a),R(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(E(e.$$.fragment,r),E(i.$$.fragment,r),E(l.$$.fragment,r),o=!0)},o(r){I(e.$$.fragment,r),I(i.$$.fragment,r),I(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function Zp(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function HO(n){let e,t,i,s,l,o,r,a,u,f,c=n[6]&&Zp();return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),l=z(n[2]),o=O(),r=v("div"),a=O(),c&&c.c(),u=Fe(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(d,h){S(d,e,h),_(e,t),_(e,i),_(e,s),_(s,l),S(d,o,h),S(d,r,h),S(d,a,h),c&&c.m(d,h),S(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&ue(l,d[2]),d[6]?c?h[0]&64&&E(c,1):(c=Zp(),c.c(),E(c,1),c.m(u.parentNode,u)):c&&(be(),I(c,1,1,()=>{c=null}),ve())},i(d){f||(E(c),f=!0)},o(d){I(c),f=!1},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),c&&c.d(d),d&&w(u)}}}function jO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[HO],default:[RO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=J));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=Gp,d=!1;function h(){f==null||f.expand()}function m(){f==null||f.collapse()}function b(){f==null||f.collapseSiblings()}async function g(){c||d||(t(5,d=!0),t(4,c=(await st(()=>import("./CodeEditor.4d167f17.js"),["./CodeEditor.4d167f17.js","./index.9c8b95cd.js"],import.meta.url)).default),Gp=c,t(5,d=!1))}function y(J){B.copyToClipboard(J),vg(`Copied ${J} to clipboard`,2e3)}g();function k(){u.subject=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),D=()=>y("{APP_URL}"),A=()=>y("{TOKEN}");function P(J){n.$$.not_equal(u.body,J)&&(u.body=J,t(0,u))}function L(){u.body=this.value,t(0,u)}const V=()=>y("{APP_NAME}"),F=()=>y("{APP_URL}"),U=()=>y("{TOKEN}"),G=()=>y("{ACTION_URL}");function K(J){le[J?"unshift":"push"](()=>{f=J,t(3,f)})}function X(J){Ve.call(this,n,J)}function Z(J){Ve.call(this,n,J)}function ie(J){Ve.call(this,n,J)}return n.$$set=J=>{e=Ye(Ye({},e),Wn(J)),t(8,l=wt(e,s)),"key"in J&&t(1,r=J.key),"title"in J&&t(2,a=J.title),"config"in J&&t(0,u=J.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||al(r))},[u,r,a,f,c,d,i,y,l,h,m,b,o,k,$,C,M,T,D,A,P,L,V,F,U,G,K,X,Z,ie]}class $r extends Ce{constructor(e){super(),$e(this,e,qO,jO,ke,{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 Xp(n,e,t){const i=n.slice();return i[22]=e[t],i}function Qp(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=O(),o=v("label"),a=z(r),f=O(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(h,m){S(h,t,m),_(t,i),i.checked=i.__value===e[2],_(t,l),_(t,o),_(o,a),_(t,f),c||(d=W(i,"change",e[11]),c=!0)},p(h,m){e=h,m&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),m&4&&(i.checked=i.__value===e[2]),m&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(h){h&&w(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function VO(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new _e({props:{class:"form-field required m-0",name:"email",$$slots:{default:[zO,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),j(t.$$.fragment),i=O(),j(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){S(a,e,u),R(t,e,null),_(e,i),R(s,e,null),l=!0,o||(r=W(e,"submit",ut(n[14])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(E(t.$$.fragment,a),E(s.$$.fragment,a),l=!0)},o(a){I(t.$$.fragment,a),I(s.$$.fragment,a),l=!1},d(a){a&&w(e),H(t),H(s),o=!1,r()}}}function UO(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function WO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=z("Close"),i=O(),s=v("button"),l=v("i"),o=O(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],ee(s,"btn-loading",n[4])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"click",n[0]),W(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&ee(s,"btn-loading",c[4])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Re(f)}}}function YO(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[WO],header:[UO],default:[BO]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[16](null),H(e,s)}}}const Cr="last_email_test",xp="email_test_request";function KO(n,e,t){let i;const s=It(),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(Cr),u=o[0].value,f=!1,c=null;function d(A="",P=""){t(1,a=A||localStorage.getItem(Cr)),t(2,u=P||o[0].value),Fn({}),r==null||r.show()}function h(){return clearTimeout(c),r==null?void 0:r.hide()}async function m(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Cr,a),clearTimeout(c),c=setTimeout(()=>{me.cancelRequest(xp),rl("Test email send timeout.")},3e4);try{await me.settings.testEmail(a,u,{$cancelKey:xp}),Lt("Successfully sent test email."),s("submit"),t(4,f=!1),await $n(),h()}catch(A){t(4,f=!1),me.errorResponseHandler(A)}clearTimeout(c)}}const b=[[]],g=()=>m();function y(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>m(),C=()=>!f;function M(A){le[A?"unshift":"push"](()=>{r=A,t(3,r)})}function T(A){Ve.call(this,n,A)}function D(A){Ve.call(this,n,A)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,m,d,g,y,b,k,$,C,M,T,D]}class JO extends Ce{constructor(e){super(),$e(this,e,KO,YO,ke,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function ZO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,P,L;i=new _e({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[XO,({uniqueId:Y})=>({29:Y}),({uniqueId:Y})=>Y?536870912:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[QO,({uniqueId:Y})=>({29:Y}),({uniqueId:Y})=>Y?536870912:0]},$$scope:{ctx:n}}});function V(Y){n[13](Y)}let F={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(F.config=n[0].meta.verificationTemplate),u=new $r({props:F}),le.push(()=>ye(u,"config",V));function U(Y){n[14](Y)}let G={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(G.config=n[0].meta.resetPasswordTemplate),d=new $r({props:G}),le.push(()=>ye(d,"config",U));function K(Y){n[15](Y)}let X={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(X.config=n[0].meta.confirmEmailChangeTemplate),b=new $r({props:X}),le.push(()=>ye(b,"config",K)),C=new _e({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[xO,({uniqueId:Y})=>({29:Y}),({uniqueId:Y})=>Y?536870912:0]},$$scope:{ctx:n}}});let Z=n[0].smtp.enabled&&eh(n);function ie(Y,re){return Y[4]?oD:lD}let J=ie(n),fe=J(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),c=O(),j(d.$$.fragment),m=O(),j(b.$$.fragment),y=O(),k=v("hr"),$=O(),j(C.$$.fragment),M=O(),Z&&Z.c(),T=O(),D=v("div"),A=v("div"),P=O(),fe.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(A,"class","flex-fill"),p(D,"class","flex")},m(Y,re){S(Y,e,re),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),S(Y,r,re),S(Y,a,re),R(u,a,null),_(a,c),R(d,a,null),_(a,m),R(b,a,null),S(Y,y,re),S(Y,k,re),S(Y,$,re),R(C,Y,re),S(Y,M,re),Z&&Z.m(Y,re),S(Y,T,re),S(Y,D,re),_(D,A),_(D,P),fe.m(D,null),L=!0},p(Y,re){const Oe={};re&1610612737&&(Oe.$$scope={dirty:re,ctx:Y}),i.$set(Oe);const ge={};re&1610612737&&(ge.$$scope={dirty:re,ctx:Y}),o.$set(ge);const ae={};!f&&re&1&&(f=!0,ae.config=Y[0].meta.verificationTemplate,Me(()=>f=!1)),u.$set(ae);const he={};!h&&re&1&&(h=!0,he.config=Y[0].meta.resetPasswordTemplate,Me(()=>h=!1)),d.$set(he);const de={};!g&&re&1&&(g=!0,de.config=Y[0].meta.confirmEmailChangeTemplate,Me(()=>g=!1)),b.$set(de);const Se={};re&1610612737&&(Se.$$scope={dirty:re,ctx:Y}),C.$set(Se),Y[0].smtp.enabled?Z?(Z.p(Y,re),re&1&&E(Z,1)):(Z=eh(Y),Z.c(),E(Z,1),Z.m(T.parentNode,T)):Z&&(be(),I(Z,1,1,()=>{Z=null}),ve()),J===(J=ie(Y))&&fe?fe.p(Y,re):(fe.d(1),fe=J(Y),fe&&(fe.c(),fe.m(D,null)))},i(Y){L||(E(i.$$.fragment,Y),E(o.$$.fragment,Y),E(u.$$.fragment,Y),E(d.$$.fragment,Y),E(b.$$.fragment,Y),E(C.$$.fragment,Y),E(Z),L=!0)},o(Y){I(i.$$.fragment,Y),I(o.$$.fragment,Y),I(u.$$.fragment,Y),I(d.$$.fragment,Y),I(b.$$.fragment,Y),I(C.$$.fragment,Y),I(Z),L=!1},d(Y){Y&&w(e),H(i),H(o),Y&&w(r),Y&&w(a),H(u),H(d),H(b),Y&&w(y),Y&&w(k),Y&&w($),H(C,Y),Y&&w(M),Z&&Z.d(Y),Y&&w(T),Y&&w(D),fe.d()}}}function GO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:x,i:x,o:x,d(t){t&&w(e)}}}function XO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Sender name"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].meta.senderName),r||(a=W(l,"input",n[11]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderName&&pe(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function QO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Sender address"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","email"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].meta.senderAddress),r||(a=W(l,"input",n[12]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].meta.senderAddress&&pe(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function xO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[29]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[29])},m(c,d){S(c,e,d),e.checked=n[0].smtp.enabled,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"change",n[16]),Le(Be.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d&536870912&&t!==(t=c[29])&&p(e,"id",t),d&1&&(e.checked=c[0].smtp.enabled),d&536870912&&a!==(a=c[29])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Re(f)}}}function eh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$;return i=new _e({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[eD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[tD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[nD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field",name:"smtp.username",$$slots:{default:[iD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),b=new _e({props:{class:"form-field",name:"smtp.password",$$slots:{default:[sD,({uniqueId:C})=>({29:C}),({uniqueId:C})=>C?536870912:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(b.$$.fragment),g=O(),y=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(m,"class","col-lg-6"),p(y,"class","col-lg-12"),p(e,"class","grid")},m(C,M){S(C,e,M),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(b,m,null),_(e,g),_(e,y),$=!0},p(C,M){const T={};M&1610612737&&(T.$$scope={dirty:M,ctx:C}),i.$set(T);const D={};M&1610612737&&(D.$$scope={dirty:M,ctx:C}),o.$set(D);const A={};M&1610612737&&(A.$$scope={dirty:M,ctx:C}),u.$set(A);const P={};M&1610612737&&(P.$$scope={dirty:M,ctx:C}),d.$set(P);const L={};M&1610612737&&(L.$$scope={dirty:M,ctx:C}),b.$set(L)},i(C){$||(E(i.$$.fragment,C),E(o.$$.fragment,C),E(u.$$.fragment,C),E(d.$$.fragment,C),E(b.$$.fragment,C),C&&Qe(()=>{k||(k=je(e,St,{duration:150},!0)),k.run(1)}),$=!0)},o(C){I(i.$$.fragment,C),I(o.$$.fragment,C),I(u.$$.fragment,C),I(d.$$.fragment,C),I(b.$$.fragment,C),C&&(k||(k=je(e,St,{duration:150},!1)),k.run(0)),$=!1},d(C){C&&w(e),H(i),H(o),H(u),H(d),H(b),C&&k&&k.end()}}}function eD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("SMTP server host"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].smtp.host),r||(a=W(l,"input",n[17]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.host&&pe(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function tD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Port"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","number"),p(l,"id",o=n[29]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].smtp.port),r||(a=W(l,"input",n[18]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].smtp.port&&pe(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function nD(n){let e,t,i,s,l,o,r;function a(f){n[19](f)}let u={id:n[29],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new Es({props:u}),le.push(()=>ye(l,"keyOfSelected",a)),{c(){e=v("label"),t=z("TLS Encryption"),s=O(),j(l.$$.fragment),p(e,"for",i=n[29])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&536870912&&i!==(i=f[29]))&&p(e,"for",i);const d={};c&536870912&&(d.id=f[29]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function iD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Username"),s=O(),l=v("input"),p(e,"for",i=n[29]),p(l,"type","text"),p(l,"id",o=n[29])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].smtp.username),r||(a=W(l,"input",n[20]),r=!0)},p(u,f){f&536870912&&i!==(i=u[29])&&p(e,"for",i),f&536870912&&o!==(o=u[29])&&p(l,"id",o),f&1&&l.value!==u[0].smtp.username&&pe(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function sD(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[29]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new Ga({props:u}),le.push(()=>ye(l,"value",a)),{c(){e=v("label"),t=z("Password"),s=O(),j(l.$$.fragment),p(e,"for",i=n[29])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&536870912&&i!==(i=f[29]))&&p(e,"for",i);const d={};c&536870912&&(d.id=f[29]),!o&&c&1&&(o=!0,d.value=f[0].smtp.password,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function lD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[24]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function oD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],ee(s,"btn-loading",n[3])},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),_(s,l),r||(a=[W(e,"click",n[22]),W(s,"click",n[23])],r=!0)},p(u,f){f&8&&(e.disabled=u[3]),f&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f&8&&ee(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Re(a)}}}function rD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[GO,ZO],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[5]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=W(u,"submit",ut(n[25])),b=!0)},p(C,M){(!m||M&32)&&ue(o,C[5]);let T=d;d=$(C),d===T?k[d].p(C,M):(be(),I(k[T],1,1,()=>{k[T]=null}),ve(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){I(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function aD(n){let e,t,i,s,l,o;e=new Ci({}),i=new cn({props:{$$slots:{default:[rD]},$$scope:{ctx:n}}});let r={};return l=new JO({props:r}),n[26](l),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,[u]){const f={};u&1073741887&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[26](null),H(l,a)}}}function uD(n,e,t){let i,s,l;Je(n,mt,X=>t(5,l=X));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}];Ht(mt,l="Mail settings",l);let r,a={},u={},f=!1,c=!1;d();async function d(){t(2,f=!0);try{const X=await me.settings.getAll()||{};m(X)}catch(X){me.errorResponseHandler(X)}t(2,f=!1)}async function h(){if(!(c||!s)){t(3,c=!0);try{const X=await me.settings.update(B.filterRedactedProps(u));m(X),Fn({}),Lt("Successfully saved mail settings.")}catch(X){me.errorResponseHandler(X)}t(3,c=!1)}}function m(X={}){t(0,u={meta:(X==null?void 0:X.meta)||{},smtp:(X==null?void 0:X.smtp)||{}}),t(9,a=JSON.parse(JSON.stringify(u)))}function b(){t(0,u=JSON.parse(JSON.stringify(a||{})))}function g(){u.meta.senderName=this.value,t(0,u)}function y(){u.meta.senderAddress=this.value,t(0,u)}function k(X){n.$$.not_equal(u.meta.verificationTemplate,X)&&(u.meta.verificationTemplate=X,t(0,u))}function $(X){n.$$.not_equal(u.meta.resetPasswordTemplate,X)&&(u.meta.resetPasswordTemplate=X,t(0,u))}function C(X){n.$$.not_equal(u.meta.confirmEmailChangeTemplate,X)&&(u.meta.confirmEmailChangeTemplate=X,t(0,u))}function M(){u.smtp.enabled=this.checked,t(0,u)}function T(){u.smtp.host=this.value,t(0,u)}function D(){u.smtp.port=rt(this.value),t(0,u)}function A(X){n.$$.not_equal(u.smtp.tls,X)&&(u.smtp.tls=X,t(0,u))}function P(){u.smtp.username=this.value,t(0,u)}function L(X){n.$$.not_equal(u.smtp.password,X)&&(u.smtp.password=X,t(0,u))}const V=()=>b(),F=()=>h(),U=()=>r==null?void 0:r.show(),G=()=>h();function K(X){le[X?"unshift":"push"](()=>{r=X,t(1,r)})}return n.$$.update=()=>{n.$$.dirty&512&&t(10,i=JSON.stringify(a)),n.$$.dirty&1025&&t(4,s=i!=JSON.stringify(u))},[u,r,f,c,s,l,o,h,b,a,i,g,y,k,$,C,M,T,D,A,P,L,V,F,U,G,K]}class fD extends Ce{constructor(e){super(),$e(this,e,uD,aD,ke,{})}}function cD(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;e=new _e({props:{class:"form-field form-field-toggle",$$slots:{default:[pD,({uniqueId:T})=>({25:T}),({uniqueId:T})=>T?33554432:0]},$$scope:{ctx:n}}});let g=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&th(n),y=n[1].s3.enabled&&nh(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&ih(n),$=n[6]&&sh(n);return{c(){j(e.$$.fragment),t=O(),g&&g.c(),i=O(),y&&y.c(),s=O(),l=v("div"),o=v("div"),r=O(),k&&k.c(),a=O(),$&&$.c(),u=O(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"class","flex-fill"),p(c,"class","txt"),p(f,"type","submit"),p(f,"class","btn btn-expanded"),f.disabled=d=!n[6]||n[3],ee(f,"btn-loading",n[3]),p(l,"class","flex")},m(T,D){R(e,T,D),S(T,t,D),g&&g.m(T,D),S(T,i,D),y&&y.m(T,D),S(T,s,D),S(T,l,D),_(l,o),_(l,r),k&&k.m(l,null),_(l,a),$&&$.m(l,null),_(l,u),_(l,f),_(f,c),h=!0,m||(b=W(f,"click",n[19]),m=!0)},p(T,D){var P,L;const A={};D&100663298&&(A.$$scope={dirty:D,ctx:T}),e.$set(A),((P=T[0].s3)==null?void 0:P.enabled)!=T[1].s3.enabled?g?(g.p(T,D),D&3&&E(g,1)):(g=th(T),g.c(),E(g,1),g.m(i.parentNode,i)):g&&(be(),I(g,1,1,()=>{g=null}),ve()),T[1].s3.enabled?y?(y.p(T,D),D&2&&E(y,1)):(y=nh(T),y.c(),E(y,1),y.m(s.parentNode,s)):y&&(be(),I(y,1,1,()=>{y=null}),ve()),((L=T[1].s3)==null?void 0:L.enabled)&&!T[6]&&!T[3]?k?k.p(T,D):(k=ih(T),k.c(),k.m(l,a)):k&&(k.d(1),k=null),T[6]?$?$.p(T,D):($=sh(T),$.c(),$.m(l,u)):$&&($.d(1),$=null),(!h||D&72&&d!==(d=!T[6]||T[3]))&&(f.disabled=d),(!h||D&8)&&ee(f,"btn-loading",T[3])},i(T){h||(E(e.$$.fragment,T),E(g),E(y),h=!0)},o(T){I(e.$$.fragment,T),I(g),I(y),h=!1},d(T){H(e,T),T&&w(t),g&&g.d(T),T&&w(i),y&&y.d(T),T&&w(s),T&&w(l),k&&k.d(),$&&$.d(),m=!1,b()}}}function dD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:x,i:x,o:x,d(t){t&&w(e)}}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[25]),e.required=!0,p(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=W(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function th(n){var P;let e,t,i,s,l,o,r,a=(P=n[0].s3)!=null&&P.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",h,m,b,g,y,k,$,C,M,T,D,A;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=z(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=v("strong"),u=z(a),f=z(` to the @@ -156,20 +156,20 @@ Updated: ${g[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=g[29])&&p(c," There are numerous command line tools that can help you, such as: `),y=v("a"),y.textContent=`rclone `,k=z(`, - `),w=v("a"),w.textContent=`s5cmd - `,C=z(", etc."),M=O(),T=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(w,"href","https://github.com/peak/s5cmd"),p(w,"target","_blank"),p(w,"rel","noopener noreferrer"),p(w,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(T,"class","clearfix m-t-base")},m(L,V){$(L,e,V),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(l,r),_(r,u),_(l,f),_(l,c),_(c,h),_(l,m),_(l,b),_(l,g),_(l,y),_(l,k),_(l,w),_(l,C),_(e,M),_(e,T),A=!0},p(L,V){var F;(!A||V&1)&&a!==(a=(F=L[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&ue(u,a),(!A||V&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&ue(h,d)},i(L){A||(L&&Qe(()=>{D||(D=je(e,St,{duration:150},!0)),D.run(1)}),A=!0)},o(L){L&&(D||(D=je(e,St,{duration:150},!1)),D.run(0)),A=!1},d(L){L&&S(e),L&&D&&D.end()}}}function th(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M,T;return i=new _e({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[pD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[hD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"s3.region",$$slots:{default:[mD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[gD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),b=new _e({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[_D,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[bD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(b.$$.fragment),g=O(),y=v("div"),j(k.$$.fragment),w=O(),C=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(m,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(D,A){$(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(b,m,null),_(e,g),_(e,y),R(k,y,null),_(e,w),_(e,C),T=!0},p(D,A){const P={};A&100663298&&(P.$$scope={dirty:A,ctx:D}),i.$set(P);const L={};A&100663298&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const V={};A&100663298&&(V.$$scope={dirty:A,ctx:D}),u.$set(V);const F={};A&100663298&&(F.$$scope={dirty:A,ctx:D}),d.$set(F);const U={};A&100663298&&(U.$$scope={dirty:A,ctx:D}),b.$set(U);const G={};A&100663298&&(G.$$scope={dirty:A,ctx:D}),k.$set(G)},i(D){T||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(u.$$.fragment,D),E(d.$$.fragment,D),E(b.$$.fragment,D),E(k.$$.fragment,D),D&&Qe(()=>{M||(M=je(e,St,{duration:150},!0)),M.run(1)}),T=!0)},o(D){I(i.$$.fragment,D),I(o.$$.fragment,D),I(u.$$.fragment,D),I(d.$$.fragment,D),I(b.$$.fragment,D),I(k.$$.fragment,D),D&&(M||(M=je(e,St,{duration:150},!1)),M.run(0)),T=!1},d(D){D&&S(e),H(i),H(o),H(u),H(d),H(b),H(k),D&&M&&M.end()}}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Endpoint"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[1].s3.endpoint),r||(a=W(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&pe(l,u[1].s3.endpoint)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function hD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Bucket"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[1].s3.bucket),r||(a=W(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&pe(l,u[1].s3.bucket)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function mD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Region"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[1].s3.region),r||(a=W(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&pe(l,u[1].s3.region)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function gD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Access key"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[1].s3.accessKey),r||(a=W(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&pe(l,u[1].s3.accessKey)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function _D(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new Ga({props:u}),le.push(()=>ye(l,"value",a)),{c(){e=v("label"),t=z("Secret"),s=O(),j(l.$$.fragment),p(e,"for",i=n[25])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&33554432&&i!==(i=f[25]))&&p(e,"for",i);const d={};c&33554432&&(d.id=f[25]),!o&&c&2&&(o=!0,d.value=f[1].s3.secret,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function bD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[25])},m(c,d){$(c,e,d),e.checked=n[1].s3.forcePathStyle,$(c,i,d),$(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"change",n[17]),Le(Be.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&33554432&&t!==(t=c[25])&&p(e,"id",t),d&2&&(e.checked=c[1].s3.forcePathStyle),d&33554432&&a!==(a=c[25])&&p(s,"for",a)},d(c){c&&S(e),c&&S(i),c&&S(s),u=!1,Re(f)}}}function nh(n){let e;function t(l,o){return l[4]?kD:l[5]?yD:vD}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),$(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&&S(e)}}}function vD(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){$(t,e,i)},p:x,d(t){t&&S(e)}}}function yD(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;$(l,e,o),i||(s=Le(t=Be.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Wt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&S(e),i=!1,s()}}}function kD(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){$(t,e,i)},p:x,d(t){t&&S(e)}}}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-secondary btn-hint"),e.disabled=n[3]},m(l,o){$(l,e,o),_(e,t),i||(s=W(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&S(e),i=!1,s()}}}function wD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[cD,fD],k=[];function w(C,M){return C[2]?0:1}return d=w(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[7]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`

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

    -

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

    `,c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){$(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),$(C,r,M),$(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=W(u,"submit",ut(n[20])),b=!0)},p(C,M){(!m||M&128)&&ue(o,C[7]);let T=d;d=w(C),d===T?k[d].p(C,M):(be(),I(k[T],1,1,()=>{k[T]=null}),ve(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){I(h),m=!1},d(C){C&&S(e),C&&S(r),C&&S(a),k[d].d(),b=!1,g()}}}function SD(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[wD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),$(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&S(t),H(i,l)}}}const no="s3_test_request";function $D(n,e,t){let i,s,l;Je(n,mt,F=>t(7,l=F)),Ht(mt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;h();async function h(){t(2,a=!0);try{const F=await me.settings.getAll()||{};b(F)}catch(F){me.errorResponseHandler(F)}t(2,a=!1)}async function m(){if(!(u||!s)){t(3,u=!0);try{me.cancelRequest(no);const F=await me.settings.update(B.filterRedactedProps(r));Fn({}),await b(F),yg(),c?y1("Successfully saved but failed to establish S3 connection."):Lt("Successfully saved files storage settings.")}catch(F){me.errorResponseHandler(F)}t(3,u=!1)}}async function b(F={}){t(1,r={s3:(F==null?void 0:F.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await y()}async function g(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await y()}async function y(){if(t(5,c=null),!!r.s3.enabled){me.cancelRequest(no),clearTimeout(d),d=setTimeout(()=>{me.cancelRequest(no),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await me.settings.testS3({$cancelKey:no})}catch(F){t(5,c=F)}t(4,f=!1),clearTimeout(d)}}un(()=>()=>{clearTimeout(d)});function k(){r.s3.enabled=this.checked,t(1,r)}function w(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function T(){r.s3.accessKey=this.value,t(1,r)}function D(F){n.$$.not_equal(r.s3.secret,F)&&(r.s3.secret=F,t(1,r))}function A(){r.s3.forcePathStyle=this.checked,t(1,r)}const P=()=>g(),L=()=>m(),V=()=>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,g,i,k,w,C,M,T,D,A,P,L,V]}class CD extends Ce{constructor(e){super(),$e(this,e,$D,SD,ke,{})}}function MD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){$(u,e,f),e.checked=n[0].enabled,$(u,i,f),$(u,s,f),_(s,l),r||(a=W(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&S(e),u&&S(i),u&&S(s),r=!1,a()}}}function sh(n){let e,t,i,s,l,o,r,a,u,f,c;l=new _e({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[TD,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[OD,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let d=n[4]&&lh(n);return{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),u=O(),d&&d.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(r,"class","col-lg-6"),p(e,"class","grid")},m(h,m){$(h,e,m),_(e,t),_(e,i),_(e,s),R(l,s,null),_(e,o),_(e,r),R(a,r,null),_(e,u),d&&d.m(e,null),c=!0},p(h,m){const b={};m&2&&(b.name=h[1]+".clientId"),m&3145729&&(b.$$scope={dirty:m,ctx:h}),l.$set(b);const g={};m&2&&(g.name=h[1]+".clientSecret"),m&3145729&&(g.$$scope={dirty:m,ctx:h}),a.$set(g),h[4]?d?(d.p(h,m),m&16&&E(d,1)):(d=lh(h),d.c(),E(d,1),d.m(e,null)):d&&(be(),I(d,1,1,()=>{d=null}),ve())},i(h){c||(E(l.$$.fragment,h),E(a.$$.fragment,h),E(d),h&&Qe(()=>{f||(f=je(e,St,{duration:200},!0)),f.run(1)}),c=!0)},o(h){I(l.$$.fragment,h),I(a.$$.fragment,h),I(d),h&&(f||(f=je(e,St,{duration:200},!1)),f.run(0)),c=!1},d(h){h&&S(e),H(l),H(a),d&&d.d(),h&&f&&f.end()}}}function TD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Client ID"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){$(u,e,f),_(e,t),$(u,s,f),$(u,l,f),pe(l,n[0].clientId),r||(a=W(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&pe(l,u[0].clientId)},d(u){u&&S(e),u&&S(s),u&&S(l),r=!1,a()}}}function OD(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new Ga({props:u}),le.push(()=>ye(l,"value",a)),{c(){e=v("label"),t=z("Client Secret"),s=O(),j(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){$(f,e,c),_(e,t),$(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&S(e),f&&S(s),H(l,f)}}}function lh(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=jt(o,r(n)),le.push(()=>ye(t,"config",l))),{c(){e=v("div"),t&&j(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){$(a,e,u),t&&R(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],Me(()=>i=!1)),o!==(o=a[4])){if(t){be();const c=t;I(c.$$.fragment,1,0,()=>{H(c,1)}),ve()}o?(t=jt(o,r(a)),le.push(()=>ye(t,"config",l)),j(t.$$.fragment),E(t.$$.fragment,1),R(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&E(t.$$.fragment,a),s=!0)},o(a){t&&I(t.$$.fragment,a),s=!1},d(a){a&&S(e),t&&H(t)}}}function DD(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[MD,({uniqueId:o})=>({20:o}),({uniqueId:o})=>o?1048576:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&sh(n);return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Fe()},m(o,r){R(e,o,r),$(o,t,r),l&&l.m(o,r),$(o,i,r),s=!0},p(o,r){const a={};r&2&&(a.name=o[1]+".enabled"),r&3145729&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].enabled?l?(l.p(o,r),r&1&&E(l,1)):(l=sh(o),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){H(e,o),o&&S(t),l&&l.d(o),o&&S(i)}}}function oh(n){let e;return{c(){e=v("i"),p(e,"class",n[3])},m(t,i){$(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&S(e)}}}function ED(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function AD(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function rh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){$(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&S(e),o&&t&&t.end(),s=!1,l()}}}function ID(n){let e,t,i,s,l,o,r,a,u,f,c=n[3]&&oh(n);function d(g,y){return g[0].enabled?AD:ED}let h=d(n),m=h(n),b=n[6]&&rh();return{c(){e=v("div"),c&&c.c(),t=O(),i=v("span"),s=z(n[2]),l=O(),m.c(),o=O(),r=v("div"),a=O(),b&&b.c(),u=Fe(),p(i,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(g,y){$(g,e,y),c&&c.m(e,null),_(e,t),_(e,i),_(i,s),$(g,l,y),m.m(g,y),$(g,o,y),$(g,r,y),$(g,a,y),b&&b.m(g,y),$(g,u,y),f=!0},p(g,y){g[3]?c?c.p(g,y):(c=oh(g),c.c(),c.m(e,t)):c&&(c.d(1),c=null),(!f||y&4)&&ue(s,g[2]),h!==(h=d(g))&&(m.d(1),m=h(g),m&&(m.c(),m.m(o.parentNode,o))),g[6]?b?y&64&&E(b,1):(b=rh(),b.c(),E(b,1),b.m(u.parentNode,u)):b&&(be(),I(b,1,1,()=>{b=null}),ve())},i(g){f||(E(b),f=!0)},o(g){I(b),f=!1},d(g){g&&S(e),c&&c.d(),g&&S(l),m.d(g),g&&S(o),g&&S(r),g&&S(a),b&&b.d(g),g&&S(u)}}}function PD(n){let e,t;const i=[n[7]];let s={$$slots:{header:[ID],default:[DD]},$$scope:{ctx:n}};for(let l=0;lt(11,o=A));let{key:r}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{optionsComponent:c}=e,d;function h(){d==null||d.expand()}function m(){d==null||d.collapse()}function b(){d==null||d.collapseSiblings()}function g(){f.enabled=this.checked,t(0,f)}function y(){f.clientId=this.value,t(0,f)}function k(A){n.$$.not_equal(f.clientSecret,A)&&(f.clientSecret=A,t(0,f))}function w(A){f=A,t(0,f)}function C(A){le[A?"unshift":"push"](()=>{d=A,t(5,d)})}function M(A){Ve.call(this,n,A)}function T(A){Ve.call(this,n,A)}function D(A){Ve.call(this,n,A)}return n.$$set=A=>{e=Ye(Ye({},e),Wn(A)),t(7,l=wt(e,s)),"key"in A&&t(1,r=A.key),"title"in A&&t(2,a=A.title),"icon"in A&&t(3,u=A.icon),"config"in A&&t(0,f=A.config),"optionsComponent"in A&&t(4,c=A.optionsComponent)},n.$$.update=()=>{n.$$.dirty&2050&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty&3&&(f.enabled||al(r))},[f,r,a,u,c,d,i,l,h,m,b,o,g,y,k,w,C,M,T,D]}class ND extends Ce{constructor(e){super(),$e(this,e,LD,PD,ke,{key:1,title:2,icon:3,config:0,optionsComponent:4,expand:8,collapse:9,collapseSiblings:10})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}get collapseSiblings(){return this.$$.ctx[10]}}function ah(n,e,t){const i=n.slice();return i[16]=e[t][0],i[17]=e[t][1],i[18]=e,i[19]=t,i}function FD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=Object.entries(gl),m=[];for(let y=0;yI(m[y],1,1,()=>{m[y]=null});let g=n[4]&&fh(n);return{c(){e=v("div");for(let y=0;yn[10](e,t),o=()=>n[10](null,t);function r(u){n[11](u,n[16])}let a={single:!0,key:n[16],title:n[17].title,icon:n[17].icon||"ri-fingerprint-line",optionsComponent:n[17].optionsComponent};return n[0][n[16]]!==void 0&&(a.config=n[0][n[16]]),e=new ND({props:a}),l(),le.push(()=>ye(e,"config",r)),{c(){j(e.$$.fragment)},m(u,f){R(e,u,f),s=!0},p(u,f){n=u,t!==n[16]&&(o(),t=n[16],l());const c={};!i&&f&1&&(i=!0,c.config=n[0][n[16]],Me(()=>i=!1)),e.$set(c)},i(u){s||(E(e.$$.fragment,u),s=!0)},o(u){I(e.$$.fragment,u),s=!1},d(u){o(),H(e,u)}}}function fh(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-secondary btn-hint"),e.disabled=n[3]},m(l,o){$(l,e,o),_(e,t),i||(s=W(e,"click",n[12]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&S(e),i=!1,s()}}}function HD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[RD,FD],k=[];function w(C,M){return C[2]?0:1}return d=w(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[5]),r=O(),a=v("div"),u=v("form"),f=v("h6"),f.textContent="Manage the allowed users sign-in/sign-up methods.",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){$(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),$(C,r,M),$(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=W(u,"submit",ut(n[6])),b=!0)},p(C,M){(!m||M&32)&&ue(o,C[5]);let T=d;d=w(C),d===T?k[d].p(C,M):(be(),I(k[T],1,1,()=>{k[T]=null}),ve(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){I(h),m=!1},d(C){C&&S(e),C&&S(r),C&&S(a),k[d].d(),b=!1,g()}}}function jD(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[HD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),$(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048639&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&S(t),H(i,l)}}}function qD(n,e,t){let i,s,l;Je(n,mt,w=>t(5,l=w)),Ht(mt,l="Auth providers",l);let o={},r={},a={},u=!1,f=!1;c();async function c(){t(2,u=!0);try{const w=await me.settings.getAll()||{};h(w)}catch(w){me.errorResponseHandler(w)}t(2,u=!1)}async function d(){var w;if(!(f||!s)){t(3,f=!0);try{const C=await me.settings.update(B.filterRedactedProps(a));h(C),Fn({}),(w=o[Object.keys(o)[0]])==null||w.collapseSiblings(),Lt("Successfully updated auth providers.")}catch(C){me.errorResponseHandler(C)}t(3,f=!1)}}function h(w){w=w||{},t(0,a={});for(const C in gl)t(0,a[C]=Object.assign({enabled:!1},w[C]),a);t(8,r=JSON.parse(JSON.stringify(a)))}function m(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(w,C){le[w?"unshift":"push"](()=>{o[C]=w,t(1,o)})}function g(w,C){n.$$.not_equal(a[C],w)&&(a[C]=w,t(0,a))}const y=()=>m(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(4,s=i!=JSON.stringify(a))},[a,o,u,f,s,l,d,m,r,i,b,g,y,k]}class VD extends Ce{constructor(e){super(),$e(this,e,qD,jD,ke,{})}}function ch(n,e,t){const i=n.slice();return i[16]=e[t],i[17]=e,i[18]=t,i}function zD(n){let e=[],t=new Map,i,s,l,o,r,a,u,f,c,d,h,m=n[5];const b=y=>y[16].key;for(let y=0;y({19:l}),({uniqueId:l})=>l?524288:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(l,o){$(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o&1572865&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&S(t),H(i,l)}}}function ph(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-secondary btn-hint"),e.disabled=n[2]},m(l,o){$(l,e,o),_(e,t),i||(s=W(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&S(e),i=!1,s()}}}function WD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[BD,zD],k=[];function w(C,M){return C[1]?0:1}return d=w(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[4]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){$(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),$(C,r,M),$(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=W(u,"submit",ut(n[6])),b=!0)},p(C,M){(!m||M&16)&&ue(o,C[4]);let T=d;d=w(C),d===T?k[d].p(C,M):(be(),I(k[T],1,1,()=>{k[T]=null}),ve(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){I(h),m=!1},d(C){C&&S(e),C&&S(r),C&&S(a),k[d].d(),b=!1,g()}}}function YD(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[WD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),$(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048607&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&S(t),H(i,l)}}}function KD(n,e,t){let i,s,l;Je(n,mt,w=>t(4,l=w));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];Ht(mt,l="Token options",l);let r={},a={},u=!1,f=!1;c();async function c(){t(1,u=!0);try{const w=await me.settings.getAll()||{};h(w)}catch(w){me.errorResponseHandler(w)}t(1,u=!1)}async function d(){if(!(f||!s)){t(2,f=!0);try{const w=await me.settings.update(B.filterRedactedProps(a));h(w),Lt("Successfully saved tokens options.")}catch(w){me.errorResponseHandler(w)}t(2,f=!1)}}function h(w){var C;w=w||{},t(0,a={});for(const M of o)t(0,a[M.key]={duration:((C=w[M.key])==null?void 0:C.duration)||0},a);t(8,r=JSON.parse(JSON.stringify(a)))}function m(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(w){a[w.key].duration=rt(this.value),t(0,a)}const g=w=>{a[w.key].secret?(delete a[w.key].secret,t(0,a)):t(0,a[w.key].secret=B.randomString(50),a)},y=()=>m(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(3,s=i!=JSON.stringify(a))},[a,u,f,s,l,o,d,m,r,i,b,g,y,k]}class JD extends Ce{constructor(e){super(),$e(this,e,KD,YD,ke,{})}}function ZD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m;return o=new k_({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in + `),$=v("a"),$.textContent=`s5cmd + `,C=z(", etc."),M=O(),T=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($,"href","https://github.com/peak/s5cmd"),p($,"target","_blank"),p($,"rel","noopener noreferrer"),p($,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(T,"class","clearfix m-t-base")},m(L,V){S(L,e,V),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(l,r),_(r,u),_(l,f),_(l,c),_(c,h),_(l,m),_(l,b),_(l,g),_(l,y),_(l,k),_(l,$),_(l,C),_(e,M),_(e,T),A=!0},p(L,V){var F;(!A||V&1)&&a!==(a=(F=L[0].s3)!=null&&F.enabled?"S3 storage":"local file system")&&ue(u,a),(!A||V&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&ue(h,d)},i(L){A||(L&&Qe(()=>{D||(D=je(e,St,{duration:150},!0)),D.run(1)}),A=!0)},o(L){L&&(D||(D=je(e,St,{duration:150},!1)),D.run(0)),A=!1},d(L){L&&w(e),L&&D&&D.end()}}}function nh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T;return i=new _e({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[hD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),o=new _e({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[mD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),u=new _e({props:{class:"form-field required",name:"s3.region",$$slots:{default:[gD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),d=new _e({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[_D,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),b=new _e({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[bD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),k=new _e({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[vD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(b.$$.fragment),g=O(),y=v("div"),j(k.$$.fragment),$=O(),C=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(m,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(D,A){S(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(b,m,null),_(e,g),_(e,y),R(k,y,null),_(e,$),_(e,C),T=!0},p(D,A){const P={};A&100663298&&(P.$$scope={dirty:A,ctx:D}),i.$set(P);const L={};A&100663298&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const V={};A&100663298&&(V.$$scope={dirty:A,ctx:D}),u.$set(V);const F={};A&100663298&&(F.$$scope={dirty:A,ctx:D}),d.$set(F);const U={};A&100663298&&(U.$$scope={dirty:A,ctx:D}),b.$set(U);const G={};A&100663298&&(G.$$scope={dirty:A,ctx:D}),k.$set(G)},i(D){T||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(u.$$.fragment,D),E(d.$$.fragment,D),E(b.$$.fragment,D),E(k.$$.fragment,D),D&&Qe(()=>{M||(M=je(e,St,{duration:150},!0)),M.run(1)}),T=!0)},o(D){I(i.$$.fragment,D),I(o.$$.fragment,D),I(u.$$.fragment,D),I(d.$$.fragment,D),I(b.$$.fragment,D),I(k.$$.fragment,D),D&&(M||(M=je(e,St,{duration:150},!1)),M.run(0)),T=!1},d(D){D&&w(e),H(i),H(o),H(u),H(d),H(b),H(k),D&&M&&M.end()}}}function hD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Endpoint"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[1].s3.endpoint),r||(a=W(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&pe(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function mD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Bucket"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[1].s3.bucket),r||(a=W(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&pe(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function gD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Region"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[1].s3.region),r||(a=W(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&pe(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _D(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Access key"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[1].s3.accessKey),r||(a=W(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&pe(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function bD(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new Ga({props:u}),le.push(()=>ye(l,"value",a)),{c(){e=v("label"),t=z("Secret"),s=O(),j(l.$$.fragment),p(e,"for",i=n[25])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&33554432&&i!==(i=f[25]))&&p(e,"for",i);const d={};c&33554432&&(d.id=f[25]),!o&&c&2&&(o=!0,d.value=f[1].s3.secret,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function vD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[25])},m(c,d){S(c,e,d),e.checked=n[1].s3.forcePathStyle,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[W(e,"change",n[17]),Le(Be.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&33554432&&t!==(t=c[25])&&p(e,"id",t),d&2&&(e.checked=c[1].s3.forcePathStyle),d&33554432&&a!==(a=c[25])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Re(f)}}}function ih(n){let e;function t(l,o){return l[4]?wD:l[5]?kD:yD}let i=t(n),s=i(n);return{c(){s.c(),e=Fe()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function yD(n){let e;return{c(){e=v("div"),e.innerHTML=` + S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function kD(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` + Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Le(t=Be.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Wt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function wD(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:x,d(t){t&&w(e)}}}function sh(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-secondary btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=W(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function SD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[dD,cD],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[7]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`

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

    +

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

    `,c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=W(u,"submit",ut(n[20])),b=!0)},p(C,M){(!m||M&128)&&ue(o,C[7]);let T=d;d=$(C),d===T?k[d].p(C,M):(be(),I(k[T],1,1,()=>{k[T]=null}),ve(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){I(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function $D(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[SD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}const no="s3_test_request";function CD(n,e,t){let i,s,l;Je(n,mt,F=>t(7,l=F)),Ht(mt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;h();async function h(){t(2,a=!0);try{const F=await me.settings.getAll()||{};b(F)}catch(F){me.errorResponseHandler(F)}t(2,a=!1)}async function m(){if(!(u||!s)){t(3,u=!0);try{me.cancelRequest(no);const F=await me.settings.update(B.filterRedactedProps(r));Fn({}),await b(F),kg(),c?k1("Successfully saved but failed to establish S3 connection."):Lt("Successfully saved files storage settings.")}catch(F){me.errorResponseHandler(F)}t(3,u=!1)}}async function b(F={}){t(1,r={s3:(F==null?void 0:F.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await y()}async function g(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await y()}async function y(){if(t(5,c=null),!!r.s3.enabled){me.cancelRequest(no),clearTimeout(d),d=setTimeout(()=>{me.cancelRequest(no),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await me.settings.testS3({$cancelKey:no})}catch(F){t(5,c=F)}t(4,f=!1),clearTimeout(d)}}un(()=>()=>{clearTimeout(d)});function k(){r.s3.enabled=this.checked,t(1,r)}function $(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function T(){r.s3.accessKey=this.value,t(1,r)}function D(F){n.$$.not_equal(r.s3.secret,F)&&(r.s3.secret=F,t(1,r))}function A(){r.s3.forcePathStyle=this.checked,t(1,r)}const P=()=>g(),L=()=>m(),V=()=>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,g,i,k,$,C,M,T,D,A,P,L,V]}class MD extends Ce{constructor(e){super(),$e(this,e,CD,$D,ke,{})}}function TD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=z("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=W(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function lh(n){let e,t,i,s,l,o,r,a,u,f,c;l=new _e({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[OD,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),a=new _e({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[DD,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let d=n[4]&&oh(n);return{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),u=O(),d&&d.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(r,"class","col-lg-6"),p(e,"class","grid")},m(h,m){S(h,e,m),_(e,t),_(e,i),_(e,s),R(l,s,null),_(e,o),_(e,r),R(a,r,null),_(e,u),d&&d.m(e,null),c=!0},p(h,m){const b={};m&2&&(b.name=h[1]+".clientId"),m&3145729&&(b.$$scope={dirty:m,ctx:h}),l.$set(b);const g={};m&2&&(g.name=h[1]+".clientSecret"),m&3145729&&(g.$$scope={dirty:m,ctx:h}),a.$set(g),h[4]?d?(d.p(h,m),m&16&&E(d,1)):(d=oh(h),d.c(),E(d,1),d.m(e,null)):d&&(be(),I(d,1,1,()=>{d=null}),ve())},i(h){c||(E(l.$$.fragment,h),E(a.$$.fragment,h),E(d),h&&Qe(()=>{f||(f=je(e,St,{duration:200},!0)),f.run(1)}),c=!0)},o(h){I(l.$$.fragment,h),I(a.$$.fragment,h),I(d),h&&(f||(f=je(e,St,{duration:200},!1)),f.run(0)),c=!1},d(h){h&&w(e),H(l),H(a),d&&d.d(),h&&f&&f.end()}}}function OD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=z("Client ID"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),pe(l,n[0].clientId),r||(a=W(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&pe(l,u[0].clientId)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function DD(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new Ga({props:u}),le.push(()=>ye(l,"value",a)),{c(){e=v("label"),t=z("Client Secret"),s=O(),j(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,Me(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){I(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function oh(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=jt(o,r(n)),le.push(()=>ye(t,"config",l))),{c(){e=v("div"),t&&j(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&R(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],Me(()=>i=!1)),o!==(o=a[4])){if(t){be();const c=t;I(c.$$.fragment,1,0,()=>{H(c,1)}),ve()}o?(t=jt(o,r(a)),le.push(()=>ye(t,"config",l)),j(t.$$.fragment),E(t.$$.fragment,1),R(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&E(t.$$.fragment,a),s=!0)},o(a){t&&I(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&H(t)}}}function ED(n){let e,t,i,s;e=new _e({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[TD,({uniqueId:o})=>({20:o}),({uniqueId:o})=>o?1048576:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&lh(n);return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Fe()},m(o,r){R(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&2&&(a.name=o[1]+".enabled"),r&3145729&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].enabled?l?(l.p(o,r),r&1&&E(l,1)):(l=lh(o),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(be(),I(l,1,1,()=>{l=null}),ve())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){I(e.$$.fragment,o),I(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function rh(n){let e;return{c(){e=v("i"),p(e,"class",n[3])},m(t,i){S(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&w(e)}}}function AD(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ID(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function 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){S(o,e,r),i=!0,s||(l=Le(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(Qe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function PD(n){let e,t,i,s,l,o,r,a,u,f,c=n[3]&&rh(n);function d(g,y){return g[0].enabled?ID:AD}let h=d(n),m=h(n),b=n[6]&&ah();return{c(){e=v("div"),c&&c.c(),t=O(),i=v("span"),s=z(n[2]),l=O(),m.c(),o=O(),r=v("div"),a=O(),b&&b.c(),u=Fe(),p(i,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(g,y){S(g,e,y),c&&c.m(e,null),_(e,t),_(e,i),_(i,s),S(g,l,y),m.m(g,y),S(g,o,y),S(g,r,y),S(g,a,y),b&&b.m(g,y),S(g,u,y),f=!0},p(g,y){g[3]?c?c.p(g,y):(c=rh(g),c.c(),c.m(e,t)):c&&(c.d(1),c=null),(!f||y&4)&&ue(s,g[2]),h!==(h=d(g))&&(m.d(1),m=h(g),m&&(m.c(),m.m(o.parentNode,o))),g[6]?b?y&64&&E(b,1):(b=ah(),b.c(),E(b,1),b.m(u.parentNode,u)):b&&(be(),I(b,1,1,()=>{b=null}),ve())},i(g){f||(E(b),f=!0)},o(g){I(b),f=!1},d(g){g&&w(e),c&&c.d(),g&&w(l),m.d(g),g&&w(o),g&&w(r),g&&w(a),b&&b.d(g),g&&w(u)}}}function LD(n){let e,t;const i=[n[7]];let s={$$slots:{header:[PD],default:[ED]},$$scope:{ctx:n}};for(let l=0;lt(11,o=A));let{key:r}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{optionsComponent:c}=e,d;function h(){d==null||d.expand()}function m(){d==null||d.collapse()}function b(){d==null||d.collapseSiblings()}function g(){f.enabled=this.checked,t(0,f)}function y(){f.clientId=this.value,t(0,f)}function k(A){n.$$.not_equal(f.clientSecret,A)&&(f.clientSecret=A,t(0,f))}function $(A){f=A,t(0,f)}function C(A){le[A?"unshift":"push"](()=>{d=A,t(5,d)})}function M(A){Ve.call(this,n,A)}function T(A){Ve.call(this,n,A)}function D(A){Ve.call(this,n,A)}return n.$$set=A=>{e=Ye(Ye({},e),Wn(A)),t(7,l=wt(e,s)),"key"in A&&t(1,r=A.key),"title"in A&&t(2,a=A.title),"icon"in A&&t(3,u=A.icon),"config"in A&&t(0,f=A.config),"optionsComponent"in A&&t(4,c=A.optionsComponent)},n.$$.update=()=>{n.$$.dirty&2050&&t(6,i=!B.isEmpty(B.getNestedVal(o,r))),n.$$.dirty&3&&(f.enabled||al(r))},[f,r,a,u,c,d,i,l,h,m,b,o,g,y,k,$,C,M,T,D]}class FD extends Ce{constructor(e){super(),$e(this,e,ND,LD,ke,{key:1,title:2,icon:3,config:0,optionsComponent:4,expand:8,collapse:9,collapseSiblings:10})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}get collapseSiblings(){return this.$$.ctx[10]}}function uh(n,e,t){const i=n.slice();return i[16]=e[t][0],i[17]=e[t][1],i[18]=e,i[19]=t,i}function RD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=Object.entries(gl),m=[];for(let y=0;yI(m[y],1,1,()=>{m[y]=null});let g=n[4]&&ch(n);return{c(){e=v("div");for(let y=0;yn[10](e,t),o=()=>n[10](null,t);function r(u){n[11](u,n[16])}let a={single:!0,key:n[16],title:n[17].title,icon:n[17].icon||"ri-fingerprint-line",optionsComponent:n[17].optionsComponent};return n[0][n[16]]!==void 0&&(a.config=n[0][n[16]]),e=new FD({props:a}),l(),le.push(()=>ye(e,"config",r)),{c(){j(e.$$.fragment)},m(u,f){R(e,u,f),s=!0},p(u,f){n=u,t!==n[16]&&(o(),t=n[16],l());const c={};!i&&f&1&&(i=!0,c.config=n[0][n[16]],Me(()=>i=!1)),e.$set(c)},i(u){s||(E(e.$$.fragment,u),s=!0)},o(u){I(e.$$.fragment,u),s=!1},d(u){o(),H(e,u)}}}function ch(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-secondary btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=W(e,"click",n[12]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function jD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[HD,RD],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[5]),r=O(),a=v("div"),u=v("form"),f=v("h6"),f.textContent="Manage the allowed users sign-in/sign-up methods.",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=W(u,"submit",ut(n[6])),b=!0)},p(C,M){(!m||M&32)&&ue(o,C[5]);let T=d;d=$(C),d===T?k[d].p(C,M):(be(),I(k[T],1,1,()=>{k[T]=null}),ve(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){I(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function qD(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[jD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048639&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function VD(n,e,t){let i,s,l;Je(n,mt,$=>t(5,l=$)),Ht(mt,l="Auth providers",l);let o={},r={},a={},u=!1,f=!1;c();async function c(){t(2,u=!0);try{const $=await me.settings.getAll()||{};h($)}catch($){me.errorResponseHandler($)}t(2,u=!1)}async function d(){var $;if(!(f||!s)){t(3,f=!0);try{const C=await me.settings.update(B.filterRedactedProps(a));h(C),Fn({}),($=o[Object.keys(o)[0]])==null||$.collapseSiblings(),Lt("Successfully updated auth providers.")}catch(C){me.errorResponseHandler(C)}t(3,f=!1)}}function h($){$=$||{},t(0,a={});for(const C in gl)t(0,a[C]=Object.assign({enabled:!1},$[C]),a);t(8,r=JSON.parse(JSON.stringify(a)))}function m(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b($,C){le[$?"unshift":"push"](()=>{o[C]=$,t(1,o)})}function g($,C){n.$$.not_equal(a[C],$)&&(a[C]=$,t(0,a))}const y=()=>m(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(4,s=i!=JSON.stringify(a))},[a,o,u,f,s,l,d,m,r,i,b,g,y,k]}class zD extends Ce{constructor(e){super(),$e(this,e,VD,qD,ke,{})}}function dh(n,e,t){const i=n.slice();return i[16]=e[t],i[17]=e,i[18]=t,i}function BD(n){let e=[],t=new Map,i,s,l,o,r,a,u,f,c,d,h,m=n[5];const b=y=>y[16].key;for(let y=0;y({19:l}),({uniqueId:l})=>l?524288:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Fe(),j(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o&1572865&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){I(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function hh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=W(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function YD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[UD,BD],k=[];function $(C,M){return C[1]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[4]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=W(u,"submit",ut(n[6])),b=!0)},p(C,M){(!m||M&16)&&ue(o,C[4]);let T=d;d=$(C),d===T?k[d].p(C,M):(be(),I(k[T],1,1,()=>{k[T]=null}),ve(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){I(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function KD(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[YD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048607&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function JD(n,e,t){let i,s,l;Je(n,mt,$=>t(4,l=$));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];Ht(mt,l="Token options",l);let r={},a={},u=!1,f=!1;c();async function c(){t(1,u=!0);try{const $=await me.settings.getAll()||{};h($)}catch($){me.errorResponseHandler($)}t(1,u=!1)}async function d(){if(!(f||!s)){t(2,f=!0);try{const $=await me.settings.update(B.filterRedactedProps(a));h($),Lt("Successfully saved tokens options.")}catch($){me.errorResponseHandler($)}t(2,f=!1)}}function h($){var C;$=$||{},t(0,a={});for(const M of o)t(0,a[M.key]={duration:((C=$[M.key])==null?void 0:C.duration)||0},a);t(8,r=JSON.parse(JSON.stringify(a)))}function m(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b($){a[$.key].duration=rt(this.value),t(0,a)}const g=$=>{a[$.key].secret?(delete a[$.key].secret,t(0,a)):t(0,a[$.key].secret=B.randomString(50),a)},y=()=>m(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(3,s=i!=JSON.stringify(a))},[a,u,f,s,l,o,d,m,r,i,b,g,y,k]}class ZD extends Ce{constructor(e){super(),$e(this,e,JD,KD,ke,{})}}function GD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m;return o=new w_({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

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

    `,t=O(),i=v("div"),s=v("button"),s.innerHTML='Copy',l=O(),j(o.$$.fragment),r=O(),a=v("div"),u=v("div"),f=O(),c=v("button"),c.innerHTML=` - Download as JSON`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-secondary fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(b,g){$(b,e,g),$(b,t,g),$(b,i,g),_(i,s),_(i,l),R(o,i,null),n[8](i),$(b,r,g),$(b,a,g),_(a,u),_(a,f),_(a,c),d=!0,h||(m=[W(s,"click",n[7]),W(i,"keydown",n[9]),W(c,"click",n[10])],h=!0)},p(b,g){const y={};g&4&&(y.content=b[2]),o.$set(y)},i(b){d||(E(o.$$.fragment,b),d=!0)},o(b){I(o.$$.fragment,b),d=!1},d(b){b&&S(e),b&&S(t),b&&S(i),H(o),n[8](null),b&&S(r),b&&S(a),h=!1,Re(m)}}}function GD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){$(t,e,i)},p:x,i:x,o:x,d(t){t&&S(e)}}}function XD(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[GD,ZD],m=[];function b(g,y){return g[1]?0:1}return f=b(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[3]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(g,y){$(g,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),$(g,r,y),$(g,a,y),_(a,u),m[f].m(u,null),d=!0},p(g,y){(!d||y&8)&&ue(o,g[3]);let k=f;f=b(g),f===k?m[f].p(g,y):(be(),I(m[k],1,1,()=>{m[k]=null}),ve(),c=m[f],c?c.p(g,y):(c=m[f]=h[f](g),c.c()),E(c,1),c.m(u,null))},i(g){d||(E(c),d=!0)},o(g){I(c),d=!1},d(g){g&&S(e),g&&S(r),g&&S(a),m[f].d()}}}function QD(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[XD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),$(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&S(t),H(i,l)}}}function xD(n,e,t){let i,s;Je(n,mt,g=>t(3,s=g)),Ht(mt,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 me.collections.getFullList(100,{$cancelKey:l}));for(let g of r)delete g.created,delete g.updated}catch(g){me.errorResponseHandler(g)}t(1,a=!1)}function f(){B.downloadJson(r,"pb_schema")}function c(){B.copyToClipboard(i),bg("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function h(g){le[g?"unshift":"push"](()=>{o=g,t(0,o)})}const m=g=>{if(g.ctrlKey&&g.code==="KeyA"){g.preventDefault();const y=window.getSelection(),k=document.createRange();k.selectNodeContents(o),y.removeAllRanges(),y.addRange(k)}},b=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,h,m,b]}class eE extends Ce{constructor(e){super(),$e(this,e,xD,QD,ke,{})}}function hh(n,e,t){const i=n.slice();return i[14]=e[t],i}function mh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function gh(n,e,t){const i=n.slice();return i[14]=e[t],i}function _h(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function bh(n,e,t){const i=n.slice();return i[14]=e[t],i}function vh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function yh(n,e,t){const i=n.slice();return i[30]=e[t],i}function tE(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&kh(),a=n[0].name!==n[1].name&&wh(n);return{c(){e=v("div"),r&&r.c(),t=O(),a&&a.c(),i=O(),s=v("strong"),o=z(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){$(u,e,f),r&&r.m(e,null),_(e,t),a&&a.m(e,null),_(e,i),_(e,s),_(s,o)},p(u,f){u[9]?r||(r=kh(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=wh(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&ue(o,l)},d(u){u&&S(e),r&&r.d(),a&&a.d()}}}function nE(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=O(),i=v("strong"),l=z(s),p(e,"class","label label-danger")},m(r,a){$(r,e,a),$(r,t,a),$(r,i,a),_(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&ue(l,s)},d(r){r&&S(e),r&&S(t),r&&S(i)}}}function iE(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=O(),i=v("strong"),l=z(s),p(e,"class","label label-success")},m(r,a){$(r,e,a),$(r,t,a),$(r,i,a),_(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&ue(l,s)},d(r){r&&S(e),r&&S(t),r&&S(i)}}}function kh(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function wh(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=z(t),s=O(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){$(o,e,r),_(e,i),$(o,s,r),$(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&ue(i,t)},d(o){o&&S(e),o&&S(s),o&&S(l)}}}function Sh(n){var g,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((g=n[0])==null?void 0:g[n[30]])+"",f,c,d,h,m=n[12]((y=n[1])==null?void 0:y[n[30]])+"",b;return{c(){var k,w,C,M,T,D;e=v("tr"),t=v("td"),i=v("span"),l=z(s),o=O(),r=v("td"),a=v("pre"),f=z(u),c=O(),d=v("td"),h=v("pre"),b=z(m),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),ee(r,"changed-old-col",!n[10]&&Gt((k=n[0])==null?void 0:k[n[30]],(w=n[1])==null?void 0:w[n[30]])),ee(r,"changed-none-col",n[10]),p(h,"class","txt"),p(d,"class","svelte-lmkr38"),ee(d,"changed-new-col",!n[5]&&Gt((C=n[0])==null?void 0:C[n[30]],(M=n[1])==null?void 0:M[n[30]])),ee(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),ee(e,"txt-primary",Gt((T=n[0])==null?void 0:T[n[30]],(D=n[1])==null?void 0:D[n[30]]))},m(k,w){$(k,e,w),_(e,t),_(t,i),_(i,l),_(e,o),_(e,r),_(r,a),_(a,f),_(e,c),_(e,d),_(d,h),_(h,b)},p(k,w){var C,M,T,D,A,P,L,V;w[0]&1&&u!==(u=k[12]((C=k[0])==null?void 0:C[k[30]])+"")&&ue(f,u),w[0]&3075&&ee(r,"changed-old-col",!k[10]&&Gt((M=k[0])==null?void 0:M[k[30]],(T=k[1])==null?void 0:T[k[30]])),w[0]&1024&&ee(r,"changed-none-col",k[10]),w[0]&2&&m!==(m=k[12]((D=k[1])==null?void 0:D[k[30]])+"")&&ue(b,m),w[0]&2083&&ee(d,"changed-new-col",!k[5]&&Gt((A=k[0])==null?void 0:A[k[30]],(P=k[1])==null?void 0:P[k[30]])),w[0]&32&&ee(d,"changed-none-col",k[5]),w[0]&2051&&ee(e,"txt-primary",Gt((L=k[0])==null?void 0:L[k[30]],(V=k[1])==null?void 0:V[k[30]]))},d(k){k&&S(e)}}}function $h(n){let e,t=n[6],i=[];for(let s=0;sProps + Download as JSON`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-secondary fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(b,g){S(b,e,g),S(b,t,g),S(b,i,g),_(i,s),_(i,l),R(o,i,null),n[8](i),S(b,r,g),S(b,a,g),_(a,u),_(a,f),_(a,c),d=!0,h||(m=[W(s,"click",n[7]),W(i,"keydown",n[9]),W(c,"click",n[10])],h=!0)},p(b,g){const y={};g&4&&(y.content=b[2]),o.$set(y)},i(b){d||(E(o.$$.fragment,b),d=!0)},o(b){I(o.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(t),b&&w(i),H(o),n[8](null),b&&w(r),b&&w(a),h=!1,Re(m)}}}function XD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:x,i:x,o:x,d(t){t&&w(e)}}}function QD(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[XD,GD],m=[];function b(g,y){return g[1]?0:1}return f=b(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[3]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(g,r,y),S(g,a,y),_(a,u),m[f].m(u,null),d=!0},p(g,y){(!d||y&8)&&ue(o,g[3]);let k=f;f=b(g),f===k?m[f].p(g,y):(be(),I(m[k],1,1,()=>{m[k]=null}),ve(),c=m[f],c?c.p(g,y):(c=m[f]=h[f](g),c.c()),E(c,1),c.m(u,null))},i(g){d||(E(c),d=!0)},o(g){I(c),d=!1},d(g){g&&w(e),g&&w(r),g&&w(a),m[f].d()}}}function xD(n){let e,t,i,s;return e=new Ci({}),i=new cn({props:{$$slots:{default:[QD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){I(e.$$.fragment,l),I(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function eE(n,e,t){let i,s;Je(n,mt,g=>t(3,s=g)),Ht(mt,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 me.collections.getFullList(100,{$cancelKey:l}));for(let g of r)delete g.created,delete g.updated}catch(g){me.errorResponseHandler(g)}t(1,a=!1)}function f(){B.downloadJson(r,"pb_schema")}function c(){B.copyToClipboard(i),vg("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function h(g){le[g?"unshift":"push"](()=>{o=g,t(0,o)})}const m=g=>{if(g.ctrlKey&&g.code==="KeyA"){g.preventDefault();const y=window.getSelection(),k=document.createRange();k.selectNodeContents(o),y.removeAllRanges(),y.addRange(k)}},b=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,h,m,b]}class tE extends Ce{constructor(e){super(),$e(this,e,eE,xD,ke,{})}}function mh(n,e,t){const i=n.slice();return i[14]=e[t],i}function gh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function _h(n,e,t){const i=n.slice();return i[14]=e[t],i}function bh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function vh(n,e,t){const i=n.slice();return i[14]=e[t],i}function yh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function kh(n,e,t){const i=n.slice();return i[30]=e[t],i}function nE(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&wh(),a=n[0].name!==n[1].name&&Sh(n);return{c(){e=v("div"),r&&r.c(),t=O(),a&&a.c(),i=O(),s=v("strong"),o=z(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),_(e,t),a&&a.m(e,null),_(e,i),_(e,s),_(s,o)},p(u,f){u[9]?r||(r=wh(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=Sh(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&ue(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function iE(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=O(),i=v("strong"),l=z(s),p(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&ue(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function sE(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=O(),i=v("strong"),l=z(s),p(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&ue(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function wh(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Sh(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=z(t),s=O(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),_(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&ue(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function $h(n){var g,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((g=n[0])==null?void 0:g[n[30]])+"",f,c,d,h,m=n[12]((y=n[1])==null?void 0:y[n[30]])+"",b;return{c(){var k,$,C,M,T,D;e=v("tr"),t=v("td"),i=v("span"),l=z(s),o=O(),r=v("td"),a=v("pre"),f=z(u),c=O(),d=v("td"),h=v("pre"),b=z(m),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),ee(r,"changed-old-col",!n[10]&&Gt((k=n[0])==null?void 0:k[n[30]],($=n[1])==null?void 0:$[n[30]])),ee(r,"changed-none-col",n[10]),p(h,"class","txt"),p(d,"class","svelte-lmkr38"),ee(d,"changed-new-col",!n[5]&&Gt((C=n[0])==null?void 0:C[n[30]],(M=n[1])==null?void 0:M[n[30]])),ee(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),ee(e,"txt-primary",Gt((T=n[0])==null?void 0:T[n[30]],(D=n[1])==null?void 0:D[n[30]]))},m(k,$){S(k,e,$),_(e,t),_(t,i),_(i,l),_(e,o),_(e,r),_(r,a),_(a,f),_(e,c),_(e,d),_(d,h),_(h,b)},p(k,$){var C,M,T,D,A,P,L,V;$[0]&1&&u!==(u=k[12]((C=k[0])==null?void 0:C[k[30]])+"")&&ue(f,u),$[0]&3075&&ee(r,"changed-old-col",!k[10]&&Gt((M=k[0])==null?void 0:M[k[30]],(T=k[1])==null?void 0:T[k[30]])),$[0]&1024&&ee(r,"changed-none-col",k[10]),$[0]&2&&m!==(m=k[12]((D=k[1])==null?void 0:D[k[30]])+"")&&ue(b,m),$[0]&2083&&ee(d,"changed-new-col",!k[5]&&Gt((A=k[0])==null?void 0:A[k[30]],(P=k[1])==null?void 0:P[k[30]])),$[0]&32&&ee(d,"changed-none-col",k[5]),$[0]&2051&&ee(e,"txt-primary",Gt((L=k[0])==null?void 0:L[k[30]],(V=k[1])==null?void 0:V[k[30]]))},d(k){k&&w(e)}}}function Ch(n){let e,t=n[6],i=[];for(let s=0;sProps Old - New`,l=O(),o=v("tbody");for(let C=0;C!["schema","created","updated"].includes(y));function b(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(k=>y.id==k.id))))}function g(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")&&b(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(k=>y.id==k.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(k=>k.id==y.id))),n.$$.dirty[0]&24&&t(8,h=f.filter(y=>!u.find(k=>k.id==y.id))),n.$$.dirty[0]&7&&t(9,l=B.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,h,l,s,m,g]}class oE extends Ce{constructor(e){super(),$e(this,e,lE,sE,ke,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function Ih(n,e,t){const i=n.slice();return i[17]=e[t],i}function Ph(n){let e,t;return e=new oE({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){j(e.$$.fragment)},m(i,s){R(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||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function rE(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=O(),o=v("tbody");for(let C=0;C!["schema","created","updated"].includes(y));function b(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(k=>y.id==k.id))))}function g(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")&&b(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(k=>y.id==k.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(k=>k.id==y.id))),n.$$.dirty[0]&24&&t(8,h=f.filter(y=>!u.find(k=>k.id==y.id))),n.$$.dirty[0]&7&&t(9,l=B.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,h,l,s,m,g]}class rE extends Ce{constructor(e){super(),$e(this,e,oE,lE,ke,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function Ph(n,e,t){const i=n.slice();return i[17]=e[t],i}function Lh(n){let e,t;return e=new rE({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){j(e.$$.fragment)},m(i,s){R(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||(E(e.$$.fragment,i),t=!0)},o(i){I(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function aE(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{m()}):m()}async function m(){if(!u){t(4,u=!0);try{await me.collections.import(o,a),Lt("Successfully imported collections configuration."),i("submit")}catch(C){me.errorResponseHandler(C)}t(4,u=!1),c()}}const b=()=>h(),g=()=>!u;function y(C){le[C?"unshift":"push"](()=>{s=C,t(1,s)})}function k(C){Ve.call(this,n,C)}function w(C){Ve.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,h,f,l,o,b,g,y,k,w]}class dE extends Ce{constructor(e){super(),$e(this,e,cE,fE,ke,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function Lh(n,e,t){const i=n.slice();return i[32]=e[t],i}function Nh(n,e,t){const i=n.slice();return i[35]=e[t],i}function Fh(n,e,t){const i=n.slice();return i[32]=e[t],i}function pE(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,w,C,M,T,D;a=new _e({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[mE,({uniqueId:U})=>({40:U}),({uniqueId:U})=>[0,U?512:0]]},$$scope:{ctx:n}}});let A=!1,P=n[6]&&n[1].length&&!n[7]&&Hh(),L=n[6]&&n[1].length&&n[7]&&jh(n),V=n[13].length&&Gh(n),F=!!n[0]&&Xh(n);return{c(){e=v("input"),t=O(),i=v("div"),s=v("p"),l=z(`Paste below the collections configuration you want to import or - `),o=v("button"),o.innerHTML='Load from JSON file',r=O(),j(a.$$.fragment),u=O(),f=O(),P&&P.c(),c=O(),L&&L.c(),d=O(),V&&V.c(),h=O(),m=v("div"),F&&F.c(),b=O(),g=v("div"),y=O(),k=v("button"),w=v("span"),w.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"),ee(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(g,"class","flex-fill"),p(w,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(m,"class","flex m-t-base")},m(U,G){$(U,e,G),n[19](e),$(U,t,G),$(U,i,G),_(i,s),_(s,l),_(s,o),$(U,r,G),R(a,U,G),$(U,u,G),$(U,f,G),P&&P.m(U,G),$(U,c,G),L&&L.m(U,G),$(U,d,G),V&&V.m(U,G),$(U,h,G),$(U,m,G),F&&F.m(m,null),_(m,b),_(m,g),_(m,y),_(m,k),_(k,w),M=!0,T||(D=[W(e,"change",n[20]),W(o,"click",n[21]),W(k,"click",n[26])],T=!0)},p(U,G){(!M||G[0]&4096)&&ee(o,"btn-loading",U[12]);const K={};G[0]&64&&(K.class="form-field "+(U[6]?"":"field-error")),G[0]&65|G[1]&1536&&(K.$$scope={dirty:G,ctx:U}),a.$set(K),U[6]&&U[1].length&&!U[7]?P||(P=Hh(),P.c(),P.m(c.parentNode,c)):P&&(P.d(1),P=null),U[6]&&U[1].length&&U[7]?L?L.p(U,G):(L=jh(U),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),U[13].length?V?V.p(U,G):(V=Gh(U),V.c(),V.m(h.parentNode,h)):V&&(V.d(1),V=null),U[0]?F?F.p(U,G):(F=Xh(U),F.c(),F.m(m,b)):F&&(F.d(1),F=null),(!M||G[0]&16384&&C!==(C=!U[14]))&&(k.disabled=C)},i(U){M||(E(a.$$.fragment,U),E(A),M=!0)},o(U){I(a.$$.fragment,U),I(A),M=!1},d(U){U&&S(e),n[19](null),U&&S(t),U&&S(i),U&&S(r),H(a,U),U&&S(u),U&&S(f),P&&P.d(U),U&&S(c),L&&L.d(U),U&&S(d),V&&V.d(U),U&&S(h),U&&S(m),F&&F.d(),T=!1,Re(D)}}}function hE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){$(t,e,i)},p:x,i:x,o:x,d(t){t&&S(e)}}}function Rh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function mE(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&Rh();return{c(){e=v("label"),t=z("Collections"),s=O(),l=v("textarea"),r=O(),c&&c.c(),a=Fe(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,h){$(d,e,h),_(e,t),$(d,s,h),$(d,l,h),pe(l,n[0]),$(d,r,h),c&&c.m(d,h),$(d,a,h),u||(f=W(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&pe(l,d[0]),!!d[0]&&!d[6]?c||(c=Rh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&S(e),d&&S(s),d&&S(l),d&&S(r),c&&c.d(d),d&&S(a),u=!1,f()}}}function Hh(n){let e;return{c(){e=v("div"),e.innerHTML=`
    -
    Your collections configuration is already up-to-date!
    `,p(e,"class","alert alert-info")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function jh(n){let e,t,i,s,l,o=n[9].length&&qh(n),r=n[4].length&&Bh(n),a=n[8].length&&Kh(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=O(),i=v("div"),o&&o.c(),s=O(),r&&r.c(),l=O(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){$(u,e,f),$(u,t,f),$(u,i,f),o&&o.m(i,null),_(i,s),r&&r.m(i,null),_(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=qh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=Bh(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=Kh(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&S(e),u&&S(t),u&&S(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function qh(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=O(),s=v("div"),s.innerHTML=`Some of the imported collections shares the same name and/or fields but are +- `)}`,()=>{m()}):m()}async function m(){if(!u){t(4,u=!0);try{await me.collections.import(o,a),Lt("Successfully imported collections configuration."),i("submit")}catch(C){me.errorResponseHandler(C)}t(4,u=!1),c()}}const b=()=>h(),g=()=>!u;function y(C){le[C?"unshift":"push"](()=>{s=C,t(1,s)})}function k(C){Ve.call(this,n,C)}function $(C){Ve.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,h,f,l,o,b,g,y,k,$]}class pE extends Ce{constructor(e){super(),$e(this,e,dE,cE,ke,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function Nh(n,e,t){const i=n.slice();return i[32]=e[t],i}function Fh(n,e,t){const i=n.slice();return i[35]=e[t],i}function Rh(n,e,t){const i=n.slice();return i[32]=e[t],i}function hE(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D;a=new _e({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[gE,({uniqueId:U})=>({40:U}),({uniqueId:U})=>[0,U?512:0]]},$$scope:{ctx:n}}});let A=!1,P=n[6]&&n[1].length&&!n[7]&&jh(),L=n[6]&&n[1].length&&n[7]&&qh(n),V=n[13].length&&Xh(n),F=!!n[0]&&Qh(n);return{c(){e=v("input"),t=O(),i=v("div"),s=v("p"),l=z(`Paste below the collections configuration you want to import or + `),o=v("button"),o.innerHTML='Load from JSON file',r=O(),j(a.$$.fragment),u=O(),f=O(),P&&P.c(),c=O(),L&&L.c(),d=O(),V&&V.c(),h=O(),m=v("div"),F&&F.c(),b=O(),g=v("div"),y=O(),k=v("button"),$=v("span"),$.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),ee(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(g,"class","flex-fill"),p($,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(m,"class","flex m-t-base")},m(U,G){S(U,e,G),n[19](e),S(U,t,G),S(U,i,G),_(i,s),_(s,l),_(s,o),S(U,r,G),R(a,U,G),S(U,u,G),S(U,f,G),P&&P.m(U,G),S(U,c,G),L&&L.m(U,G),S(U,d,G),V&&V.m(U,G),S(U,h,G),S(U,m,G),F&&F.m(m,null),_(m,b),_(m,g),_(m,y),_(m,k),_(k,$),M=!0,T||(D=[W(e,"change",n[20]),W(o,"click",n[21]),W(k,"click",n[26])],T=!0)},p(U,G){(!M||G[0]&4096)&&ee(o,"btn-loading",U[12]);const K={};G[0]&64&&(K.class="form-field "+(U[6]?"":"field-error")),G[0]&65|G[1]&1536&&(K.$$scope={dirty:G,ctx:U}),a.$set(K),U[6]&&U[1].length&&!U[7]?P||(P=jh(),P.c(),P.m(c.parentNode,c)):P&&(P.d(1),P=null),U[6]&&U[1].length&&U[7]?L?L.p(U,G):(L=qh(U),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),U[13].length?V?V.p(U,G):(V=Xh(U),V.c(),V.m(h.parentNode,h)):V&&(V.d(1),V=null),U[0]?F?F.p(U,G):(F=Qh(U),F.c(),F.m(m,b)):F&&(F.d(1),F=null),(!M||G[0]&16384&&C!==(C=!U[14]))&&(k.disabled=C)},i(U){M||(E(a.$$.fragment,U),E(A),M=!0)},o(U){I(a.$$.fragment,U),I(A),M=!1},d(U){U&&w(e),n[19](null),U&&w(t),U&&w(i),U&&w(r),H(a,U),U&&w(u),U&&w(f),P&&P.d(U),U&&w(c),L&&L.d(U),U&&w(d),V&&V.d(U),U&&w(h),U&&w(m),F&&F.d(),T=!1,Re(D)}}}function mE(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:x,i:x,o:x,d(t){t&&w(e)}}}function Hh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function gE(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&Hh();return{c(){e=v("label"),t=z("Collections"),s=O(),l=v("textarea"),r=O(),c&&c.c(),a=Fe(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,h){S(d,e,h),_(e,t),S(d,s,h),S(d,l,h),pe(l,n[0]),S(d,r,h),c&&c.m(d,h),S(d,a,h),u||(f=W(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&pe(l,d[0]),!!d[0]&&!d[6]?c||(c=Hh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function jh(n){let e;return{c(){e=v("div"),e.innerHTML=`
    +
    Your collections configuration is already up-to-date!
    `,p(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function qh(n){let e,t,i,s,l,o=n[9].length&&Vh(n),r=n[4].length&&Uh(n),a=n[8].length&&Jh(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=O(),i=v("div"),o&&o.c(),s=O(),r&&r.c(),l=O(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),_(i,s),r&&r.m(i,null),_(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=Vh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=Uh(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=Jh(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function Vh(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=O(),s=v("div"),s.innerHTML=`Some of the imported collections shares the same name and/or fields but are imported with different IDs. You can replace them in the import if you want - to.`,l=O(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){$(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=W(o,"click",n[24]),r=!0)},p:x,d(u){u&&S(e),r=!1,a()}}}function Xh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){$(s,e,l),t||(i=W(e,"click",n[25]),t=!0)},p:x,d(s){s&&S(e),t=!1,i()}}}function gE(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[hE,pE],m=[];function b(g,y){return g[5]?0:1}return f=b(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[15]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(g,y){$(g,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),$(g,r,y),$(g,a,y),_(a,u),m[f].m(u,null),d=!0},p(g,y){(!d||y[0]&32768)&&ue(o,g[15]);let k=f;f=b(g),f===k?m[f].p(g,y):(be(),I(m[k],1,1,()=>{m[k]=null}),ve(),c=m[f],c?c.p(g,y):(c=m[f]=h[f](g),c.c()),E(c,1),c.m(u,null))},i(g){d||(E(c),d=!0)},o(g){I(c),d=!1},d(g){g&&S(e),g&&S(r),g&&S(a),m[f].d()}}}function _E(n){let e,t,i,s,l,o;e=new Ci({}),i=new cn({props:{$$slots:{default:[gE]},$$scope:{ctx:n}}});let r={};return l=new dE({props:r}),n[27](l),l.$on("submit",n[28]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),$(a,t,u),R(i,a,u),$(a,s,u),R(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&S(t),H(i,a),a&&S(s),n[27](null),H(l,a)}}}function bE(n,e,t){let i,s,l,o,r,a,u;Je(n,mt,J=>t(15,u=J)),Ht(mt,u="Import collections",u);let f,c,d="",h=!1,m=[],b=[],g=!0,y=[],k=!1;w();async function w(){t(5,k=!0);try{t(2,b=await me.collections.getFullList(200));for(let J of b)delete J.created,delete J.updated}catch(J){me.errorResponseHandler(J)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let J of m){const fe=B.findByKey(b,"id",J.id);!(fe!=null&&fe.id)||!B.hasCollectionChanges(fe,J,g)||y.push({new:J,old:fe})}}function M(){t(1,m=[]);try{t(1,m=JSON.parse(d))}catch{}Array.isArray(m)?t(1,m=B.filterDuplicatesByKey(m)):t(1,m=[]);for(let J of m)delete J.created,delete J.updated,J.schema=B.filterDuplicatesByKey(J.schema)}function T(){var J,fe;for(let Y of m){const re=B.findByKey(b,"name",Y.name)||B.findByKey(b,"id",Y.id);if(!re)continue;const Oe=Y.id,ge=re.id;Y.id=ge;const ae=Array.isArray(re.schema)?re.schema:[],he=Array.isArray(Y.schema)?Y.schema:[];for(const de of he){const Se=B.findByKey(ae,"name",de.name);Se&&Se.id&&(de.id=Se.id)}for(let de of m)if(!!Array.isArray(de.schema))for(let Se of de.schema)((J=Se.options)==null?void 0:J.collectionId)&&((fe=Se.options)==null?void 0:fe.collectionId)===Oe&&(Se.options.collectionId=ge)}t(0,d=JSON.stringify(m,null,4))}function D(J){t(12,h=!0);const fe=new FileReader;fe.onload=async Y=>{t(12,h=!1),t(10,f.value="",f),t(0,d=Y.target.result),await $n(),m.length||(rl("Invalid collections configuration."),A())},fe.onerror=Y=>{console.warn(Y),rl("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},fe.readAsText(J)}function A(){t(0,d=""),t(10,f.value="",f),Fn({})}function P(J){le[J?"unshift":"push"](()=>{f=J,t(10,f)})}const L=()=>{f.files.length&&D(f.files[0])},V=()=>{f.click()};function F(){d=this.value,t(0,d)}function U(){g=this.checked,t(3,g)}const G=()=>T(),K=()=>A(),X=()=>c==null?void 0:c.show(b,m,g);function Z(J){le[J?"unshift":"push"](()=>{c=J,t(11,c)})}const ie=()=>A();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&m.length&&m.length===m.filter(J=>!!J.id&&!!J.name).length),n.$$.dirty[0]&78&&t(9,s=b.filter(J=>i&&g&&!B.findByKey(m,"id",J.id))),n.$$.dirty[0]&70&&t(8,l=m.filter(J=>i&&!B.findByKey(b,"id",J.id))),n.$$.dirty[0]&10&&(typeof m<"u"||typeof g<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=m.filter(J=>{let fe=B.findByKey(b,"name",J.name)||B.findByKey(b,"id",J.id);if(!fe)return!1;if(fe.id!=J.id)return!0;const Y=Array.isArray(fe.schema)?fe.schema:[],re=Array.isArray(J.schema)?J.schema:[];for(const Oe of re){if(B.findByKey(Y,"id",Oe.id))continue;const ae=B.findByKey(Y,"name",Oe.name);if(ae&&Oe.id!=ae.id)return!0}return!1}))},[d,m,b,g,y,k,i,o,l,s,f,c,h,a,r,u,T,D,A,P,L,V,F,U,G,K,X,Z,ie]}class vE extends Ce{constructor(e){super(),$e(this,e,bE,_E,ke,{},null,[-1,-1])}}const Ct=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ki("/"):!0}],yE={"/login":vt({component:gO,conditions:Ct.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":vt({asyncComponent:()=>st(()=>import("./PageAdminRequestPasswordReset.d9c4c816.js"),[],import.meta.url),conditions:Ct.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageAdminConfirmPasswordReset.ad1b2398.js"),[],import.meta.url),conditions:Ct.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":vt({component:qT,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":vt({component:vS,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":vt({component:MO,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":vt({component:fO,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":vt({component:uD,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":vt({component:CD,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":vt({component:VD,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":vt({component:JD,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":vt({component:eE,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":vt({component:vE,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.1076ce6b.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.1076ce6b.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.ee437942.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.ee437942.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.045ac88a.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.045ac88a.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"*":vt({component:V1,userData:{showAppSidebar:!1}})};function kE(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=Vo}=i;return{delay:f,duration:Wt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,m)=>{const b=m*a,g=m*u,y=h+m*e.width/t.width,k=h+m*e.height/t.height;return`transform: ${l} translate(${b}px, ${g}px) scale(${y}, ${k});`}}}function Qh(n,e,t){const i=n.slice();return i[2]=e[t],i}function wE(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function SE(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function $E(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function CE(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){$(t,e,i)},d(t){t&&S(e)}}}function xh(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,h=x,m,b,g;function y(M,T){return M[2].type==="info"?CE:M[2].type==="success"?$E:M[2].type==="warning"?SE:wE}let k=y(e),w=k(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),w.c(),s=O(),l=v("div"),r=z(o),a=O(),u=v("button"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),ee(t,"alert-info",e[2].type=="info"),ee(t,"alert-success",e[2].type=="success"),ee(t,"alert-danger",e[2].type=="error"),ee(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,T){$(M,t,T),_(t,i),w.m(i,null),_(t,s),_(t,l),_(l,r),_(t,a),_(t,u),_(t,f),m=!0,b||(g=W(u,"click",ut(C)),b=!0)},p(M,T){e=M,k!==(k=y(e))&&(w.d(1),w=k(e),w&&(w.c(),w.m(i,null))),(!m||T&1)&&o!==(o=e[2].message+"")&&ue(r,o),(!m||T&1)&&ee(t,"alert-info",e[2].type=="info"),(!m||T&1)&&ee(t,"alert-success",e[2].type=="success"),(!m||T&1)&&ee(t,"alert-danger",e[2].type=="error"),(!m||T&1)&&ee(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){Z_(t),h(),am(t,d)},a(){h(),h=J_(t,d,kE,{duration:150})},i(M){m||(Qe(()=>{c||(c=je(t,bo,{duration:150},!0)),c.run(1)}),m=!0)},o(M){c||(c=je(t,bo,{duration:150},!1)),c.run(0),m=!1},d(M){M&&S(t),w.d(),M&&c&&c.end(),b=!1,g()}}}function ME(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=>vg(l)]}class OE extends Ce{constructor(e){super(),$e(this,e,TE,ME,ke,{})}}function DE(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=z(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){$(l,e,o),_(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&ue(i,t)},d(l){l&&S(e)}}}function EE(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=O(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],ee(s,"btn-loading",n[2])},m(a,u){$(a,e,u),_(e,t),$(a,i,u),$(a,s,u),_(s,l),e.focus(),o||(r=[W(e,"click",n[4]),W(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&ee(s,"btn-loading",a[2])},d(a){a&&S(e),a&&S(i),a&&S(s),o=!1,Re(r)}}}function AE(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:[EE],header:[DE]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function IE(n,e,t){let i;Je(n,Ya,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){le[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i==null?void 0:i.noCallback)&&i.noCallback(),await $n(),t(3,o=!1),S_()};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 PE extends Ce{constructor(e){super(),$e(this,e,IE,AE,ke,{})}}function em(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k;return b=new Zn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[LE]},$$scope:{ctx:n}}}),{c(){var w;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=O(),s=v("nav"),l=v("a"),l.innerHTML='',o=O(),r=v("a"),r.innerHTML='',a=O(),u=v("a"),u.innerHTML='',f=O(),c=v("figure"),d=v("img"),m=O(),j(b.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),Ln(d.src,h="./images/avatars/avatar"+(((w=n[0])==null?void 0:w.avatar)||0)+".svg")||p(d,"src",h),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m(w,C){$(w,e,C),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(e,f),_(e,c),_(c,d),_(c,m),R(b,c,null),g=!0,y||(k=[Le(zt.call(null,t)),Le(zt.call(null,l)),Le(On.call(null,l,{path:"/collections/?.*",className:"current-route"})),Le(Be.call(null,l,{text:"Collections",position:"right"})),Le(zt.call(null,r)),Le(On.call(null,r,{path:"/logs/?.*",className:"current-route"})),Le(Be.call(null,r,{text:"Logs",position:"right"})),Le(zt.call(null,u)),Le(On.call(null,u,{path:"/settings/?.*",className:"current-route"})),Le(Be.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p(w,C){var T;(!g||C&1&&!Ln(d.src,h="./images/avatars/avatar"+(((T=w[0])==null?void 0:T.avatar)||0)+".svg"))&&p(d,"src",h);const M={};C&1024&&(M.$$scope={dirty:C,ctx:w}),b.$set(M)},i(w){g||(E(b.$$.fragment,w),g=!0)},o(w){I(b.$$.fragment,w),g=!1},d(w){w&&S(e),H(b),y=!1,Re(k)}}}function LE(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` + to.
    `,l=O(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=W(o,"click",n[24]),r=!0)},p:x,d(u){u&&w(e),r=!1,a()}}}function Qh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){S(s,e,l),t||(i=W(e,"click",n[25]),t=!0)},p:x,d(s){s&&w(e),t=!1,i()}}}function _E(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[mE,hE],m=[];function b(g,y){return g[5]?0:1}return f=b(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=z(n[15]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(g,r,y),S(g,a,y),_(a,u),m[f].m(u,null),d=!0},p(g,y){(!d||y[0]&32768)&&ue(o,g[15]);let k=f;f=b(g),f===k?m[f].p(g,y):(be(),I(m[k],1,1,()=>{m[k]=null}),ve(),c=m[f],c?c.p(g,y):(c=m[f]=h[f](g),c.c()),E(c,1),c.m(u,null))},i(g){d||(E(c),d=!0)},o(g){I(c),d=!1},d(g){g&&w(e),g&&w(r),g&&w(a),m[f].d()}}}function bE(n){let e,t,i,s,l,o;e=new Ci({}),i=new cn({props:{$$slots:{default:[_E]},$$scope:{ctx:n}}});let r={};return l=new pE({props:r}),n[27](l),l.$on("submit",n[28]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){I(e.$$.fragment,a),I(i.$$.fragment,a),I(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[27](null),H(l,a)}}}function vE(n,e,t){let i,s,l,o,r,a,u;Je(n,mt,J=>t(15,u=J)),Ht(mt,u="Import collections",u);let f,c,d="",h=!1,m=[],b=[],g=!0,y=[],k=!1;$();async function $(){t(5,k=!0);try{t(2,b=await me.collections.getFullList(200));for(let J of b)delete J.created,delete J.updated}catch(J){me.errorResponseHandler(J)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let J of m){const fe=B.findByKey(b,"id",J.id);!(fe!=null&&fe.id)||!B.hasCollectionChanges(fe,J,g)||y.push({new:J,old:fe})}}function M(){t(1,m=[]);try{t(1,m=JSON.parse(d))}catch{}Array.isArray(m)?t(1,m=B.filterDuplicatesByKey(m)):t(1,m=[]);for(let J of m)delete J.created,delete J.updated,J.schema=B.filterDuplicatesByKey(J.schema)}function T(){var J,fe;for(let Y of m){const re=B.findByKey(b,"name",Y.name)||B.findByKey(b,"id",Y.id);if(!re)continue;const Oe=Y.id,ge=re.id;Y.id=ge;const ae=Array.isArray(re.schema)?re.schema:[],he=Array.isArray(Y.schema)?Y.schema:[];for(const de of he){const Se=B.findByKey(ae,"name",de.name);Se&&Se.id&&(de.id=Se.id)}for(let de of m)if(!!Array.isArray(de.schema))for(let Se of de.schema)((J=Se.options)==null?void 0:J.collectionId)&&((fe=Se.options)==null?void 0:fe.collectionId)===Oe&&(Se.options.collectionId=ge)}t(0,d=JSON.stringify(m,null,4))}function D(J){t(12,h=!0);const fe=new FileReader;fe.onload=async Y=>{t(12,h=!1),t(10,f.value="",f),t(0,d=Y.target.result),await $n(),m.length||(rl("Invalid collections configuration."),A())},fe.onerror=Y=>{console.warn(Y),rl("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},fe.readAsText(J)}function A(){t(0,d=""),t(10,f.value="",f),Fn({})}function P(J){le[J?"unshift":"push"](()=>{f=J,t(10,f)})}const L=()=>{f.files.length&&D(f.files[0])},V=()=>{f.click()};function F(){d=this.value,t(0,d)}function U(){g=this.checked,t(3,g)}const G=()=>T(),K=()=>A(),X=()=>c==null?void 0:c.show(b,m,g);function Z(J){le[J?"unshift":"push"](()=>{c=J,t(11,c)})}const ie=()=>A();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&m.length&&m.length===m.filter(J=>!!J.id&&!!J.name).length),n.$$.dirty[0]&78&&t(9,s=b.filter(J=>i&&g&&!B.findByKey(m,"id",J.id))),n.$$.dirty[0]&70&&t(8,l=m.filter(J=>i&&!B.findByKey(b,"id",J.id))),n.$$.dirty[0]&10&&(typeof m<"u"||typeof g<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=m.filter(J=>{let fe=B.findByKey(b,"name",J.name)||B.findByKey(b,"id",J.id);if(!fe)return!1;if(fe.id!=J.id)return!0;const Y=Array.isArray(fe.schema)?fe.schema:[],re=Array.isArray(J.schema)?J.schema:[];for(const Oe of re){if(B.findByKey(Y,"id",Oe.id))continue;const ae=B.findByKey(Y,"name",Oe.name);if(ae&&Oe.id!=ae.id)return!0}return!1}))},[d,m,b,g,y,k,i,o,l,s,f,c,h,a,r,u,T,D,A,P,L,V,F,U,G,K,X,Z,ie]}class yE extends Ce{constructor(e){super(),$e(this,e,vE,bE,ke,{},null,[-1,-1])}}const Ct=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ki("/"):!0}],kE={"/login":vt({component:_O,conditions:Ct.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":vt({asyncComponent:()=>st(()=>import("./PageAdminRequestPasswordReset.af860e10.js"),[],import.meta.url),conditions:Ct.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageAdminConfirmPasswordReset.8f2dede8.js"),[],import.meta.url),conditions:Ct.concat([n=>!me.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":vt({component:VT,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":vt({component:yS,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":vt({component:TO,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":vt({component:cO,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":vt({component:fD,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":vt({component:MD,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":vt({component:zD,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":vt({component:ZD,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":vt({component:tE,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":vt({component:yE,conditions:Ct.concat([n=>me.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.165f459d.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.165f459d.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.11900417.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.11900417.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.bea8ee64.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.bea8ee64.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"*":vt({component:z1,userData:{showAppSidebar:!1}})};function wE(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=Vo}=i;return{delay:f,duration:Wt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,m)=>{const b=m*a,g=m*u,y=h+m*e.width/t.width,k=h+m*e.height/t.height;return`transform: ${l} translate(${b}px, ${g}px) scale(${y}, ${k});`}}}function xh(n,e,t){const i=n.slice();return i[2]=e[t],i}function SE(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function $E(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function CE(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ME(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function em(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,h=x,m,b,g;function y(M,T){return M[2].type==="info"?ME:M[2].type==="success"?CE:M[2].type==="warning"?$E:SE}let k=y(e),$=k(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),$.c(),s=O(),l=v("div"),r=z(o),a=O(),u=v("button"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),ee(t,"alert-info",e[2].type=="info"),ee(t,"alert-success",e[2].type=="success"),ee(t,"alert-danger",e[2].type=="error"),ee(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,T){S(M,t,T),_(t,i),$.m(i,null),_(t,s),_(t,l),_(l,r),_(t,a),_(t,u),_(t,f),m=!0,b||(g=W(u,"click",ut(C)),b=!0)},p(M,T){e=M,k!==(k=y(e))&&($.d(1),$=k(e),$&&($.c(),$.m(i,null))),(!m||T&1)&&o!==(o=e[2].message+"")&&ue(r,o),(!m||T&1)&&ee(t,"alert-info",e[2].type=="info"),(!m||T&1)&&ee(t,"alert-success",e[2].type=="success"),(!m||T&1)&&ee(t,"alert-danger",e[2].type=="error"),(!m||T&1)&&ee(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){G_(t),h(),um(t,d)},a(){h(),h=Z_(t,d,wE,{duration:150})},i(M){m||(Qe(()=>{c||(c=je(t,bo,{duration:150},!0)),c.run(1)}),m=!0)},o(M){c||(c=je(t,bo,{duration:150},!1)),c.run(0),m=!1},d(M){M&&w(t),$.d(),M&&c&&c.end(),b=!1,g()}}}function TE(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=>yg(l)]}class DE extends Ce{constructor(e){super(),$e(this,e,OE,TE,ke,{})}}function EE(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=z(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){S(l,e,o),_(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&ue(i,t)},d(l){l&&w(e)}}}function AE(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=O(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],ee(s,"btn-loading",n[2])},m(a,u){S(a,e,u),_(e,t),S(a,i,u),S(a,s,u),_(s,l),e.focus(),o||(r=[W(e,"click",n[4]),W(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&ee(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Re(r)}}}function IE(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:[AE],header:[EE]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){I(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function PE(n,e,t){let i;Je(n,Ya,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){le[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i==null?void 0:i.noCallback)&&i.noCallback(),await $n(),t(3,o=!1),$_()};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 LE extends Ce{constructor(e){super(),$e(this,e,PE,IE,ke,{})}}function tm(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k;return b=new Zn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[NE]},$$scope:{ctx:n}}}),{c(){var $;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=O(),s=v("nav"),l=v("a"),l.innerHTML='',o=O(),r=v("a"),r.innerHTML='',a=O(),u=v("a"),u.innerHTML='',f=O(),c=v("figure"),d=v("img"),m=O(),j(b.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),Ln(d.src,h="./images/avatars/avatar"+((($=n[0])==null?void 0:$.avatar)||0)+".svg")||p(d,"src",h),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m($,C){S($,e,C),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(e,f),_(e,c),_(c,d),_(c,m),R(b,c,null),g=!0,y||(k=[Le(zt.call(null,t)),Le(zt.call(null,l)),Le(On.call(null,l,{path:"/collections/?.*",className:"current-route"})),Le(Be.call(null,l,{text:"Collections",position:"right"})),Le(zt.call(null,r)),Le(On.call(null,r,{path:"/logs/?.*",className:"current-route"})),Le(Be.call(null,r,{text:"Logs",position:"right"})),Le(zt.call(null,u)),Le(On.call(null,u,{path:"/settings/?.*",className:"current-route"})),Le(Be.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p($,C){var T;(!g||C&1&&!Ln(d.src,h="./images/avatars/avatar"+(((T=$[0])==null?void 0:T.avatar)||0)+".svg"))&&p(d,"src",h);const M={};C&1024&&(M.$$scope={dirty:C,ctx:$}),b.$set(M)},i($){g||(E(b.$$.fragment,$),g=!0)},o($){I(b.$$.fragment,$),g=!1},d($){$&&w(e),H(b),y=!1,Re(k)}}}function NE(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` Manage admins`,t=O(),i=v("hr"),s=O(),l=v("button"),l.innerHTML=` - Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){$(a,e,u),$(a,t,u),$(a,i,u),$(a,s,u),$(a,l,u),o||(r=[Le(zt.call(null,e)),W(l,"click",n[6])],o=!0)},p:x,d(a){a&&S(e),a&&S(t),a&&S(i),a&&S(s),a&&S(l),o=!1,Re(r)}}}function NE(n){var h;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=B.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((h=n[0])==null?void 0:h.id)&&n[1]&&em(n);return o=new a0({props:{routes:yE}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new OE({}),f=new PE({}),{c(){t=O(),i=v("div"),d&&d.c(),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(m,b){$(m,t,b),$(m,i,b),d&&d.m(i,null),_(i,s),_(i,l),R(o,l,null),_(l,r),R(a,l,null),$(m,u,b),R(f,m,b),c=!0},p(m,[b]){var g;(!c||b&12)&&e!==(e=B.joinNonEmpty([m[3],m[2],"PocketBase"]," - "))&&(document.title=e),((g=m[0])==null?void 0:g.id)&&m[1]?d?(d.p(m,b),b&3&&E(d,1)):(d=em(m),d.c(),E(d,1),d.m(i,s)):d&&(be(),I(d,1,1,()=>{d=null}),ve())},i(m){c||(E(d),E(o.$$.fragment,m),E(a.$$.fragment,m),E(f.$$.fragment,m),c=!0)},o(m){I(d),I(o.$$.fragment,m),I(a.$$.fragment,m),I(f.$$.fragment,m),c=!1},d(m){m&&S(t),m&&S(i),d&&d.d(),H(o),H(a),m&&S(u),H(f,m)}}}function FE(n,e,t){let i,s,l,o;Je(n,ks,h=>t(8,i=h)),Je(n,_o,h=>t(2,s=h)),Je(n,ya,h=>t(0,l=h)),Je(n,mt,h=>t(3,o=h));let r,a=!1;function u(h){var m,b,g,y;((m=h==null?void 0:h.detail)==null?void 0:m.location)!==r&&(t(1,a=!!((g=(b=h==null?void 0:h.detail)==null?void 0:b.userData)!=null&&g.showAppSidebar)),r=(y=h==null?void 0:h.detail)==null?void 0:y.location,Ht(mt,o="",o),Fn({}),S_())}function f(){ki("/")}async function c(){var h,m;if(!!(l!=null&&l.id))try{const b=await me.settings.getAll({$cancelKey:"initialAppSettings"});Ht(_o,s=((h=b==null?void 0:b.meta)==null?void 0:h.appName)||"",s),Ht(ks,i=!!((m=b==null?void 0:b.meta)!=null&&m.hideControls),i)}catch(b){console.warn("Failed to load app settings.",b)}}function d(){me.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class RE extends Ce{constructor(e){super(),$e(this,e,FE,NE,ke,{})}}new RE({target:document.getElementById("app")});export{Re as A,Lt as B,B as C,ki as D,Fe as E,kg as F,fa as G,ru as H,Je as I,Zi as J,It as K,Pn as L,un as M,le as N,k_ as O,bt as P,Gi as Q,xt as R,Ce as S,Qa as T,I as a,O as b,j as c,H as d,v as e,p as f,$ as g,_ as h,$e as i,Le as j,be as k,zt as l,R as m,ve as n,S as o,me as p,_e as q,ee as r,ke as s,E as t,W as u,ut as v,z as w,ue as x,x as y,pe as z}; + Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Le(zt.call(null,e)),W(l,"click",n[6])],o=!0)},p:x,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Re(r)}}}function FE(n){var h;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=B.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((h=n[0])==null?void 0:h.id)&&n[1]&&tm(n);return o=new u0({props:{routes:kE}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new DE({}),f=new LE({}),{c(){t=O(),i=v("div"),d&&d.c(),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(m,b){S(m,t,b),S(m,i,b),d&&d.m(i,null),_(i,s),_(i,l),R(o,l,null),_(l,r),R(a,l,null),S(m,u,b),R(f,m,b),c=!0},p(m,[b]){var g;(!c||b&12)&&e!==(e=B.joinNonEmpty([m[3],m[2],"PocketBase"]," - "))&&(document.title=e),((g=m[0])==null?void 0:g.id)&&m[1]?d?(d.p(m,b),b&3&&E(d,1)):(d=tm(m),d.c(),E(d,1),d.m(i,s)):d&&(be(),I(d,1,1,()=>{d=null}),ve())},i(m){c||(E(d),E(o.$$.fragment,m),E(a.$$.fragment,m),E(f.$$.fragment,m),c=!0)},o(m){I(d),I(o.$$.fragment,m),I(a.$$.fragment,m),I(f.$$.fragment,m),c=!1},d(m){m&&w(t),m&&w(i),d&&d.d(),H(o),H(a),m&&w(u),H(f,m)}}}function RE(n,e,t){let i,s,l,o;Je(n,ks,h=>t(8,i=h)),Je(n,_o,h=>t(2,s=h)),Je(n,ya,h=>t(0,l=h)),Je(n,mt,h=>t(3,o=h));let r,a=!1;function u(h){var m,b,g,y;((m=h==null?void 0:h.detail)==null?void 0:m.location)!==r&&(t(1,a=!!((g=(b=h==null?void 0:h.detail)==null?void 0:b.userData)!=null&&g.showAppSidebar)),r=(y=h==null?void 0:h.detail)==null?void 0:y.location,Ht(mt,o="",o),Fn({}),$_())}function f(){ki("/")}async function c(){var h,m;if(!!(l!=null&&l.id))try{const b=await me.settings.getAll({$cancelKey:"initialAppSettings"});Ht(_o,s=((h=b==null?void 0:b.meta)==null?void 0:h.appName)||"",s),Ht(ks,i=!!((m=b==null?void 0:b.meta)!=null&&m.hideControls),i)}catch(b){console.warn("Failed to load app settings.",b)}}function d(){me.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class HE extends Ce{constructor(e){super(),$e(this,e,RE,FE,ke,{})}}new HE({target:document.getElementById("app")});export{Re as A,Lt as B,B as C,ki as D,Fe as E,wg as F,fa as G,ru as H,Je as I,Zi as J,It as K,Pn as L,un as M,le as N,w_ as O,bt as P,Gi as Q,xt as R,Ce as S,Qa as T,I as a,O as b,j as c,H as d,v as e,p as f,S as g,_ as h,$e as i,Le as j,be as k,zt as l,R as m,ve as n,w as o,me as p,_e as q,ee as r,ke as s,E as t,W as u,ut as v,z as w,ue as x,x as y,pe as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 8c05be38..f71ba398 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -24,7 +24,7 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - + diff --git a/ui/src/components/collections/CollectionDocsPanel.svelte b/ui/src/components/collections/CollectionDocsPanel.svelte index 966d0cb8..32293009 100644 --- a/ui/src/components/collections/CollectionDocsPanel.svelte +++ b/ui/src/components/collections/CollectionDocsPanel.svelte @@ -123,7 +123,12 @@